[RFA] Ignore breakpoints when reading memory.

Vladimir Prus ghost@cs.msu.su
Thu Dec 13 19:23:00 GMT 2007

Jim Blandy wrote:

> Daniel Jacobowitz <drow at false.org> writes:
>> On Sat, Dec 01, 2007 at 02:19:45PM +0300, Vladimir Prus wrote:
>>> 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?
>> Doesn't this make the extra call in read_memory_nobpt redundant?
>> Are there any sites that need to see the breakpoint?  For instance,
>> look at ppc_linux_memory_remove_breakpoint.
> The code I'm presently working on would like to see breakpoints, to my
> surprise.

Hmm, why?

I see two solutions:
1. Add new parameter to target_xfer_partial, telling whether breakpoint
content should be shown or restored. Pass that parameter whenever we
need to see breakpoints. That would need quite a bit of churn

2. Don't touch memory_xfer_partial at all. Audit all places where code
memory is accessed, and call restore_breakpoint_shadows explicitly.
Lots of work, likewise, but also eliminates the performance concerns.


- Volodya

More information about the Gdb-patches mailing list