This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] Set a breakpoint's type before adjusting its address


On Fri, Apr 27, 2007 at 03:15:59PM -0700, Kevin Buettner wrote:
> At the moment, running GDB on an FR-V target will generate lots of
> "reading through apparently deleted breakpoint" warnings.  This is due
> to the fact that (due to architectural constraints) FR-V needs to
> adjust breakpoint addresses.  When it does so, it reads through
> read_memory_nobpt(), triggering the warning due to the fact that the
> breakpoint's type hasn't been set yet.  The patch below moves the type
> assignment prior to the adjustment thus avoiding this situation.
> 
> Comments?
> 
> 	* breakpoint.c (set_raw_breakpoint): Set breakpoint type before
> 	attempting to adjust its address.

This happens because the breakpoint's location is already on the
location chain, right?  Alternatively, we could move that from the end
of allocate_bp_location to the end of set_raw_breakpoint, and avoid
the inconsistency.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]