This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

RFA: build i386-darwin


Hi

currently gdb is the same when configured for i386-darwin or x86_64-darwin.
This is obviously wrong as without --enable-64-bit-bfd, i386-darwin won't
handle correctly 64 bit addresses and compilation will generate warnings.

In a effort to clean, I extracted amd64-darwin-tdep.[ch] from
i386-darwin-tdep.[ch].

However, there is still only i386-darwin-nat.c  It contains a few #ifdef BFD64/
#endif almost like sparc-sol2-nat.c.  This is not very beautiful but I wasn't
able to find a better method: creating an amd64-darwin-nat.c doesn't work
very well: it will duplicate most of i386 code (we can't really use the same
trick as done for linux) and it will need to link with both
i386-darwin-nat.c and amd64-darwin-nat.c which is never expected.

So I prefer to use #ifdef/#endif.  Maybe later I will be able to find a better
solution.

Compiled on both i386/amd64 darwin, no regressions with amd64 with i386
compiler.

Tristan.


gdb/
2009-06-29  Tristan Gingold  <gingold@adacore.com>

	* i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
	(amd64_darwin_thread_state_num_regs)
	(amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
	amd64-darwin-tdep.c
	(_initialize_i386_darwin_tdep): Remove 64 bits parts.
	(darwin_dwarf_signal_frame_p): Make public.
	* amd64-darwin-tdep.c: New file with most chunks from
	i386-darwin-tdep.c	
	* i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
	(amd64_darwin_thread_state_reg_offset)
	(amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
	* amd64-darwin-tdep.h: New file.
	* i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
	if BFD64 is defined.
	(i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
	64 bits parts.
	(i386_darwin_store_inferior_registers): Ditto.
	(darwin_set_sstep): Ditto.
	(darwin_complete_target): Ditto.
	(amd64_darwin_sstep_at_sigreturn): Ditto.

	* configure.tgt: Create a separate entry for x86_64-*-darwin.
	Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.

	* Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
	i386-darwin-tdep.c i386-darwin-nat.c
	(ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.1088
diff -c -p -r1.1088 Makefile.in
*** gdb/Makefile.in	29 Jun 2009 13:10:39 -0000	1.1088
--- gdb/Makefile.in	29 Jun 2009 13:53:54 -0000
*************** TARGET_OBS = @TARGET_OBS@
*** 466,472 ****
  ALL_64_TARGET_OBS = \
  	alphabsd-tdep.o alphafbsd-tdep.o alpha-linux-tdep.o alpha-mdebug-tdep.o \
  	alphanbsd-tdep.o alphaobsd-tdep.o alpha-osf1-tdep.o alpha-tdep.o \
! 	amd64fbsd-tdep.o amd64-dicos-tdep.o amd64-linux-tdep.o amd64nbsd-tdep.o \
  	amd64obsd-tdep.o amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o \
  	ia64-linux-tdep.o ia64-tdep.o \
  	mips64obsd-tdep.o \
--- 466,473 ----
  ALL_64_TARGET_OBS = \
  	alphabsd-tdep.o alphafbsd-tdep.o alpha-linux-tdep.o alpha-mdebug-tdep.o \
  	alphanbsd-tdep.o alphaobsd-tdep.o alpha-osf1-tdep.o alpha-tdep.o \
! 	amd64fbsd-tdep.o amd64-darwin-tdep.o amd64-dicos-tdep.o \
! 	amd64-linux-tdep.o amd64nbsd-tdep.o \
  	amd64obsd-tdep.o amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o \
  	ia64-linux-tdep.o ia64-tdep.o \
  	mips64obsd-tdep.o \
*************** ALLDEPFILES = \
*** 1289,1294 ****
--- 1290,1296 ----
  	amd64bsd-nat.c amd64fbsd-nat.c amd64fbsd-tdep.c \
  	amd64nbsd-nat.c amd64nbsd-tdep.c \
  	amd64obsd-nat.c amd64obsd-tdep.c \
+ 	amd64-darwin-tdep.c \
  	amd64-dicos-tdep.c \
  	amd64-linux-nat.c amd64-linux-tdep.c \
  	amd64-sol2-tdep.c \
*************** ALLDEPFILES = \
*** 1297,1303 ****
  	avr-tdep.c \
  	bsd-uthread.c bsd-kvm.c \
  	core-regset.c corelow.c \
! 	dcache.c dicos-tdep.c \
  	exec.c \
  	fbsd-nat.c \
  	fork-child.c \
--- 1299,1305 ----
  	avr-tdep.c \
  	bsd-uthread.c bsd-kvm.c \
  	core-regset.c corelow.c \
! 	dcache.c dicos-tdep.c darwin-nat.c \
  	exec.c \
  	fbsd-nat.c \
  	fork-child.c \
*************** ALLDEPFILES = \
*** 1313,1318 ****
--- 1315,1321 ----
  	i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \
  	i386nbsd-nat.c i386nbsd-tdep.c i386obsd-nat.c i386obsd-tdep.c \
  	i387-tdep.c \
+ 	i386-darwin-tdep.c i386-darwin-nat.c \
  	i386-dicos-tdep.c \
  	i386-linux-tdep.c i386-nat.c \
  	i386-sol2-nat.c i386-sol2-tdep.c \
Index: gdb/configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.220
diff -c -p -r1.220 configure.tgt
*** gdb/configure.tgt	29 Jun 2009 13:10:39 -0000	1.220
--- gdb/configure.tgt	29 Jun 2009 13:53:54 -0000
*************** hppa*-*-*)
*** 151,160 ****
  	gdb_target_obs="hppa-tdep.o"
  	;;
  
! i[34567]86-*-darwin* | x86_64-*-darwin*)
  	# Target: Darwin/i386
! 	gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o \
  			i386-darwin-tdep.o solib.o solib-darwin.o"
  	;;
  i[34567]86-*-dicos*)
  	# Target: DICOS/i386
--- 151,164 ----
  	gdb_target_obs="hppa-tdep.o"
  	;;
  
! i[34567]86-*-darwin*)
  	# Target: Darwin/i386
! 	gdb_target_obs="i386-tdep.o i387-tdep.o \
  			i386-darwin-tdep.o solib.o solib-darwin.o"
+ 	if test "x$enable_64_bit_bfd" = "xyes"; then
+ 	    # Target: GNU/Linux x86-64
+ 	    gdb_target_obs="amd64-tdep.o amd64-darwin-tdep.o ${gdb_target_obs}"
+ 	fi
  	;;
  i[34567]86-*-dicos*)
  	# Target: DICOS/i386
*************** vax-*-*)
*** 524,529 ****
--- 528,540 ----
  	gdb_target_obs="vax-tdep.o"
  	;;
  
+ x86_64-*-darwin*)
+ 	# Target: Darwin/x86-64
+ 	gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o \
+ 			i386-darwin-tdep.o amd64-darwin-tdep.o \
+                         solib.o solib-darwin.o"
+ 	;;
+ 
  x86_64-*-dicos*)
  	# Target: DICOS/x86-64
  	gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o \
Index: gdb/i386-darwin-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-darwin-nat.c,v
retrieving revision 1.5
diff -c -p -r1.5 i386-darwin-nat.c
*** gdb/i386-darwin-nat.c	17 Jun 2009 18:44:23 -0000	1.5
--- gdb/i386-darwin-nat.c	29 Jun 2009 13:53:54 -0000
***************
*** 30,36 ****
  #include "regcache.h"
  #include "gdb_assert.h"
  #include "i386-tdep.h"
- #include "amd64-nat.h"
  #include "i387-tdep.h"
  #include "gdbarch.h"
  #include "arch-utils.h"
--- 30,35 ----
***************
*** 39,44 ****
--- 38,48 ----
  #include "darwin-nat.h"
  #include "i386-darwin-tdep.h"
  
+ #ifdef BFD64
+ #include "amd64-nat.h"
+ #include "amd64-darwin-tdep.h"
+ #endif
+ 
  /* Read register values from the inferior process.
     If REGNO is -1, do this for all registers.
     Otherwise, REGNO specifies which register (so we can save time).  */
*************** i386_darwin_fetch_inferior_registers (st
*** 50,55 ****
--- 54,60 ----
    int fetched = 0;
    struct gdbarch *gdbarch = get_regcache_arch (regcache);
  
+ #ifdef BFD64
    if (gdbarch_ptr_bit (gdbarch) == 64)
      {
        if (regno == -1 || amd64_native_gregset_supplies_p (gdbarch, regno))
*************** i386_darwin_fetch_inferior_registers (st
*** 89,94 ****
--- 94,100 ----
          }
      }
    else
+ #endif
      {
        if (regno == -1 || regno < I386_NUM_GREGS)
          {
*************** i386_darwin_store_inferior_registers (st
*** 151,156 ****
--- 157,163 ----
    thread_t current_thread = ptid_get_tid (inferior_ptid);
    struct gdbarch *gdbarch = get_regcache_arch (regcache);
  
+ #ifdef BFD64
    if (gdbarch_ptr_bit (gdbarch) == 64)
      {
        if (regno == -1 || amd64_native_gregset_supplies_p (gdbarch, regno))
*************** i386_darwin_store_inferior_registers (st
*** 196,201 ****
--- 203,209 ----
          }
      }
    else
+ #endif
      {
        if (regno == -1 || regno < I386_NUM_GREGS)
          {
*************** i386_darwin_sstep_at_sigreturn (x86_thre
*** 472,477 ****
--- 480,486 ----
    return 0;
  }
  
+ #ifdef BFD64
  static int
  amd64_darwin_sstep_at_sigreturn (x86_thread_state_t *regs)
  {
*************** amd64_darwin_sstep_at_sigreturn (x86_thr
*** 499,504 ****
--- 508,514 ----
      }
    return 0;
  }
+ #endif
  
  void
  darwin_set_sstep (thread_t thread, int enable)
*************** darwin_set_sstep (thread_t thread, int e
*** 532,537 ****
--- 542,548 ----
  	MACH_CHECK_ERROR (kret);
        }
        break;
+ #ifdef BFD64
      case x86_THREAD_STATE64:
        {
  	__uint64_t bit = enable ? X86_EFLAGS_T : 0;
*************** darwin_set_sstep (thread_t thread, int e
*** 546,551 ****
--- 557,563 ----
  	MACH_CHECK_ERROR (kret);
        }
        break;
+ #endif
      default:
        error (_("darwin_set_sstep: unknown flavour: %d\n"), regs.tsh.flavor);
      }
*************** darwin_set_sstep (thread_t thread, int e
*** 554,563 ****
--- 566,577 ----
  void
  darwin_complete_target (struct target_ops *target)
  {
+ #ifdef BFD64
    amd64_native_gregset64_reg_offset = amd64_darwin_thread_state_reg_offset;
    amd64_native_gregset64_num_regs = amd64_darwin_thread_state_num_regs;
    amd64_native_gregset32_reg_offset = i386_darwin_thread_state_reg_offset;
    amd64_native_gregset32_num_regs = i386_darwin_thread_state_num_regs;
+ #endif
  
    target->to_fetch_registers = i386_darwin_fetch_inferior_registers;
    target->to_store_registers = i386_darwin_store_inferior_registers;
Index: gdb/i386-darwin-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-darwin-tdep.c,v
retrieving revision 1.4
diff -c -p -r1.4 i386-darwin-tdep.c
*** gdb/i386-darwin-tdep.c	4 Feb 2009 15:10:50 -0000	1.4
--- gdb/i386-darwin-tdep.c	29 Jun 2009 13:53:54 -0000
***************
*** 32,38 ****
  
  #include "i387-tdep.h"
  #include "i386-tdep.h"
- #include "amd64-tdep.h"
  #include "osabi.h"
  #include "ui-out.h"
  #include "symtab.h"
--- 32,37 ----
*************** int i386_darwin_thread_state_reg_offset[
*** 68,106 ****
  const int i386_darwin_thread_state_num_regs = 
    ARRAY_SIZE (i386_darwin_thread_state_reg_offset);
  
- /* Offsets into the struct x86_thread_state64 where we'll find the saved regs.
-    From <mach/i386/thread_status.h> and amd64-tdep.h.  */
- int amd64_darwin_thread_state_reg_offset[] =
- {
-   0 * 8,			/* %rax */
-   1 * 8,			/* %rbx */
-   2 * 8,			/* %rcx */
-   3 * 8,			/* %rdx */
-   5 * 8,			/* %rsi */
-   4 * 8,			/* %rdi */
-   6 * 8,			/* %rbp */
-   7 * 8,			/* %rsp */
-   8 * 8,			/* %r8 ... */
-   9 * 8,
-   10 * 8,
-   11 * 8,
-   12 * 8,
-   13 * 8,
-   14 * 8,
-   15 * 8,			/* ... %r15 */
-   16 * 8,			/* %rip */
-   17 * 8,			/* %rflags */
-   18 * 8,			/* %cs */
-   -1,				/* %ss */
-   -1,				/* %ds */
-   -1,				/* %es */
-   19 * 8,			/* %fs */
-   20 * 8			/* %gs */
- };
- 
- const int amd64_darwin_thread_state_num_regs = 
-   ARRAY_SIZE (amd64_darwin_thread_state_reg_offset);
- 
  /* Assuming THIS_FRAME is a Darwin sigtramp routine, return the
     address of the associated sigcontext structure.  */
  
--- 67,72 ----
*************** i386_darwin_sigcontext_addr (struct fram
*** 126,150 ****
    return extract_unsigned_integer (buf, 4) + 12;
  }
  
- static CORE_ADDR
- amd64_darwin_sigcontext_addr (struct frame_info *this_frame)
- {
-   CORE_ADDR rbx;
-   CORE_ADDR si;
-   gdb_byte buf[8];
- 
-   /* A pointer to the ucontext is passed as the fourth argument
-      to the signal handler, which is saved in rbx.  */
-   get_frame_register (this_frame, AMD64_RBX_REGNUM, buf);
-   rbx = extract_unsigned_integer (buf, 8);
- 
-   /* The pointer to mcontext is at offset 48.  */
-   read_memory (rbx + 48, buf, 8);
- 
-   /* First register (rax) is at offset 16.  */
-   return extract_unsigned_integer (buf, 8) + 16;
- }
- 
  /* Return true if the PC of THIS_FRAME is in a signal trampoline which
     may have DWARF-2 CFI.
  
--- 92,97 ----
*************** amd64_darwin_sigcontext_addr (struct fra
*** 153,159 ****
     Without this function, the frame is recognized as a normal frame which is
     not expected.  */
  
! static int
  darwin_dwarf_signal_frame_p (struct gdbarch *gdbarch,
  			     struct frame_info *this_frame)
  {
--- 100,106 ----
     Without this function, the frame is recognized as a normal frame which is
     not expected.  */
  
! int
  darwin_dwarf_signal_frame_p (struct gdbarch *gdbarch,
  			     struct frame_info *this_frame)
  {
*************** i386_darwin_init_abi (struct gdbarch_inf
*** 183,209 ****
    set_solib_ops (gdbarch, &darwin_so_ops);
  }
  
- static void
- x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
- {
-   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- 
-   amd64_init_abi (info, gdbarch);
- 
-   tdep->struct_return = reg_struct_return;
- 
-   dwarf2_frame_set_signal_frame_p (gdbarch, darwin_dwarf_signal_frame_p);
- 
-   tdep->sigtramp_p = i386_sigtramp_p;
-   tdep->sigcontext_addr = amd64_darwin_sigcontext_addr;
-   tdep->sc_reg_offset = amd64_darwin_thread_state_reg_offset;
-   tdep->sc_num_regs = amd64_darwin_thread_state_num_regs;
- 
-   tdep->jb_pc_offset = 148;
- 
-   set_solib_ops (gdbarch, &darwin_so_ops);
- }
- 
  static enum gdb_osabi
  i386_mach_o_osabi_sniffer (bfd *abfd)
  {
--- 130,135 ----
*************** _initialize_i386_darwin_tdep (void)
*** 224,230 ****
  
    gdbarch_register_osabi (bfd_arch_i386, bfd_mach_i386_i386,
  			  GDB_OSABI_DARWIN, i386_darwin_init_abi);
- 
-   gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
-                           GDB_OSABI_DARWIN, x86_darwin_init_abi_64);
  }
--- 150,153 ----
Index: gdb/i386-darwin-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/i386-darwin-tdep.h,v
retrieving revision 1.2
diff -c -p -r1.2 i386-darwin-tdep.h
*** gdb/i386-darwin-tdep.h	3 Jan 2009 05:57:51 -0000	1.2
--- gdb/i386-darwin-tdep.h	29 Jun 2009 13:53:54 -0000
***************
*** 19,33 ****
  #ifndef __I386_DARWIN_TDEP_H__
  #define __I386_DARWIN_TDEP_H__
  
  /* Mapping between the general-purpose registers in Darwin x86 thread_state
     struct and GDB's register cache layout.  */
  extern int i386_darwin_thread_state_reg_offset[];
  extern const int i386_darwin_thread_state_num_regs;
  
! /* Mapping between the general-purpose registers in Darwin x86-64 thread
!    state and GDB's register cache layout.
!    Indexed by amd64_regnum.  */
! extern int amd64_darwin_thread_state_reg_offset[];
! extern const int amd64_darwin_thread_state_num_regs;
  
  #endif /* __I386_DARWIN_TDEP_H__ */
--- 19,32 ----
  #ifndef __I386_DARWIN_TDEP_H__
  #define __I386_DARWIN_TDEP_H__
  
+ #include "defs.h"
+ #include "frame.h"
+ 
  /* Mapping between the general-purpose registers in Darwin x86 thread_state
     struct and GDB's register cache layout.  */
  extern int i386_darwin_thread_state_reg_offset[];
  extern const int i386_darwin_thread_state_num_regs;
  
! int darwin_dwarf_signal_frame_p (struct gdbarch *, struct frame_info *);
  
  #endif /* __I386_DARWIN_TDEP_H__ */
*** /dev/null	Mon Jun 29 15:50:32 2009
--- gdb/amd64-darwin-tdep.c	Fri Jun 26 15:46:39 2009
***************
*** 0 ****
--- 1,127 ----
+ /* Darwin support for GDB, the GNU debugger.
+    Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2008, 2009
+    Free Software Foundation, Inc.
+ 
+    Contributed by Apple Computer, 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 3 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, see <http://www.gnu.org/licenses/>.  */
+ 
+ #include "defs.h"
+ #include "frame.h"
+ #include "inferior.h"
+ #include "gdbcore.h"
+ #include "target.h"
+ #include "floatformat.h"
+ #include "symtab.h"
+ #include "regcache.h"
+ #include "libbfd.h"
+ #include "objfiles.h"
+ 
+ #include "i387-tdep.h"
+ #include "amd64-tdep.h"
+ #include "osabi.h"
+ #include "ui-out.h"
+ #include "symtab.h"
+ #include "frame.h"
+ #include "gdb_assert.h"
+ #include "amd64-darwin-tdep.h"
+ #include "i386-darwin-tdep.h"
+ #include "solib.h"
+ #include "solib-darwin.h"
+ #include "dwarf2-frame.h"
+ 
+ /* Offsets into the struct x86_thread_state64 where we'll find the saved regs.
+    From <mach/i386/thread_status.h> and amd64-tdep.h.  */
+ int amd64_darwin_thread_state_reg_offset[] =
+ {
+   0 * 8,			/* %rax */
+   1 * 8,			/* %rbx */
+   2 * 8,			/* %rcx */
+   3 * 8,			/* %rdx */
+   5 * 8,			/* %rsi */
+   4 * 8,			/* %rdi */
+   6 * 8,			/* %rbp */
+   7 * 8,			/* %rsp */
+   8 * 8,			/* %r8 ... */
+   9 * 8,
+   10 * 8,
+   11 * 8,
+   12 * 8,
+   13 * 8,
+   14 * 8,
+   15 * 8,			/* ... %r15 */
+   16 * 8,			/* %rip */
+   17 * 8,			/* %rflags */
+   18 * 8,			/* %cs */
+   -1,				/* %ss */
+   -1,				/* %ds */
+   -1,				/* %es */
+   19 * 8,			/* %fs */
+   20 * 8			/* %gs */
+ };
+ 
+ const int amd64_darwin_thread_state_num_regs = 
+   ARRAY_SIZE (amd64_darwin_thread_state_reg_offset);
+ 
+ /* Assuming THIS_FRAME is a Darwin sigtramp routine, return the
+    address of the associated sigcontext structure.  */
+ 
+ static CORE_ADDR
+ amd64_darwin_sigcontext_addr (struct frame_info *this_frame)
+ {
+   CORE_ADDR rbx;
+   CORE_ADDR si;
+   gdb_byte buf[8];
+ 
+   /* A pointer to the ucontext is passed as the fourth argument
+      to the signal handler, which is saved in rbx.  */
+   get_frame_register (this_frame, AMD64_RBX_REGNUM, buf);
+   rbx = extract_unsigned_integer (buf, 8);
+ 
+   /* The pointer to mcontext is at offset 48.  */
+   read_memory (rbx + 48, buf, 8);
+ 
+   /* First register (rax) is at offset 16.  */
+   return extract_unsigned_integer (buf, 8) + 16;
+ }
+ 
+ static void
+ x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
+ {
+   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ 
+   amd64_init_abi (info, gdbarch);
+ 
+   tdep->struct_return = reg_struct_return;
+ 
+   dwarf2_frame_set_signal_frame_p (gdbarch, darwin_dwarf_signal_frame_p);
+ 
+   tdep->sigtramp_p = i386_sigtramp_p;
+   tdep->sigcontext_addr = amd64_darwin_sigcontext_addr;
+   tdep->sc_reg_offset = amd64_darwin_thread_state_reg_offset;
+   tdep->sc_num_regs = amd64_darwin_thread_state_num_regs;
+ 
+   tdep->jb_pc_offset = 148;
+ 
+   set_solib_ops (gdbarch, &darwin_so_ops);
+ }
+ 
+ void
+ _initialize_amd64_darwin_tdep (void)
+ {
+   gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
+                           GDB_OSABI_DARWIN, x86_darwin_init_abi_64);
+ }
*** /dev/null	Mon Jun 29 15:50:32 2009
--- gdb/amd64-darwin-tdep.h	Fri Jun 26 14:41:02 2009
***************
*** 0 ****
--- 1,28 ----
+ /* Target-dependent code for Darwin x86-64.
+ 
+    Copyright (C) 2009 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 3 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, see <http://www.gnu.org/licenses/>.  */
+ #ifndef __AMD64_DARWIN_TDEP_H__
+ #define __AMD64_DARWIN_TDEP_H__
+ 
+ /* Mapping between the general-purpose registers in Darwin x86-64 thread
+    state and GDB's register cache layout.
+    Indexed by amd64_regnum.  */
+ extern int amd64_darwin_thread_state_reg_offset[];
+ extern const int amd64_darwin_thread_state_num_regs;
+ 
+ #endif /* __AMD64_DARWIN_TDEP_H__ */


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