diff options
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index f8d5bc1..b03f212 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -76,6 +76,23 @@ struct block; struct gdbarch; struct ui_file; +/* Status of a given frame's stack. */ + +enum frame_id_stack_status +{ + /* Stack address is invalid. E.g., this frame is the outermost + (i.e., _start), and the stack hasn't been setup yet. */ + FID_STACK_INVALID = 0, + + /* Stack address is valid, and is found in the stack_addr field. */ + FID_STACK_VALID = 1, + + /* Stack address is unavailable. I.e., there's a valid stack, but + we don't know where it is (because memory or registers we'd + compute it from were not collected). */ + FID_STACK_UNAVAILABLE = -1 +}; + /* The frame object. */ struct frame_info; @@ -97,8 +114,9 @@ struct frame_id function pointer register or stack pointer register. They are wrong. - This field is valid only if stack_addr_p is true. Otherwise, this - frame represents the null frame. */ + This field is valid only if frame_id.stack_status is + FID_STACK_VALID. It will be 0 for other + FID_STACK_... statuses. */ CORE_ADDR stack_addr; /* The frame's code address. This shall be constant through out the @@ -129,7 +147,7 @@ struct frame_id CORE_ADDR special_addr; /* Flags to indicate the above fields have valid contents. */ - unsigned int stack_addr_p : 1; + ENUM_BITFIELD(frame_id_stack_status) stack_status : 2; unsigned int code_addr_p : 1; unsigned int special_addr_p : 1; @@ -169,6 +187,12 @@ extern struct frame_id frame_id_build_special (CORE_ADDR stack_addr, CORE_ADDR code_addr, CORE_ADDR special_addr); +/* Construct a frame ID representing a frame where the stack address + exists, but is unavailable. CODE_ADDR is the frame's constant code + address (typically the entry point). The special identifier + address is set to indicate a wild card. */ +extern struct frame_id frame_id_build_unavailable_stack (CORE_ADDR code_addr); + /* Construct a wild card frame ID. The parameter is the frame's constant stack address (typically the outer-bound). The code address as well as the special identifier address are set to indicate wild cards. */ |