From: Jim Blandy <jimb@red-bean.com>
To: fnf@specifix.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix ptype problem printing typedefs defined differently in different compilation units
Date: Wed, 04 Jan 2006 03:45:00 -0000 [thread overview]
Message-ID: <8f2776cb0601031945gb876b84i48c145c291ecbcee@mail.gmail.com> (raw)
In-Reply-To: <200601032147.14083.fnf@specifix.com>
On 1/3/06, Fred Fish <fnf@specifix.com> wrote:
> > I have some questions about the patch, though.
> > get_current_source_symtab_and_line is a user-interface thing, and I'm
> > uncomfortable calling it from one of our fundamental lookup functions.
>
> There is a static pointer to the current source symtab in source.c,
> and only functions in that file have direct access to it. All the
> rest of gdb seems to use one of the accessor functions exported from
> source.c:
>
> get_current_source_symtab_and_line
> set_current_source_symtab_and_line
> clear_current_source_symtab_and_line
I wasn't making an argument from the layout of GDB's source code.
Conceptually, the current source file and line are properties of the
user interface --- of a command-line user interface, really. The
fundamantal lookup code ought to be independent of that, it seems to
me.
> > Why isn't the right block being passed to lookup_symbol in the first
> > place?
> ...
> parse_exp_in_context() sees that block is zero and tries to find
> expression_context_block by calling get_selected_block(), but since
> the target isn't running, that returns zero, which gets saved in
> expression_context_block.
What would break if get_selected_block used, in the absence of a
frame, the current source position? Or, if get_selected_block really
needs to return zero when there's no stack, what would break if
parse_exp_in_context used the current source position as a fallback
when get_selected_block returns zero? It seems reasonable to me.
next prev parent reply other threads:[~2006-01-04 3:45 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-03 20:17 Fred Fish
2006-01-03 23:15 ` Jim Blandy
2006-01-04 2:46 ` Fred Fish
2006-01-04 3:45 ` Jim Blandy [this message]
2006-01-04 11:15 ` Fred Fish
2006-01-04 21:04 ` Fred Fish
2006-01-05 0:21 ` Jim Blandy
2006-01-05 0:26 ` Jim Blandy
2006-01-05 0:54 ` Daniel Jacobowitz
2006-01-05 4:47 ` Jim Blandy
2006-01-15 18:48 ` Daniel Jacobowitz
2006-01-16 4:22 ` Jim Blandy
2006-01-23 15:27 ` Fred Fish
2006-01-23 16:12 ` Daniel Jacobowitz
2006-01-23 16:43 ` Fred Fish
2006-01-23 19:17 ` Jim Blandy
2006-01-23 19:35 ` Fred Fish
2006-01-23 20:45 ` Jim Blandy
2006-02-11 0:39 ` Fred Fish
2006-02-11 18:35 ` Daniel Jacobowitz
2006-02-11 19:08 ` Eli Zaretskii
2006-02-11 20:13 ` Daniel Jacobowitz
2006-02-11 20:01 ` Fred Fish
2006-02-11 20:21 ` Daniel Jacobowitz
2006-02-12 18:49 ` Fred Fish
2006-02-14 14:11 ` Daniel Jacobowitz
2006-02-14 18:47 ` Fred Fish
2006-02-17 0:17 ` Fred Fish
2006-02-17 9:15 ` Eli Zaretskii
2006-02-17 13:36 ` Fred Fish
2006-02-17 20:32 ` Fred Fish
2006-02-18 9:27 ` Eli Zaretskii
2006-02-18 22:19 ` Daniel Jacobowitz
2006-02-20 15:47 ` Fred Fish
2006-02-20 16:23 ` Daniel Jacobowitz
2006-05-17 19:04 ` Fred Fish
2006-02-11 0:39 ` Fred Fish
2006-01-24 15:23 ` [commit] " Fred Fish
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=8f2776cb0601031945gb876b84i48c145c291ecbcee@mail.gmail.com \
--to=jimb@red-bean.com \
--cc=fnf@specifix.com \
--cc=gdb-patches@sourceware.org \
/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