From: Andrew STUBBS <andrew.stubbs@st.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] keep-variable command
Date: Thu, 17 Nov 2005 12:26:00 -0000 [thread overview]
Message-ID: <437C68CF.3060805@st.com> (raw)
In-Reply-To: <u7jb873tj.fsf@gnu.org>
Eli Zaretskii wrote:
> It's possible this is something I never knew about: is it actually
> correct that _all_ convenience variables are deleted when `file' is
> used? The explanation above about their types being lost doesn't make
> sense to me; can you explain? For example, if I define a variable
> that holds an integer number, why would its type become meaningless?
Currently _all_ convenience variables are deleted when the symbol-file
command is used. The file command also uses symbol-file.
The explanation I gave refers to the situation after my patch has been
applied and the debugger is attempting to keep some variables. You are
correct when you say that basic types will always exist. However, I did
not want to assume that they will be kept in the same place. Our initial
implementation did not attempt to fix this up at all and worked for
quite a while before anybody noticed it didn't work (badly) with unusual
types. Investigation showed that it was only working with basic types by
chance - the new types just happened to be at the same addresses, so I
fixed it up properly as you see it now. There is always the possibility
of a file redefining any type, of course, so you may not be using the
int you thought you were using.
> Does this description assume that convenience variables point, or are
> somehow related, to the symbol table? If so, why does this assumption
> hold for every convenience variable? I can think of a convenience
> variable that has no relation whatsoever to the symbol table; how does
> such a variable fit into the above scheme?
All variables must have a type, even void ones, as far as I can tell.
The type is recorded in terms of a reference into a table of types which
is related to the symbol table in some way I do not claim to fully
understand. What is certain is that symbol-file wipes the type table.
Please give your example of a convenience variable with no relation to
the symbol table.
Andrew
next prev parent reply other threads:[~2005-11-17 11:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 15:54 Andrew STUBBS
2005-11-16 20:26 ` Eli Zaretskii
2005-11-17 1:07 ` Jim Blandy
2005-11-17 9:56 ` Daniel Jacobowitz
2005-11-17 15:07 ` Andrew STUBBS
2005-11-17 12:42 ` Andrew STUBBS
2005-11-17 12:26 ` Andrew STUBBS [this message]
2005-11-17 19:33 ` Eli Zaretskii
2005-11-17 19:36 ` Daniel Jacobowitz
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=437C68CF.3060805@st.com \
--to=andrew.stubbs@st.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.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