An indefinite hash map holds accesses to its key and value. As these
are introduced by the map itself, it makes sense to automatically
dereference them.
TN: V518-039
Change-Id: I91412189d6c274eb3030355886d0bf8141cb07e4
It seems that with recent GNAT versions, there is no longer a typedef
type layer around the table array type, so remove the corresponding
matcher layer.
TN: V605-001
Change-Id: I3c45ba2910a7a604042108ec0daf673f1361c7bc
Right now, gnat-gdb-scripts implements its own string formatting code,
I think so that it can also show the type and address in the output.
However, this is a bit verbose, and the experience with the C++
printers is that just showing the string data seems fine for users.
This patch simplifies the string printing to use lazy_string and use
the "string" display hint. If we do want to restore the type and/or
address, it seems preferable to add this to gdb proper.
Change-Id: Id06781a3ae52bddc88a4c75ed8fa42de30ba15d8
no-tn-check
In a review, Pierre-Marie pointed out that super calls don't need the
class name in Python 3. This patch cleans this up throughout the
code.
no-tn-check
Change-Id: Ie45bf3a25a91586d36749626db50fe3103e84f9f
My previous change introduced a regression, because it removed
register_pretty_printers but did not update one test that called this
explicitly.
no-tn-check
Change-Id: Iddeebe0fdfe4b737ccb20a5db4eacada0a03cbc6
This patch simplifies pretty-printer registration. In particular,
they are now simply registered globally.
In conjunction with this, the printers are now changed to only
activate when the current language is Ada. This requires a small gdb
patch to expose this information; there is a patch pending for this.
I examined a few different approaches here, becase there are two
different problems to avoid. One is that, with the new DWARF reader,
it's best to defer symbol lookups as long as possible -- a symbol
lookup requires waiting for the DWARF scan to finish, which introduces
a user-visible pause. The second problem is that, because many Ada
programs are statically linked, the usual approach of a .py file
associated with a shared library would not work. (We could use a
.debug_gdb_scripts section, but this has other issues.)
I settled on this approach as it seems to be reasonable, and provides
what users probably want anyway.
Change-Id: I40a598272143fd61ec3be685906f3b4812781907
TN: V518-040
This adds .flake8 and .pre-commit files, to make it easier to share
the reformatting and checking configuration. pep8.ini is removed in
favor of flake8. I took the flake8 setup from gdb-testsuite.
no-tn-check
Change-Id: I1532c08e9731697a57d3714e3d07b84db4c1b5bd
flake8 does not like the use of a lambda in utils.py, preferring a
'def'. It also prefers the use of a set comprehension rather than an
explicit call to 'set'.
no-tn-check
Change-Id: I8281118ba6baf7d3306b1f756e8870fe76f96e1d
Recently, GDB has started printing one ">" prompt per line in the
"python" command. For instance, when the input is:
python
pass
pass
pass
end
GDB prints:
>>>(gdb)
[plus a trailing space, i.e. the main prompt]
Since this breaks the current regexp that matches GDB prompts ("^(gdb)
", so the pexpect machinery hangs), switch to using a script file
instead to workaround this problem.
TN: U622-042
Change-Id: I0e6d6cc23a6b8ed350c1bc695bbd79913a8adecf
GDB now exposes decoded type names through the Python API (foo.bar
instead of foo__bar): update baselines in relevant tests accordingly.
Change-Id: I1b3b75dcbeb766ee6bcffd695f6771a4f3930aa1
TN: N224-026
GNAT is switching to minimal encodings by default, and this change
affects the type names that are visible in gdb. This patch updates
one test that now fails.
TN: U610-001
Change-Id: Ic678ab3b50ac83950f5a9ff29d3f3c0f4aa11b4f