(self, args: List)
| 9242 | _example_ = "p $_base(\\\"/usr/lib/ld-2.33.so\\\")" |
| 9243 | |
| 9244 | def do_invoke(self, args: List) -> int: |
| 9245 | addr = 0 |
| 9246 | try: |
| 9247 | name = args[0].string() |
| 9248 | except IndexError: |
| 9249 | name = gef.session.file.name |
| 9250 | except gdb.error: |
| 9251 | err(f"Invalid arg: {args[0]}") |
| 9252 | return 0 |
| 9253 | |
| 9254 | try: |
| 9255 | base = get_section_base_address(name) |
| 9256 | if base: |
| 9257 | addr = int(base) |
| 9258 | except TypeError: |
| 9259 | err(f"Cannot find section {name}") |
| 9260 | return 0 |
| 9261 | return addr |
| 9262 | |
| 9263 | |
| 9264 | @register |
nothing calls this directly
no test coverage detected