Reviewed and approved by Jim Blandy and Daniel Jacobowitz
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.
This commit is contained in:
parent
fc6e323197
commit
59f92a09f1
2 changed files with 23 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2006-01-23 Andrew Stubbs <andrew.stubbs@st.com>
|
2006-01-23 Andrew Stubbs <andrew.stubbs@st.com>
|
||||||
|
|
||||||
* sh-tdep.c: Include reggroups.h.
|
* sh-tdep.c: Include reggroups.h.
|
||||||
|
|
19
gdb/parse.c
19
gdb/parse.c
|
@ -52,6 +52,7 @@
|
||||||
#include "doublest.h"
|
#include "doublest.h"
|
||||||
#include "gdb_assert.h"
|
#include "gdb_assert.h"
|
||||||
#include "block.h"
|
#include "block.h"
|
||||||
|
#include "source.h"
|
||||||
|
|
||||||
/* Standard set of definitions for printing, dumping, prefixifying,
|
/* Standard set of definitions for printing, dumping, prefixifying,
|
||||||
* and evaluating expressions. */
|
* and evaluating expressions. */
|
||||||
|
@ -1075,13 +1076,27 @@ parse_exp_in_context (char **stringptr, struct block *block, int comma,
|
||||||
old_chain = make_cleanup (free_funcalls, 0 /*ignore*/);
|
old_chain = make_cleanup (free_funcalls, 0 /*ignore*/);
|
||||||
funcall_chain = 0;
|
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)
|
if (block)
|
||||||
{
|
{
|
||||||
expression_context_block = block;
|
expression_context_block = block;
|
||||||
expression_context_pc = BLOCK_START (block);
|
expression_context_pc = BLOCK_START (block);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
expression_context_block = get_selected_block (&expression_context_pc);
|
|
||||||
|
|
||||||
expout_size = 10;
|
expout_size = 10;
|
||||||
expout_ptr = 0;
|
expout_ptr = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue