This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Set a breakpoint's type before adjusting its address
- From: Daniel Jacobowitz <drow at false dot org>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 28 Apr 2007 17:45:10 -0400
- Subject: Re: [rfc] Set a breakpoint's type before adjusting its address
- References: <20070427151559.0394bfa0@ironwood.lan>
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