Re: [RFC] TARGET_ADJUST_BREAKPOINT_ADDRESS - patch 1 of 4

Kevin Buettner
2003-10-11T02:17:45Z

On Oct 8, 2:26pm, Andrew Cagney wrote:

> I also wonder if PPC64 GDB could use this to do the descriptor ->
> function address transformation that I described in:
> http://sources.redhat.com/ml/gdb-patches/2003-09/msg00415.html

I suppose it could, although that's definitely not the (well, my)
intended purpose of ADJUST_BREAKPOINT_ADDRESS. If we do wind up using
it for this purpose, we'll want to disable the warning messages. It
makes no sense to have a breakpoint on the descriptor, so when used in
this way, it'd definitely be the case that gdb is just doing the
"right thing". It'd be easy enough to add an argument to the method
which passes indicating the kind of adjustment. Off hand, I think a
tri-state value makes sense:

1) the adjustment can potentially alter expected behavior making
user warnings manditory. E.g, FR-V architecture constraints.

2) benign, the breakpoint's location has been moved slightly,
but there should be no change in expected behavior. Perhaps
an informational message could be displayed for this state.
E.g. - maybe - that old v850 problem that Gary Thomas once
told us about in which he had to sometimes place breakpoints
that were larger than the smallest instruction.

3) the adjustment was necessary because to place a breakpoint on
the original address is wrong. E.g, function descriptors -
it makes no sense to place a breakpoint on the function descriptor,
but it does make sense to place a breakpoint on the code address
that the descriptor points to.

Kevin