diff options
author | Tom de Vries <tdevries@suse.de> | 2024-08-22 09:49:53 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-08-22 09:49:53 +0200 |
commit | a16c032a5c67453e88bc58dc3db0ac568c348973 (patch) | |
tree | c8bc2c606e1a1b33c543b1dba6c34c302307aa13 /gdb/python/py-lazy-string.c | |
parent | 1ebf4606c242c2338de520876e6b342d44106150 (diff) | |
download | binutils-a16c032a5c67453e88bc58dc3db0ac568c348973.zip binutils-a16c032a5c67453e88bc58dc3db0ac568c348973.tar.gz binutils-a16c032a5c67453e88bc58dc3db0ac568c348973.tar.bz2 |
[gdb] Eliminate catch(...) in get_test_insn
In get_test_insn in gdb/disasm-selftests.c, we find this code:
...
try
{
kind = gdbarch_breakpoint_kind_from_pc (gdbarch, &pc);
insn = gdbarch_sw_breakpoint_from_kind (gdbarch, kind, &bplen);
}
catch (...)
{
continue;
}
...
The catch is there to catch memory errors, but it swallows all exceptions, including
gdb_exception_quit and gdb_exception_forced_quit.
Fix this by limiting the catch to gdb_exception_error.
Tested on x86_64-linux, by rebuilding and running gdb.gdb/unittest.exp.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-lazy-string.c')
0 files changed, 0 insertions, 0 deletions