diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-12-09 12:14:52 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-12-09 12:14:52 +0300 |
commit | ea3ddd58a57e2e01ec17ed500f533c523be9ddef (patch) | |
tree | 72ee60c10f1833abaca62db0ec02cb1cc9b49ec2 | |
parent | ee8536fb62c8a81ea727b475a6793417d00b40b0 (diff) | |
download | gdb-ea3ddd58a57e2e01ec17ed500f533c523be9ddef.tar.gz |
Add Dyson patches
-rw-r--r-- | debian/patches/dyson-reg.patch | 25 | ||||
-rw-r--r-- | debian/patches/dyson-syscall-table.patch | 24 | ||||
-rw-r--r-- | debian/patches/dyson-thread-debugging-library.patch | 13 | ||||
-rw-r--r-- | debian/patches/series | 3 |
4 files changed, 65 insertions, 0 deletions
diff --git a/debian/patches/dyson-reg.patch b/debian/patches/dyson-reg.patch new file mode 100644 index 0000000..9958d64 --- /dev/null +++ b/debian/patches/dyson-reg.patch @@ -0,0 +1,25 @@ +Index: gdb.git/gdb/procfs.c +=================================================================== +--- gdb.git.orig/gdb/procfs.c ++++ gdb.git/gdb/procfs.c +@@ -1569,6 +1569,12 @@ proc_set_watchpoint (procinfo *pi, CORE_ + + #include <sys/sysi86.h> + ++// These macros are not exposed by default on Dyson to avoid conflicts ++// with other software (due to very generic names). ++#ifndef GS ++#define GS 0 ++#endif ++ + /* The KEY is actually the value of the lower 16 bits of the GS + register for the LWP that we're interested in. Returns the + matching ssh struct (LDT entry). */ +@@ -1641,6 +1647,7 @@ procfs_find_LDT_entry (ptid_t ptid) /* A + /* Find the matching entry and return it. */ + return proc_get_LDT_entry (pi, key); + } ++#undef GS + + #endif + diff --git a/debian/patches/dyson-syscall-table.patch b/debian/patches/dyson-syscall-table.patch new file mode 100644 index 0000000..23009f2 --- /dev/null +++ b/debian/patches/dyson-syscall-table.patch @@ -0,0 +1,24 @@ +Index: gdb.git/gdb/proc-events.c +=================================================================== +--- gdb.git.orig/gdb/proc-events.c ++++ gdb.git/gdb/proc-events.c +@@ -167,7 +167,9 @@ init_syscall_table (void) + #ifdef SYS_fstatat64 + syscall_table[SYS_fstatat64] = "fstatat64"; + #endif ++#ifdef SYS_fstatfs + syscall_table[SYS_fstatfs] = "fstatfs"; ++#endif + syscall_table[SYS_fstatvfs] = "fstatvfs"; + syscall_table[SYS_fstatvfs64] = "fstatvfs64"; + #ifdef SYS_fxstat +@@ -432,7 +434,9 @@ init_syscall_table (void) + #ifdef SYS_stat64 + syscall_table[SYS_stat64] = "stat64"; + #endif ++#ifdef SYS_statfs + syscall_table[SYS_statfs] = "statfs"; ++#endif + syscall_table[SYS_statvfs] = "statvfs"; + syscall_table[SYS_statvfs64] = "statvfs64"; + syscall_table[SYS_stime] = "stime"; diff --git a/debian/patches/dyson-thread-debugging-library.patch b/debian/patches/dyson-thread-debugging-library.patch new file mode 100644 index 0000000..99825a4 --- /dev/null +++ b/debian/patches/dyson-thread-debugging-library.patch @@ -0,0 +1,13 @@ +Index: gdb.git/gdb/sol-thread.c +=================================================================== +--- gdb.git.orig/gdb/sol-thread.c ++++ gdb.git/gdb/sol-thread.c +@@ -1187,7 +1187,7 @@ _initialize_sol_thread (void) + { + void *dlhandle; + +- dlhandle = dlopen ("libthread_db.so.1", RTLD_NOW); ++ dlhandle = dlopen ("libc_db.so.1", RTLD_NOW); + if (!dlhandle) + goto die; + diff --git a/debian/patches/series b/debian/patches/series index 858f648..ac9dc55 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,6 @@ gdb_configure.nat.patch gdb-PATH_MAX.patch struct-thread_info.patch gdb_bsd-kvm.c.diff +dyson-thread-debugging-library.patch +dyson-syscall-table.patch +dyson-reg.patch |