diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-07-07 20:29:56 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-07-07 20:29:56 +0000 |
commit | 23a8e2915cfa83f8cac60e61e1b414a7aeab198e (patch) | |
tree | 5ebb4da63b33de2d086d84e2cea8479d650a5ff7 /gdb/config | |
parent | e154ecf4ab067beccde639b61a166eb9ebc7c0c3 (diff) | |
download | gdb-23a8e2915cfa83f8cac60e61e1b414a7aeab198e.zip gdb-23a8e2915cfa83f8cac60e61e1b414a7aeab198e.tar.gz gdb-23a8e2915cfa83f8cac60e61e1b414a7aeab198e.tar.bz2 |
* frame.h, blockframe.c, stack.c, a29k-tdep.c,
config/gould/tmp-{pn,np1}.h,
config/{sparc/tm-sparc.h,pyr/tm-pyr.h,vax/tm-vax.h}: Remove field
next_frame from struct frame_info. It has no purpose beyond
->next->frame and is an artifact from GDB 2.8.
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/rs6000/tm-rs6000.h | 78 | ||||
-rw-r--r-- | gdb/config/sparc/tm-sparc.h | 9 | ||||
-rw-r--r-- | gdb/config/vax/tm-vax.h | 8 |
3 files changed, 47 insertions, 48 deletions
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h index 81ed15c..6350254 100644 --- a/gdb/config/rs6000/tm-rs6000.h +++ b/gdb/config/rs6000/tm-rs6000.h @@ -18,21 +18,10 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -extern int symtab_relocated; - /* Minimum possible text address in AIX */ #define TEXT_SEGMENT_BASE 0x10000000 - -/* text addresses in a core file does not necessarily match to symbol table, - if symbol table relocation wasn't done yet. */ - -#define CORE_NEEDS_RELOCATION(PC) \ - if (!symtab_relocated && !inferior_pid) \ - xcoff_relocate_core (); -extern void xcoff_relocate_core PARAMS ((void)); - /* Load segment of a given pc value. */ #define PC_LOAD_SEGMENT(PC) pc_load_segment_name(PC) @@ -42,20 +31,16 @@ extern void xcoff_relocate_core PARAMS ((void)); #define BELIEVE_PCC_PROMOTION 1 /* return true if a given `pc' value is in `call dummy' function. */ - +/* FIXME: This just checks for the end of the stack, which is broken + for things like stepping through gcc nested function stubs. */ #define PC_IN_CALL_DUMMY(STOP_PC, STOP_SP, STOP_FRAME_ADDR) \ (STOP_SP < STOP_PC && STOP_PC < STACK_END_ADDR) -/* For each symtab, we keep track of which BFD it came from. */ -#define EXTRA_SYMTAB_INFO \ - unsigned nonreloc:1; /* TRUE if non relocatable */ - -#define INIT_EXTRA_SYMTAB_INFO(symtab) \ - symtab->nonreloc = 0; \ - +#if 0 extern unsigned int text_start, data_start; -extern int inferior_pid; extern char *corefile; +#endif +extern int inferior_pid; /* setpgrp() messes up controling terminal. The other version of it requires libbsd.a. */ @@ -114,17 +99,12 @@ function_frame_info PARAMS ((CORE_ADDR, struct aix_framedata *)); /* When a child process is just starting, we sneak in and relocate the symbol table (and other stuff) after the dynamic linker has - figured out where they go. But we want to do this relocation just - once. */ - -extern int loadinfotextindex; + figured out where they go. */ #define SOLIB_CREATE_INFERIOR_HOOK(PID) \ do { \ - if (loadinfotextindex == 0) \ - xcoff_relocate_symtab (PID); \ + xcoff_relocate_symtab (PID); \ } while (0) - /* Number of trap signals we need to skip over, once the inferior process starts running. */ @@ -155,15 +135,17 @@ extern int loadinfotextindex; #define PROCESS_LINENUMBER_HOOK() aix_process_linenos () - /* When a target process or core-file has been attached, we sneak in - and figure out where the shared libraries have got to. In case there - is no inferior_process exists (e.g. bringing up a core file), we can't - attemtp to relocate symbol table, since we don't have information about - load segments. */ + and figure out where the shared libraries have got to. */ #define SOLIB_ADD(a, b, c) \ - if (inferior_pid) xcoff_relocate_symtab (inferior_pid) + if (inferior_pid) \ + /* Attach to process. */ \ + xcoff_relocate_symtab (inferior_pid); \ + else \ + /* Core file. */ \ + xcoff_relocate_core (); +extern void xcoff_relocate_core PARAMS ((void)); /* Immediately after a function call, return the saved pc. Can't go through the frames for this because on some machines @@ -401,10 +383,11 @@ extern unsigned int rs6000_struct_return_address; /* In the case of the RS6000, the frame's nominal address is the address of a 4-byte word containing the calling frame's address. */ -#define FRAME_CHAIN(thisframe) \ - (!inside_entry_file ((thisframe)->pc) ? \ - read_memory_integer ((thisframe)->frame, 4) :\ - 0) +#define FRAME_CHAIN(thisframe) rs6000_frame_chain (thisframe) +#ifdef __STDC__ +struct frame_info; +#endif +CORE_ADDR rs6000_frame_chain PARAMS ((struct frame_info *)); /* Define other aspects of the stack frame. */ @@ -426,19 +409,30 @@ extern unsigned int rs6000_struct_return_address; CORE_ADDR initial_sp; /* initial stack pointer. */ \ struct frame_saved_regs *cache_fsr; /* saved registers */ +#define INIT_FRAME_PC_FIRST(fromleaf, prev) \ + prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \ + prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ()); +#define INIT_FRAME_PC(fromleaf, prev) /* nothing */ +#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \ + fi->initial_sp = 0; \ + fi->cache_fsr = 0; \ + if (fi->next != (CORE_ADDR)0 \ + && read_memory_integer (fi->frame, 4) == 0 \ + && fi->pc < TEXT_SEGMENT_BASE) \ + /* We're in get_prev_frame_info */ \ + /* and this is a special signal frame. */ \ + /* (fi->pc will be something like 0x3f88 or 0x2790). */ \ + fi->signal_handler_caller = 1; + /* Frameless function invocation in IBM RS/6000 is sometimes half-done. It perfectly sets up a new frame, e.g. a new frame (in fact stack) pointer, etc, but it doesn't save the %pc. We call frameless_function_invocation to tell us how to get the %pc. */ -#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \ - fi->initial_sp = 0; \ - fi->cache_fsr = 0; - #define FRAME_SAVED_PC(FRAME) \ (frameless_function_invocation (FRAME, 1) \ ? SAVED_PC_AFTER_CALL (FRAME) \ - : read_memory_integer (read_memory_integer ((FRAME)->frame, 4)+8, 4)) + : read_memory_integer (rs6000_frame_chain (FRAME)+8, 4)) #define FRAME_ARGS_ADDRESS(FI) \ (((struct frame_info*)(FI))->initial_sp ? \ diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index d4acb9a..a6e5e38 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -310,13 +310,18 @@ sparc_extract_struct_value_address PARAMS ((char [REGISTER_BYTES])); If there is a frame below this one, and the frame pointers are identical, it's a leaf frame and the bottoms are the same also. - Otherwise the bottom of this frame is the top of the next frame. */ + Otherwise the bottom of this frame is the top of the next frame. + + The bottom field is misnamed, since it might imply that memory from + bottom to frame contains this frame. That need not be true if + stack frames are allocated in different segments (e.g. some on a + stack, some on a heap in the data segment). */ #define EXTRA_FRAME_INFO FRAME_ADDR bottom; #define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \ (fci)->bottom = \ ((fci)->next ? \ - ((fci)->frame == (fci)->next_frame ? \ + ((fci)->frame == (fci)->next->frame ? \ (fci)->next->bottom : (fci)->next->frame) : \ read_register (SP_REGNUM)); diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h index 8631e04..6fd2454 100644 --- a/gdb/config/vax/tm-vax.h +++ b/gdb/config/vax/tm-vax.h @@ -245,16 +245,16 @@ fix to bug-gdb@prep.ai.mit.edu. */ So return 0 (indicating we don't know the address of the arglist) if we don't know what frame this frame calls. */ #define FRAME_ARGS_ADDRESS_CORRECT(fi) \ - (((fi)->next_frame \ - ? read_memory_integer ((fi)->next_frame + 8, 4) \ + (((fi)->next \ + ? read_memory_integer ((fi)->next->frame + 8, 4) \ : /* read_register (AP_REGNUM) */ 0)) /* In most of GDB, getting the args address is too important to just say "I don't know". This is sometimes wrong for functions that aren't on top of the stack, but c'est la vie. */ #define FRAME_ARGS_ADDRESS(fi) \ - (((fi)->next_frame \ - ? read_memory_integer ((fi)->next_frame + 8, 4) \ + (((fi)->next \ + ? read_memory_integer ((fi)->next->frame + 8, 4) \ : read_register (AP_REGNUM) /* 0 */)) #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame) |