public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: santoshp <santosh.pradhan@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Strange address in the stack trace
Date: Tue, 13 Nov 2012 20:35:00 -0000	[thread overview]
Message-ID: <CADPb22TZoUTunU9q5p_Ruu8prLUZD9av1U=kz5iD2=2B+Sh=bQ@mail.gmail.com> (raw)
In-Reply-To: <1352454420562-212534.post@n7.nabble.com>

On Fri, Nov 9, 2012 at 1:47 AM, santoshp <santosh.pradhan@gmail.com> wrote:
> Hi All,While debugging a crash dump using GDB (7.2) on RHEL-5, one address
> looks strange to me. i.e. valueChanges variable. The same variable getting
> passed to frames but shows different addresses in different frames. #1
> 0x00002aaaab8a163a in MR_AnyVal (this=0x2aaab9000020, *o=@0x52*) at
> repos/mr/anyvali.c:36#2 0x00002aaaabb0fa13 in
> MR_MonitoringSystem::valueChanges2monValueChanges
> (*valueChanges=@0x465a5700*) at repos/mr/MR_MonitoredValue.h:61#3
> 0x00002aaaabb1065b in MR_MonitoringSystem::processChangesStandard
> (*valueChanges=@0x465a5700*) at repos/mr/MR_MonitoringSystem.c:280#4
> 0x00002aaaabbb026c in MR_Accessor::notify (this=, *valueChanges=@0x52*) at
> repos/accessors/MR_Accessor.c:1573Can somebody please comment on this
> whether this is from OS (because it's optimized build) or the behavior from
> GDB?Thanks,Santosh

Hi.  Sounds like this is just the effect of debugging optimized code.
GDB can only print a value as the debug info specifies, and when
debugging optimized code often the debug info is inaccurate.  GIGO.

  reply	other threads:[~2012-11-13 20:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09  9:47 santoshp
2012-11-13 20:35 ` Doug Evans [this message]
2012-11-14 10:30   ` santoshp

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='CADPb22TZoUTunU9q5p_Ruu8prLUZD9av1U=kz5iD2=2B+Sh=bQ@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb@sourceware.org \
    --cc=santosh.pradhan@gmail.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).