diff options
author | Pedro Alves <palves@redhat.com> | 2010-04-01 14:26:53 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-04-01 14:26:53 +0000 |
commit | d3bbe7a0c8af16f3fab8b1bbe2f9d96e66818c27 (patch) | |
tree | fc71b14994bc13bc4bbfc3a8a6d7712063bfcb25 /gdb/gdbserver/server.c | |
parent | 8b07ae33f0743a5dbad03cb4a76987f6db7fc38c (diff) | |
download | gdb-d3bbe7a0c8af16f3fab8b1bbe2f9d96e66818c27.zip gdb-d3bbe7a0c8af16f3fab8b1bbe2f9d96e66818c27.tar.gz gdb-d3bbe7a0c8af16f3fab8b1bbe2f9d96e66818c27.tar.bz2 |
* mem-break.c (struct raw_breakpoint): New field shlib_disabled.
(set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
of another, then delete the previous, and validate all
breakpoints.
(validate_inserted_breakpoint): New.
(delete_disabled_breakpoints): New.
(validate_breakpoints): New.
(check_mem_read): Validate breakpoints before trusting their
shadow. Delete disabled breakpoints.
(check_mem_write): Validate breakpoints before trusting they
should be inserted. Delete disabled breakpoints.
* mem-break.h (validate_breakpoints):
* server.c (handle_query): Validate breakpoints when we see a
qSymbol query.
Diffstat (limited to 'gdb/gdbserver/server.c')
-rw-r--r-- | gdb/gdbserver/server.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 232085a..c6fc005 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -858,6 +858,18 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p) if (strcmp ("qSymbol::", own_buf) == 0) { + /* GDB is suggesting new symbols have been loaded. This may + mean a new shared library has been detected as loaded, so + take the opportunity to check if breakpoints we think are + inserted, still are. Note that it isn't guaranteed that + we'll see this when a shared library is loaded, and nor will + we see this for unloads (although breakpoints in unloaded + libraries shouldn't trigger), as GDB may not find symbols for + the library at all. We also re-validate breakpoints when we + see a second GDB breakpoint for the same address, and or when + we access breakpoint shadows. */ + validate_breakpoints (); + if (target_running () && the_target->look_up_symbols != NULL) (*the_target->look_up_symbols) (); |