diff options
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/alpha/tm-alpha.h | 2 | ||||
-rw-r--r-- | gdb/config/arc/tm-arc.h | 6 | ||||
-rw-r--r-- | gdb/config/d30v/tm-d30v.h | 2 | ||||
-rw-r--r-- | gdb/config/i386/linux.mh | 3 | ||||
-rw-r--r-- | gdb/config/i386/nm-linux.h | 21 | ||||
-rw-r--r-- | gdb/config/i386/tm-linux.h | 215 | ||||
-rw-r--r-- | gdb/config/i386/xm-linux.h | 2 | ||||
-rw-r--r-- | gdb/config/i960/tm-i960.h | 5 | ||||
-rw-r--r-- | gdb/config/m32r/tm-m32r.h | 1 | ||||
-rw-r--r-- | gdb/config/mips/tm-embed.h | 1 | ||||
-rw-r--r-- | gdb/config/mips/tm-mips.h | 4 | ||||
-rw-r--r-- | gdb/config/mn10200/tm-mn10200.h | 2 | ||||
-rw-r--r-- | gdb/config/mn10300/tm-mn10300.h | 2 | ||||
-rw-r--r-- | gdb/config/sparc/tm-sparc.h | 4 | ||||
-rw-r--r-- | gdb/config/z8k/tm-z8k.h | 16 |
15 files changed, 272 insertions, 14 deletions
diff --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h index f7e8a791fa0..8b3c5ba76ff 100644 --- a/gdb/config/alpha/tm-alpha.h +++ b/gdb/config/alpha/tm-alpha.h @@ -408,7 +408,7 @@ init_extra_frame_info PARAMS ((struct frame_info *)); #define PRINT_EXTRA_FRAME_INFO(fi) \ { \ if (fi && fi->proc_desc && fi->proc_desc->pdr.framereg < NUM_REGS) \ - printf_filtered (" frame pointer is at %s+%d\n", \ + printf_filtered (" frame pointer is at %s+%ld\n", \ REGISTER_NAME (fi->proc_desc->pdr.framereg), \ fi->proc_desc->pdr.frameoffset); \ } diff --git a/gdb/config/arc/tm-arc.h b/gdb/config/arc/tm-arc.h index 90949e36921..34fabaf4f3a 100644 --- a/gdb/config/arc/tm-arc.h +++ b/gdb/config/arc/tm-arc.h @@ -309,12 +309,14 @@ extern void frame_find_saved_regs (); /* See arc-tdep.c */ /* Things needed for making calls to functions in the inferior process */ +void arc_push_dummy_frame (void); #define PUSH_DUMMY_FRAME \ - push_dummy_frame () + arc_push_dummy_frame () /* Discard from the stack the innermost frame, restoring all registers. */ +void arc_pop_frame (void); #define POP_FRAME \ - pop_frame () + arc_pop_frame () /* This sequence of words is the instructions bl xxxx, flag 1 */ #define CALL_DUMMY { 0x28000000, 0x1fbe8001 } diff --git a/gdb/config/d30v/tm-d30v.h b/gdb/config/d30v/tm-d30v.h index 2c6131b2ccc..ac7940fc01b 100644 --- a/gdb/config/d30v/tm-d30v.h +++ b/gdb/config/d30v/tm-d30v.h @@ -215,6 +215,7 @@ extern void d30v_init_extra_frame_info PARAMS ((int fromleaf, struct frame_info #define FRAMELESS_FUNCTION_INVOCATION(FI) \ (frameless_look_for_prologue (FI)) +CORE_ADDR d30v_frame_chain (struct frame_info *frame); #define FRAME_CHAIN(FRAME) d30v_frame_chain(FRAME) extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *)); #define FRAME_CHAIN_VALID(chain, thisframe) d30v_frame_chain_valid (chain, thisframe) @@ -222,6 +223,7 @@ extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *)); #define FRAME_ARGS_ADDRESS(fi) (fi)->frame #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame +void d30v_init_frame_pc (int fromleaf, struct frame_info *prev); #define INIT_FRAME_PC_FIRST(fromleaf, prev) d30v_init_frame_pc(fromleaf, prev) #define INIT_FRAME_PC(fromleaf, prev) /* nada */ diff --git a/gdb/config/i386/linux.mh b/gdb/config/i386/linux.mh index 30de91d7d7f..1fe1e364cbe 100644 --- a/gdb/config/i386/linux.mh +++ b/gdb/config/i386/linux.mh @@ -4,4 +4,5 @@ XM_FILE= xm-linux.h XDEPFILES= ser-tcp.o NAT_FILE= nm-linux.h -NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o core-aout.o core-regset.o i386v-nat.o i386v4-nat.o +NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o \ + core-aout.o core-regset.o i386v-nat.o i386-linux-nat.o linux-thread.o diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h index d3238386b69..df964f44d48 100644 --- a/gdb/config/i386/nm-linux.h +++ b/gdb/config/i386/nm-linux.h @@ -64,6 +64,9 @@ extern int kernel_u_size PARAMS ((void)); #include "solib.h" /* Support for shared libraries. */ #endif +/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ +#define FETCH_INFERIOR_REGISTERS + extern CORE_ADDR i386_stopped_by_watchpoint PARAMS ((int)); extern int @@ -71,4 +74,22 @@ i386_insert_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len, int rw)); extern int i386_remove_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len)); +/* Support for the glibc linuxthreads package. */ + +#ifdef __STDC__ +struct objfile; +#endif + +extern void +linuxthreads_new_objfile PARAMS ((struct objfile *objfile)); +#define target_new_objfile(OBJFILE) linuxthreads_new_objfile (OBJFILE) + +extern char * +linuxthreads_pid_to_str PARAMS ((int pid)); +#define target_pid_to_str(PID) linuxthreads_pid_to_str (PID) + +extern int +linuxthreads_prepare_to_proceed PARAMS ((int step)); +#define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1) + #endif /* #ifndef NM_LINUX_H */ diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h index 0767bd9ba97..e4f70a2078d 100644 --- a/gdb/config/i386/tm-linux.h +++ b/gdb/config/i386/tm-linux.h @@ -21,8 +21,7 @@ #ifndef TM_LINUX_H #define TM_LINUX_H -/* FIXME: If nothing else gets added to this file, it could be removed - and configure could just use tm-i386.h instead. -fnf */ +#define I386_GNULINUX_TARGET #include "i386/tm-i386.h" @@ -39,9 +38,196 @@ #include "tm-sysv4.h" +/* copy of tm-cygwin32.h */ +#undef REGISTER_RAW_SIZE +#undef REGISTER_VIRTUAL_SIZE +#undef REGISTER_VIRTUAL_TYPE +#undef REGISTER_NAMES +#undef REGISTER_BYTES +#undef REGISTER_BYTE +#undef MAX_REGISTER_VIRTUAL_SIZE +#undef NUM_REGS +#undef NUM_FREGS + +/* Number of machine registers */ + +#define NUM_REGS 31 +#define NUM_FREGS 15 + +/* Initializer for an array of names of registers. + There should be NUM_REGS strings in this initializer. */ + +/* the order of the first 8 registers must match the compiler's + * numbering scheme (which is the same as the 386 scheme) + * also, this table must match regmap in i386-pinsn.c. + */ + +#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \ + "esp", "ebp", "esi", "edi", \ + "eip", "eflags","cs", "ss", \ + "ds", "es", "fs", "gs", \ + "cwd", "swd", "twd", "fip", \ + "fcs", "fopo", "fos", \ + "st", "st1", "st2", "st3", \ + "st4", "st5", "st6", "st7",} + +#define LOW_RETURN_REGNUM 0 /* holds low four bytes of result */ +#define HIGH_RETURN_REGNUM 2 /* holds high four bytes of result */ + +#define FPSTART_REGNUM 16 /* start of FPU registers */ +#define FPCONTROL_REGNUM 16 /* FPU control register */ +#define FPSTATUS_REGNUM 17 /* FPU status register */ +#define FPTAG_REGNUM 18 /* FPU tag register */ +#define FPDATA_REGNUM 23 /* actual floating-point values */ +#define FPEND_REGNUM (FPSTART_REGNUM + 14) /* last FPU register */ + +#define FPENV_BYTES (7 * 4) + +#define FPREG_RAW_SIZE (10) + +/* Total amount of space needed to store our copies of the machine's + FPU state. */ + +#define FPREG_BYTES (FPENV_BYTES + 8 * FPREG_RAW_SIZE) + +/* Total amount of space needed to store our copies of the machine's + register state, the array `registers'. */ + +#define REGISTER_BYTES (FPSTART_REGNUM * 4 + FPREG_BYTES) + +/* Index within `registers' of the first byte of the space for + register N. */ + +#define REGISTER_BYTE(N) (((N) < FPDATA_REGNUM) ? \ + (N) * 4 : \ + (((N) - FPDATA_REGNUM) * FPREG_RAW_SIZE) \ + + (FPDATA_REGNUM * 4)) + +/* Number of bytes of storage in the actual machine representation + for register N. */ + +#define REGISTER_RAW_SIZE(N) (((N) < FPDATA_REGNUM) ? 4 : FPREG_RAW_SIZE) + +/* Number of bytes of storage in the program's representation + for register N. */ + +#define REGISTER_VIRTUAL_SIZE(N) (((N) < FPDATA_REGNUM) ? 4 : FPREG_RAW_SIZE) + +/* Largest value REGISTER_RAW_SIZE can have. */ + +#undef MAX_REGISTER_RAW_SIZE +#define MAX_REGISTER_RAW_SIZE FPREG_RAW_SIZE + +/* Largest value REGISTER_VIRTUAL_SIZE can have. */ + +#define MAX_REGISTER_VIRTUAL_SIZE FPREG_RAW_SIZE + +#if defined(HAVE_LONG_DOUBLE) && defined(HOST_I386) +/* The host and target are i386 machines and the compiler supports + long doubles. Long doubles on the host therefore have the same + layout as a 387 FPU stack register. */ +#define LD_I387 +#endif + +#define TARGET_LONG_DOUBLE_BIT 80 + +#ifdef LD_I387 +extern int i387_extract_floating (PTR addr, int len, long double *dretptr); +extern int i387_store_floating (PTR addr, int len, long double val); + +#define TARGET_EXTRACT_FLOATING i387_extract_floating +#define TARGET_STORE_FLOATING i387_store_floating + +#define TARGET_ANALYZE_FLOATING \ + do \ + { \ + unsigned expon; \ + \ + low = extract_unsigned_integer (valaddr, 4); \ + high = extract_unsigned_integer (valaddr + 4, 4); \ + expon = extract_unsigned_integer (valaddr + 8, 2); \ + \ + nonnegative = ((expon & 0x8000) == 0); \ + is_nan = ((expon & 0x7fff) == 0x7fff) \ + && ((high & 0x80000000) == 0x80000000) \ + && (((high & 0x7fffffff) | low) != 0); \ + } \ + while (0) +#endif + +#ifndef LD_I387 +/* Nonzero if register N requires conversion + from raw format to virtual format. */ +#define REGISTER_CONVERTIBLE(N) \ + ((N < FPDATA_REGNUM) ? 0 : 1) +#endif + +#ifdef LD_I387 +#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ +{ \ + long double val = *((long double *)FROM); \ + store_floating ((TO), TYPE_LENGTH (TYPE), val); \ +} +#else +/* Convert data from raw format for register REGNUM in buffer FROM + to virtual format with type TYPE in buffer TO. */ +extern void +i387_to_double PARAMS ((char *, char *)); + +#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ +{ \ + double val; \ + i387_to_double ((FROM), (char *)&val); \ + store_floating ((TO), TYPE_LENGTH (TYPE), val); \ +} +#endif + +#ifdef LD_I387 +#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ +{ \ + long double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ + *((long double *)TO) = val; \ +} +#else +extern void +double_to_i387 PARAMS ((char *, char *)); + +#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ +{ \ + double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ + double_to_i387((char *)&val, (TO)); \ +} +#endif + +/* Return the GDB type object for the "standard" data type + of data in register N. */ + +#ifdef LD_I387 +#define REGISTER_VIRTUAL_TYPE(N) \ + ((N < FPDATA_REGNUM) ? builtin_type_int : \ + builtin_type_long_double) +#else +#define REGISTER_VIRTUAL_TYPE(N) \ + ((N < FPDATA_REGNUM) ? builtin_type_int : \ + builtin_type_double) +#endif + +/* end of copy */ + +extern void i387_float_info(void); +#define FLOAT_INFO { i387_float_info (); } + /* The following works around a problem with /usr/include/sys/procfs.h */ #define sys_quotactl 1 +/* Define DO_REGISTERS_INFO() to do machine-specific formatting + of register dumps. */ + +#define DO_REGISTERS_INFO(_regnum, fp) i386_do_registers_info(_regnum, fp) +extern void i386_do_registers_info PARAMS ((int, int)); + +extern void i387_print_register PARAMS ((char *, int)); + /* When the i386 Linux kernel calls a signal handler, the return address points to a bit of code on the stack. These definitions are used to identify this bit of code as a signal trampoline in @@ -104,4 +290,29 @@ extern CORE_ADDR i386_linux_sigtramp_saved_pc PARAMS ((struct frame_info *)); extern CORE_ADDR i386_linux_sigtramp_saved_sp PARAMS ((struct frame_info *)); +/* Some versions of Linux have real-time signal support in the C library, and + some don't. We have to include this file to find out. */ +#include <signal.h> + +#ifdef __SIGRTMIN +#define REALTIME_LO __SIGRTMIN +#define REALTIME_HI (__SIGRTMAX + 1) +#else +#define REALTIME_LO 32 +#define REALTIME_HI 64 +#endif + +/* When we call a function in a shared library, and the PLT sends us + into the dynamic linker to find the function's real address, we + need to skip over the dynamic linker call. This function decides + when to skip, and where to skip to. See the comments for + SKIP_SOLIB_RESOLVER at the top of infrun.c. */ +#define SKIP_SOLIB_RESOLVER i386_linux_skip_solib_resolver +extern CORE_ADDR i386_linux_skip_solib_resolver (CORE_ADDR pc); + +/* N_FUN symbols in shared libaries have 0 for their values and need + to be relocated. */ +#define SOFUN_ADDRESS_MAYBE_MISSING + #endif /* #ifndef TM_LINUX_H */ + diff --git a/gdb/config/i386/xm-linux.h b/gdb/config/i386/xm-linux.h index b788b677948..fb07b4214d2 100644 --- a/gdb/config/i386/xm-linux.h +++ b/gdb/config/i386/xm-linux.h @@ -21,6 +21,8 @@ #ifndef XM_LINUX_H #define XM_LINUX_H +#define HOST_I386 + #define HOST_BYTE_ORDER LITTLE_ENDIAN #define HAVE_TERMIOS diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h index 3a6e2342ee1..73bb8dbfff4 100644 --- a/gdb/config/i960/tm-i960.h +++ b/gdb/config/i960/tm-i960.h @@ -287,6 +287,7 @@ extern use_struct_convention_fn i960_use_struct_convention; by FI does not have a frame on the stack associated with it. If it does not, FRAMELESS is set to 1, else 0. */ +CORE_ADDR leafproc_return (CORE_ADDR ip); #define FRAMELESS_FUNCTION_INVOCATION(FI) \ (leafproc_return ((FI)->pc) != 0) @@ -341,8 +342,10 @@ error("Function calls into the inferior process are not supported on the i960") /* Discard from the stack the innermost frame, restoring all registers. */ + +void i960_pop_frame (void); #define POP_FRAME \ - pop_frame () + i960_pop_frame () /* This sequence of words is the instructions diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h index 7898f66bd96..97f08807ec6 100644 --- a/gdb/config/m32r/tm-m32r.h +++ b/gdb/config/m32r/tm-m32r.h @@ -168,6 +168,7 @@ extern CORE_ADDR m32r_skip_prologue PARAMS ((CORE_ADDR pc)); #define COERCE_FLOAT_TO_DOUBLE 1 +extern void m32r_write_sp (CORE_ADDR val); #define TARGET_WRITE_SP m32r_write_sp diff --git a/gdb/config/mips/tm-embed.h b/gdb/config/mips/tm-embed.h index af51a7fc138..9e0ac8600f1 100644 --- a/gdb/config/mips/tm-embed.h +++ b/gdb/config/mips/tm-embed.h @@ -43,6 +43,7 @@ int remote_mips_remove_watchpoint PARAMS ((CORE_ADDR addr, int len, int type)); #define HAVE_NONSTEPPABLE_WATCHPOINT +int remote_mips_stopped_by_watchpoint (void); #define STOPPED_BY_WATCHPOINT(w) remote_mips_stopped_by_watchpoint () #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \ diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h index fecdea64de1..6e7e72c5762 100644 --- a/gdb/config/mips/tm-mips.h +++ b/gdb/config/mips/tm-mips.h @@ -579,3 +579,7 @@ typedef unsigned long t_inst; /* Integer big enough to hold an instruction */ (((long) MSYMBOL_INFO (msym) & 0x80000000) != 0) #define MSYMBOL_SIZE(msym) \ ((long) MSYMBOL_INFO (msym) & 0x7fffffff) + + +/* Command to set the processor type. */ +extern void mips_set_processor_type_command (char *, int); diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h index 8816de01ddf..cb2a57f371c 100644 --- a/gdb/config/mn10200/tm-mn10200.h +++ b/gdb/config/mn10200/tm-mn10200.h @@ -161,6 +161,8 @@ extern CORE_ADDR mn10200_frame_saved_pc PARAMS ((struct frame_info *)); } \ } + +extern CORE_ADDR mn10200_store_struct_return (CORE_ADDR addr, CORE_ADDR sp); #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \ (SP) = mn10200_store_struct_return (STRUCT_ADDR, SP) diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h index f9e38e01573..4bc76fd165d 100644 --- a/gdb/config/mn10300/tm-mn10300.h +++ b/gdb/config/mn10300/tm-mn10300.h @@ -104,6 +104,8 @@ void mn10300_store_return_value PARAMS ((struct type * type, char *valbuf)); #define STORE_RETURN_VALUE(TYPE, VALBUF) \ mn10300_store_return_value (TYPE, VALBUF) + +extern CORE_ADDR mn10300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp); #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \ (mn10300_store_struct_return (STRUCT_ADDR, SP)) diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index a8db2f51bcf..635a69379d1 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -339,8 +339,8 @@ extern void sparc_init_extra_frame_info PARAMS ((int, struct frame_info *)); #define PRINT_EXTRA_FRAME_INFO(fi) \ { \ if ((fi) && (fi)->flat) \ - printf_filtered (" flat, pc saved at 0x%x, fp saved at 0x%x\n", \ - (fi)->pc_addr, (fi)->fp_addr); \ + printf_filtered (" flat, pc saved at 0x%s, fp saved at 0x%s\n", \ + paddr_nz ((fi)->pc_addr), paddr_nz ((fi)->fp_addr)); \ } #define FRAME_CHAIN(thisframe) (sparc_frame_chain (thisframe)) diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h index bf6d4c93972..f781e0a868e 100644 --- a/gdb/config/z8k/tm-z8k.h +++ b/gdb/config/z8k/tm-z8k.h @@ -42,7 +42,7 @@ to reach some "real" code. */ #define SKIP_PROLOGUE(ip) (z8k_skip_prologue (ip)) -extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip)); +extern CORE_ADDR z8k_skip_prologue PARAMS ((CORE_ADDR ip)); /* Immediately after a function call, return the saved pc. @@ -50,7 +50,9 @@ extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip)); the new frame is not set up until the new function executes some instructions. */ -#define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call(frame) + +extern int z8k_saved_pc_after_call (struct frame_info *frame); +#define SAVED_PC_AFTER_CALL(frame) z8k_saved_pc_after_call(frame) /* Stack grows downward. */ @@ -167,7 +169,8 @@ extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip)); is the address of a ptr sized byte word containing the calling frame's address. */ -#define FRAME_CHAIN(thisframe) frame_chain(thisframe); +extern CORE_ADDR z8k_frame_chain (struct frame_info *thisframe); +#define FRAME_CHAIN(thisframe) z8k_frame_chain(thisframe); @@ -179,7 +182,8 @@ extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip)); #define FRAMELESS_FUNCTION_INVOCATION(FI) \ (frameless_look_for_prologue (FI)) -#define FRAME_SAVED_PC(FRAME) frame_saved_pc(FRAME) +extern CORE_ADDR z8k_frame_saved_pc (struct frame_info *frame); +#define FRAME_SAVED_PC(FRAME) z8k_frame_saved_pc(FRAME) #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame) @@ -276,9 +280,11 @@ int sim_z8001_mode; #define NO_STD_REGS -#define PRINT_REGISTER_HOOK(regno) print_register_hook(regno) +extern void z8k_print_register_hook (int regno); +#define PRINT_REGISTER_HOOK(regno) z8k_print_register_hook(regno) +extern void z8k_set_pointer_size (int newsize); #define INIT_EXTRA_SYMTAB_INFO \ z8k_set_pointer_size(objfile->obfd->arch_info->bits_per_address); |