This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Ignore breakpoints when reading memory.
Mark Kettenis <mark.kettenis at xs4all.nl> writes:
>> From: Vladimir Prus <email@example.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?
Without taking a position on whether this is a significant problem:
If we used some ordered data structure (we've got splay trees handy)
to hold the breakpoint locations sorted by address, then that would
permit better algorithms in some of the always-inserted breakpoint
code as well. The comparison between the old and new breakpoint
location lists could be linear instead of quadratic.