summaryrefslogtreecommitdiff
path: root/gdb/gdb-gdb.py.in
Commit message (Collapse)AuthorAgeFilesLines
* Format gdb-gdb.py.in with autopep8Simon Marchi2018-06-271-3/+21
| | | | | | | | Format using "autopep8 -i". gdb/ChangeLog: * gdb-gdb.py.in: Format using autopep8.
* Add pretty-printer for CORE_ADDRSimon Marchi2018-06-271-0/+13
| | | | | | | | | Add a pretty-printer that prints CORE_ADDR values in hex. gdb/ChangeLog: * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class. (type_lookup_function): Recognize CORE_ADDR values.
* gdb-gdb.py.in: Don't print value's tag_nameSimon Marchi2018-06-271-1/+0
| | | | | | | | | This has been removed recently. gdb/ChangeLog: * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't print tag_name.
* gdb-gdb.py.in: Fix ordering of TypeFlags objects with Python 3Simon Marchi2018-06-271-2/+4
| | | | | | | | | | | | | Python 3 doesn't use __cmp__ to order objects, it uses __lt__. Because of this, we get this exception when trying to pretty-print "type" objects: I tested it with Python 2.7 as well. gdb/ChangeLog: * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove. <__lt__>: Add.
* Copy gdb-gdb.py to build dirSimon Marchi2018-06-271-0/+252
I have thought for a long time how nice it would be to have cool pretty printers for GDB's internal types. Well, turns out there are few already in gdb-gdb.py! Unfortunately, if you build GDB outside of the source directory, that file never gets loaded. top-gdb will look for a file called ../path/to/build/gdb/gdb-gdb.py but that file is in the source directory at ../path/to/src/gdb/gdb-gdb.py This patch makes it so we copy it to the build directory, just like we do for gdb-gdb.gdb. With this, I can at least see the file getting automatically loaded: (top-gdb) info pretty-printer global pretty-printers: builtin mpx_bound128 objfile /home/emaisin/build/binutils-gdb/gdb/gdb pretty-printers: type_lookup_function I noticed that running "make" didn't re-generate gdb-gdb.py from gdb-gdb.py.in. That's because it's copied when running the configure script and that's it. I added a rule in the Makefile for that (and for gdb-gdb.gdb too) and added them as a dependency to the "all" target. gdb/ChangeLog: * gdb-gdb.py: Move to... * gdb-gdb.py.in: ... here. * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py. * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as dependencies. (distclean): Remove gdb-gdb.py when cleaning. (gdb-gdb.py, gdb-gdb.gdb): New rules. * configure: Re-generate.