summaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-12-09 03:30:44 +0000
committerAndrew Cagney <cagney@redhat.com>2002-12-09 03:30:44 +0000
commit4deaf592eb548cdbeb9bb1ede8bf8e33406e3e8b (patch)
treef86eab238b66894525b6c4e05a8d0a443375930f /gdb/stack.c
parent69a09bef56cc37df7000fc137117941e41faae3a (diff)
downloadgdb-4deaf592eb548cdbeb9bb1ede8bf8e33406e3e8b.tar.gz
2002-12-07 Andrew Cagney <ac131313@redhat.com>
* f-valprint.c (info_common_command): Use get_frame_pc. * std-regs.c (value_of_builtin_frame_pc_reg): Ditto. * ax-gdb.c (agent_command): Ditto. * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto. (rs6000_pop_frame): Ditto. (rs6000_frameless_function_invocation): Ditto. (rs6000_frame_saved_pc, frame_get_saved_regs): Ditto. (frame_initial_stack_address, rs6000_frame_chain): Ditto. * macroscope.c (default_macro_scope): Ditto. * stack.c (print_frame_info_base): Ditto. (print_frame, frame_info, print_frame_label_vars): Ditto. (return_command, func_command, get_frame_language): Ditto. * infcmd.c (finish_command): Ditto. * dummy-frame.c (cached_find_dummy_frame): Ditto. * breakpoint.c (deprecated_frame_in_dummy): Ditto. (break_at_finish_at_depth_command_1): Ditto. (break_at_finish_command_1): Ditto. (until_break_command, get_catch_sals): Ditto. * blockframe.c (func_frame_chain_valid): Ditto. (frameless_look_for_prologue): Ditto. (frame_address_in_block, generic_func_frame_chain_valid): Ditto.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 51a2b3b268d..5f843f27004 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -314,7 +314,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
if (get_frame_type (fi) == DUMMY_FRAME)
{
- annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
+ annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi));
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
@@ -330,7 +330,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
}
if ((get_frame_type (fi) == SIGTRAMP_FRAME))
{
- annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
+ annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi));
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
@@ -369,11 +369,11 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
{
struct symtab_and_line cursal;
int done = 0;
- int mid_statement = (source == SRC_LINE) && (fi->pc != sal.pc);
+ int mid_statement = (source == SRC_LINE) && (get_frame_pc (fi) != sal.pc);
if (annotation_level)
done = identify_source_line (sal.symtab, sal.line, mid_statement,
- fi->pc);
+ get_frame_pc (fi));
if (!done)
{
if (print_frame_info_listing_hook)
@@ -390,7 +390,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
ability to decide for themselves if it is desired. */
if (addressprint && mid_statement)
{
- ui_out_field_core_addr (uiout, "addr", fi->pc);
+ ui_out_field_core_addr (uiout, "addr", get_frame_pc (fi));
ui_out_text (uiout, "\t");
}
@@ -405,7 +405,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
}
if (source != 0)
- set_default_breakpoint (1, fi->pc, sal.symtab, sal.line);
+ set_default_breakpoint (1, get_frame_pc (fi), sal.symtab, sal.line);
annotate_frame_end ();
@@ -504,7 +504,7 @@ print_frame (struct frame_info *fi,
}
}
- annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
+ annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi));
list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
@@ -514,10 +514,12 @@ print_frame (struct frame_info *fi,
ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
}
if (addressprint)
- if (fi->pc != sal.pc || !sal.symtab || source == LOC_AND_ADDRESS)
+ if (get_frame_pc (fi) != sal.pc
+ || !sal.symtab
+ || source == LOC_AND_ADDRESS)
{
annotate_frame_address ();
- ui_out_field_core_addr (uiout, "addr", fi->pc);
+ ui_out_field_core_addr (uiout, "addr", get_frame_pc (fi));
annotate_frame_address_end ();
ui_out_text (uiout, " in ");
}
@@ -562,7 +564,7 @@ print_frame (struct frame_info *fi,
#ifdef PC_SOLIB
if (!funname || (!sal.symtab || !sal.symtab->filename))
{
- char *lib = PC_SOLIB (fi->pc);
+ char *lib = PC_SOLIB (get_frame_pc (fi));
if (lib)
{
annotate_frame_where ();
@@ -752,7 +754,7 @@ frame_info (char *addr_exp, int from_tty)
func = get_frame_function (fi);
/* FIXME: cagney/2002-11-28: Why bother? Won't sal.symtab contain
the same value. */
- s = find_pc_symtab (fi->pc);
+ s = find_pc_symtab (get_frame_pc (fi));
if (func)
{
/* I'd like to use SYMBOL_SOURCE_NAME() here, to display
@@ -784,7 +786,7 @@ frame_info (char *addr_exp, int from_tty)
}
else
{
- register struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (fi->pc);
+ register struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (get_frame_pc (fi));
if (msymbol != NULL)
{
funname = SYMBOL_NAME (msymbol);
@@ -807,7 +809,7 @@ frame_info (char *addr_exp, int from_tty)
printf_filtered (":\n");
}
printf_filtered (" %s = ", REGISTER_NAME (PC_REGNUM));
- print_address_numeric (fi->pc, 1, gdb_stdout);
+ print_address_numeric (get_frame_pc (fi), 1, gdb_stdout);
wrap_here (" ");
if (funname)
@@ -1301,7 +1303,7 @@ print_frame_label_vars (register struct frame_info *fi, int this_level_only,
register int values_printed = 0;
int index, have_default = 0;
char *blocks_printed;
- CORE_ADDR pc = fi->pc;
+ CORE_ADDR pc = get_frame_pc (fi);
if (block == 0)
{
@@ -1708,7 +1710,7 @@ return_command (char *retval_exp, int from_tty)
error ("No selected frame.");
thisfun = get_frame_function (deprecated_selected_frame);
selected_frame_addr = get_frame_base (deprecated_selected_frame);
- selected_frame_pc = deprecated_selected_frame->pc;
+ selected_frame_pc = get_frame_pc (deprecated_selected_frame);
/* Compute the return value (if any -- possibly getting errors here). */
@@ -1753,7 +1755,7 @@ return_command (char *retval_exp, int from_tty)
selected frame shares its fp with another frame. */
while (selected_frame_addr != get_frame_base (frame = get_current_frame ())
- || selected_frame_pc != frame->pc)
+ || selected_frame_pc != get_frame_pc (frame))
POP_FRAME;
/* Then pop that frame. */
@@ -1822,8 +1824,8 @@ func_command (char *arg, int from_tty)
do
{
for (i = 0; (i < sals.nelts && !found); i++)
- found = (fp->pc >= func_bounds[i].low &&
- fp->pc < func_bounds[i].high);
+ found = (get_frame_pc (fp) >= func_bounds[i].low &&
+ get_frame_pc (fp) < func_bounds[i].high);
if (!found)
{
level = 1;
@@ -1851,7 +1853,7 @@ get_frame_language (void)
if (deprecated_selected_frame)
{
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
if (s)
flang = s->language;
else