aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-03-31 07:55:09 -0600
committerTom Tromey <tromey@adacore.com>2022-04-14 10:02:56 -0600
commit7b5e70a921a6c168459002e7a3a464791ae75cc2 (patch)
tree6ab2b902e9576692345da65aab1fd8ff29be4e3c /gdb/cp-namespace.c
parent74f8cb8887a0381de5b701136af42f0b4c66f3d4 (diff)
downloadgdb-7b5e70a921a6c168459002e7a3a464791ae75cc2.zip
gdb-7b5e70a921a6c168459002e7a3a464791ae75cc2.tar.gz
gdb-7b5e70a921a6c168459002e7a3a464791ae75cc2.tar.bz2
Fix regression on Windows with WOW64
Internally at AdaCore, we recently started testing a 64-bit gdb debugging 32-bit processes. This failed with gdb head, but not with gdb 11. The tests fail like this: Starting program: [...].exe warning: Could not load shared library symbols for WOW64_IMAGE_SECTION. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for WOW64_IMAGE_SECTION. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for NOT_AN_IMAGE. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for NOT_AN_IMAGE. Do you need "set solib-search-path" or "set sysroot"? After some debugging and bisecting, to my surprise the bug was introduced by commit 183be222 ("gdb, gdbserver: make target_waitstatus safe"). The problem occurs in handle_exception. Previously the code did: - ourstatus->kind = TARGET_WAITKIND_STOPPED; [...] case EXCEPTION_BREAKPOINT: [...] - ourstatus->kind = TARGET_WAITKIND_SPURIOUS; [...] /* FALLTHROUGH */ case STATUS_WX86_BREAKPOINT: DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_BREAKPOINT"); - ourstatus->value.sig = GDB_SIGNAL_TRAP; [...] - last_sig = ourstatus->value.sig; However, in the new code, the fallthrough case does: + ourstatus->set_stopped (GDB_SIGNAL_TRAP); ... which changes the 'kind' in 'ourstatus' after falling through. This patch rearranges the 'last_sig' setting to more closely match what was done before (this is probably not strictly needed but also seemed harmless), and removes the fall-through in the 'ignore_first_breakpoint' case when __x86_64__ is defined.
Diffstat (limited to 'gdb/cp-namespace.c')
0 files changed, 0 insertions, 0 deletions