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]
Other format: [Raw text]

[PATCH] Add FreeBSD/amd64 target and host to 6.0


Andrew has said in the past that for checking in new targets, things
are a bit relaxed too, and since he said this was okay anyway, I
checked it in.  I added the new files via a seperate:

  cvs tag -b gdb_6_0-branch ...

which seems to have done the trick.  That's why they're not part of
the diff.

I'll update the NEWS entry in a moment.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* configure.host: Add x86_64-*-freebsd*.
	* configure.tgt: Add x86_64-*-freebsd*.
	* Makefile.in (amd64fbsd-nat.o, amd64fbsd-tdep.o): New targets.
	* x86-64-tdep.h (amd64fbsd_sigtramp_start, amd64fbsd_sigtramp_end,
	amd64fbsd_sc_reg_offset): Add extern declarations.
	(X86_64_RAX_REGNUM, X86_64_RDX_REGNUM, X86_64_RDI_REGNUM,
	X86_64_RBP_REGNUM, X86_64_RSP_REGNUM, X86_64_RIP_REGNUM,
	X86_64_EFLAGS_REGNUM, X86_64_ST0_REGNUM, X86_64_XMM0_REGNUM,
	X86_64_XMM1_REGNUM): Moved here ...
	* x86-64-tdep.c: ... from here.
	* amd64fbsd-nat.c: New file.
	* amd64fbsd-tdep.c: New file.
	* config/i386/nm-fbsd64.h: New file.
	* config/i386/fbsd64.mh: New file.
	* config/i386/fbsd64.mt: New file.

Index: configure.host
===================================================================
RCS file: /cvs/src/src/gdb/configure.host,v
retrieving revision 1.53
diff -u -p -r1.53 configure.host
--- configure.host 13 Jun 2003 17:49:49 -0000 1.53
+++ configure.host 18 Aug 2003 18:06:22 -0000
@@ -150,5 +150,6 @@ vax-*-ultrix2*)		gdb_host=vaxult2 ;;
 vax-*-ultrix*)		gdb_host=vaxult ;;
 
 x86_64-*-linux*)	gdb_host=x86-64linux ;;
+x86_64-*-freebsd*)	gdb_host=fbsd64 ;;
 
 esac
Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.107.4.1
diff -u -p -r1.107.4.1 configure.tgt
--- configure.tgt 1 Aug 2003 21:56:58 -0000 1.107.4.1
+++ configure.tgt 18 Aug 2003 18:06:22 -0000
@@ -37,6 +37,7 @@ esac
 
 case "${target}" in
 
+x86_64-*-freebsd*)	gdb_target=fbsd64 ;;
 *-*-freebsd*)		gdb_target=fbsd
 			;;
 
@@ -265,6 +266,7 @@ esac
 case "${gdb_target}" in
 d10v)		gdb_multi_arch=yes ;;
 m32r)		gdb_multi_arch=yes ;;
+fbsd64)		gdb_multi_arch=yes ;;
 m68hc11)	gdb_multi_arch=yes ;;
 mn10300)	gdb_multi_arch=yes ;;
 x86-64linux)    gdb_multi_arch=yes ;;
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.410.2.13
diff -u -p -r1.410.2.13 Makefile.in
--- Makefile.in 17 Aug 2003 18:22:33 -0000 1.410.2.13
+++ Makefile.in 18 Aug 2003 18:06:24 -0000
@@ -1535,6 +1535,11 @@ alpha-tdep.o: alpha-tdep.c $(defs_h) $(d
 	$(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \
 	$(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \
 	$(elf_bfd_h) $(alpha_tdep_h)
+amd64fbsd-nat.o: amd64fbsd-nat.o $(defs_h) $(inferior_h) $(regcache_h) \
+	$(gdb_assert_h) $(gregset_h) $(x86_64_tdep_h)
+amd64fbsd-tdep.o: amd64fbsd-tdep.o $(defs_h) $(arch_utils_h) $(frame_h) \
+	$(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \
+	$(x86_64_tdep_h)
 annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
 	$(gdbtypes_h) $(breakpoint_h)
 arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) \
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.79.2.6
diff -u -p -r1.79.2.6 x86-64-tdep.c
--- x86-64-tdep.c 7 Aug 2003 11:21:58 -0000 1.79.2.6
+++ x86-64-tdep.c 18 Aug 2003 18:06:25 -0000
@@ -39,18 +39,7 @@
 #include "x86-64-tdep.h"
 #include "i387-tdep.h"
 
-/* Register numbers of various important registers.  */
-
-#define X86_64_RAX_REGNUM	0 /* %rax */
-#define X86_64_RDX_REGNUM	3 /* %rdx */
-#define X86_64_RDI_REGNUM	5 /* %rdi */
-#define X86_64_RBP_REGNUM	6 /* %rbp */
-#define X86_64_RSP_REGNUM	7 /* %rsp */
-#define X86_64_RIP_REGNUM	16 /* %rip */
-#define X86_64_EFLAGS_REGNUM	17 /* %eflags */
-#define X86_64_ST0_REGNUM	22 /* %st0 */
-#define X86_64_XMM0_REGNUM	38 /* %xmm0 */
-#define X86_64_XMM1_REGNUM	39 /* %xmm1 */
+/* Register information.  */
 
 struct x86_64_register_info
 {
Index: x86-64-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.h,v
retrieving revision 1.15
diff -u -p -r1.15 x86-64-tdep.h
--- x86-64-tdep.h 31 May 2003 08:15:38 -0000 1.15
+++ x86-64-tdep.h 18 Aug 2003 18:06:25 -0000
@@ -30,6 +30,19 @@ struct frame_info;
 
 #include "i386-tdep.h"
 
+/* Register numbers of various important registers.  */
+
+#define X86_64_RAX_REGNUM	0 /* %rax */
+#define X86_64_RDX_REGNUM	3 /* %rdx */
+#define X86_64_RDI_REGNUM	5 /* %rdi */
+#define X86_64_RBP_REGNUM	6 /* %rbp */
+#define X86_64_RSP_REGNUM	7 /* %rsp */
+#define X86_64_RIP_REGNUM	16 /* %rip */
+#define X86_64_EFLAGS_REGNUM	17 /* %eflags */
+#define X86_64_ST0_REGNUM	22 /* %st0 */
+#define X86_64_XMM0_REGNUM	38 /* %xmm0 */
+#define X86_64_XMM1_REGNUM	39 /* %xmm1 */
+
 /* Number of general purpose registers.  */
 #define X86_64_NUM_GREGS	22
 
@@ -47,5 +60,11 @@ void x86_64_supply_fxsave (char *fxsave)
    reserved bits in *FXSAVE.  */
 
 void x86_64_fill_fxsave (char *fxsave, int regnum);
+
+
+/* Variables exported from amd64fbsd-tdep.c.  */
+extern CORE_ADDR amd64fbsd_sigtramp_start;
+extern CORE_ADDR amd64fbsd_sigtramp_end;
+extern int amd64fbsd_sc_reg_offset[];
 
 #endif /* x86-64-tdep.h */


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