diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2003-10-17 16:32:17 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2003-10-17 16:32:17 +0000 |
commit | 48c6672556ca8a5b964e1d7899d1c411ece1899d (patch) | |
tree | 6186f864b22fe29ed2114e312ec71c262ceda986 /gdb/frame.h | |
parent | 7998dfc3904875046d56eee96af0ff399f31a721 (diff) | |
download | gdb-48c6672556ca8a5b964e1d7899d1c411ece1899d.zip gdb-48c6672556ca8a5b964e1d7899d1c411ece1899d.tar.gz gdb-48c6672556ca8a5b964e1d7899d1c411ece1899d.tar.bz2 |
2003-10-17 Jeff Johnston <jjohnstn@redhat.com>
* frame.h (struct frame_id): Add new field: special_addr.
(frame_id_build_special): New prototype.
* frame.c (frame_id_build_special): New function.
(frame_id_build): Change to call frame_id_build_special().
(frame_id_eq): Change to also test special_addr field.
(frame_id_inner): Update comment.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index 4e05f16..81f07eb 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -95,8 +95,6 @@ struct frame_id is used. Watch out for all the legacy targets that still use the function pointer register or stack pointer register. They are wrong. */ - /* NOTE: cagney/2002-11-16: The ia64 has two stacks and hence two - frame bases. This will need to be expanded to accomodate that. */ CORE_ADDR stack_addr; /* The frame's code address. This shall be constant through out the lifetime of the frame. While the PC (a.k.a. resume address) @@ -104,15 +102,33 @@ struct frame_id Typically, it is set to the address of the entry point of the frame's function (as returned by frame_func_unwind(). */ CORE_ADDR code_addr; + /* The frame's special address. This shall be constant through out the + lifetime of the frame. This is used for architectures that may have + frames that do not change the stack but are still distinct and have + some form of distinct identifier (e.g. the ia64 which uses a 2nd + stack for registers). This field is treated as unordered - i.e. will + not be used in frame ordering comparisons such as frame_id_inner(). + A zero in this field will be treated as a wild-card when comparing + frames for equality. */ + CORE_ADDR special_addr; }; /* Methods for constructing and comparing Frame IDs. - NOTE: Given frameless functions A and B, where A calls B (and hence + NOTE: Given stackless functions A and B, where A calls B (and hence B is inner-to A). The relationships: !eq(A,B); !eq(B,A); - !inner(A,B); !inner(B,A); all hold. This is because, while B is - inner to A, B is not strictly inner to A (being frameless, they - have the same .base value). */ + !inner(A,B); !inner(B,A); all hold. + + This is because, while B is inner-to A, B is not strictly inner-to A. + Being stackless, they have an identical .stack_addr value, and differ + only by their unordered .code_addr and/or .special_addr values. + + Because frame_id_inner is only used as a safety net (e.g., + detect a corrupt stack) the lack of strictness is not a problem. + Code needing to determine an exact relationship between two frames + must instead use frame_id_eq and frame_id_unwind. For instance, + in the above, to determine that A stepped-into B, the equation + "A.id != B.id && A.id == id_unwind (B)" can be used. */ /* For convenience. All fields are zero. */ extern const struct frame_id null_frame_id; @@ -120,10 +136,21 @@ extern const struct frame_id null_frame_id; /* Construct a frame ID. The first parameter is the frame's constant stack address (typically the outer-bound), and the second the frame's constant code address (typically the entry point) (or zero, - to indicate a wild card). */ + to indicate a wild card). The special identifier address is + defaulted to zero. */ extern struct frame_id frame_id_build (CORE_ADDR stack_addr, CORE_ADDR code_addr); +/* Construct a special frame ID. The first parameter is the frame's constant + stack address (typically the outer-bound), the second is the + frame's constant code address (typically the entry point) (or zero, + to indicate a wild card), and the third parameter is the frame's + special identifier address (or zero to indicate a wild card or + unused default). */ +extern struct frame_id frame_id_build_special (CORE_ADDR stack_addr, + CORE_ADDR code_addr, + CORE_ADDR special_addr); + /* Returns non-zero when L is a valid frame (a valid frame has a non-zero .base). */ extern int frame_id_p (struct frame_id l); |