diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-12-09 00:32:08 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-12-09 00:32:08 +0000 |
commit | 75e3c1f98d4e0b3d89560b5981ade71c246b504b (patch) | |
tree | 97546595050844383dab1b4312e7f0d7530a23e7 | |
parent | 559747269fed22d80ee96ad0a6e3fa606bf257b8 (diff) | |
download | gdb-75e3c1f98d4e0b3d89560b5981ade71c246b504b.zip gdb-75e3c1f98d4e0b3d89560b5981ade71c246b504b.tar.gz gdb-75e3c1f98d4e0b3d89560b5981ade71c246b504b.tar.bz2 |
2002-12-08 Andrew Cagney <ac131313@redhat.com>
* stack.c (frame_info): Use get_prev_frame.
* blockframe.c (frame_address_in_block): Ditto.
* rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
(rs6000_frameless_function_invocation): Ditto.
(rs6000_frame_saved_pc): Ditto.
(rs6000_frame_chain): Ditto.
* arch-utils.c (init_frame_pc_default): Ditto.
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/arch-utils.c | 6 | ||||
-rw-r--r-- | gdb/blockframe.c | 4 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 16 | ||||
-rw-r--r-- | gdb/stack.c | 8 |
5 files changed, 28 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 525b006..630e43e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,15 @@ 2002-12-08 Andrew Cagney <ac131313@redhat.com> + * stack.c (frame_info): Use get_prev_frame. + * blockframe.c (frame_address_in_block): Ditto. + * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto. + (rs6000_frameless_function_invocation): Ditto. + (rs6000_frame_saved_pc): Ditto. + (rs6000_frame_chain): Ditto. + * arch-utils.c (init_frame_pc_default): Ditto. + +2002-12-08 Andrew Cagney <ac131313@redhat.com> + * config/mn10200/tm-mn10200.h (DEPRECATED_PC_IN_CALL_DUMMY): Delete redundant definition. diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index a805dbc..dfbbc21 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -383,9 +383,9 @@ void init_frame_pc_default (int fromleaf, struct frame_info *prev) { if (fromleaf) - prev->pc = SAVED_PC_AFTER_CALL (prev->next); - else if (prev->next != NULL) - prev->pc = FRAME_SAVED_PC (prev->next); + prev->pc = SAVED_PC_AFTER_CALL (get_next_frame (prev)); + else if (get_next_frame (prev) != NULL) + prev->pc = FRAME_SAVED_PC (get_next_frame (prev)); else prev->pc = read_pc (); } diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 84b8cc4..caaecd4 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -213,8 +213,8 @@ frame_address_in_block (struct frame_info *frame) /* FIXME: cagney/2002-11-10: Should this instead test for NORMAL_FRAME? A dummy frame (in fact all the abnormal frames) save the PC value in the block. */ - if (frame->next != 0 - && get_frame_type (frame->next) != SIGTRAMP_FRAME) + if (get_next_frame (frame) != 0 + && get_frame_type (get_next_frame (frame)) != SIGTRAMP_FRAME) --pc; return pc; diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index b6e336b..31b6cb1 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -169,7 +169,7 @@ rs6000_init_extra_frame_info (int fromleaf, struct frame_info *fi) fi->extra_info = (struct frame_extra_info *) frame_obstack_alloc (sizeof (struct frame_extra_info)); fi->extra_info->initial_sp = 0; - if (fi->next != (CORE_ADDR) 0 + if (get_next_frame (fi) != (CORE_ADDR) 0 && fi->pc < TEXT_SEGMENT_BASE) /* We're in get_prev_frame */ /* and this is a special signal frame. */ @@ -1477,7 +1477,8 @@ rs6000_frameless_function_invocation (struct frame_info *fi) /* Don't even think about framelessness except on the innermost frame or if the function was interrupted by a signal. */ - if (fi->next != NULL && !(get_frame_type (fi->next) == SIGTRAMP_FRAME)) + if (get_next_frame (fi) != NULL + && !(get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) return 0; func_start = get_pc_function_start (fi->pc); @@ -1526,10 +1527,11 @@ rs6000_frame_saved_pc (struct frame_info *fi) (void) skip_prologue (func_start, fi->pc, &fdata); - if (fdata.lr_offset == 0 && fi->next != NULL) + if (fdata.lr_offset == 0 && get_next_frame (fi) != NULL) { - if ((get_frame_type (fi->next) == SIGTRAMP_FRAME)) - return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET, + if ((get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) + return read_memory_addr (get_next_frame (fi)->frame + + SIG_FRAME_LR_OFFSET, wordsize); else if (DEPRECATED_PC_IN_CALL_DUMMY (get_next_frame (fi)->pc, 0, 0)) /* The link register wasn't saved by this frame and the next @@ -1756,8 +1758,8 @@ rs6000_frame_chain (struct frame_info *thisframe) if ((get_frame_type (thisframe) == SIGTRAMP_FRAME)) fp = read_memory_addr (thisframe->frame + SIG_FRAME_FP_OFFSET, wordsize); - else if (thisframe->next != NULL - && (get_frame_type (thisframe->next) == SIGTRAMP_FRAME) + else if (get_next_frame (thisframe) != NULL + && (get_frame_type (get_next_frame (thisframe)) == SIGTRAMP_FRAME) && FRAMELESS_FUNCTION_INVOCATION (thisframe)) /* A frameless function interrupted by a signal did not change the frame pointer. */ diff --git a/gdb/stack.c b/gdb/stack.c index 76cd4a5..d1dbd4e 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -837,15 +837,15 @@ frame_info (char *addr_exp, int from_tty) printf_filtered (" called by frame at "); print_address_numeric (calling_frame_info->frame, 1, gdb_stdout); } - if (fi->next && calling_frame_info) + if (get_next_frame (fi) && calling_frame_info) puts_filtered (","); wrap_here (" "); - if (fi->next) + if (get_next_frame (fi)) { printf_filtered (" caller of frame at "); - print_address_numeric (fi->next->frame, 1, gdb_stdout); + print_address_numeric (get_next_frame (fi)->frame, 1, gdb_stdout); } - if (fi->next || calling_frame_info) + if (get_next_frame (fi) || calling_frame_info) puts_filtered ("\n"); if (s) printf_filtered (" source language %s.\n", |