aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/boards/remote-stdio-gdbserver.exp
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-06-21 01:11:43 +0100
committerPedro Alves <palves@redhat.com>2016-06-21 01:11:43 +0100
commit45db7c09c37c9aceb3a7e149a6577388fc566432 (patch)
tree5497ee6024ddcb072c1260f940f7ca8e9e9e9c6c /gdb/testsuite/boards/remote-stdio-gdbserver.exp
parent5a069ab36dead610ac759c4b37f6635419f09306 (diff)
downloadgdb-45db7c09c37c9aceb3a7e149a6577388fc566432.zip
gdb-45db7c09c37c9aceb3a7e149a6577388fc566432.tar.gz
gdb-45db7c09c37c9aceb3a7e149a6577388fc566432.tar.bz2
[Ada catchpoints] Fix "warning: failed to get exception name: No definition of \"e.full_name\" in current context"
Looking at testsuite results, I noticed this warning in an MI test: ~"\nCatchpoint " ~"2, " &"warning: failed to get exception name: No definition of \"e.full_name\" in current context.\n" ~"exception at 0x000000000040192d in foo () at /home/pedro/brno/pedro/gdb/mygit/src/gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb:20\n" ~"20\t raise Constraint_Error; -- SPOT1\n" *stopped,reason="breakpoint-hit",disp="keep",bkptno="2",exception-name="CONSTRAINT_ERROR",frame={addr="0x000000000040192d",func="foo",args=[],file="/home/pedro/brno/pedro/gdb/mygit/src/gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb",fullname="/home/pedro/brno/pedro/gdb/mygit/src/gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb",line="20"},thread-id="1",stopped-threads="all",core="5" (gdb) PASS: gdb.ada/mi_catch_ex.exp: continue until CE caught by all-exceptions catchpoint The problem is that: - MI prints the breakpoint hit twice: once on the MI stream; another time on the console stream. - After printing the Ada catchpoint hit, gdb selects a non-current frame, from within the catchpoint's print_it routine. So the second time the breakpoint is printed, the selected frame is no longer the current frame, and then evaluating e.full_name in ada_exception_name_addr fails. This commit fixes the problem and enhances the gdb.ada/mi_catch_ex.exp test to make sure the catchpoint hit is printed correctly on the console stream too. gdb/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> * ada-lang.c (ada_exception_name_addr_1): Add comment. (print_it_exception): Select the current frame. gdb/testsuite/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> * gdb.ada/mi_catch_ex.exp (continue_to_exception): New procedure. (top level): Use it instead of mi_execute_to.
Diffstat (limited to 'gdb/testsuite/boards/remote-stdio-gdbserver.exp')
0 files changed, 0 insertions, 0 deletions