diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-11-29 01:52:02 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-11-29 01:52:02 +0000 |
commit | 1058bca7483f329cd60fba85ce7391d522885fde (patch) | |
tree | 036848f60b897b3e984bd3b9863fb1ed44ba8496 /gdb/frame.h | |
parent | d92419e5e96545b7021e28c14db0576ad0b1790b (diff) | |
download | gdb-1058bca7483f329cd60fba85ce7391d522885fde.zip gdb-1058bca7483f329cd60fba85ce7391d522885fde.tar.gz gdb-1058bca7483f329cd60fba85ce7391d522885fde.tar.bz2 |
2002-11-28 Andrew Cagney <ac131313@redhat.com>
* frame.c (pc_notcurrent): New function.
(find_frame_sal): New function.
* frame.h (find_frame_sal): Declare.
(struct symtab_and_line): Add opaque declaration.
* stack.c (print_frame_info_base): Use find_pc_line instead of
find_frame_sal.
(frame_info): Ditto.
* ada-lang.c (find_printable_frame): Ditto.
Index: tui/ChangeLog
2002-11-28 Andrew Cagney <ac131313@redhat.com>
* tuiStack.c (tuiShowFrameInfo): Use find_frame_sal instead of
find_pc_line.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index 2a5e47d..202f9c8 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -23,6 +23,8 @@ #if !defined (FRAME_H) #define FRAME_H 1 +struct symtab_and_line; + /* The frame object. */ struct frame_info; @@ -99,6 +101,27 @@ extern struct frame_info *frame_find_by_id (struct frame_id id); this frame. */ extern CORE_ADDR get_frame_pc (struct frame_info *); +/* Closely related to the resume address, various symbol table + attributes that are determined by the PC. Note that for a normal + frame, the PC refers to the resume address after the return, and + not the call instruction. In such a case, the address is adjusted + so that it (approximatly) identifies the call site (and not return + site). + + NOTE: cagney/2002-11-28: The frame cache could be used to cache the + computed value. Working on the assumption that the bottle-neck is + in the single step code, and that code causes the frame cache to be + constantly flushed, caching things in a frame is probably of little + benefit. As they say `show us the numbers'. + + NOTE: cagney/2002-11-28: Plenty more where this one came from: + find_frame_block(), find_frame_partial_function(), + find_frame_symtab(), find_frame_function(). Each will need to be + carefully considered to determine if the real intent was for it to + apply to the PC or the adjusted PC. */ +extern void find_frame_sal (struct frame_info *frame, + struct symtab_and_line *sal); + /* Return the frame address from FI. Except in the machine-dependent *FRAME* macros, a frame address has no defined meaning other than as a magic cookie which identifies a frame over calls to the |