Rebase to FSF GDB 7.7.

- New rpmbuild option: --with asan
This commit is contained in:
Jan Kratochvil 2014-02-07 19:38:14 +01:00
commit 2c55a5441d
37 changed files with 3098 additions and 4749 deletions

View file

@ -23,11 +23,11 @@ instead.
Port to GDB-6.7.
Index: gdb-7.4.50.20120703/gdb/amd64-linux-tdep.c
Index: gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/amd64-linux-tdep.c 2012-06-13 22:36:48.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/amd64-linux-tdep.c 2012-07-03 17:32:46.547563363 +0200
@@ -271,6 +271,80 @@ amd64_linux_register_reggroup_p (struct
--- gdb-7.6.90.20140127.orig/gdb/amd64-linux-tdep.c 2014-02-04 23:40:06.263483469 +0100
+++ gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c 2014-02-04 23:47:18.438009290 +0100
@@ -289,6 +289,80 @@ amd64_linux_register_reggroup_p (struct
/* Set the program counter for process PTID to PC. */
@ -108,20 +108,20 @@ Index: gdb-7.4.50.20120703/gdb/amd64-linux-tdep.c
static void
amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
@@ -1547,6 +1621,8 @@ amd64_linux_init_abi (struct gdbarch_inf
@@ -1607,6 +1681,8 @@ amd64_linux_init_abi_common(struct gdbar
amd64_linux_init_abi_common (info, gdbarch);
tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET;
+ tdep->outermost_frame_p = amd64_linux_outermost_frame;
+
/* GNU/Linux uses SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_lp64_fetch_link_map_offsets);
Index: gdb-7.4.50.20120703/gdb/amd64-tdep.c
/* Add the %orig_rax register used for syscall restarting. */
set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc);
Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/amd64-tdep.c 2012-06-16 17:20:22.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/amd64-tdep.c 2012-07-03 17:32:12.335604415 +0200
@@ -2324,6 +2324,7 @@ amd64_frame_unwind_stop_reason (struct f
--- gdb-7.6.90.20140127.orig/gdb/amd64-tdep.c 2014-02-04 23:40:06.265483471 +0100
+++ gdb-7.6.90.20140127/gdb/amd64-tdep.c 2014-02-04 23:45:40.846891653 +0100
@@ -2359,6 +2359,7 @@ amd64_frame_unwind_stop_reason (struct f
{
struct amd64_frame_cache *cache =
amd64_frame_cache (this_frame, this_cache);
@ -129,7 +129,7 @@ Index: gdb-7.4.50.20120703/gdb/amd64-tdep.c
if (!cache->base_p)
return UNWIND_UNAVAILABLE;
@@ -2332,6 +2333,10 @@ amd64_frame_unwind_stop_reason (struct f
@@ -2367,6 +2368,10 @@ amd64_frame_unwind_stop_reason (struct f
if (cache->base == 0)
return UNWIND_OUTERMOST;
@ -140,30 +140,31 @@ Index: gdb-7.4.50.20120703/gdb/amd64-tdep.c
return UNWIND_NO_REASON;
}
@@ -2341,6 +2346,7 @@ amd64_frame_this_id (struct frame_info *
@@ -2498,6 +2503,7 @@ amd64_sigtramp_frame_this_id (struct fra
{
struct amd64_frame_cache *cache =
amd64_frame_cache (this_frame, this_cache);
amd64_sigtramp_frame_cache (this_frame, this_cache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
if (!cache->base_p)
return;
@@ -2349,6 +2355,10 @@ amd64_frame_this_id (struct frame_info *
if (cache->base == 0)
return;
+ /* Detect OS dependent outermost frames; such as `clone'. */
+ if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
+ return;
+
(*this_id) = frame_id_build (cache->base + 16, cache->pc);
(*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame));
@@ -2506,6 +2512,11 @@ amd64_sigtramp_frame_this_id (struct fra
/* This marks the outermost frame. */
return;
}
+ else if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
+ {
+ /* Detect OS dependent outermost frames; such as `clone'. */
+ return;
+ }
else
(*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame));
}
Index: gdb-7.4.50.20120703/gdb/i386-tdep.c
Index: gdb-7.6.90.20140127/gdb/i386-tdep.c
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/i386-tdep.c 2012-06-18 19:31:34.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/i386-tdep.c 2012-07-03 17:32:12.339604409 +0200
@@ -7655,6 +7655,9 @@ i386_gdbarch_init (struct gdbarch_info i
--- gdb-7.6.90.20140127.orig/gdb/i386-tdep.c 2014-02-04 23:40:06.267483473 +0100
+++ gdb-7.6.90.20140127/gdb/i386-tdep.c 2014-02-04 23:43:33.048734974 +0100
@@ -7830,6 +7830,9 @@ i386_gdbarch_init (struct gdbarch_info i
tdep->xsave_xcr0_offset = -1;
@ -173,11 +174,11 @@ Index: gdb-7.4.50.20120703/gdb/i386-tdep.c
tdep->record_regmap = i386_record_regmap;
set_gdbarch_long_long_align_bit (gdbarch, 32);
Index: gdb-7.4.50.20120703/gdb/i386-tdep.h
Index: gdb-7.6.90.20140127/gdb/i386-tdep.h
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/i386-tdep.h 2012-06-13 22:29:15.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/i386-tdep.h 2012-07-03 17:32:12.340604408 +0200
@@ -219,6 +219,9 @@ struct gdbarch_tdep
--- gdb-7.6.90.20140127.orig/gdb/i386-tdep.h 2014-02-04 23:40:06.268483475 +0100
+++ gdb-7.6.90.20140127/gdb/i386-tdep.h 2014-02-04 23:43:33.048734974 +0100
@@ -192,6 +192,9 @@ struct gdbarch_tdep
int (*i386_sysenter_record) (struct regcache *regcache);
/* Parse syscall args. */
int (*i386_syscall_record) (struct regcache *regcache);
@ -187,10 +188,10 @@ Index: gdb-7.4.50.20120703/gdb/i386-tdep.h
};
/* Floating-point registers. */
Index: gdb-7.4.50.20120703/gdb/ia64-tdep.c
Index: gdb-7.6.90.20140127/gdb/ia64-tdep.c
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/ia64-tdep.c 2012-07-03 17:30:09.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/ia64-tdep.c 2012-07-03 17:32:12.343604405 +0200
--- gdb-7.6.90.20140127.orig/gdb/ia64-tdep.c 2014-02-04 23:40:06.270483477 +0100
+++ gdb-7.6.90.20140127/gdb/ia64-tdep.c 2014-02-04 23:43:33.049734975 +0100
@@ -2176,6 +2176,138 @@ static const struct frame_unwind ia64_fr
default_frame_sniffer
};
@ -330,7 +331,7 @@ Index: gdb-7.4.50.20120703/gdb/ia64-tdep.c
/* Signal trampolines. */
static void
@@ -4146,6 +4278,7 @@ ia64_gdbarch_init (struct gdbarch_info i
@@ -4023,6 +4155,7 @@ ia64_gdbarch_init (struct gdbarch_info i
set_gdbarch_dummy_id (gdbarch, ia64_dummy_id);
set_gdbarch_unwind_pc (gdbarch, ia64_unwind_pc);
@ -338,10 +339,10 @@ Index: gdb-7.4.50.20120703/gdb/ia64-tdep.c
#ifdef HAVE_LIBUNWIND_IA64_H
frame_unwind_append_unwinder (gdbarch,
&ia64_libunwind_sigtramp_frame_unwind);
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.c
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.c 2012-07-03 17:32:12.344604404 +0200
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c 2014-02-04 23:43:33.050734976 +0100
@@ -0,0 +1,39 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@ -382,10 +383,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.c
+ for (;;)
+ pause();
+}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.exp
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2012-07-03 17:32:12.344604404 +0200
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2014-02-04 23:43:33.050734976 +0100
@@ -0,0 +1,61 @@
+# Copyright 2006 Free Software Foundation, Inc.
+