This is the mail archive of the gdb@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: gdb watch command on ppc


On Wed, Oct 12, 2005 at 04:16:07PM -0500, Claudia Salzberg wrote:
> I have noticed a discrepancy between the way the gdb for ppc handles 
> watchpoints on pointers.  I am trying to place a software watchpoint on a 
> variable of type int * and am not getting the expected results.  Note that 
> I observe the expected functionality (the watchpoint being correctly set) 
> on x86 and that I have tried the following on today's cvs head.  I have 
> also tried this on various ppc machines with the same result.  I include 
> the sample program that matches the output shown below as well as an 
> additional program that generates the same behavior.  I do not see this if 
> I attempt to place a watchpoint on a non pointer variable.  Thanks for 
> your input.

First of all, GDB doesn't support HW watchpoints for PPC at the moment;
are you using Manoj's patches?  At least I don't think it does.

> Breakpoint 1, main () at main.c:13
> 13              int *a = (int *)malloc(sizeof(int));
> (gdb) watch a
> Watchpoint 2: a

If it did, this would say "Hardware Watchpoint"; you're getting
single-step watchpoints.

> (gdb) c
> Continuing.
> 
> Watchpoint 2 deleted because the program has left the block in
> which its expression is valid.
> fixup (l=0x7ffff620, reloc_offset=0) at dl-runtime.c:63
> 63      dl-runtime.c: No such file or directory.
>         in dl-runtime.c

This may be a backtrace bug.  GDB thinks that main() has returned,
because it failed to backtrace out of the dynamic linker in the call to
malloc().


-- 
Daniel Jacobowitz
CodeSourcery, LLC


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