diff options
author | Jim Blandy <jimb@codesourcery.com> | 2002-04-05 22:04:43 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2002-04-05 22:04:43 +0000 |
commit | 5d3f4e318a6be36209ab2dd5ff2868c18fb1b673 (patch) | |
tree | e58f0395d3a7b896eda7025c8d51e7a378662a9d /gdb/stack.c | |
parent | 63202e1251cca3d7423011a6bb629aee96c84d83 (diff) | |
download | gdb-5d3f4e318a6be36209ab2dd5ff2868c18fb1b673.tar.gz |
gdb/ChangeLog:
* stack.c (get_selected_block): Add new argument `addr_in_block',
used to return the exact code address we used to select the block,
not just the block.
* blockframe.c (get_frame_block, get_current_block): Same.
* frame.h (get_frame_block, get_current_block,
get_selected_block): Update declarations.
* linespec.c, stack.c, blockframe.c, breakpoint.c, findvar.c,
linespec.c, varobj.c, printcmd.c, symtab.c: Callers changed.
gdb/mi/ChangeLog:
* mi-cmd-stack.c (list_args_or_locals): Pass new arg to
get_frame_block. (See entry in gdb/ChangeLog.)
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 2fe6e420b0b..bedb6ee6fda 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1238,7 +1238,7 @@ static void print_frame_local_vars (register struct frame_info *fi, register int num_tabs, register struct ui_file *stream) { - register struct block *block = get_frame_block (fi); + register struct block *block = get_frame_block (fi, 0); register int values_printed = 0; if (block == 0) @@ -1272,7 +1272,7 @@ print_frame_label_vars (register struct frame_info *fi, int this_level_only, register struct ui_file *stream) { register struct blockvector *bl; - register struct block *block = get_frame_block (fi); + register struct block *block = get_frame_block (fi, 0); register int values_printed = 0; int index, have_default = 0; char *blocks_printed; @@ -1501,17 +1501,21 @@ record_selected_frame (CORE_ADDR *frameaddrp, int *levelp) } /* Return the symbol-block in which the selected frame is executing. - Can return zero under various legitimate circumstances. */ + Can return zero under various legitimate circumstances. + + If ADDR_IN_BLOCK is non-zero, set *ADDR_IN_BLOCK to the relevant + code address within the block returned. We use this to decide + which macros are in scope. */ struct block * -get_selected_block (void) +get_selected_block (CORE_ADDR *addr_in_block) { if (!target_has_stack) return 0; if (!selected_frame) - return get_current_block (); - return get_frame_block (selected_frame); + return get_current_block (addr_in_block); + return get_frame_block (selected_frame, addr_in_block); } /* Find a frame a certain number of levels away from FRAME. |