From: Fred Fish <fnf@specifix.com>
To: Jim Blandy <jimb@red-bean.com>
Cc: Daniel Jacobowitz <drow@false.org>,
gdb-patches@sourceware.org, fnf@specifix.com
Subject: [commit] Fix ptype problem printing typedefs defined differently in different compilation units
Date: Tue, 24 Jan 2006 15:23:00 -0000 [thread overview]
Message-ID: <200601241023.00993.fnf@specifix.com> (raw)
In-Reply-To: <8f2776cb0601231117r6bdb8f95g6ee4c60aa6ebd22@mail.gmail.com>
On Monday 23 January 2006 14:17, Jim Blandy wrote:
> So I don't think there's a problem with your patch.
I've committed the patch.
-Fred
2006-01-24 Fred Fish <fnf@specifix.com>
* parse.c (source.h): Include.
(parse_exp_in_context): Use static source context if no
other context found.
Index: parse.c
===================================================================
RCS file: /cvs/src/src/gdb/parse.c,v
retrieving revision 1.51
diff -c -p -r1.51 parse.c
*** parse.c 17 Dec 2005 22:34:01 -0000 1.51
--- parse.c 24 Jan 2006 14:49:59 -0000
***************
*** 52,57 ****
--- 52,58 ----
#include "doublest.h"
#include "gdb_assert.h"
#include "block.h"
+ #include "source.h"
/* Standard set of definitions for printing, dumping, prefixifying,
* and evaluating expressions. */
*************** parse_exp_in_context (char **stringptr,
*** 1075,1087 ****
old_chain = make_cleanup (free_funcalls, 0 /*ignore*/);
funcall_chain = 0;
if (block)
{
expression_context_block = block;
expression_context_pc = BLOCK_START (block);
}
- else
- expression_context_block = get_selected_block (&expression_context_pc);
expout_size = 10;
expout_ptr = 0;
--- 1076,1102 ----
old_chain = make_cleanup (free_funcalls, 0 /*ignore*/);
funcall_chain = 0;
+ /* If no context specified, try using the current frame, if any. */
+
+ if (!block)
+ block = get_selected_block (&expression_context_pc);
+
+ /* Fall back to using the current source static context, if any. */
+
+ if (!block)
+ {
+ struct symtab_and_line cursal = get_current_source_symtab_and_line ();
+ if (cursal.symtab)
+ block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (cursal.symtab), STATIC_BLOCK);
+ }
+
+ /* Save the context, if specified by caller, or found above. */
+
if (block)
{
expression_context_block = block;
expression_context_pc = BLOCK_START (block);
}
expout_size = 10;
expout_ptr = 0;
prev parent reply other threads:[~2006-01-24 15:23 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-03 20:17 [PATCH] " Fred Fish
2006-01-03 23:15 ` Jim Blandy
2006-01-04 2:46 ` Fred Fish
2006-01-04 3:45 ` Jim Blandy
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 ` Fred Fish [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=200601241023.00993.fnf@specifix.com \
--to=fnf@specifix.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=jimb@red-bean.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