aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/python.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-09-06 17:25:21 +0200
committerTom de Vries <tdevries@suse.de>2023-09-06 17:25:21 +0200
commit313b2841b8e9046ea658104988e01bedf6148d5f (patch)
tree6da107d393cbd5ac9d1557fe46dfd51b40af8b7d /gdb/testsuite/gdb.python/python.c
parente061219f5d600af5b33418553f192e0cb9fc9ca9 (diff)
downloadbinutils-313b2841b8e9046ea658104988e01bedf6148d5f.zip
binutils-313b2841b8e9046ea658104988e01bedf6148d5f.tar.gz
binutils-313b2841b8e9046ea658104988e01bedf6148d5f.tar.bz2
[gdb/testsuite] Fix gdb.ada/same_enum.exp
Test-case gdb.ada/same_enum.exp is supposed to be a regression test for this bit of code in remove_extra_symbols: ... if (symbols_are_identical_enums (syms)) syms.resize (1); ... The test-case does "print red" and expects one of these two choices to be picked by remove_extra_symbols: ... type Color is (Black, Red, Green, Blue, White); type RGB_Color is new Color range Red .. Blue; ... but because only the type Color is used: ... FC : Color := Red; SC : Color := Green; ... the RGB_Color type is eliminated from the debug info, and consequently remove_extra_symbols has no effect for the test-case. In other words, we have: ... (gdb) ptype Color ^M type = (black, red, green, blue, white)^M (gdb) ptype RGB_Color^M No definition of "rgb_color" in current context.^M ... Fix this by changing the type of SC to RGB_Color, and add prints of the two types to check that they're both available. With the test-case fixed, if we disable the bit of code in remove_extra_symbols we get: ... (gdb) print red^M Multiple matches for red^M [0] cancel^M [1] pck.color'(pck.red) (enumeral)^M [2] pck.rgb_colorB'(pck.red) (enumeral)^M > FAIL: gdb.ada/same_enum.exp: print red (timeout) ... in other words, the test-case now properly functions as a regression test. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.python/python.c')
0 files changed, 0 insertions, 0 deletions