diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-05-01 19:35:22 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-05-01 19:35:22 +0000 |
commit | 0e100dab2eb07e9fc9ca155f87172d02439b64cb (patch) | |
tree | c7d780fe2636e683e8ee64f718b2f51b57d7c635 /gdb | |
parent | 55699d593f51fb72de21a8860f53b5b5a11207bd (diff) | |
download | gdb-0e100dab2eb07e9fc9ca155f87172d02439b64cb.zip gdb-0e100dab2eb07e9fc9ca155f87172d02439b64cb.tar.gz gdb-0e100dab2eb07e9fc9ca155f87172d02439b64cb.tar.bz2 |
2004-05-01 Andrew Cagney <cagney@redhat.com>
* frame.c (create_sentinel_frame): Set type to SENTINEL_FRAME.
* dummy-frame.c (dummy_frame_this_id): Use get_frame_type, instead
of frame_relative_level.
* sentinel-frame.c (sentinel_frame_unwinder): Set unwinder's type
to SENTINEL_FRAME.
* frame.h (enum frame_type): Add SENTINEL_FRAME.
* s390-tdep.c (s390_prologue_frame_unwind_cache): Delete calls to
frame_relative_level.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/dummy-frame.c | 2 | ||||
-rw-r--r-- | gdb/frame.c | 2 | ||||
-rw-r--r-- | gdb/frame.h | 5 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 14 | ||||
-rw-r--r-- | gdb/sentinel-frame.c | 3 |
6 files changed, 25 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 17fc35f..fe6552b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2004-05-01 Andrew Cagney <cagney@redhat.com> + * frame.c (create_sentinel_frame): Set type to SENTINEL_FRAME. + * dummy-frame.c (dummy_frame_this_id): Use get_frame_type, instead + of frame_relative_level. + * sentinel-frame.c (sentinel_frame_unwinder): Set unwinder's type + to SENTINEL_FRAME. + * frame.h (enum frame_type): Add SENTINEL_FRAME. + * s390-tdep.c (s390_prologue_frame_unwind_cache): Delete calls to + frame_relative_level. + +2004-05-01 Andrew Cagney <cagney@redhat.com> + * frame.h (deprecated_set_frame_type): Delete declaration. * frame.c (deprecated_set_frame_type): Delete function, update comments. diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index af8e001..216db67 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -353,7 +353,7 @@ dummy_frame_this_id (struct frame_info *next_frame, determine the dummy frame's ID. */ (*this_id) = gdbarch_unwind_dummy_id (current_gdbarch, next_frame); } - else if (frame_relative_level (next_frame) < 0) + else if (get_frame_type (next_frame) == SENTINEL_FRAME) { /* We're unwinding a sentinel frame, the PC of which is pointing at a stack dummy. Fake up the dummy frame's ID using the diff --git a/gdb/frame.c b/gdb/frame.c index f120a16..5359fd3 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -767,7 +767,7 @@ static struct frame_info * create_sentinel_frame (struct regcache *regcache) { struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info); - frame->type = NORMAL_FRAME; + frame->type = SENTINEL_FRAME; frame->level = -1; /* Explicitly initialize the sentinel frame's cache. Provide it with the underlying regcache. In the future additional diff --git a/gdb/frame.h b/gdb/frame.h index 617d3a1..a6e84a6 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -355,7 +355,10 @@ enum frame_type DUMMY_FRAME, /* In a signal handler, various OSs handle this in various ways. The main thing is that the frame may be far from normal. */ - SIGTRAMP_FRAME + SIGTRAMP_FRAME, + /* Sentinel or registers frame. This frame obtains register values + direct from the inferior's registers. */ + SENTINEL_FRAME }; extern enum frame_type get_frame_type (struct frame_info *); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 0f8f65d..6a5cd50 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1803,10 +1803,10 @@ s390_prologue_frame_unwind_cache (struct frame_info *next_frame, /* If the next frame is a NORMAL_FRAME, this frame *cannot* have frame size zero. This is only possible if the next frame is a sentinel frame, a dummy frame, or a signal trampoline frame. */ - if (get_frame_type (next_frame) == NORMAL_FRAME - /* For some reason, sentinel frames are NORMAL_FRAMEs - -- but they have negative frame level. */ - && frame_relative_level (next_frame) >= 0) + /* FIXME: cagney/2004-05-01: This sanity check shouldn't be + needed, instead the code should simpliy rely on its + analysis. */ + if (get_frame_type (next_frame) == NORMAL_FRAME) return 0; /* If we really have a frameless function, %r14 must be valid @@ -1850,9 +1850,9 @@ s390_prologue_frame_unwind_cache (struct frame_info *next_frame, treat it as frameless if we're currently within the function epilog code at a point where the frame pointer has already been restored. This can only happen in an innermost frame. */ - if (size > 0 - && (get_frame_type (next_frame) != NORMAL_FRAME - || frame_relative_level (next_frame) < 0)) + /* FIXME: cagney/2004-05-01: This sanity check shouldn't be needed, + instead the code should simpliy rely on its analysis. */ + if (size > 0 && get_frame_type (next_frame) != NORMAL_FRAME) { /* See the comment in s390_in_function_epilogue_p on why this is not completely reliable ... */ diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c index 94c1ee3..f1e5c7f 100644 --- a/gdb/sentinel-frame.c +++ b/gdb/sentinel-frame.c @@ -83,8 +83,7 @@ sentinel_frame_this_id (struct frame_info *next_frame, const struct frame_unwind sentinel_frame_unwinder = { - /* Should the sentinel frame be given a special type? */ - NORMAL_FRAME, + SENTINEL_FRAME, sentinel_frame_this_id, sentinel_frame_prev_register }; |