Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] -stack-info-frame/-stack-list-frames
Date: Wed, 23 Apr 2008 23:23:00 -0000	[thread overview]
Message-ID: <18447.45489.330759.603491@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200804231703.25325.vladimir@codesourcery.com>

 > >  > Does that window shows:
 > >  > 
 > >  > 1. Value of variable named XXX in the frame where that variable was
 > >  > added to the window?
 > >  > 2. Value of variable named XXX in the current frame
 > >  > 3. Something else?
 > > 
 > > It doesn't really matter how it was created.
 > 
 > Of course it does, because for 2 (which are those floating varobjs), the
 > concept of frame varobj belongs is fairly moot.

Floating varobjs are evaluated in the selected frame and that's the (changing)
frame to which it belongs.
 
 > >  > Well, for other frames I know what they are used for.
 > > 
 > > (by frames you mean fields?)
 > 
 > Yes.
 >  
 > > Really?  In the output of -stack-list-frames what are the pc address field
 > > for the outer frames used for?
 > 
 > It's there so that you can know where you function is called from, in case
 > the caller is assembler and there's no other information about location.

I mean it's not interesting to see the pc addresses for all the frames in the
call stack simultaneously.  Only the pc address of the selected frame is really
of interest.

 >...
 > Yes, stack surely grows in the other directions on other architectures. But
 > that's probably not the main issue. What is the case when a user wants to
 > know which frame a variable having address XXX belongs to? If that variable
 > is varobj, GUI probably already recorded the association between varobj and
 > frame and is in position to show that directly.

Gdb knows with which frame the varobj is associated but two frames might
have the same variable name, and with recursion they might have the same
procedure name.  Then the user could only work out which was which (if he
forgets when they were created) by comparing the frame addresses with the
memory locations of the variable.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


      reply	other threads:[~2008-04-23 22:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23  5:33 Nick Roberts
2008-04-23  5:48 ` Vladimir Prus
2008-04-23  6:03   ` Nick Roberts
2008-04-23  6:16     ` Vladimir Prus
2008-04-23  9:50       ` Nick Roberts
2008-04-23 10:32         ` Vladimir Prus
2008-04-23 13:23           ` Nick Roberts
2008-04-23 13:44             ` Daniel Jacobowitz
2008-04-23 23:04               ` Nick Roberts
2008-04-23 23:27                 ` Daniel Jacobowitz
2008-04-24  0:40                   ` Bob Rossi
2008-04-24  1:45                     ` Nick Roberts
2008-04-24  1:31                   ` Nick Roberts
2008-04-24  1:48                     ` Nick Roberts
2008-04-24 10:24                     ` Daniel Jacobowitz
2008-04-25  1:48                       ` Nick Roberts
2008-04-25  2:03                         ` Daniel Jacobowitz
2008-04-25 11:41                           ` Nick Roberts
2008-04-23 13:53             ` Vladimir Prus
2008-04-23 23:23               ` Nick Roberts [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=18447.45489.330759.603491@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb-patches@sourceware.org \
    --cc=vladimir@codesourcery.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