From 1e7b928d5cacb177748068e3047fb72ae1510a5f Mon Sep 17 00:00:00 2001 From: aoliva Date: Tue, 11 Jul 2006 08:25:57 +0000 Subject: [PATCH] Fix i386 build. --- ...catch-debug-registers-error-20060527.patch | 16 ++++++--- gdb-6.3-threaded-watchpoints2-20050225.patch | 36 +++++++++---------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/gdb-6.3-catch-debug-registers-error-20060527.patch b/gdb-6.3-catch-debug-registers-error-20060527.patch index 52a8bcc..2d29595 100644 --- a/gdb-6.3-catch-debug-registers-error-20060527.patch +++ b/gdb-6.3-catch-debug-registers-error-20060527.patch @@ -6,11 +6,19 @@ from Alexandre Oliva (i386_linux_set_debug_regs_for_thread): ... this, and add new function to catch exceptions in the old one. -Index: gdb-6.3/gdb/i386-linux-nat.c +Index: gdb-6.5/gdb/i386-linux-nat.c =================================================================== ---- gdb-6.3.orig/gdb/i386-linux-nat.c 2006-04-14 03:22:47.000000000 -0300 -+++ gdb-6.3/gdb/i386-linux-nat.c 2006-05-27 03:48:47.000000000 -0300 -@@ -694,14 +694,33 @@ struct i386_debug_register_state +--- gdb-6.5.orig/gdb/i386-linux-nat.c 2006-07-11 05:21:58.000000000 -0300 ++++ gdb-6.5/gdb/i386-linux-nat.c 2006-07-11 05:24:29.000000000 -0300 +@@ -27,6 +27,7 @@ + #include "observer.h" + #include "target.h" + #include "linux-nat.h" ++#include "exceptions.h" + + #include "gdb_assert.h" + #include "gdb_string.h" +@@ -695,14 +696,33 @@ struct i386_debug_register_state unsigned long control; }; diff --git a/gdb-6.3-threaded-watchpoints2-20050225.patch b/gdb-6.3-threaded-watchpoints2-20050225.patch index 1496d82..30ff0a3 100644 --- a/gdb-6.3-threaded-watchpoints2-20050225.patch +++ b/gdb-6.3-threaded-watchpoints2-20050225.patch @@ -37,8 +37,8 @@ Index: gdb-6.5/gdb/config/i386/nm-linux64.h =================================================================== ---- gdb-6.5.orig/gdb/config/i386/nm-linux64.h 2006-07-11 02:44:36.000000000 -0300 -+++ gdb-6.5/gdb/config/i386/nm-linux64.h 2006-07-11 02:45:16.000000000 -0300 +--- gdb-6.5.orig/gdb/config/i386/nm-linux64.h 2006-07-11 05:20:42.000000000 -0300 ++++ gdb-6.5/gdb/config/i386/nm-linux64.h 2006-07-11 05:20:44.000000000 -0300 @@ -35,22 +35,59 @@ /* Provide access to the i386 hardware debugging registers. */ @@ -109,8 +109,8 @@ Index: gdb-6.5/gdb/config/i386/nm-linux64.h #define FETCH_INFERIOR_REGISTERS Index: gdb-6.5/gdb/config/i386/nm-linux.h =================================================================== ---- gdb-6.5.orig/gdb/config/i386/nm-linux.h 2006-07-11 02:44:36.000000000 -0300 -+++ gdb-6.5/gdb/config/i386/nm-linux.h 2006-07-11 02:45:16.000000000 -0300 +--- gdb-6.5.orig/gdb/config/i386/nm-linux.h 2006-07-11 05:20:42.000000000 -0300 ++++ gdb-6.5/gdb/config/i386/nm-linux.h 2006-07-11 05:20:44.000000000 -0300 @@ -46,23 +46,61 @@ extern CORE_ADDR register_u_addr (CORE_A /* Provide access to the i386 hardware debugging registers. */ @@ -183,8 +183,8 @@ Index: gdb-6.5/gdb/config/i386/nm-linux.h Index: gdb-6.5/gdb/i386-nat.c =================================================================== ---- gdb-6.5.orig/gdb/i386-nat.c 2006-07-11 02:44:36.000000000 -0300 -+++ gdb-6.5/gdb/i386-nat.c 2006-07-11 02:45:16.000000000 -0300 +--- gdb-6.5.orig/gdb/i386-nat.c 2006-07-11 05:20:42.000000000 -0300 ++++ gdb-6.5/gdb/i386-nat.c 2006-07-11 05:20:44.000000000 -0300 @@ -21,6 +21,7 @@ #include "defs.h" @@ -196,7 +196,7 @@ Index: gdb-6.5/gdb/i386-nat.c Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c 2006-07-11 02:45:16.000000000 -0300 ++++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c 2006-07-11 05:20:44.000000000 -0300 @@ -0,0 +1,66 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -267,7 +267,7 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp 2006-07-11 02:45:16.000000000 -0300 ++++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp 2006-07-11 05:20:44.000000000 -0300 @@ -0,0 +1,133 @@ +# This testcase is part of GDB, the GNU debugger. + @@ -404,8 +404,8 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp +} Index: gdb-6.5/gdb/i386-linux-nat.c =================================================================== ---- gdb-6.5.orig/gdb/i386-linux-nat.c 2006-07-11 02:44:36.000000000 -0300 -+++ gdb-6.5/gdb/i386-linux-nat.c 2006-07-11 02:45:16.000000000 -0300 +--- gdb-6.5.orig/gdb/i386-linux-nat.c 2006-07-11 05:20:42.000000000 -0300 ++++ gdb-6.5/gdb/i386-linux-nat.c 2006-07-11 05:21:58.000000000 -0300 @@ -24,6 +24,7 @@ #include "inferior.h" #include "gdbcore.h" @@ -580,7 +580,7 @@ Index: gdb-6.5/gdb/i386-linux-nat.c +i386_linux_insert_hw_breakpoint (struct bp_target_info *bp_tgt) +{ + int rc; -+ rc = i386_insert_hw_breakpoint (bt_tgt); ++ rc = i386_insert_hw_breakpoint (bp_tgt); + if (!rc) + i386_linux_sync_debug_registers_across_threads (); + return rc; @@ -616,21 +616,17 @@ Index: gdb-6.5/gdb/i386-linux-nat.c /* Called by libthread_db. Returns a pointer to the thread local storage (or its descriptor). */ -@@ -844,3 +969,10 @@ _initialize_i386_linux_nat (void) +@@ -843,4 +968,6 @@ _initialize_i386_linux_nat (void) + /* Register the target. */ linux_nat_add_target (t); - } + -+void -+_initialize_i386_linux_nat (void) -+{ + observer_attach_linux_new_thread (i386_linux_new_thread); -+} -+ + } Index: gdb-6.5/gdb/amd64-linux-nat.c =================================================================== ---- gdb-6.5.orig/gdb/amd64-linux-nat.c 2006-07-11 02:44:36.000000000 -0300 -+++ gdb-6.5/gdb/amd64-linux-nat.c 2006-07-11 02:45:16.000000000 -0300 +--- gdb-6.5.orig/gdb/amd64-linux-nat.c 2006-07-11 05:20:42.000000000 -0300 ++++ gdb-6.5/gdb/amd64-linux-nat.c 2006-07-11 05:20:44.000000000 -0300 @@ -25,6 +25,7 @@ #include "inferior.h" #include "gdbcore.h"