- [pie] Fix general ppc64 regression due to a function descriptors bug.
- [pie] Fix also keeping breakpoints disabled in PIE mode. - Import upstream <tab>-completion crash fix. - Drop some unused patches from the repository. - More RHEL-5 build compatibility updates. - Use gfortran44 when running the testsuite on RHEL-5. - Disable python there due to insufficient ppc multilib. - Fix orphanripper hangs and thus enable it again.
This commit is contained in:
parent
d492495bcf
commit
059aafdd99
|
@ -1,23 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182116
|
|
||||||
|
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/linux-thread-db.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/linux-thread-db.c 2006-08-24 02:55:24.000000000 -0300
|
|
||||||
+++ gdb-6.5/gdb/linux-thread-db.c 2006-08-24 02:56:16.000000000 -0300
|
|
||||||
@@ -939,6 +939,15 @@ thread_db_wait (ptid_t ptid, struct targ
|
|
||||||
|| ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
|
|
||||||
return pid_to_ptid (-1);
|
|
||||||
|
|
||||||
+ if (ourstatus->kind == TARGET_WAITKIND_EXECD)
|
|
||||||
+ {
|
|
||||||
+ remove_thread_event_breakpoints ();
|
|
||||||
+ unpush_target (&thread_db_ops);
|
|
||||||
+ using_thread_db = 0;
|
|
||||||
+
|
|
||||||
+ return pid_to_ptid (GET_PID (ptid));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (ourstatus->kind == TARGET_WAITKIND_STOPPED
|
|
||||||
&& (ourstatus->value.sig == TARGET_SIGNAL_TRAP
|
|
||||||
|| ourstatus->value.sig == TARGET_SIGNAL_ILL))
|
|
|
@ -1,28 +0,0 @@
|
||||||
2005-01-25 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* ia64-tdep.c (getunwind_table): Call the low-level xfer
|
|
||||||
unwind table syscall to support backtracing from syscalls in
|
|
||||||
a corefile.
|
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/ia64-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/ia64-tdep.c 2006-04-18 16:20:06.000000000 -0300
|
|
||||||
+++ gdb-6.5/gdb/ia64-tdep.c 2006-07-07 02:18:40.000000000 -0300
|
|
||||||
@@ -2470,8 +2470,17 @@ getunwind_table (void *buf, size_t len)
|
|
||||||
we want to preserve fall back to the running kernel's table, then
|
|
||||||
we should find a way to override the corefile layer's
|
|
||||||
xfer_partial method. */
|
|
||||||
+#if 0
|
|
||||||
x = target_read_partial (¤t_target, TARGET_OBJECT_UNWIND_TABLE, NULL,
|
|
||||||
buf, 0, len);
|
|
||||||
+#endif
|
|
||||||
+ /* FIXME: This is a temporary solution to backtracing syscalls in corefiles.
|
|
||||||
+ To do this properly, the AUXV section should be used. This
|
|
||||||
+ fix will work as long as the kernel used to generate the corefile
|
|
||||||
+ is equivalent to the kernel used to debug the corefile. */
|
|
||||||
+ x = ia64_linux_xfer_unwind_table (¤t_target,
|
|
||||||
+ TARGET_OBJECT_UNWIND_TABLE, NULL,
|
|
||||||
+ buf, NULL, 0, len);
|
|
||||||
|
|
||||||
return (int)x;
|
|
||||||
}
|
|
|
@ -29,7 +29,7 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
|
||||||
+ ULONGEST unatN_val;
|
+ ULONGEST unatN_val;
|
||||||
+ ULONGEST unat;
|
+ ULONGEST unat;
|
||||||
+ read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
|
+ read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
|
||||||
+ register_size (current_gdbarch, IA64_UNAT_REGNUM));
|
+ register_size (target_gdbarch, IA64_UNAT_REGNUM));
|
||||||
+ unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
|
+ unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
|
||||||
+ return frame_unwind_got_constant (this_frame, regnum, unatN_val);
|
+ return frame_unwind_got_constant (this_frame, regnum, unatN_val);
|
||||||
+ }
|
+ }
|
||||||
|
@ -45,9 +45,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
|
||||||
+ CORE_ADDR gr_addr = 0, nat_addr = 0;
|
+ CORE_ADDR gr_addr = 0, nat_addr = 0;
|
||||||
+
|
+
|
||||||
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
|
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
|
||||||
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
|
+ register_size (target_gdbarch, IA64_BSP_REGNUM));
|
||||||
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
||||||
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
|
+ register_size (target_gdbarch, IA64_CFM_REGNUM));
|
||||||
+
|
+
|
||||||
+ /* The bsp points at the end of the register frame so we
|
+ /* The bsp points at the end of the register frame so we
|
||||||
+ subtract the size of frame from it to get start of register frame. */
|
+ subtract the size of frame from it to get start of register frame. */
|
||||||
|
@ -71,10 +71,10 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
|
||||||
+ nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
|
+ nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
|
||||||
+ if (nat_addr != 0)
|
+ if (nat_addr != 0)
|
||||||
+ read_memory (nat_addr, (char *) &nat_collection,
|
+ read_memory (nat_addr, (char *) &nat_collection,
|
||||||
+ register_size (current_gdbarch, IA64_RNAT_REGNUM));
|
+ register_size (target_gdbarch, IA64_RNAT_REGNUM));
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+ nat_collection = read_memory_integer (nat_addr, 8);
|
+ nat_collection = read_memory_integer (nat_addr, 8, BFD_ENDIAN_LITTLE);
|
||||||
+ if (nat_addr != 0)
|
+ if (nat_addr != 0)
|
||||||
+ {
|
+ {
|
||||||
+ nat_bit = (gr_addr >> 3) & 0x3f;
|
+ nat_bit = (gr_addr >> 3) & 0x3f;
|
||||||
|
@ -97,9 +97,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
|
||||||
+ ULONGEST bof;
|
+ ULONGEST bof;
|
||||||
+
|
+
|
||||||
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
|
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
|
||||||
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
|
+ register_size (target_gdbarch, IA64_BSP_REGNUM));
|
||||||
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
||||||
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
|
+ register_size (target_gdbarch, IA64_CFM_REGNUM));
|
||||||
+
|
+
|
||||||
+ /* The bsp points at the end of the register frame so we
|
+ /* The bsp points at the end of the register frame so we
|
||||||
+ subtract the size of frame from it to get beginning of frame. */
|
+ subtract the size of frame from it to get beginning of frame. */
|
||||||
|
@ -133,9 +133,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
|
||||||
+ ULONGEST cfm;
|
+ ULONGEST cfm;
|
||||||
+ ULONGEST prN_val;
|
+ ULONGEST prN_val;
|
||||||
+ read_memory (pr_addr, (char *) &pr,
|
+ read_memory (pr_addr, (char *) &pr,
|
||||||
+ register_size (current_gdbarch, IA64_PR_REGNUM));
|
+ register_size (target_gdbarch, IA64_PR_REGNUM));
|
||||||
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
||||||
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
|
+ register_size (target_gdbarch, IA64_CFM_REGNUM));
|
||||||
+
|
+
|
||||||
+ /* Get the register rename base for this frame and adjust the
|
+ /* Get the register rename base for this frame and adjust the
|
||||||
+ * register name to take rotation into account. */
|
+ * register name to take rotation into account. */
|
||||||
|
|
|
@ -1,82 +0,0 @@
|
||||||
2005-04-02 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* symfile.c (separate_debug_file_exists): When the CRCs mismatch
|
|
||||||
print a warning.
|
|
||||||
(find_separate_debug_file): Pass in the objfile's name.
|
|
||||||
|
|
||||||
Index: gdb-6.8.50.20081128/gdb/symfile.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.50.20081128.orig/gdb/symfile.c 2008-10-03 18:36:10.000000000 +0200
|
|
||||||
+++ gdb-6.8.50.20081128/gdb/symfile.c 2008-12-01 16:34:36.000000000 +0100
|
|
||||||
@@ -1296,7 +1296,8 @@ get_debug_link_info (struct objfile *obj
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
-separate_debug_file_exists (const char *name, unsigned long crc)
|
|
||||||
+separate_debug_file_exists (const char *name, unsigned long crc,
|
|
||||||
+ const char *parent_name)
|
|
||||||
{
|
|
||||||
unsigned long file_crc = 0;
|
|
||||||
bfd *abfd;
|
|
||||||
@@ -1316,7 +1317,15 @@ separate_debug_file_exists (const char *
|
|
||||||
|
|
||||||
bfd_close (abfd);
|
|
||||||
|
|
||||||
- return crc == file_crc;
|
|
||||||
+ if (crc != file_crc)
|
|
||||||
+ {
|
|
||||||
+ warning (_("the debug information found in \"%s\""
|
|
||||||
+ " does not match \"%s\" (CRC mismatch).\n"),
|
|
||||||
+ name, parent_name);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *debug_file_directory = NULL;
|
|
||||||
@@ -1368,6 +1377,8 @@ find_separate_debug_file (struct objfile
|
|
||||||
basename = get_debug_link_info (objfile, &crc32);
|
|
||||||
|
|
||||||
if (basename == NULL)
|
|
||||||
+ /* There's no separate debug info, hence there's no way we could
|
|
||||||
+ load it => no warning. */
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
dir = xstrdup (objfile->name);
|
|
||||||
@@ -1395,7 +1406,7 @@ find_separate_debug_file (struct objfile
|
|
||||||
strcpy (debugfile, dir);
|
|
||||||
strcat (debugfile, basename);
|
|
||||||
|
|
||||||
- if (separate_debug_file_exists (debugfile, crc32))
|
|
||||||
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
|
||||||
{
|
|
||||||
xfree (basename);
|
|
||||||
xfree (dir);
|
|
||||||
@@ -1408,7 +1419,7 @@ find_separate_debug_file (struct objfile
|
|
||||||
strcat (debugfile, "/");
|
|
||||||
strcat (debugfile, basename);
|
|
||||||
|
|
||||||
- if (separate_debug_file_exists (debugfile, crc32))
|
|
||||||
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
|
||||||
{
|
|
||||||
xfree (basename);
|
|
||||||
xfree (dir);
|
|
||||||
@@ -1421,7 +1432,7 @@ find_separate_debug_file (struct objfile
|
|
||||||
strcat (debugfile, dir);
|
|
||||||
strcat (debugfile, basename);
|
|
||||||
|
|
||||||
- if (separate_debug_file_exists (debugfile, crc32))
|
|
||||||
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
|
||||||
{
|
|
||||||
xfree (basename);
|
|
||||||
xfree (dir);
|
|
||||||
@@ -1440,7 +1451,7 @@ find_separate_debug_file (struct objfile
|
|
||||||
strcat (debugfile, "/");
|
|
||||||
strcat (debugfile, basename);
|
|
||||||
|
|
||||||
- if (separate_debug_file_exists (debugfile, crc32))
|
|
||||||
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
|
||||||
{
|
|
||||||
xfree (canon_name);
|
|
||||||
xfree (basename);
|
|
|
@ -1,55 +0,0 @@
|
||||||
Index: gdb-6.8/gdb/testsuite/gdb.base/sepdebug.exp
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/sepdebug.exp 2008-02-26 09:14:11.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.base/sepdebug.exp 2008-07-14 10:26:19.000000000 +0200
|
|
||||||
@@ -981,3 +981,40 @@ if ![string compare $build_id_debug_file
|
|
||||||
# Spare debug files may confuse testsuite runs in the future.
|
|
||||||
remote_exec build "rm -f ${objdir}/${subdir}/${build_id_debug_filename}"
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+# Compile up a second, different, object file. Copy its debug info
|
|
||||||
+# over the top of the new debug info. Note that somewhere in the
|
|
||||||
+# above the "set debug-file-directory" variable is set to
|
|
||||||
+# ${objdir}/${subdir} so need to move things there.
|
|
||||||
+
|
|
||||||
+set existing_binfile $binfile
|
|
||||||
+set testfile "sepdebug2"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+set corrupt_debug_file [separate_debug_filename $binfile]
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+if [gdb_gnu_strip_debug $binfile] {
|
|
||||||
+ # check that you have a recent version of strip and objcopy installed
|
|
||||||
+ unsupported "cannot produce separate debug info files"
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+remote_exec build "cp $corrupt_debug_file ${existing_binfile}.debug"
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+set test "A corrupt debug file gets a warning"
|
|
||||||
+gdb_test_multiple "file $existing_binfile" "$test" {
|
|
||||||
+ -re "warning:.*mismatch.*" {
|
|
||||||
+ pass "$test"
|
|
||||||
+ }
|
|
||||||
+ -re ".y or n. " {
|
|
||||||
+ send_gdb "y\n"
|
|
||||||
+ exp_continue
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
Index: gdb-6.8/gdb/testsuite/gdb.base/sepdebug2.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.base/sepdebug2.c 2008-07-14 10:26:19.000000000 +0200
|
|
||||||
@@ -0,0 +1,5 @@
|
|
||||||
+int
|
|
||||||
+main (int argc, char *argv[], char *envp[])
|
|
||||||
+{
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
|
@ -102,3 +102,154 @@ frames-invalid can happen asynchronously.
|
||||||
|
|
||||||
set timeout $oldtimeout
|
set timeout $oldtimeout
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
http://sourceware.org/ml/gdb-patches/2009-12/msg00234.html
|
||||||
|
Subject: [patch] testsuite: Fix a race by me - watchthreads-reorder.exp
|
||||||
|
|
||||||
|
Hi,
|
||||||
|
|
||||||
|
there is a bug explainable by man pthread_cond_signal:
|
||||||
|
The [...] pthread_cond_signal() functions shall have no effect if
|
||||||
|
there are no threads currently blocked on cond.
|
||||||
|
|
||||||
|
meaning a race for the testcase.
|
||||||
|
+FAIL: gdb.threads/watchthreads-reorder.exp: reorder1: continue a (timeout)
|
||||||
|
|
||||||
|
One can reproduce the race on CVS HEAD by:
|
||||||
|
# --- a/gdb/testsuite/gdb.threads/watchthreads-reorder.c
|
||||||
|
# +++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.c
|
||||||
|
# @@ -89,6 +89,7 @@ thread1_func (void *unused)
|
||||||
|
# int i;
|
||||||
|
# volatile int rwatch_store;
|
||||||
|
#
|
||||||
|
# +sleep(1);
|
||||||
|
# thread1_tid = gettid ();
|
||||||
|
# i = pthread_cond_signal (&thread1_tid_cond);
|
||||||
|
# assert (i == 0);
|
||||||
|
# @@ -317,6 +318,7 @@ main (int argc, char **argv)
|
||||||
|
#
|
||||||
|
# if (thread1_tid == 0)
|
||||||
|
# {
|
||||||
|
# +sleep(2);
|
||||||
|
# i = pthread_cond_wait (&thread1_tid_cond, &thread1_tid_mutex);
|
||||||
|
# assert (i == 0);
|
||||||
|
#
|
||||||
|
|
||||||
|
Fixed; gdbstop_mutex got removed as it became redundant there.
|
||||||
|
|
||||||
|
Going to check it in as obvious in several days (code is by me + it is just
|
||||||
|
a testcase).
|
||||||
|
|
||||||
|
|
||||||
|
Sorry,
|
||||||
|
Jan
|
||||||
|
|
||||||
|
|
||||||
|
gdb/testsuite/
|
||||||
|
2009-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* gdb.threads/watchthreads-reorder.c (gdbstop_mutex): Remove.
|
||||||
|
(thread1_func): Protect thread1_tid_cond by thread1_tid_mutex. Remove
|
||||||
|
gdbstop_mutex handling.
|
||||||
|
(thread2_func): Protect thread2_tid_cond by thread2_tid_mutex. Remove
|
||||||
|
gdbstop_mutex handling.
|
||||||
|
(main): Move thread1_tid_mutex and thread2_tid_mutex locks before
|
||||||
|
pthread_create. Remove gdbstop_mutex handling. New comment. Remove
|
||||||
|
pthread_cond_wait conditionalizations.
|
||||||
|
|
||||||
|
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.c
|
||||||
|
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.c
|
||||||
|
@@ -34,8 +34,6 @@
|
||||||
|
otherwise. */
|
||||||
|
#define TIMEOUT (gettid () == getpid() ? 10 : 15)
|
||||||
|
|
||||||
|
-static pthread_mutex_t gdbstop_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
|
||||||
|
-
|
||||||
|
static pid_t thread1_tid;
|
||||||
|
static pthread_cond_t thread1_tid_cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
static pthread_mutex_t thread1_tid_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
|
||||||
|
@@ -90,12 +88,11 @@ thread1_func (void *unused)
|
||||||
|
volatile int rwatch_store;
|
||||||
|
|
||||||
|
thread1_tid = gettid ();
|
||||||
|
+
|
||||||
|
+ timed_mutex_lock (&thread1_tid_mutex);
|
||||||
|
i = pthread_cond_signal (&thread1_tid_cond);
|
||||||
|
assert (i == 0);
|
||||||
|
-
|
||||||
|
- /* Be sure GDB is already stopped before continuing. */
|
||||||
|
- timed_mutex_lock (&gdbstop_mutex);
|
||||||
|
- i = pthread_mutex_unlock (&gdbstop_mutex);
|
||||||
|
+ i = pthread_mutex_unlock (&thread1_tid_mutex);
|
||||||
|
assert (i == 0);
|
||||||
|
|
||||||
|
rwatch_store = thread1_rwatch;
|
||||||
|
@@ -115,12 +112,11 @@ thread2_func (void *unused)
|
||||||
|
volatile int rwatch_store;
|
||||||
|
|
||||||
|
thread2_tid = gettid ();
|
||||||
|
+
|
||||||
|
+ timed_mutex_lock (&thread2_tid_mutex);
|
||||||
|
i = pthread_cond_signal (&thread2_tid_cond);
|
||||||
|
assert (i == 0);
|
||||||
|
-
|
||||||
|
- /* Be sure GDB is already stopped before continuing. */
|
||||||
|
- timed_mutex_lock (&gdbstop_mutex);
|
||||||
|
- i = pthread_mutex_unlock (&gdbstop_mutex);
|
||||||
|
+ i = pthread_mutex_unlock (&thread2_tid_mutex);
|
||||||
|
assert (i == 0);
|
||||||
|
|
||||||
|
rwatch_store = thread2_rwatch;
|
||||||
|
@@ -267,7 +263,8 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
|
setbuf (stdout, NULL);
|
||||||
|
|
||||||
|
- timed_mutex_lock (&gdbstop_mutex);
|
||||||
|
+ timed_mutex_lock (&thread1_tid_mutex);
|
||||||
|
+ timed_mutex_lock (&thread2_tid_mutex);
|
||||||
|
|
||||||
|
timed_mutex_lock (&terminate_mutex);
|
||||||
|
|
||||||
|
@@ -306,30 +303,21 @@ main (int argc, char **argv)
|
||||||
|
state_wait (tracer, "T (stopped)");
|
||||||
|
}
|
||||||
|
|
||||||
|
- timed_mutex_lock (&thread1_tid_mutex);
|
||||||
|
- timed_mutex_lock (&thread2_tid_mutex);
|
||||||
|
-
|
||||||
|
- /* Let the threads start. */
|
||||||
|
- i = pthread_mutex_unlock (&gdbstop_mutex);
|
||||||
|
- assert (i == 0);
|
||||||
|
+ /* Threads are now waiting at timed_mutex_lock (thread1_tid_mutex) and so
|
||||||
|
+ they could not trigger the watchpoints before GDB gets unstopped later.
|
||||||
|
+ Threads get resumed at pthread_cond_wait below. */
|
||||||
|
|
||||||
|
printf ("Waiting till the threads initialize their TIDs.\n");
|
||||||
|
|
||||||
|
- if (thread1_tid == 0)
|
||||||
|
- {
|
||||||
|
- i = pthread_cond_wait (&thread1_tid_cond, &thread1_tid_mutex);
|
||||||
|
- assert (i == 0);
|
||||||
|
+ i = pthread_cond_wait (&thread1_tid_cond, &thread1_tid_mutex);
|
||||||
|
+ assert (i == 0);
|
||||||
|
|
||||||
|
- assert (thread1_tid > 0);
|
||||||
|
- }
|
||||||
|
+ assert (thread1_tid > 0);
|
||||||
|
|
||||||
|
- if (thread2_tid == 0)
|
||||||
|
- {
|
||||||
|
- i = pthread_cond_wait (&thread2_tid_cond, &thread2_tid_mutex);
|
||||||
|
- assert (i == 0);
|
||||||
|
+ i = pthread_cond_wait (&thread2_tid_cond, &thread2_tid_mutex);
|
||||||
|
+ assert (i == 0);
|
||||||
|
|
||||||
|
- assert (thread2_tid > 0);
|
||||||
|
- }
|
||||||
|
+ assert (thread2_tid > 0);
|
||||||
|
|
||||||
|
printf ("Thread 1 TID = %lu, thread 2 TID = %lu, PID = %lu.\n",
|
||||||
|
(unsigned long) thread1_tid, (unsigned long) thread2_tid,
|
||||||
|
|
||||||
|
|
|
@ -625,3 +625,39 @@ gdb/
|
||||||
complaint (&symfile_complaints, _("bad string table offset in symbol %d"),
|
complaint (&symfile_complaints, _("bad string table offset in symbol %d"),
|
||||||
symnum);
|
symnum);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
http://sourceware.org/ml/gdb-patches/2009-11/msg00422.html
|
||||||
|
http://sourceware.org/ml/gdb-cvs/2009-11/msg00169.html
|
||||||
|
|
||||||
|
### src/gdb/ChangeLog 2009/11/19 22:42:48 1.11094
|
||||||
|
### src/gdb/ChangeLog 2009/11/19 22:44:32 1.11095
|
||||||
|
## -1,3 +1,8 @@
|
||||||
|
+2009-11-19 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
+
|
||||||
|
+ * completer.c (complete_line_internal): Make sure the command
|
||||||
|
+ completer is not NULL before calling it.
|
||||||
|
+
|
||||||
|
2009-11-19 Jerome Guitton <guitton@adacore.com>
|
||||||
|
|
||||||
|
* ada-lang.c (packed_array_type): Rename to...
|
||||||
|
--- src/gdb/completer.c 2009/03/25 10:50:56 1.34
|
||||||
|
+++ src/gdb/completer.c 2009/11/19 22:44:34 1.35
|
||||||
|
@@ -676,7 +676,7 @@
|
||||||
|
p--)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
- if (reason != handle_brkchars)
|
||||||
|
+ if (reason != handle_brkchars && c->completer != NULL)
|
||||||
|
list = (*c->completer) (c, p, word);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -747,7 +747,7 @@
|
||||||
|
p--)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
- if (reason != handle_brkchars)
|
||||||
|
+ if (reason != handle_brkchars && c->completer != NULL)
|
||||||
|
list = (*c->completer) (c, p, word);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,122 @@
|
||||||
|
--- ./gdb/breakpoint.c 2009-12-18 00:13:49.000000000 +0100
|
||||||
|
+++ ./gdb/breakpoint.c 2009-12-18 00:13:16.000000000 +0100
|
||||||
|
@@ -8563,6 +8563,49 @@ update_breakpoint_locations (struct brea
|
||||||
|
update_global_location_list (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
+void
|
||||||
|
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
|
||||||
|
+{
|
||||||
|
+ struct bp_location *bl, **blp_tmp;
|
||||||
|
+ int changed = 0;
|
||||||
|
+
|
||||||
|
+ gdb_assert (objfile->separate_debug_objfile_backlink == NULL);
|
||||||
|
+
|
||||||
|
+ ALL_BP_LOCATIONS (bl, blp_tmp)
|
||||||
|
+ {
|
||||||
|
+ struct obj_section *osect;
|
||||||
|
+
|
||||||
|
+ /* BL->SECTION can be correctly NULL for breakpoints with multiple
|
||||||
|
+ locations expanded through symtab. */
|
||||||
|
+
|
||||||
|
+ ALL_OBJFILE_OSECTIONS (objfile, osect)
|
||||||
|
+ {
|
||||||
|
+ CORE_ADDR relocated_address;
|
||||||
|
+ CORE_ADDR delta_offset;
|
||||||
|
+
|
||||||
|
+ delta_offset = ANOFFSET (delta, osect->the_bfd_section->index);
|
||||||
|
+ if (delta_offset == 0)
|
||||||
|
+ continue;
|
||||||
|
+ relocated_address = bl->address + delta_offset;
|
||||||
|
+
|
||||||
|
+ if (obj_section_addr (osect) <= relocated_address
|
||||||
|
+ && relocated_address < obj_section_endaddr (osect))
|
||||||
|
+ {
|
||||||
|
+ if (bl->inserted)
|
||||||
|
+ remove_breakpoint (bl, mark_uninserted);
|
||||||
|
+
|
||||||
|
+ bl->address += delta_offset;
|
||||||
|
+ bl->requested_address += delta_offset;
|
||||||
|
+
|
||||||
|
+ changed = 1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (changed)
|
||||||
|
+ qsort (bp_location, bp_location_count, sizeof (*bp_location),
|
||||||
|
+ bp_location_compare_for_qsort);
|
||||||
|
+}
|
||||||
|
|
||||||
|
/* Reset a breakpoint given it's struct breakpoint * BINT.
|
||||||
|
The value we return ends up being the return value from catch_errors.
|
||||||
|
--- ./gdb/breakpoint.h 2009-12-18 00:13:48.000000000 +0100
|
||||||
|
+++ ./gdb/breakpoint.h 2009-12-17 22:11:10.000000000 +0100
|
||||||
|
@@ -970,4 +970,7 @@ extern struct breakpoint *get_tracepoint
|
||||||
|
is newly allocated; the caller should free when done with it. */
|
||||||
|
extern VEC(breakpoint_p) *all_tracepoints (void);
|
||||||
|
|
||||||
|
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||||
|
+ struct section_offsets *delta);
|
||||||
|
+
|
||||||
|
#endif /* !defined (BREAKPOINT_H) */
|
||||||
|
--- ./gdb/objfiles.c 2009-12-18 00:13:48.000000000 +0100
|
||||||
|
+++ ./gdb/objfiles.c 2009-12-17 23:19:22.000000000 +0100
|
||||||
|
@@ -546,7 +546,7 @@ free_all_objfiles (void)
|
||||||
|
/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS
|
||||||
|
entries in new_offsets. SEPARATE_DEBUG_OBJFILE is not touched here. */
|
||||||
|
|
||||||
|
-static void
|
||||||
|
+static int
|
||||||
|
objfile_relocate1 (struct objfile *objfile, struct section_offsets *new_offsets)
|
||||||
|
{
|
||||||
|
struct obj_section *s;
|
||||||
|
@@ -565,7 +565,7 @@ objfile_relocate1 (struct objfile *objfi
|
||||||
|
something_changed = 1;
|
||||||
|
}
|
||||||
|
if (!something_changed)
|
||||||
|
- return;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* OK, get all the symtabs. */
|
||||||
|
@@ -706,6 +706,13 @@ objfile_relocate1 (struct objfile *objfi
|
||||||
|
exec_set_section_address (bfd_get_filename (objfile->obfd), idx,
|
||||||
|
obj_section_addr (s));
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ /* Final call of breakpoint_re_set can keep breakpoint locations disabled if
|
||||||
|
+ their addresses match. */
|
||||||
|
+ if (objfile->separate_debug_objfile_backlink == NULL)
|
||||||
|
+ breakpoints_relocate (objfile, delta);
|
||||||
|
+
|
||||||
|
+ return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS
|
||||||
|
@@ -720,7 +727,9 @@ objfile_relocate1 (struct objfile *objfi
|
||||||
|
void
|
||||||
|
objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
|
||||||
|
{
|
||||||
|
- objfile_relocate1 (objfile, new_offsets);
|
||||||
|
+ int changed = 0;
|
||||||
|
+
|
||||||
|
+ changed |= objfile_relocate1 (objfile, new_offsets);
|
||||||
|
|
||||||
|
if (objfile->separate_debug_objfile != NULL)
|
||||||
|
{
|
||||||
|
@@ -747,11 +756,12 @@ objfile_relocate (struct objfile *objfil
|
||||||
|
objfile_addrs);
|
||||||
|
do_cleanups (my_cleanups);
|
||||||
|
|
||||||
|
- objfile_relocate1 (debug_objfile, new_debug_offsets);
|
||||||
|
+ changed |= objfile_relocate1 (debug_objfile, new_debug_offsets);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Relocate breakpoints as necessary, after things are relocated. */
|
||||||
|
- breakpoint_re_set ();
|
||||||
|
+ if (changed)
|
||||||
|
+ breakpoint_re_set ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return non-zero if OBJFILE has partial symbols. */
|
|
@ -146,9 +146,20 @@
|
||||||
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
||||||
--- a/gdb/solib-svr4.c
|
--- a/gdb/solib-svr4.c
|
||||||
+++ b/gdb/solib-svr4.c
|
+++ b/gdb/solib-svr4.c
|
||||||
@@ -1621,7 +1621,10 @@ svr4_exec_displacement (void)
|
@@ -1672,15 +1672,20 @@ static CORE_ADDR
|
||||||
|
svr4_exec_displacement (void)
|
||||||
|
{
|
||||||
|
int found;
|
||||||
|
+ /* ENTRY_POINT is a possible function descriptor - before
|
||||||
|
+ a call to gdbarch_convert_from_func_ptr_addr. */
|
||||||
|
CORE_ADDR entry_point;
|
||||||
|
|
||||||
|
if (exec_bfd == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (target_auxv_search (¤t_target, AT_ENTRY, &entry_point) == 1)
|
if (target_auxv_search (¤t_target, AT_ENTRY, &entry_point) == 1)
|
||||||
return entry_point - exec_entry_point (exec_bfd, ¤t_target);
|
- return entry_point - exec_entry_point (exec_bfd, ¤t_target);
|
||||||
|
+ return entry_point - bfd_get_start_address (exec_bfd);
|
||||||
|
|
||||||
- return svr4_static_exec_displacement ();
|
- return svr4_static_exec_displacement ();
|
||||||
+ if (!ptid_equal (inferior_ptid, null_ptid))
|
+ if (!ptid_equal (inferior_ptid, null_ptid))
|
||||||
|
|
|
@ -276,12 +276,16 @@ static int spawn (char **argv, int timeout)
|
||||||
|
|
||||||
assert (signal_chld_hit != 0);
|
assert (signal_chld_hit != 0);
|
||||||
|
|
||||||
|
/* Do not unset O_NONBLOCK as a stale child (the whole purpose of this
|
||||||
|
program) having open its output pty would block us in read_out. */
|
||||||
|
#if 0
|
||||||
i = fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */);
|
i = fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */);
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
{
|
{
|
||||||
perror ("fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */)");
|
perror ("fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */)");
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
while (read_out (amaster));
|
while (read_out (amaster));
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,189 @@
|
||||||
|
Some functionality is available on RHEL-5.4+ only with gfortran44 as the
|
||||||
|
default gfortran binary is from gcc-4.1.
|
||||||
|
|
||||||
|
--- ./gdb/testsuite/gdb.fortran/common-block.exp 2009-12-15 05:13:56.000000000 +0100
|
||||||
|
+++ ./gdb/testsuite/gdb.fortran/common-block.exp 2009-12-15 05:21:00.000000000 +0100
|
||||||
|
@@ -20,7 +20,25 @@ set testfile "common-block"
|
||||||
|
set srcfile ${testfile}.f90
|
||||||
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
|
|
||||||
|
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
|
||||||
|
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||||
|
+
|
||||||
|
+set board [target_info name]
|
||||||
|
+if [board_info $board exists f77compiler] {
|
||||||
|
+ set old_f77compiler [board_info $board f77compiler]
|
||||||
|
+ unset_board_info f77compiler
|
||||||
|
+} elseif [info exists old_f77compiler] {
|
||||||
|
+ unset old_f77compiler
|
||||||
|
+}
|
||||||
|
+set_board_info f77compiler gfortran44
|
||||||
|
+
|
||||||
|
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
|
||||||
|
+
|
||||||
|
+unset_board_info f77compiler
|
||||||
|
+if [info exists old_f77compiler] {
|
||||||
|
+ set_board_info f77compiler $old_f77compiler
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { $err != "" } {
|
||||||
|
untested "Couldn't compile ${srcfile}"
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
--- ./gdb/testsuite/gdb.fortran/dwarf-stride.exp 2009-12-15 05:13:56.000000000 +0100
|
||||||
|
+++ ./gdb/testsuite/gdb.fortran/dwarf-stride.exp 2009-12-15 05:20:07.000000000 +0100
|
||||||
|
@@ -27,7 +27,25 @@
|
||||||
|
set testfile dwarf-stride
|
||||||
|
set srcfile ${testfile}.f90
|
||||||
|
|
||||||
|
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}] } {
|
||||||
|
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||||
|
+
|
||||||
|
+set board [target_info name]
|
||||||
|
+if [board_info $board exists f77compiler] {
|
||||||
|
+ set old_f77compiler [board_info $board f77compiler]
|
||||||
|
+ unset_board_info f77compiler
|
||||||
|
+} elseif [info exists old_f77compiler] {
|
||||||
|
+ unset old_f77compiler
|
||||||
|
+}
|
||||||
|
+set_board_info f77compiler gfortran44
|
||||||
|
+
|
||||||
|
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}]
|
||||||
|
+
|
||||||
|
+unset_board_info f77compiler
|
||||||
|
+if [info exists old_f77compiler] {
|
||||||
|
+ set_board_info f77compiler $old_f77compiler
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if $err {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
--- ./gdb/testsuite/gdb.fortran/dynamic.exp 2009-12-15 05:13:56.000000000 +0100
|
||||||
|
+++ ./gdb/testsuite/gdb.fortran/dynamic.exp 2009-12-15 05:17:21.000000000 +0100
|
||||||
|
@@ -25,7 +25,25 @@ set testfile "dynamic"
|
||||||
|
set srcfile ${testfile}.f90
|
||||||
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
|
|
||||||
|
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
|
||||||
|
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||||
|
+
|
||||||
|
+set board [target_info name]
|
||||||
|
+if [board_info $board exists f77compiler] {
|
||||||
|
+ set old_f77compiler [board_info $board f77compiler]
|
||||||
|
+ unset_board_info f77compiler
|
||||||
|
+} elseif [info exists old_f77compiler] {
|
||||||
|
+ unset old_f77compiler
|
||||||
|
+}
|
||||||
|
+set_board_info f77compiler gfortran44
|
||||||
|
+
|
||||||
|
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
|
||||||
|
+
|
||||||
|
+unset_board_info f77compiler
|
||||||
|
+if [info exists old_f77compiler] {
|
||||||
|
+ set_board_info f77compiler $old_f77compiler
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { $err != "" } {
|
||||||
|
untested "Couldn't compile ${srcfile}"
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
--- ./gdb/testsuite/gdb.fortran/library-module.exp 2009-12-15 05:13:56.000000000 +0100
|
||||||
|
+++ ./gdb/testsuite/gdb.fortran/library-module.exp 2009-12-15 05:22:37.000000000 +0100
|
||||||
|
@@ -25,16 +25,34 @@ if [get_compiler_info not-used] {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}] != "" } {
|
||||||
|
- untested "Couldn't compile ${srclibfile}"
|
||||||
|
- return -1
|
||||||
|
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||||
|
+
|
||||||
|
+set board [target_info name]
|
||||||
|
+if [board_info $board exists f77compiler] {
|
||||||
|
+ set old_f77compiler [board_info $board f77compiler]
|
||||||
|
+ unset_board_info f77compiler
|
||||||
|
+} elseif [info exists old_f77compiler] {
|
||||||
|
+ unset old_f77compiler
|
||||||
|
}
|
||||||
|
+set_board_info f77compiler gfortran44
|
||||||
|
|
||||||
|
# prepare_for_testing cannot be used as linking with $libfile cannot be passed
|
||||||
|
# just for the linking phase (and not the source compilation phase). And any
|
||||||
|
# warnings on ignored $libfile abort the process.
|
||||||
|
|
||||||
|
-if { [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}] != "" } {
|
||||||
|
+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}]
|
||||||
|
+set err2 [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}]
|
||||||
|
+
|
||||||
|
+unset_board_info f77compiler
|
||||||
|
+if [info exists old_f77compiler] {
|
||||||
|
+ set_board_info f77compiler $old_f77compiler
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { $err1 != "" } {
|
||||||
|
+ untested "Couldn't compile ${srclibfile}"
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+if { $err2 != "" } {
|
||||||
|
untested "Couldn't compile ${srcfile}"
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
--- ./gdb/testsuite/gdb.fortran/module.exp 2009-12-15 05:13:56.000000000 +0100
|
||||||
|
+++ ./gdb/testsuite/gdb.fortran/module.exp 2009-12-15 05:28:49.000000000 +0100
|
||||||
|
@@ -16,7 +16,25 @@
|
||||||
|
set testfile "module"
|
||||||
|
set srcfile ${testfile}.f90
|
||||||
|
|
||||||
|
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] } {
|
||||||
|
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||||
|
+
|
||||||
|
+set board [target_info name]
|
||||||
|
+if [board_info $board exists f77compiler] {
|
||||||
|
+ set old_f77compiler [board_info $board f77compiler]
|
||||||
|
+ unset_board_info f77compiler
|
||||||
|
+} elseif [info exists old_f77compiler] {
|
||||||
|
+ unset old_f77compiler
|
||||||
|
+}
|
||||||
|
+set_board_info f77compiler gfortran44
|
||||||
|
+
|
||||||
|
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}]
|
||||||
|
+
|
||||||
|
+unset_board_info f77compiler
|
||||||
|
+if [info exists old_f77compiler] {
|
||||||
|
+ set_board_info f77compiler $old_f77compiler
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if $err {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
--- ./gdb/testsuite/gdb.fortran/string.exp 2009-12-15 05:13:56.000000000 +0100
|
||||||
|
+++ ./gdb/testsuite/gdb.fortran/string.exp 2009-12-15 05:18:13.000000000 +0100
|
||||||
|
@@ -23,7 +23,25 @@ set testfile "string"
|
||||||
|
set srcfile ${testfile}.f90
|
||||||
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
|
|
||||||
|
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
|
||||||
|
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||||
|
+
|
||||||
|
+set board [target_info name]
|
||||||
|
+if [board_info $board exists f77compiler] {
|
||||||
|
+ set old_f77compiler [board_info $board f77compiler]
|
||||||
|
+ unset_board_info f77compiler
|
||||||
|
+} elseif [info exists old_f77compiler] {
|
||||||
|
+ unset old_f77compiler
|
||||||
|
+}
|
||||||
|
+set_board_info f77compiler gfortran44
|
||||||
|
+
|
||||||
|
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
|
||||||
|
+
|
||||||
|
+unset_board_info f77compiler
|
||||||
|
+if [info exists old_f77compiler] {
|
||||||
|
+ set_board_info f77compiler $old_f77compiler
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { $err != "" } {
|
||||||
|
untested "Couldn't compile ${srcfile}"
|
||||||
|
return -1
|
||||||
|
}
|
63
gdb.spec
63
gdb.spec
|
@ -8,12 +8,15 @@
|
||||||
%if 0%{!?dist:1}
|
%if 0%{!?dist:1}
|
||||||
%define rhel 5
|
%define rhel 5
|
||||||
%define dist .el5
|
%define dist .el5
|
||||||
|
%endif
|
||||||
|
# RHEL-5 Brew does not set it.
|
||||||
|
%if "%{dist}" == ".el5"
|
||||||
%define el5 1
|
%define el5 1
|
||||||
%define gnat_version 4.1
|
%endif
|
||||||
%define gcj_version 7rh
|
# RHEL-5 ppc* python .so files are shipped only as ppc but gdb is ppc64 there.
|
||||||
%else
|
# Brew builds it fine as its ppc64 buildroot has full ppc64 package set.
|
||||||
%define gnat_version 4.4
|
%if 0%{?el5:1}
|
||||||
%define gcj_version 10
|
%define _without_python 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Summary: A GNU source-level debugger for C, C++, Java and other languages
|
Summary: A GNU source-level debugger for C, C++, Java and other languages
|
||||||
|
@ -106,6 +109,7 @@ Patch118: gdb-6.3-gstack-20050411.patch
|
||||||
Patch122: gdb-6.3-test-pie-20050107.patch
|
Patch122: gdb-6.3-test-pie-20050107.patch
|
||||||
Patch124: gdb-archer-pie.patch
|
Patch124: gdb-archer-pie.patch
|
||||||
Patch389: gdb-archer-pie-addons.patch
|
Patch389: gdb-archer-pie-addons.patch
|
||||||
|
Patch394: gdb-archer-pie-addons-keep-disabled.patch
|
||||||
|
|
||||||
# Get selftest working with sep-debug-info
|
# Get selftest working with sep-debug-info
|
||||||
Patch125: gdb-6.3-test-self-20050110.patch
|
Patch125: gdb-6.3-test-self-20050110.patch
|
||||||
|
@ -396,6 +400,9 @@ Patch391: gdb-x86_64-i386-syscall-restart.patch
|
||||||
# Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
# Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
||||||
Patch392: gdb-bz533176-fortran-omp-step.patch
|
Patch392: gdb-bz533176-fortran-omp-step.patch
|
||||||
|
|
||||||
|
# Use gfortran44 when running the testsuite on RHEL-5.
|
||||||
|
Patch393: gdb-rhel5-fortran44.patch
|
||||||
|
|
||||||
BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
|
BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
|
||||||
Requires: readline
|
Requires: readline
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
|
@ -411,14 +418,28 @@ BuildRequires: python-devel
|
||||||
BuildRequires: libstdc++
|
BuildRequires: libstdc++
|
||||||
%endif # 0%{!?_without_python:1}
|
%endif # 0%{!?_without_python:1}
|
||||||
|
|
||||||
|
%if 0%{!?el5:1}
|
||||||
|
%define gnat_version 4.4
|
||||||
|
%define gcj_version 10
|
||||||
|
%else
|
||||||
|
%define gnat_version 4.1
|
||||||
|
%define gcj_version 7rh
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?_with_testsuite:1}
|
%if 0%{?_with_testsuite:1}
|
||||||
BuildRequires: sharutils dejagnu
|
BuildRequires: sharutils dejagnu
|
||||||
# gcc-objc++ is not covered by the GDB testsuite.
|
# gcc-objc++ is not covered by the GDB testsuite.
|
||||||
BuildRequires: gcc gcc-c++ gcc-gfortran gcc-java gcc-objc glibc-static
|
BuildRequires: gcc gcc-c++ gcc-gfortran gcc-java gcc-objc
|
||||||
# Prelink is broken on sparcv9/sparc64
|
%if 0%{!?el5:1}
|
||||||
|
BuildRequires: glibc-static
|
||||||
|
%endif
|
||||||
|
# Copied from prelink-0.4.2-3.fc13.
|
||||||
|
%ifarch %{ix86} alpha sparc sparcv9 sparc64 s390 s390x x86_64 ppc ppc64
|
||||||
|
# Prelink is broken on sparcv9/sparc64.
|
||||||
%ifnarch sparcv9 sparc64
|
%ifnarch sparcv9 sparc64
|
||||||
BuildRequires: prelink
|
BuildRequires: prelink
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if 0%{!?rhel:1}
|
%if 0%{!?rhel:1}
|
||||||
BuildRequires: fpc
|
BuildRequires: fpc
|
||||||
%endif
|
%endif
|
||||||
|
@ -427,7 +448,7 @@ BuildRequires: gcc44 gcc44-gfortran
|
||||||
%endif
|
%endif
|
||||||
# Ensure the devel libraries are installed for both multilib arches.
|
# Ensure the devel libraries are installed for both multilib arches.
|
||||||
%define multilib_64_archs sparc64 ppc64 s390x x86_64
|
%define multilib_64_archs sparc64 ppc64 s390x x86_64
|
||||||
# Copied from gcc-4.1.2-32
|
# Copied from gcc-4.1.2-32.
|
||||||
%ifarch %{ix86} x86_64 ia64 ppc alpha
|
%ifarch %{ix86} x86_64 ia64 ppc alpha
|
||||||
BuildRequires: gcc-gnat
|
BuildRequires: gcc-gnat
|
||||||
%ifarch %{multilib_64_archs} ppc
|
%ifarch %{multilib_64_archs} ppc
|
||||||
|
@ -449,8 +470,13 @@ BuildRequires: %{_exec_prefix}/lib64/libz.so %{_exec_prefix}/lib/libz.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
|
%if 0%{!?el5:1}
|
||||||
BuildRequires: libunwind-devel >= 0.99-0.1.frysk20070405cvs
|
BuildRequires: libunwind-devel >= 0.99-0.1.frysk20070405cvs
|
||||||
Requires: libunwind >= 0.99-0.1.frysk20070405cvs
|
Requires: libunwind >= 0.99-0.1.frysk20070405cvs
|
||||||
|
%else
|
||||||
|
BuildRequires: libunwind >= 0.96-3
|
||||||
|
Requires: libunwind >= 0.96-3
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
|
@ -606,6 +632,12 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||||
%patch390 -p1
|
%patch390 -p1
|
||||||
%patch391 -p1
|
%patch391 -p1
|
||||||
%patch392 -p1
|
%patch392 -p1
|
||||||
|
# Always verify its applicability.
|
||||||
|
%patch393 -p1
|
||||||
|
%if 0%{!?el5:1}
|
||||||
|
%patch393 -p1 -R
|
||||||
|
%endif
|
||||||
|
%patch394 -p1
|
||||||
|
|
||||||
find -name "*.orig" | xargs rm -f
|
find -name "*.orig" | xargs rm -f
|
||||||
! find -name "*.rej" # Should not happen.
|
! find -name "*.rej" # Should not happen.
|
||||||
|
@ -719,7 +751,7 @@ echo ====================TESTSUITE DISABLED=========================
|
||||||
%else
|
%else
|
||||||
echo ====================TESTING=========================
|
echo ====================TESTING=========================
|
||||||
cd gdb
|
cd gdb
|
||||||
gcc -o ./orphanripper %{SOURCE2} -Wall -lutil
|
gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
|
||||||
# Need to use a single --ignore option, second use overrides first.
|
# Need to use a single --ignore option, second use overrides first.
|
||||||
# No `%{?_smp_mflags}' here as it may race.
|
# No `%{?_smp_mflags}' here as it may race.
|
||||||
# WARNING: can't generate a core file - core tests suppressed - check ulimit
|
# WARNING: can't generate a core file - core tests suppressed - check ulimit
|
||||||
|
@ -776,8 +808,7 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil
|
||||||
CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')"
|
CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')"
|
||||||
%endif # 0%{!?_with_upstream:1}
|
%endif # 0%{!?_with_upstream:1}
|
||||||
|
|
||||||
# FIXME: Temporary F12 disable: ./orphanripper
|
./orphanripper make %{?_smp_mflags} -k $CHECK || :
|
||||||
make %{?_smp_mflags} -k $CHECK || :
|
|
||||||
)
|
)
|
||||||
for t in sum log
|
for t in sum log
|
||||||
do
|
do
|
||||||
|
@ -911,6 +942,16 @@ fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 18 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0-11.fc12
|
||||||
|
- [pie] Fix general ppc64 regression due to a function descriptors bug.
|
||||||
|
- [pie] Fix also keeping breakpoints disabled in PIE mode.
|
||||||
|
- Import upstream <tab>-completion crash fix.
|
||||||
|
- Drop some unused patches from the repository.
|
||||||
|
- More RHEL-5 build compatibility updates.
|
||||||
|
- Use gfortran44 when running the testsuite on RHEL-5.
|
||||||
|
- Disable python there due to insufficient ppc multilib.
|
||||||
|
- Fix orphanripper hangs and thus enable it again.
|
||||||
|
|
||||||
* Mon Dec 14 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0-10.fc12
|
* Mon Dec 14 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0-10.fc12
|
||||||
- Make gdb-6.3-rh-testversion-20041202.patch to accept both RHEL and Fedora GDB.
|
- Make gdb-6.3-rh-testversion-20041202.patch to accept both RHEL and Fedora GDB.
|
||||||
- Adjust BuildRequires for Fedora-12, RHEL-6 and RHEL-5 builds.
|
- Adjust BuildRequires for Fedora-12, RHEL-6 and RHEL-5 builds.
|
||||||
|
|
Loading…
Reference in New Issue