()
| 2456 | |
| 2457 | |
| 2458 | def main(): |
| 2459 | # This pattern allows for two modes of use: |
| 2460 | # - manual loading using `source gdb-arrow.py`: current_objfile() |
| 2461 | # will be None; |
| 2462 | # - automatic loading from the GDB `scripts-directory`: current_objfile() |
| 2463 | # will be tied to the inferior being debugged. |
| 2464 | objfile = gdb.current_objfile() |
| 2465 | if objfile is None: |
| 2466 | objfile = gdb |
| 2467 | |
| 2468 | objfile.pretty_printers.append(arrow_pretty_print) |
| 2469 | |
| 2470 | |
| 2471 | if __name__ == '__main__': |