This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH RFC] Make GNU/Linux/PPC port work again


The patch below makes the GNU/Linux/PPC port work again.

I haven't tested it with other Power or PowerPC targets or native
configurations; it is possible that I inadvertently broke something... 
I'd appreciate it if those of you (hi Nick!) affected by this code
would test it before I commit this patch.

Long term, I'd like to introduce a new file called ppc-tdep.c which
contains the generic target methods for the Power and PowerPC
architectures.  (Much of the code in rs6000-tdep.c would be moved to
this file.) rs6000-tdep.c would become an AIX specific file that knows
about shared libraries, signal handlers, and anything else specific to
AIX.  It would play the same role for AIX that ppc-linux-tdep.c plays
for Linux.  (The other way to do it would be to remove the AIXisms
from rs6000-tdep.c and create a new file named ppc-aix-tdep.c which
knows about the AIXisms.)

	* ppc-tdep.h: New file.
	* Makefile.in (ppc-linux-tdep.o, rs6000-tdep.o): Add ppc-tdep.h
	as a dependency.
	* ppc-linux-tdep.c, rs6000-tdep.c (ppc-tdep.h): Include.

	* ppc-linux-tdep.c (ppc_linux_at_sigtramp_return_path): Made static.

	* rs6000-tdep.c (elf-bfd.h): Include.
	(gdbarch_tdep): Add field osabi to this struct.
	(rs6000_init_extra_frame_info, rs6000_frame_init_saved_regs,
	rs6000_frameless_function_invocation, rs6000_frame_saved_pc,
	rs6000_frame_chain): No longer static.
	(process_note_abi_tag_sections, get_elfosabi): New static
	functions.
	(rs6000_gdbarch_init): Revised to accomodate ELF executables;
	also use Linux specific methods when the target is Linux.

	* config/powerpc/aix.mt, config/powerpc/cygwin.mt,
	config/powerpc/macos.mt, config/powerpc/nbsd.mt,
	config/powerpc/ppc-eabi.mt, config/powerpc/ppc-nw.mt,
	config/powerpc/ppc-sim.mt, config/powerpc/ppcle-eabi.mt,
	config/powerpc/ppcle-sim.mt, config/powerpc/solaris.mt,
	config/powerpc/vxworks.mt, config/rs6000/aix4.mt,
	config/rs6000/rs6000.mt, config/rs6000/rs6000lynx.mt
	(TDEPFILES): Add ppc-linux-tdep.o.

	* config/tm-linux.h (SIGCONTEXT_PC_OFFSET, FRAME_SAVED_PC,
	INIT_EXTRA_FRAME_INFO, FRAMELESS_FUNCTION_INVOCATION,
	FRAME_INIT_SAVED_REGS, FRAME_CHAIN, PUSH_ARGUMENTS,
	MEMORY_REMOVE_BREAKPOINT: Removed defines.
	(ppc_linux_frame_saved_pc, ppc_linux_init_extra_frame_info,
	ppc_linux_frameless_function_invocation,
	ppc_linux_frame_init_saved_regs, ppc_linux_frame_chain,
	ppc_sysv_abi_push_arguments, ppc_linux_memory_remove_breakpoint):
	Removed declarations.
	(CANNOT_FETCH_REGISTER, CANNOT_STORE_REGISTER): Disabled.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile.in
--- Makefile.in	2000/07/10 06:16:51	1.39
+++ Makefile.in	2000/07/19 22:01:15
@@ -1627,7 +1627,7 @@ ppc-linux-nat.o: ppc-linux-nat.c $(defs_
 	$(inferior_h) target.h
 
 ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-	target.h
+	target.h ppc-tdep.h
 
 ppcbug-rom.o: ppcbug-rom.c monitor.h $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
 	$(inferior_h) target.h serial.h terminal.h
@@ -1769,7 +1769,7 @@ rs6000-nat.o: rs6000-nat.c $(bfd_h) $(de
 	xcoffsolib.h
 
 rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-	target.h xcoffsolib.h
+	target.h xcoffsolib.h ppc-tdep.h
 
 scm-exp.o: $(defs_h) $(value_h) parser-defs.h language.h c-lang.h \
 	scm-lang.h scm-tags.h
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.4
diff -u -p -r1.4 ppc-linux-tdep.c
--- ppc-linux-tdep.c	2000/02/26 09:25:50	1.4
+++ ppc-linux-tdep.c	2000/07/19 22:01:32
@@ -29,6 +29,8 @@
 #include "symfile.h"
 #include "objfiles.h"
 
+#include "ppc-tdep.h"
+
 /* The following two instructions are used in the signal trampoline
    code on linux/ppc */
 #define INSTR_LI_R0_0x7777	0x38007777
@@ -95,7 +97,7 @@
 #define PPC_LINUX_PT_FPR31 (PPC_LINUX_PT_FPR0 + 2*31)
 #define PPC_LINUX_PT_FPSCR (PPC_LINUX_PT_FPR0 + 2*32 + 1)
 
-int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
+static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
 
 /* Determine if pc is in a signal trampoline...
 
@@ -177,7 +179,7 @@ ppc_linux_in_sigtramp (CORE_ADDR pc, cha
  * instructions.  It'd be faster though if we could find a way to do this
  * via some simple address comparisons.
  */
-int
+static int
 ppc_linux_at_sigtramp_return_path (CORE_ADDR pc)
 {
   char buf[12];
Index: ppc-tdep.h
===================================================================
RCS file: ppc-tdep.h
diff -N ppc-tdep.h
--- /dev/null	Tue May  5 13:32:27 1998
+++ ppc-tdep.h	Wed Jul 19 15:01:32 2000
@@ -0,0 +1,49 @@
+/* Target-dependent code for GDB, the GNU debugger.
+   Copyright 2000
+   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.  */
+
+/* From ppc-linux-tdep.c... */
+unsigned long ppc_linux_frame_saved_pc (struct frame_info *fi);
+void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *);
+int ppc_linux_frameless_function_invocation (struct frame_info *);
+void ppc_linux_frame_init_saved_regs (struct frame_info *);
+CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
+CORE_ADDR ppc_sysv_abi_push_arguments (int, value_ptr *, CORE_ADDR, int,
+				       CORE_ADDR);
+int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
+
+
+/* From rs6000-tdep.c... */
+unsigned long rs6000_frame_saved_pc (struct frame_info *fi);
+void rs6000_init_extra_frame_info (int fromleaf, struct frame_info *);
+int rs6000_frameless_function_invocation (struct frame_info *);
+void rs6000_frame_init_saved_regs (struct frame_info *);
+CORE_ADDR rs6000_frame_chain (struct frame_info *);
+
+/* Some important register numbers. */
+
+#define	GP0_REGNUM 0		/* GPR register 0 */
+#define	TOC_REGNUM 2		/* TOC register */
+#define PS_REGNUM 65		/* Processor (or machine) status (%msr) */
+#define	CR_REGNUM 66		/* Condition register */
+#define	LR_REGNUM 67		/* Link register */
+#define	CTR_REGNUM 68		/* Count register */
+#define	XER_REGNUM 69		/* Integer exception register */
+#define	MQ_REGNUM 70		/* Multiply/Divide extension register */
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.10
diff -u -p -r1.10 rs6000-tdep.c
--- rs6000-tdep.c	2000/07/14 22:17:32	1.10
+++ rs6000-tdep.c	2000/07/19 22:01:33
@@ -35,15 +35,9 @@
 #include "coff/internal.h"	/* for libcoff.h */
 #include "bfd/libcoff.h"	/* for xcoff_data */
 
-/* Some important register numbers.  Keep these in the same order as in
-   /usr/mstsave.h `mstsave' structure, for easier processing. */
+#include "elf-bfd.h"
 
-#define	GP0_REGNUM 0		/* GPR register 0 */
-#define	TOC_REGNUM 2		/* TOC register */
-#define PS_REGNUM 65		/* Processor (or machine) status (%msr) */
-#define	CR_REGNUM 66		/* Condition register */
-#define	LR_REGNUM 67		/* Link register */
-#define	CTR_REGNUM 68		/* Count register */
+#include "ppc-tdep.h"
 
 /* If the kernel has to deliver a signal, it pushes a sigcontext
    structure on the stack and then calls the signal handler, passing
@@ -89,6 +83,7 @@ struct reg
 struct gdbarch_tdep
   {
     int wordsize;		/* size in bytes of fixed-point word */
+    int osabi;			/* OS / ABI from ELF header */
     int *regoff;		/* byte offsets in register arrays */
     const struct reg *regs;	/* from current variant */
   };
@@ -157,7 +152,7 @@ struct frame_extra_info
   CORE_ADDR initial_sp;		/* initial stack pointer. */
 };
 
-static void
+void
 rs6000_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
   fi->extra_info = (struct frame_extra_info *)
@@ -182,7 +177,7 @@ rs6000_init_extra_frame_info (int fromle
    not sure if it will be needed. The following function takes care of gpr's
    and fpr's only. */
 
-static void
+void
 rs6000_frame_init_saved_regs (struct frame_info *fi)
 {
   frame_get_saved_regs (fi, NULL);
@@ -1085,7 +1080,7 @@ rs6000_skip_trampoline_code (CORE_ADDR p
 
 /* Determines whether the function FI has a frame on the stack or not.  */
 
-static int
+int
 rs6000_frameless_function_invocation (struct frame_info *fi)
 {
   CORE_ADDR func_start;
@@ -1119,7 +1114,7 @@ rs6000_frameless_function_invocation (st
 
 /* Return the PC saved in a frame */
 
-static CORE_ADDR
+CORE_ADDR
 rs6000_frame_saved_pc (struct frame_info *fi)
 {
   CORE_ADDR func_start;
@@ -1313,7 +1308,7 @@ frame_initial_stack_address (struct fram
 /* In the case of the RS/6000, the frame's nominal address
    is the address of a 4-byte word containing the calling frame's address.  */
 
-static CORE_ADDR
+CORE_ADDR
 rs6000_frame_chain (struct frame_info *thisframe)
 {
   CORE_ADDR fp, fpp, lr;
@@ -1909,6 +1904,84 @@ find_variant_by_arch (enum bfd_architect
   return NULL;
 }
 
+
+
+
+static void
+process_note_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
+{
+  int *os_ident_ptr = obj;
+  const char *name;
+  unsigned int sectsize;
+
+  name = bfd_get_section_name (abfd, sect);
+  sectsize = bfd_section_size (abfd, sect);
+  if (strcmp (name, ".note.ABI-tag") == 0 && sectsize > 0)
+    {
+      unsigned int name_length, data_length, note_type;
+      char *note = alloca (sectsize);
+
+      bfd_get_section_contents (abfd, sect, note,
+                                (file_ptr) 0, (bfd_size_type) sectsize);
+
+      name_length = bfd_h_get_32 (abfd, note);
+      data_length = bfd_h_get_32 (abfd, note + 4);
+      note_type   = bfd_h_get_32 (abfd, note + 8);
+
+      if (name_length == 4 && data_length == 16 && note_type == 1
+          && strcmp (note + 12, "GNU") == 0)
+	{
+	  int os_number = bfd_h_get_32 (abfd, note + 16);
+
+	  /* The case numbers are from abi-tags in glibc */
+	  switch (os_number)
+	    {
+	    case 0 :
+	      *os_ident_ptr = ELFOSABI_LINUX;
+	      break;
+	    case 1 :
+	      *os_ident_ptr = ELFOSABI_HURD;
+	      break;
+	    case 2 :
+	      *os_ident_ptr = ELFOSABI_SOLARIS;
+	      break;
+	    default :
+	      internal_error (
+		"process_note_abi_sections: unknown OS number %d", os_number);
+	      break;
+	    }
+	}
+    }
+}
+
+/* Return one of the ELFOSABI_ constants for BFDs representing ELF
+   executables.  If it's not an ELF executable or if the OS/ABI couldn't
+   be determined, simply return -1. */
+
+static int
+get_elfosabi (bfd *abfd)
+{
+  int elfosabi = -1;
+
+  if (abfd != NULL && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+    {
+      elfosabi = elf_elfheader (abfd)->e_ident[EI_OSABI];
+
+      /* When elfosabi is 0 (ELFOSABI_NONE), this is supposed to indicate
+         that we're on a SYSV system.  However, GNU/Linux uses a note section
+	 to record OS/ABI info, but leaves e_ident[EI_OSABI] zero.  So we
+	 have to check the note sections too. */
+      if (elfosabi == 0)
+	{
+	  bfd_map_over_sections (abfd,
+	                         process_note_abi_tag_sections,
+				 &elfosabi);
+	}
+    }
+
+  return elfosabi;
+}
+
 
 
 /* Initialize the current architecture based on INFO.  If possible, re-use an
@@ -1923,25 +1996,40 @@ rs6000_gdbarch_init (struct gdbarch_info
 {
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
-  int wordsize, fromexec, power, i, off;
+  int wordsize, from_xcoff_exec, from_elf_exec, power, i, off;
   struct reg *regs;
   const struct variant *v;
   enum bfd_architecture arch;
   unsigned long mach;
   bfd abfd;
+  int osabi, sysv_abi;
 
-  fromexec = info.abfd && info.abfd->format == bfd_object &&
+  from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
     bfd_get_flavour (info.abfd) == bfd_target_xcoff_flavour;
 
+  from_elf_exec = info.abfd && info.abfd->format == bfd_object &&
+    bfd_get_flavour (info.abfd) == bfd_target_elf_flavour;
+
+  sysv_abi = info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour;
+
+  osabi = get_elfosabi (info.abfd);
+
   /* Check word size.  If INFO is from a binary file, infer it from that,
      else use the previously-inferred size. */
-  if (fromexec)
+  if (from_xcoff_exec)
     {
       if (xcoff_data (info.abfd)->xcoff64)
 	wordsize = 8;
       else
 	wordsize = 4;
     }
+  else if (from_elf_exec)
+    {
+      if (elf_elfheader (info.abfd)->e_ident[EI_CLASS] == ELFCLASS64)
+	wordsize = 8;
+      else
+	wordsize = 4;
+    }
   else
     {
       tdep = TDEP;
@@ -1960,7 +2048,7 @@ rs6000_gdbarch_init (struct gdbarch_info
          meaningful, because 64-bit CPUs can run in 32-bit mode.  So, perform
          separate word size check. */
       tdep = gdbarch_tdep (arches->gdbarch);
-      if (tdep && tdep->wordsize == wordsize)
+      if (tdep && tdep->wordsize == wordsize && tdep->osabi == osabi)
 	return arches->gdbarch;
     }
 
@@ -1972,7 +2060,7 @@ rs6000_gdbarch_init (struct gdbarch_info
        - "set arch"		trust blindly
        - GDB startup		useless but harmless */
 
-  if (!fromexec)
+  if (!from_xcoff_exec)
     {
       arch = info.bfd_architecture;
       mach = info.bfd_arch_info->mach;
@@ -1986,6 +2074,7 @@ rs6000_gdbarch_init (struct gdbarch_info
     }
   tdep = xmalloc (sizeof (struct gdbarch_tdep));
   tdep->wordsize = wordsize;
+  tdep->osabi = osabi;
   gdbarch = gdbarch_alloc (&info, tdep);
   power = arch == bfd_arch_rs6000;
 
@@ -2060,16 +2149,17 @@ rs6000_gdbarch_init (struct gdbarch_info
   set_gdbarch_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
 
   set_gdbarch_extract_return_value (gdbarch, rs6000_extract_return_value);
-  set_gdbarch_push_arguments (gdbarch, rs6000_push_arguments);
+  
+  if (sysv_abi)
+    set_gdbarch_push_arguments (gdbarch, ppc_sysv_abi_push_arguments);
+  else
+    set_gdbarch_push_arguments (gdbarch, rs6000_push_arguments);
 
   set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
   set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value);
   set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
 
-  set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
-  set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
-
   set_gdbarch_pop_frame (gdbarch, rs6000_pop_frame);
 
   set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue);
@@ -2081,10 +2171,32 @@ rs6000_gdbarch_init (struct gdbarch_info
   /* Not sure on this. FIXMEmgo */
   set_gdbarch_frame_args_skip (gdbarch, 8);
 
-  set_gdbarch_frameless_function_invocation (gdbarch, rs6000_frameless_function_invocation);
-  set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
   set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
-  set_gdbarch_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
+  if (osabi == ELFOSABI_LINUX)
+    {
+      set_gdbarch_frameless_function_invocation (gdbarch,
+	ppc_linux_frameless_function_invocation);
+      set_gdbarch_frame_chain (gdbarch, ppc_linux_frame_chain);
+      set_gdbarch_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc);
+
+      set_gdbarch_frame_init_saved_regs (gdbarch,
+	                                 ppc_linux_frame_init_saved_regs);
+      set_gdbarch_init_extra_frame_info (gdbarch,
+	                                 ppc_linux_init_extra_frame_info);
+
+      set_gdbarch_memory_remove_breakpoint (gdbarch,
+	                                    ppc_linux_memory_remove_breakpoint);
+    }
+  else
+    {
+      set_gdbarch_frameless_function_invocation (gdbarch,
+	rs6000_frameless_function_invocation);
+      set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
+      set_gdbarch_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
+
+      set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
+      set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
+    }
   set_gdbarch_frame_args_address (gdbarch, rs6000_frame_args_address);
   set_gdbarch_frame_locals_address (gdbarch, rs6000_frame_args_address);
   set_gdbarch_saved_pc_after_call (gdbarch, rs6000_saved_pc_after_call);
Index: config/powerpc/aix.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/aix.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 aix.mt
--- aix.mt	1999/04/16 01:34:24	1.1.1.1
+++ aix.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: PowerPC running AIX
-TDEPFILES= rs6000-tdep.o xcoffsolib.o
+TDEPFILES= rs6000-tdep.o xcoffsolib.o ppc-linux-tdep.o
 TM_FILE= tm-ppc-aix.h
Index: config/powerpc/cygwin.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/cygwin.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 cygwin.mt
--- cygwin.mt	1999/04/16 01:34:24	1.1.1.1
+++ cygwin.mt	2000/07/19 22:01:34
@@ -1,5 +1,5 @@
 # Target: Powerpc running cygnus's unix api over win32
-TDEPFILES= rs6000-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
 TM_FILE= tm-cygwin.h
 
 
Index: config/powerpc/macos.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/macos.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 macos.mt
--- macos.mt	1999/04/16 01:34:24	1.1.1.1
+++ macos.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: PowerMac (PowerPC running MacOS)
-TDEPFILES= rs6000-tdep.o xcoffread.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o
 TM_FILE= tm-macos.h
Index: config/powerpc/nbsd.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/nbsd.mt,v
retrieving revision 1.2
diff -u -p -r1.2 nbsd.mt
--- nbsd.mt	2000/05/24 04:16:27	1.2
+++ nbsd.mt	2000/07/19 22:01:34
@@ -1,5 +1,5 @@
 # Target: PowerPC, running NetBSD
-TDEPFILES= rs6000-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
 TM_FILE= tm-nbsd.h
 
 GDBSERVER_DEPFILES= low-nbsd.o
Index: config/powerpc/ppc-eabi.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppc-eabi.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 ppc-eabi.mt
--- ppc-eabi.mt	1999/04/16 01:34:24	1.1.1.1
+++ ppc-eabi.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: PowerPC running eabi
-TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o
+TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
 TM_FILE= tm-ppc-eabi.h
Index: config/powerpc/ppc-nw.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppc-nw.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 ppc-nw.mt
--- ppc-nw.mt	1999/04/16 01:34:25	1.1.1.1
+++ ppc-nw.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: PowerPC running Netware
-TDEPFILES= rs6000-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
 TM_FILE= tm-ppc-nw.h
Index: config/powerpc/ppc-sim.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppc-sim.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 ppc-sim.mt
--- ppc-sim.mt	1999/04/16 01:34:25	1.1.1.1
+++ ppc-sim.mt	2000/07/19 22:01:34
@@ -1,5 +1,5 @@
 # Target: PowerPC running eabi and including the simulator
-TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o
+TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
 TM_FILE= tm-ppc-eabi.h
 
 SIM_OBS = remote-sim.o
Index: config/powerpc/ppcle-eabi.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppcle-eabi.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 ppcle-eabi.mt
--- ppcle-eabi.mt	1999/04/16 01:34:25	1.1.1.1
+++ ppcle-eabi.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: PowerPC running eabi in little endian mode
-TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o
+TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
 TM_FILE= tm-ppcle-eabi.h
Index: config/powerpc/ppcle-sim.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/ppcle-sim.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 ppcle-sim.mt
--- ppcle-sim.mt	1999/04/16 01:34:25	1.1.1.1
+++ ppcle-sim.mt	2000/07/19 22:01:34
@@ -1,5 +1,5 @@
 # Target: PowerPC running eabi in little endian mode under the simulator
-TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o
+TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
 TM_FILE= tm-ppcle-eabi.h
 
 SIM_OBS = remote-sim.o
Index: config/powerpc/solaris.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/solaris.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 solaris.mt
--- solaris.mt	1999/04/16 01:34:25	1.1.1.1
+++ solaris.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: PowerPC, running Solaris 2
-TDEPFILES= rs6000-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
 TM_FILE= tm-solaris.h
Index: config/powerpc/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/tm-linux.h,v
retrieving revision 1.4
diff -u -p -r1.4 tm-linux.h
--- tm-linux.h	2000/05/28 01:12:38	1.4
+++ tm-linux.h	2000/07/19 22:01:34
@@ -42,9 +42,6 @@ extern int at_subroutine_call_instructio
    in symfile.c) */
 #undef IBM6000_TARGET
 
-/* Offset to saved PC in sigcontext, from <linux/signal.h>.  */
-#define SIGCONTEXT_PC_OFFSET 184
-
 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)
@@ -52,37 +49,11 @@ extern CORE_ADDR ppc_linux_skip_trampoli
 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 (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)))
-
+#if 0
 #define CANNOT_FETCH_REGISTER(regno) ((regno) >= MQ_REGNUM)
 #define CANNOT_STORE_REGISTER(regno) ((regno) >= MQ_REGNUM)
+#endif
 
 /* Linux doesn't use the PowerOpen ABI for function pointer representation */
 #undef CONVERT_FROM_FUNC_PTR_ADDR
@@ -93,13 +64,6 @@ CORE_ADDR ppc_sysv_abi_push_arguments (i
    function overlap with the function prologue.  */
 #define PROLOGUE_FIRSTLINE_OVERLAP
 #endif
-
-/* Needed to handled the self-modifying code situation due to the dynamic
-   linker. */
-int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
-#undef MEMORY_REMOVE_BREAKPOINT
-#define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) \
-  ppc_linux_memory_remove_breakpoint(addr, contents_cache)
 
 /* N_FUN symbols in shared libaries have 0 for their values and need
    to be relocated. */
Index: config/powerpc/vxworks.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/vxworks.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 vxworks.mt
--- vxworks.mt	1999/07/19 23:28:26	1.1.1.1
+++ vxworks.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: Powerpc running VxWorks
-TDEPFILES= rs6000-tdep.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o
 TM_FILE= tm-vxworks.h
Index: config/rs6000/aix4.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/aix4.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 aix4.mt
--- aix4.mt	1999/04/16 01:34:25	1.1.1.1
+++ aix4.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: IBM RS/6000 running AIX4
-TDEPFILES= rs6000-tdep.o xcoffsolib.o xcoffread.o
+TDEPFILES= rs6000-tdep.o xcoffsolib.o xcoffread.o ppc-linux-tdep.o
 TM_FILE= tm-rs6000-aix4.h
Index: config/rs6000/rs6000.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/rs6000.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 rs6000.mt
--- rs6000.mt	1999/04/16 01:34:25	1.1.1.1
+++ rs6000.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: IBM RS/6000 running AIX
-TDEPFILES= rs6000-tdep.o xcoffsolib.o xcoffread.o
+TDEPFILES= rs6000-tdep.o xcoffsolib.o xcoffread.o ppc-linux-tdep.o
 TM_FILE= tm-rs6000.h
Index: config/rs6000/rs6000lynx.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/rs6000lynx.mt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 rs6000lynx.mt
--- rs6000lynx.mt	1999/04/16 01:34:25	1.1.1.1
+++ rs6000lynx.mt	2000/07/19 22:01:34
@@ -1,3 +1,3 @@
 # Target: IBM RS6000 running LynxOS
-TDEPFILES= coff-solib.o rs6000-tdep.o
+TDEPFILES= coff-solib.o rs6000-tdep.o ppc-linux-tdep.o
 TM_FILE= tm-rs6000ly.h


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]