This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Ignore breakpoints when reading memory.
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: vladimir at codesourcery dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 4 Dec 2007 19:11:29 +0100 (CET)
- Subject: Re: [RFA] Ignore breakpoints when reading memory.
- References: <200712011419.45773.vladimir@codesourcery.com>
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 1 Dec 2007 14:19:45 +0300
>
> This commit prepares us for always-inserted-breakpoints mode.
> If breakpoints are always inserted, then reading the code memory
> will read the breakpoint instructions, not the original content.
> This patch makes us try to restore the original comments using
> the breakpoints table. OK?
So now reading from target memory will need to traverse the complete
list of inserted breakpoints. Did you do any benchmarking to see what
the impact of this change is, especially when running on a somewhat
slow machine?
> * breakpoint.h (breakpoint_restore_shadows): New
> declaration.
> * breakpoint.c (breakpoint_restore_shadows): New.
> (read_memory_nobpt): Use breakpoint_restore_shadows.
> * target.c (memory_xfer_partial): Call
> breakpoint_restore_shadows.