public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Claudia Salzberg <salzberg@us.ibm.com>
Cc: gdb@sourceware.org
Subject: Re: gdb watch command on ppc
Date: Wed, 12 Oct 2005 21:20:00 -0000	[thread overview]
Message-ID: <20051012211957.GA829@nevyn.them.org> (raw)
In-Reply-To: <OF3F5AE681.75D72D9F-ON87257098.00733AA0-86257098.0074AB0E@us.ibm.com>

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

      reply	other threads:[~2005-10-12 21:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-12 21:14 Claudia Salzberg
2005-10-12 21:20 ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051012211957.GA829@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=salzberg@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).