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 | ae767bfb78e53e5586a10e6d7144dc3199e5aa36 (patch) | |
tree | 89d180b4aad315ea33face14267ddd1b5d639609 /gdb/stack.c | |
parent | 84d2ac95e4f51faedabd0219bbf0fd1c2ef5f530 (diff) | |
download | gdb-ae767bfb78e53e5586a10e6d7144dc3199e5aa36.zip gdb-ae767bfb78e53e5586a10e6d7144dc3199e5aa36.tar.gz gdb-ae767bfb78e53e5586a10e6d7144dc3199e5aa36.tar.bz2 |
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 2fe6e42..bedb6ee 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. |