aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2000-02-22 01:20:32 +0000
committerKevin Buettner <kevinb@redhat.com>2000-02-22 01:20:32 +0000
commitc877c8e605d04635abeb06dfdd001c63f404227c (patch)
tree3fc1dc159041b140e1e5e4f3a3c0a3b3724852bd /gdb/config
parent2559291b00ed01bbd3fb05db965f51c398f1fcad (diff)
downloadgdb-c877c8e605d04635abeb06dfdd001c63f404227c.zip
gdb-c877c8e605d04635abeb06dfdd001c63f404227c.tar.gz
gdb-c877c8e605d04635abeb06dfdd001c63f404227c.tar.bz2
Changes for GNU/Linux PPC native port of gdb.
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/powerpc/linux.mt3
-rw-r--r--gdb/config/powerpc/nm-linux.h64
-rw-r--r--gdb/config/powerpc/tm-linux.h113
-rw-r--r--gdb/config/powerpc/xm-linux.h46
-rw-r--r--gdb/config/rs6000/tm-rs6000.h9
5 files changed, 230 insertions, 5 deletions
diff --git a/gdb/config/powerpc/linux.mt b/gdb/config/powerpc/linux.mt
new file mode 100644
index 0000000..a7c1bed
--- /dev/null
+++ b/gdb/config/powerpc/linux.mt
@@ -0,0 +1,3 @@
+# Target: Motorola PPC on Linux
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
+TM_FILE= tm-linux.h
diff --git a/gdb/config/powerpc/nm-linux.h b/gdb/config/powerpc/nm-linux.h
new file mode 100644
index 0000000..78b78b9
--- /dev/null
+++ b/gdb/config/powerpc/nm-linux.h
@@ -0,0 +1,64 @@
+/* IBM PowerPC native-dependent macros for GDB, the GNU debugger.
+ Copyright 1995 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+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. */
+
+#ifndef NM_LINUX_H
+#define NM_LINUX_H
+
+/* Return sizeof user struct to callers in less machine dependent routines */
+
+#define KERNEL_U_SIZE kernel_u_size()
+extern int kernel_u_size PARAMS ((void));
+
+/* Tell gdb that we can attach and detach other processes */
+#define ATTACH_DETACH
+
+#define U_REGS_OFFSET 0
+
+#define REGISTER_U_ADDR(addr, blockend, regno) \
+ (addr) = ppc_register_u_addr ((blockend),(regno));
+
+/* No <sys/reg.h> */
+
+#define NO_SYS_REG_H
+
+#ifdef HAVE_LINK_H
+#include "solib.h" /* Support for shared libraries. */
+#define SVR4_SHARED_LIBS
+#endif
+
+/* Support for Linuxthreads. */
+
+#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/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h
new file mode 100644
index 0000000..13a5327
--- /dev/null
+++ b/gdb/config/powerpc/tm-linux.h
@@ -0,0 +1,113 @@
+/* Definitions to target GDB to Linux on 386.
+ Copyright 1992, 1993 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef TM_LINUX_H
+#define TM_LINUX_H
+
+#include "powerpc/tm-ppc-eabi.h"
+
+#undef PUSH_ARGUMENTS
+
+/* We can single step on linux */
+#undef SOFTWARE_SINGLE_STEP
+#define SOFTWARE_SINGLE_STEP(p,q) abort() /* Will never execute! */
+#undef SOFTWARE_SINGLE_STEP_P
+#define SOFTWARE_SINGLE_STEP_P 0
+
+/* Make sure nexti gets the help it needs for debugging assembly code
+ without symbols */
+
+#define AT_SUBROUTINE_CALL_INSTRUCTION_TARGET(prevpc,stoppc) \
+ at_subroutine_call_instruction_target(prevpc,stoppc)
+extern int at_subroutine_call_instruction_target();
+
+/* We _want_ the SVR4 section offset calculations (see syms_from_objfile()
+ in symfile.c) */
+#undef IBM6000_TARGET
+
+/* Offset to saved PC in sigcontext, from <linux/signal.h>. */
+#define SIGCONTEXT_PC_OFFSET 184
+
+/* Avoid warning from redefinition in tm-sysv4.h */
+#undef SKIP_TRAMPOLINE_CODE
+
+/* We need this file for the SOLIB_TRAMPOLINE stuff. */
+#include "tm-sysv4.h"
+
+extern CORE_ADDR ppc_linux_skip_trampoline_code (CORE_ADDR pc);
+#undef SKIP_TRAMPOLINE_CODE
+#define SKIP_TRAMPOLINE_CODE(pc) ppc_linux_skip_trampoline_code (pc)
+
+extern int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
+#undef IN_SIGTRAMP
+#define IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name)
+
+extern unsigned long ppc_linux_frame_saved_pc (struct frame_info *);
+#undef FRAME_SAVED_PC
+#define FRAME_SAVED_PC(FRAME) ppc_linux_frame_saved_pc (FRAME)
+
+extern void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *);
+#undef INIT_EXTRA_FRAME_INFO
+#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
+ ppc_linux_init_extra_frame_info (fromleaf, fi)
+
+extern int ppc_linux_frameless_function_invocation (struct frame_info *);
+#undef FRAMELESS_FUNCTION_INVOCATION
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+ (ppc_linux_frameless_function_invocation (FI))
+
+extern void ppc_linux_frame_init_saved_regs (struct frame_info *);
+#undef FRAME_INIT_SAVED_REGS
+#define FRAME_INIT_SAVED_REGS(FI) ppc_linux_frame_init_saved_regs (FI)
+
+CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
+#undef FRAME_CHAIN
+#define FRAME_CHAIN(thisframe) ppc_linux_frame_chain (thisframe)
+
+CORE_ADDR ppc_sysv_abi_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
+#undef PUSH_ARGUMENTS
+#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
+ (ppc_sysv_abi_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
+
+#define CANNOT_FETCH_REGISTER(regno) ((regno) >= MQ_REGNUM)
+#define CANNOT_STORE_REGISTER(regno) ((regno) >= MQ_REGNUM)
+
+/* Linux doesn't use the PowerOpen ABI for function pointer representation */
+#undef CONVERT_FROM_FUNC_PTR_ADDR
+
+#if 0 /* If skip_prologue() isn't too greedy, we don't need this */
+/* There is some problem with the debugging symbols generated by the
+ compiler such that the debugging symbol for the first line of a
+ function overlap with the function prologue. */
+#define PROLOGUE_FIRSTLINE_OVERLAP
+#endif
+
+/* 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
+
+#endif /* #ifndef TM_LINUX_H */
diff --git a/gdb/config/powerpc/xm-linux.h b/gdb/config/powerpc/xm-linux.h
index 754f858..0ca4c60 100644
--- a/gdb/config/powerpc/xm-linux.h
+++ b/gdb/config/powerpc/xm-linux.h
@@ -1,3 +1,49 @@
+/* Native support for linux, for GDB, the GNU debugger.
+ Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef XM_LINUX_H
+#define XM_LINUX_H
+
+#define HOST_BYTE_ORDER BIG_ENDIAN
+
+#define HAVE_TERMIOS
+
+/* This is the amount to subtract from u.u_ar0
+ + to get the offset in the core file of the register values. */
+#define KERNEL_U_ADDR 0x0
+
+#define NEED_POSIX_SETPGID
+
+/* Need R_OK etc, but USG isn't defined. */
+#include <unistd.h>
+
+/* If you expect to use the mmalloc package to obtain mapped symbol files,
+ for now you have to specify some parameters that determine how gdb places
+ the mappings in it's address space. See the comments in map_to_address()
+ for details. This is expected to only be a short term solution. Yes it
+ is a kludge.
+ FIXME: Make this more automatic. */
+
+#define MMAP_BASE_ADDRESS 0x20000000 /* First mapping here */
+#define MMAP_INCREMENT 0x01000000 /* Increment to next mapping */
+
+#endif /* #ifndef XM_LINUX_H */
/* Host definitions for a Sun 4, for GDB, the GNU debugger.
Copyright 1996
Free Software Foundation, Inc.
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index 3c34431..89a0bd1 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -380,10 +380,9 @@ CORE_ADDR rs6000_frame_chain PARAMS ((struct frame_info *));
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
+extern int rs6000_frameless_function_invocation (struct frame_info *);
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
- (frameless_function_invocation (FI))
-
-extern int frameless_function_invocation PARAMS ((struct frame_info *));
+ (rs6000_frameless_function_invocation (FI))
#define INIT_FRAME_PC_FIRST(fromleaf, prev) \
prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \
@@ -407,9 +406,9 @@ extern void rs6000_init_extra_frame_info (int fromleaf, struct frame_info *);
#define DEFAULT_LR_SAVE 8
/* Return saved PC from a frame */
-#define FRAME_SAVED_PC(FRAME) frame_saved_pc (FRAME)
+#define FRAME_SAVED_PC(FRAME) rs6000_frame_saved_pc (FRAME)
-extern unsigned long frame_saved_pc PARAMS ((struct frame_info *));
+extern unsigned long rs6000_frame_saved_pc (struct frame_info *);
extern CORE_ADDR rs6000_frame_args_address PARAMS ((struct frame_info *));
#define FRAME_ARGS_ADDRESS(FI) rs6000_frame_args_address (FI)