Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: jtc@redback.com (J.T. Conklin)
To: Aditya Chugh <Aditya@in.huawei.com>
Cc: bug-gdb@prep.ai.mit.edu, gdb@sourceware.cygnus.com
Subject: Re: MACROS in gdb ???
Date: Wed, 21 Mar 2001 15:59:00 -0000	[thread overview]
Message-ID: <5mofuxl5ft.fsf@jtc.redback.com> (raw)
In-Reply-To: <70EB682332F4D41187D6000629AE2C651AE3B1@mail.in.huawei.com>

>>>>> "Aditya" == Aditya Chugh <Aditya@in.huawei.com> writes:
Aditya> I am not sure this is the right forum for a question on gdb.

I have culled the 'cc' list to the most relevant mailing lists.

Aditya> I am a Newbie as far as gdb is concerned.  But I have been
Aditya> struggling with this for quite some time and would sincerely
Aditya> appreciate any help.

Aditya> But after processing this macro the value of u2IncarnId
Aditya> changes unexplicably ????

You don't mention what target you're using or what optimization level
was used when you compiled the files.  But the symptoms you describe
often occur when debugging optimized code.  

For example if a register is being used to hold a value and then that
value is no longer needed in the rest of the function, a compiler may
choose to use that register for an unrelated value.  This can make
debugging a bit of a challenge, but looking at a disassembly of the
function or recompiling the system with no optimization can be used to
help diagnose the problem.

It helps to have a somewhat "flexible" attitude when it comes to
debugging optimized code.  A rigid interpretation of results will
lead to frustration.

Aditya> If I am missing something obvious please forgive me. I have
Aditya> spent the whole day trying to figure out where I am going
Aditya> wrong.

I hope this helps.  

        --jtc

-- 
J.T. Conklin
RedBack Networks


  reply	other threads:[~2001-03-21 15:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21 15:59 Aditya Chugh
2001-03-21 15:59 ` J.T. Conklin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-03-21 15:59 Aditya Chugh
2001-03-21 15:59 ` J.T. Conklin
2001-03-21 15:59 ` Daniel Berlin
2001-03-21 15:59 ` Eli Zaretskii
     [not found]   ` <eliz@is.elta.co.il>
2001-03-21 15:59     ` Kevin Buettner
2001-03-21 15:59       ` Eli Zaretskii

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=5mofuxl5ft.fsf@jtc.redback.com \
    --to=jtc@redback.com \
    --cc=Aditya@in.huawei.com \
    --cc=bug-gdb@prep.ai.mit.edu \
    --cc=gdb@sourceware.cygnus.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