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] Simplify ppc64_sysv_abi_adjust_breakpoint_address


On Thu, 2008-10-09 at 19:51 +0200, Ulrich Weigand wrote:
> Luis Machado wrote:
> 
> > It seems we have a situation in which
> > "ppc64_sysv_abi_adjust_breakpoint_address" is still required, in a way.
> > 
> > Before removing this function, GDB was smart enough to know that the
> > entry point of a 64-bit PPC binary is, in reality, a function
> > descriptor, thus grabbing the correct breakpoint location from within
> > that address and setting it correctly.
> > 
> > After removing this function, GDB no longer knows that a specific
> > address is a function descriptor, and places a breakpoint at a data
> > section. The binary's code tries to fetch the correct address from the
> > function descriptor's address and ends up fetching the breakpoint
> > instruction, which makes no sense.
> > 
> > So, i see two ways:
> > 
> > 1 - Make GDB smart again, being able to determine if the address is of a
> > function descriptor or not, basically the way i was before this patch.
> > 
> > 2 - Assume the user knows what he's doing and that he knows where to
> > place a breakpoint when using the address of a function descriptor.
> 
> I'm not sure exactly what situation you're refering to ... is this
> about
>    break *0x.....
> where the address that was manually specified refers to a function
> descriptor instead of the function code?
> 
> In that case, I'd tend to consider this user error -- if you use
> hard-coded addresses, you should know what you're doing on the 
> platform.
> 
> If this is about something else, could you show a command line
> that does the wrong thing for you?
> 
> Bye,
> Ulrich
> 

This is exactly about placing breakpoint on numberic addresses like
"break *0x...". GDB used to do that correctly before that patch, but it
doesn't anymore. So, maybe it's OK to consider this is something the
user should be aware of...

Luis


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