- Upgrade to the upstream gdb-6.8.50 snapshot.
This commit is contained in:
parent
39347a6c8a
commit
407ebe9063
@ -1 +1 @@
|
||||
gdb-6.8.tar.bz2
|
||||
gdb-6.8.50.20081209.tar.bz2
|
||||
|
@ -1,158 +0,0 @@
|
||||
for gdb-6.3/gdb/ChangeLog
|
||||
from Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* i386-linux-nat.c (i386_debug_register_for_thread): New struct.
|
||||
(i386_linux_set_dr_for_thread): Rename from...
|
||||
(i386_linux_set_debug_regs_for_thread): ... this, and
|
||||
add new function to catch exceptions in the old one.
|
||||
|
||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
This patch was originally made to workaround a deficiency of ia32el (==ia32
|
||||
emulator on ia64) which EIOs on ptrace(2) of the debug registers.
|
||||
|
||||
Currently I can no longer run gdb.i386 on RHEL-5.1.ia64 as it fails on
|
||||
$ rpm -qv kernel
|
||||
kernel-2.6.18-53.el5.ia64
|
||||
$ file /emul/ia32-linux/usr/bin/gdb ./print-threads
|
||||
/emul/ia32-linux/usr/bin/gdb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
|
||||
./print-threads: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
|
||||
$ /emul/ia32-linux/usr/bin/gdb ./print-threads
|
||||
(gdb) r
|
||||
Starting program: /root/jkratoch/redhat/print-threads
|
||||
Warning:
|
||||
Cannot insert breakpoint -2.
|
||||
Error accessing memory address 0x555766fb: Input/output error.
|
||||
(gdb) maint info breakpoints
|
||||
Num Type Disp Enb Address What
|
||||
-1 longjmp resume keep n 0x00000000
|
||||
-2 shlib events keep y 0x555766fb
|
||||
|
||||
ia32-on-ia64 run problem info:
|
||||
|
||||
the inconsistency is in function linux_nat_wait - there is a variable called
|
||||
block_mask, which is assumed to represent the current signal mask. in the
|
||||
following execution path this assumption does not hold:
|
||||
|
||||
1) block-mask is filled with SIGCHLD and the signal is masked in
|
||||
lin_lwp_attach_lwp, which is called at the beginning of the procedure
|
||||
that handles a new thread in the debuggee.
|
||||
2) further down this procedure gdb tries to set the debug regs of the debuggee.
|
||||
when trying to set debug regs - gdb fails and calls throw_exception. this
|
||||
function finishes with siglongjmp, which clears the sigmask (seq. 1).
|
||||
3) further down, linux_nat_wait is called to wait on the new child. in
|
||||
linux_nat_wait there is a sequence :
|
||||
|
||||
if ( ! (block_mask & SIGCHLD) )
|
||||
mask- SIGCHLD
|
||||
while () {
|
||||
wait-no-hang( )
|
||||
if no child found then
|
||||
sigsuspend (SIGCHLD)
|
||||
|
||||
4) the signal that notifies the debugger about the child is received after the
|
||||
wait and before the sigsuspend. originally, this was not supposed to happen
|
||||
because SIGCHLD is supposed to be blocked, but because what happens in step
|
||||
2, the signal mask is cleared and the signal is received at this point,
|
||||
which results with a hang
|
||||
|
||||
sequence 1:
|
||||
|
||||
catch_errors (symbol_add_stubs)
|
||||
symbol_file_add_with_addrs_or_offsets
|
||||
deprecated_target_new_objfile_hook
|
||||
tui_new_objfile_hook
|
||||
attach_thread
|
||||
observer_notify_linux_new_thread
|
||||
generic_observer_notify
|
||||
observer_linux_new_thread_notification_stub
|
||||
i386_linux_new_thread
|
||||
i386_linux_set_debug_regs_for_thread
|
||||
i386_linux_dr_set_addr
|
||||
i386_linux_dr_set
|
||||
perror_with_name
|
||||
.
|
||||
.
|
||||
.
|
||||
throw_exception
|
||||
siglongjmp
|
||||
|
||||
RHEL Bug 175270
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/i386-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/i386-linux-nat.c 2008-01-10 19:19:02.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/i386-linux-nat.c 2008-02-24 09:23:09.000000000 +0100
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "regcache.h"
|
||||
#include "target.h"
|
||||
#include "linux-nat.h"
|
||||
+#include "exceptions.h"
|
||||
|
||||
#include "gdb_assert.h"
|
||||
#include "gdb_string.h"
|
||||
@@ -611,20 +612,40 @@ i386_linux_dr_get (ptid_t ptid, int regn
|
||||
return value;
|
||||
}
|
||||
|
||||
-static void
|
||||
-i386_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
|
||||
-{
|
||||
- int tid;
|
||||
+struct i386_linux_dr_set
|
||||
+ {
|
||||
+ int tid;
|
||||
+ int regnum;
|
||||
+ unsigned long value;
|
||||
+ };
|
||||
|
||||
- tid = TIDGET (ptid);
|
||||
- if (tid == 0)
|
||||
- tid = PIDGET (ptid);
|
||||
+static int
|
||||
+i386_linux_dr_set_core (void *data_pointer)
|
||||
+{
|
||||
+ struct i386_linux_dr_set *data = data_pointer;
|
||||
|
||||
errno = 0;
|
||||
- ptrace (PTRACE_POKEUSER, tid,
|
||||
- offsetof (struct user, u_debugreg[regnum]), value);
|
||||
+ ptrace (PTRACE_POKEUSER, data->tid,
|
||||
+ offsetof (struct user, u_debugreg[data->regnum]), data->value);
|
||||
if (errno != 0)
|
||||
perror_with_name (_("Couldn't write debug register"));
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+i386_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
|
||||
+{
|
||||
+ struct i386_linux_dr_set data;
|
||||
+ int tid;
|
||||
+
|
||||
+ data.tid = TIDGET (ptid);
|
||||
+ if (data.tid == 0)
|
||||
+ data.tid = PIDGET (ptid);
|
||||
+
|
||||
+ data.regnum = regnum;
|
||||
+ data.value = value;
|
||||
+
|
||||
+ return catch_errors (i386_linux_dr_set_core, &data, "", RETURN_MASK_ALL);
|
||||
}
|
||||
|
||||
void
|
||||
Index: gdb-6.8cvs20080219/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/Makefile.in 2008-02-24 09:13:35.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/Makefile.in 2008-02-24 09:14:26.000000000 +0100
|
||||
@@ -2252,7 +2252,7 @@ i386gnu-tdep.o: i386gnu-tdep.c $(defs_h)
|
||||
i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
|
||||
$(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
|
||||
$(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \
|
||||
- $(gdb_proc_service_h) $(target_h)
|
||||
+ $(gdb_proc_service_h) $(target_h) $(exceptions_h)
|
||||
i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
|
||||
$(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \
|
||||
$(dwarf2_frame_h) $(gdb_string_h) $(i386_tdep_h) \
|
@ -1,24 +0,0 @@
|
||||
2005-02-01 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* dwarf2read.c (die_type): Tolerate a type reference to location
|
||||
<0> and treat as unknown type.
|
||||
|
||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/dwarf2read.c 2008-02-22 08:10:39.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/dwarf2read.c 2008-02-22 08:17:56.000000000 +0100
|
||||
@@ -7634,6 +7634,10 @@ die_type (struct die_info *die, struct d
|
||||
/* A missing DW_AT_type represents a void type. */
|
||||
return builtin_type (current_gdbarch)->builtin_void;
|
||||
}
|
||||
+ else if (DW_ADDR (type_attr) == 0)
|
||||
+ /* If we have an invalid reference to 0, ignore it and treat
|
||||
+ the type as unknown. */
|
||||
+ return builtin_type_error;
|
||||
else
|
||||
type_die = follow_die_ref (die, type_attr, cu);
|
||||
|
@ -3,14 +3,11 @@
|
||||
* frame.c (get_prev_frame): Stop backtrace when a zero PC and
|
||||
successive normal frames.
|
||||
|
||||
Index: ./gdb/frame.c
|
||||
Index: gdb-6.8.50.20081128/gdb/frame.c
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/frame.c,v
|
||||
retrieving revision 1.191
|
||||
diff -p -u -r1.191 frame.c
|
||||
--- ./gdb/frame.c 1 Sep 2004 14:13:33 -0000 1.191
|
||||
+++ ./gdb/frame.c 28 Sep 2004 02:45:58 -0000
|
||||
@@ -1235,6 +1235,18 @@ get_prev_frame (struct frame_info *this_
|
||||
--- gdb-6.8.50.20081128.orig/gdb/frame.c 2008-12-04 01:34:37.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/frame.c 2008-12-04 01:35:47.000000000 +0100
|
||||
@@ -1566,6 +1566,18 @@ get_prev_frame (struct frame_info *this_
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -22,7 +19,7 @@ diff -p -u -r1.191 frame.c
|
||||
+ && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
|
||||
+ && get_frame_pc (this_frame) == 0)
|
||||
+ {
|
||||
+ frame_debug_got_null_frame (gdb_stdlog, this_frame, "zero PC");
|
||||
+ frame_debug_got_null_frame (this_frame, "zero PC");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
|
@ -3,12 +3,12 @@
|
||||
* linux-nat.c (linux_nat_xfer_memory): Don't use
|
||||
linux_proc_xfer_memory for ia64.
|
||||
|
||||
Index: gdb-6.5/gdb/linux-nat.c
|
||||
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.5.orig/gdb/linux-nat.c 2006-07-07 00:57:56.000000000 -0300
|
||||
+++ gdb-6.5/gdb/linux-nat.c 2006-07-07 02:24:51.000000000 -0300
|
||||
@@ -3152,10 +3152,15 @@ linux_xfer_partial (struct target_ops *o
|
||||
return procfs_xfer_auxv (ops, object, annex, readbuf, writebuf,
|
||||
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:22:23.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:25:26.000000000 +0100
|
||||
@@ -4123,10 +4123,15 @@ linux_xfer_partial (struct target_ops *o
|
||||
return linux_nat_xfer_osdata (ops, object, annex, readbuf, writebuf,
|
||||
offset, len);
|
||||
|
||||
+#ifndef NATIVE_XFER_UNWIND_TABLE
|
||||
|
@ -4,11 +4,11 @@
|
||||
to install and uninstall.
|
||||
* gstack.sh, gstack.1: New files.
|
||||
|
||||
Index: gdb-6.8/gdb/Makefile.in
|
||||
Index: gdb-6.8.50.20081128/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/Makefile.in 2008-03-17 13:15:08.000000000 +0100
|
||||
+++ gdb-6.8/gdb/Makefile.in 2008-07-14 10:25:47.000000000 +0200
|
||||
@@ -1161,7 +1161,7 @@ gdb.z:gdb.1
|
||||
--- gdb-6.8.50.20081128.orig/gdb/Makefile.in 2008-12-01 16:11:48.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/Makefile.in 2008-12-01 16:14:11.000000000 +0100
|
||||
@@ -902,7 +902,7 @@ gdb.z:gdb.1
|
||||
# time it takes for make to check that all is up to date.
|
||||
# install-only is intended to address that need.
|
||||
install: all install-only
|
||||
@ -17,7 +17,7 @@ Index: gdb-6.8/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e "$$t"` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1193,9 +1193,26 @@ install-tui:
|
||||
@@ -934,9 +934,26 @@ install-tui:
|
||||
$(DESTDIR)$(man1dir) ; \
|
||||
$(INSTALL_DATA) $(srcdir)/gdb.1 \
|
||||
$(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||
@ -45,7 +45,7 @@ Index: gdb-6.8/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e $$t` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1217,6 +1234,17 @@ uninstall-tui:
|
||||
@@ -958,6 +975,17 @@ uninstall-tui:
|
||||
fi ; \
|
||||
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
|
||||
$(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||
@ -62,11 +62,11 @@ Index: gdb-6.8/gdb/Makefile.in
|
||||
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||
|
||||
# The C++ name parser can be built standalone for testing.
|
||||
test-cp-name-parser.o: cp-name-parser.c $(safe_ctype_h) $(libiberty_h) \
|
||||
Index: gdb-6.8/gdb/gstack.sh
|
||||
test-cp-name-parser.o: cp-name-parser.c
|
||||
Index: gdb-6.8.50.20081128/gdb/gstack.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8/gdb/gstack.sh 2008-07-14 10:25:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/gstack.sh 2008-12-01 16:13:16.000000000 +0100
|
||||
@@ -0,0 +1,45 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
|
@ -1,33 +0,0 @@
|
||||
Index: gdb-6.3/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/linux-nat.c 2006-06-15 07:27:02.000000000 -0300
|
||||
+++ gdb-6.3/gdb/linux-nat.c 2006-06-15 07:27:06.000000000 -0300
|
||||
@@ -157,12 +157,28 @@ static int
|
||||
my_waitpid (int pid, int *status, int flags)
|
||||
{
|
||||
int ret;
|
||||
+ int old_status = status ? *status : 0;
|
||||
+
|
||||
do
|
||||
{
|
||||
ret = waitpid (pid, status, flags);
|
||||
}
|
||||
while (ret == -1 && errno == EINTR);
|
||||
|
||||
+ if (ret == 0 && status != 0)
|
||||
+ {
|
||||
+ /* waitpid() running within ia32el (on multi-threaded processes
|
||||
+ only?) modifies status even when it returns zero, and this
|
||||
+ breaks the assumption in linux_nat_wait(), and perhaps
|
||||
+ elsewhere, that it remains unchanged in this case. We
|
||||
+ restore the old value before returning zero, such that the
|
||||
+ assumption holds. */
|
||||
+ if (*status != 0 && *status != old_status)
|
||||
+ warning ("waitpid: non-zero status %x for zero return value",
|
||||
+ *status);
|
||||
+ *status = old_status;
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-6.6/gdb/gcore.c
|
||||
Index: gdb-6.8.50.20081128/gdb/gcore.c
|
||||
===================================================================
|
||||
--- gdb-6.6.orig/gdb/gcore.c
|
||||
+++ gdb-6.6/gdb/gcore.c
|
||||
--- gdb-6.8.50.20081128.orig/gdb/gcore.c 2008-09-11 16:27:34.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/gcore.c 2008-12-01 16:39:04.000000000 +0100
|
||||
@@ -475,8 +475,14 @@ gcore_copy_callback (bfd *obfd, asection
|
||||
if (size > total_size)
|
||||
size = total_size;
|
||||
@ -17,4 +17,4 @@ Index: gdb-6.6/gdb/gcore.c
|
||||
+ || bfd_section_vma (obfd, osec) != 0))
|
||||
{
|
||||
warning (_("Memory read failed for corefile section, %s bytes at 0x%s."),
|
||||
paddr_d (size), paddr (bfd_section_vma (obfd, osec)));
|
||||
plongest (size), paddr (bfd_section_vma (obfd, osec)));
|
||||
|
@ -7,11 +7,11 @@
|
||||
(ia64_rse_skip_regs): Ditto.
|
||||
(ia64_linux_check_stack_region): New function.
|
||||
|
||||
Index: gdb-6.5/gdb/linux-nat.c
|
||||
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.5.orig/gdb/linux-nat.c 2006-07-07 02:29:12.000000000 -0300
|
||||
+++ gdb-6.5/gdb/linux-nat.c 2006-07-07 03:03:55.000000000 -0300
|
||||
@@ -2473,7 +2473,9 @@ linux_nat_xfer_partial (struct target_op
|
||||
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:25:43.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:27:09.000000000 +0100
|
||||
@@ -3246,7 +3246,9 @@ linux_nat_xfer_partial (struct target_op
|
||||
do_cleanups (old_chain);
|
||||
return xfer;
|
||||
}
|
||||
@ -22,8 +22,8 @@ Index: gdb-6.5/gdb/linux-nat.c
|
||||
static int
|
||||
linux_nat_thread_alive (ptid_t ptid)
|
||||
{
|
||||
@@ -3214,15 +3216,34 @@ linux_xfer_partial (struct target_ops *o
|
||||
return procfs_xfer_auxv (ops, object, annex, readbuf, writebuf,
|
||||
@@ -4148,15 +4150,34 @@ linux_xfer_partial (struct target_ops *o
|
||||
return linux_nat_xfer_osdata (ops, object, annex, readbuf, writebuf,
|
||||
offset, len);
|
||||
|
||||
-#ifndef NATIVE_XFER_UNWIND_TABLE
|
||||
@ -62,11 +62,11 @@ Index: gdb-6.5/gdb/linux-nat.c
|
||||
|
||||
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
|
||||
offset, len);
|
||||
Index: gdb-6.5/gdb/ia64-linux-nat.c
|
||||
Index: gdb-6.8.50.20081209/gdb/ia64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.5.orig/gdb/ia64-linux-nat.c 2006-03-24 20:08:16.000000000 -0300
|
||||
+++ gdb-6.5/gdb/ia64-linux-nat.c 2006-07-07 02:52:25.000000000 -0300
|
||||
@@ -687,6 +687,64 @@ ia64_linux_xfer_partial (struct target_o
|
||||
--- gdb-6.8.50.20081209.orig/gdb/ia64-linux-nat.c 2008-08-15 10:08:27.000000000 +0200
|
||||
+++ gdb-6.8.50.20081209/gdb/ia64-linux-nat.c 2008-12-10 01:25:53.000000000 +0100
|
||||
@@ -807,6 +807,64 @@ ia64_linux_xfer_partial (struct target_o
|
||||
|
||||
void _initialize_ia64_linux_nat (void);
|
||||
|
||||
|
@ -12,10 +12,10 @@ gdb/testsuite:
|
||||
* gdb.arch/ia64-sigill.c: New test.
|
||||
* gdb.arch/ia64-sigill.exp: Ditto.
|
||||
|
||||
Index: gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.exp 2008-12-02 21:10:57.000000000 +0100
|
||||
@@ -0,0 +1,59 @@
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -76,10 +76,10 @@ Index: gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
||||
+gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
|
||||
+gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
|
||||
+
|
||||
Index: gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.c
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.c 2008-12-02 21:10:57.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
@ -89,11 +89,11 @@ Index: gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-6.6/gdb/linux-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.6.orig/gdb/linux-nat.c
|
||||
+++ gdb-6.6/gdb/linux-nat.c
|
||||
@@ -2241,7 +2241,8 @@ retry:
|
||||
--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c 2008-12-02 19:04:38.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/linux-nat.c 2008-12-02 21:11:11.000000000 +0100
|
||||
@@ -2974,7 +2974,8 @@ retry:
|
||||
threads can be a bit time-consuming so if we want decent
|
||||
performance with heavily multi-threaded programs, especially when
|
||||
they're using a high frequency timer, we'd better avoid it if we
|
||||
@ -103,8 +103,8 @@ Index: gdb-6.6/gdb/linux-nat.c
|
||||
|
||||
if (WIFSTOPPED (status))
|
||||
{
|
||||
@@ -2252,7 +2253,9 @@ retry:
|
||||
if (!lp->step
|
||||
@@ -2992,7 +2993,9 @@ retry:
|
||||
&& inf->stop_soon == NO_STOP_QUIETLY
|
||||
&& signal_stop_state (signo) == 0
|
||||
&& signal_print_state (signo) == 0
|
||||
- && signal_pass_state (signo) == 1)
|
||||
|
@ -24,10 +24,10 @@
|
||||
|
||||
Fix a compilation error on a typo.
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/libunwind-frame.c
|
||||
Index: gdb-6.8.50.20081128/gdb/libunwind-frame.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/libunwind-frame.c 2008-01-02 00:04:03.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/libunwind-frame.c 2008-02-24 20:25:56.000000000 +0100
|
||||
--- gdb-6.8.50.20081128.orig/gdb/libunwind-frame.c 2008-05-06 20:37:46.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/libunwind-frame.c 2008-12-02 19:46:26.000000000 +0100
|
||||
@@ -61,6 +61,7 @@ static unw_word_t (*unw_find_dyn_list_p)
|
||||
struct libunwind_frame_cache
|
||||
{
|
||||
@ -44,10 +44,10 @@ Index: gdb-6.8cvs20080219/gdb/libunwind-frame.c
|
||||
unw_regnum_t uw_sp_regnum;
|
||||
struct libunwind_frame_cache *cache;
|
||||
struct libunwind_descr *descr;
|
||||
@@ -171,14 +173,30 @@ libunwind_frame_cache (struct frame_info
|
||||
@@ -174,14 +176,30 @@ libunwind_frame_cache (struct frame_info
|
||||
: __LITTLE_ENDIAN);
|
||||
|
||||
unw_init_remote_p (&cache->cursor, as, next_frame);
|
||||
unw_init_remote_p (&cache->cursor, as, this_frame);
|
||||
+
|
||||
+ /* For the base address, we have a small problem. The majority
|
||||
+ of the time, we can get the stack pointer of the previous
|
||||
@ -77,7 +77,7 @@ Index: gdb-6.8cvs20080219/gdb/libunwind-frame.c
|
||||
ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &fp);
|
||||
if (ret < 0)
|
||||
{
|
||||
@@ -186,6 +204,7 @@ libunwind_frame_cache (struct frame_info
|
||||
@@ -189,6 +207,7 @@ libunwind_frame_cache (struct frame_info
|
||||
error (_("Can't get libunwind sp register."));
|
||||
}
|
||||
|
||||
@ -85,17 +85,17 @@ Index: gdb-6.8cvs20080219/gdb/libunwind-frame.c
|
||||
cache->base = (CORE_ADDR)fp;
|
||||
cache->as = as;
|
||||
|
||||
@@ -381,6 +400,31 @@ libunwind_search_unwind_table (void *as,
|
||||
@@ -376,6 +395,31 @@ libunwind_search_unwind_table (void *as,
|
||||
di, pi, need_unwind_info, args);
|
||||
}
|
||||
|
||||
+void
|
||||
+libunwind_sigtramp_frame_this_id (struct frame_info *next_frame,
|
||||
+libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
+ void **this_cache,
|
||||
+ struct frame_id *this_id)
|
||||
+{
|
||||
+ struct libunwind_frame_cache *cache =
|
||||
+ libunwind_frame_cache (next_frame, this_cache);
|
||||
+ libunwind_frame_cache (this_frame, this_cache);
|
||||
+
|
||||
+ /* Unlike a regular frame, we can't use the normal frame pointer
|
||||
+ mechanism because a sigaltstack may have been used. Instead,
|
||||
@ -115,46 +115,37 @@ Index: gdb-6.8cvs20080219/gdb/libunwind-frame.c
|
||||
+};
|
||||
+
|
||||
/* Verify if we are in a sigtramp frame and we can use libunwind to unwind. */
|
||||
const struct frame_unwind *
|
||||
libunwind_sigtramp_frame_sniffer (struct frame_info *next_frame)
|
||||
@@ -419,7 +463,7 @@ libunwind_sigtramp_frame_sniffer (struct
|
||||
ret = unw_is_signal_frame_p (&cursor);
|
||||
unw_destroy_addr_space_p (as);
|
||||
if (ret > 0)
|
||||
- return &libunwind_frame_unwind;
|
||||
+ return &libunwind_sigtramp_frame_unwind;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
Index: gdb-6.8cvs20080219/gdb/libunwind-frame.h
|
||||
int
|
||||
libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
Index: gdb-6.8.50.20081128/gdb/libunwind-frame.h
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/libunwind-frame.h 2008-01-02 00:04:03.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/libunwind-frame.h 2008-02-24 20:23:47.000000000 +0100
|
||||
@@ -47,6 +47,9 @@ void libunwind_frame_set_descr (struct g
|
||||
--- gdb-6.8.50.20081128.orig/gdb/libunwind-frame.h 2008-05-06 20:37:46.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/libunwind-frame.h 2008-12-02 19:38:55.000000000 +0100
|
||||
@@ -52,6 +52,9 @@ void libunwind_frame_set_descr (struct g
|
||||
|
||||
void libunwind_frame_this_id (struct frame_info *next_frame, void **this_cache,
|
||||
void libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
struct frame_id *this_id);
|
||||
+void libunwind_sigtramp_frame_this_id (struct frame_info *next_frame,
|
||||
+void libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
+ void **this_cache,
|
||||
+ struct frame_id *this_id);
|
||||
void libunwind_frame_prev_register (struct frame_info *next_frame, void **this_cache,
|
||||
int regnum, int *optimizedp,
|
||||
enum lval_type *lvalp, CORE_ADDR *addrp,
|
||||
Index: gdb-6.8cvs20080219/gdb/ia64-tdep.c
|
||||
struct value *libunwind_frame_prev_register (struct frame_info *this_frame,
|
||||
void **this_cache, int regnum);
|
||||
void libunwind_frame_dealloc_cache (struct frame_info *self, void *cache);
|
||||
Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/ia64-tdep.c 2008-02-24 20:23:40.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/ia64-tdep.c 2008-02-24 20:23:47.000000000 +0100
|
||||
@@ -2942,7 +2942,7 @@ ia64_libunwind_sigtramp_frame_this_id (s
|
||||
--- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c 2008-12-02 19:04:32.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/ia64-tdep.c 2008-12-02 21:09:46.000000000 +0100
|
||||
@@ -2964,7 +2964,7 @@ ia64_libunwind_sigtramp_frame_this_id (s
|
||||
struct frame_id id;
|
||||
CORE_ADDR prev_ip;
|
||||
|
||||
- libunwind_frame_this_id (next_frame, this_cache, &id);
|
||||
+ libunwind_sigtramp_frame_this_id (next_frame, this_cache, &id);
|
||||
- libunwind_frame_this_id (this_frame, this_cache, &id);
|
||||
+ libunwind_sigtramp_frame_this_id (this_frame, this_cache, &id);
|
||||
if (frame_id_eq (id, null_frame_id))
|
||||
{
|
||||
(*this_id) = null_frame_id;
|
||||
@@ -2954,8 +2954,14 @@ ia64_libunwind_sigtramp_frame_this_id (s
|
||||
frame_unwind_register (next_frame, IA64_BSP_REGNUM, buf);
|
||||
@@ -2976,8 +2976,14 @@ ia64_libunwind_sigtramp_frame_this_id (s
|
||||
get_frame_register (this_frame, IA64_BSP_REGNUM, buf);
|
||||
bsp = extract_unsigned_integer (buf, 8);
|
||||
|
||||
- /* For a sigtramp frame, we don't make the check for previous ip being 0. */
|
||||
|
@ -8,29 +8,30 @@
|
||||
* ia64-tdep.c (ia64_sigtramp_frame_prev_register): Fix an
|
||||
ISO C compliance compilation error.
|
||||
|
||||
Index: gdb-6.8/gdb/ia64-tdep.c
|
||||
2008-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to gdb-6.8.50.20081128, follow the upstream change:
|
||||
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-tdep.c.diff?cvsroot=src&r1=1.176&r2=1.177
|
||||
|
||||
Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/ia64-tdep.c 2008-07-14 10:24:32.000000000 +0200
|
||||
+++ gdb-6.8/gdb/ia64-tdep.c 2008-07-14 10:26:46.000000000 +0200
|
||||
@@ -2043,7 +2043,100 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
pc &= ~0xf;
|
||||
store_unsigned_integer (valuep, 8, pc);
|
||||
--- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c 2008-11-26 06:27:48.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/ia64-tdep.c 2008-12-02 19:04:32.000000000 +0100
|
||||
@@ -2107,6 +2107,94 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
return frame_unwind_got_constant (this_frame, regnum, pc);
|
||||
}
|
||||
- else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) ||
|
||||
|
||||
+ /* Red Hat patch begin. */
|
||||
+ else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
|
||||
+ {
|
||||
+ /* NAT pseudo registers 0-31: get them from UNAT.
|
||||
+ * "copied" from ia64_pseudo_register_read() */
|
||||
+ CORE_ADDR addr = 0;
|
||||
+ ULONGEST unatN_val;
|
||||
+ ULONGEST unat;
|
||||
+ read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
|
||||
+ register_size (current_gdbarch, IA64_UNAT_REGNUM));
|
||||
+ unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
|
||||
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
|
||||
+ unatN_val);
|
||||
+ *lvalp = lval_memory;
|
||||
+ *addrp = cache->saved_regs[IA64_UNAT_REGNUM];
|
||||
+ return frame_unwind_got_constant (this_frame, regnum, unatN_val);
|
||||
+ }
|
||||
+ else if (IA64_NAT32_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
|
||||
+ {
|
||||
@ -78,13 +79,11 @@ Index: gdb-6.8/gdb/ia64-tdep.c
|
||||
+ {
|
||||
+ nat_bit = (gr_addr >> 3) & 0x3f;
|
||||
+ natN_val = (nat_collection >> nat_bit) & 1;
|
||||
+ *lvalp = lval_memory;
|
||||
+ *addrp = nat_addr;
|
||||
+ store_unsigned_integer (valuep,
|
||||
+ register_size (current_gdbarch, regnum),
|
||||
+ natN_val);
|
||||
+ return frame_unwind_got_constant (this_frame, regnum, natN_val);
|
||||
+ }
|
||||
+ }
|
||||
+ warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"),
|
||||
+ regnum);
|
||||
+ }
|
||||
+ else if (regnum == VBOF_REGNUM)
|
||||
+ {
|
||||
@ -106,18 +105,19 @@ Index: gdb-6.8/gdb/ia64-tdep.c
|
||||
+ subtract the size of frame from it to get beginning of frame. */
|
||||
+ bof = rse_address_add (bsp, -(cfm & 0x7f));
|
||||
+
|
||||
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), bof);
|
||||
+ *lvalp = lval_memory;
|
||||
+ *addrp = 0; // NOTE: pseudo reg not a anywhere really...
|
||||
+ return frame_unwind_got_constant (this_frame, regnum, bof);
|
||||
+ }
|
||||
+ else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) ||
|
||||
(regnum >= V32_REGNUM && regnum <= V127_REGNUM))
|
||||
+ /* Red Hat patch end. */
|
||||
+
|
||||
else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM)
|
||||
|| (regnum >= V32_REGNUM && regnum <= V127_REGNUM))
|
||||
{
|
||||
CORE_ADDR addr = 0;
|
||||
@@ -2057,6 +2150,39 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
read_memory (addr, valuep, register_size (gdbarch, regnum));
|
||||
}
|
||||
@@ -2121,7 +2209,42 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
return frame_unwind_got_constant (this_frame, regnum, 0);
|
||||
}
|
||||
|
||||
- else /* All other registers not listed above. */
|
||||
+ /* Red Hat patch begin. */
|
||||
+ else if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
|
||||
+ {
|
||||
+ /* VP 0-63.
|
||||
@ -145,12 +145,14 @@ Index: gdb-6.8/gdb/ia64-tdep.c
|
||||
+ regnum = VP16_REGNUM + ((regnum - VP16_REGNUM) + rrb_pr) % 48;
|
||||
+ }
|
||||
+ prN_val = (pr & (1LL << (regnum - VP0_REGNUM))) != 0;
|
||||
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
|
||||
+ prN_val);
|
||||
+ *lvalp = lval_memory;
|
||||
+ *addrp = pr_addr;
|
||||
+ return frame_unwind_got_constant (this_frame, regnum, prN_val);
|
||||
+ }
|
||||
+ warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"),
|
||||
+ regnum);
|
||||
+ }
|
||||
else
|
||||
+ /* Red Hat patch end. */
|
||||
+
|
||||
+ /* All other registers not listed above. */
|
||||
{
|
||||
/* All other registers not listed above. */
|
||||
CORE_ADDR addr = cache->saved_regs[regnum];
|
||||
|
||||
|
@ -9,8 +9,10 @@
|
||||
|
||||
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
|
||||
|
||||
--- gdb-6.3/gdb/testsuite/gdb.base/attach-32.c.fix3 2005-07-21 14:23:50.000000000 -0400
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32.c 2005-07-21 14:05:56.000000000 -0400
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c 2008-12-07 10:06:03.000000000 +0100
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -32,8 +34,10 @@
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
--- gdb-6.3/gdb/testsuite/gdb.base/attach-32.exp.fix3 2005-07-21 14:23:45.000000000 -0400
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32.exp 2005-07-21 17:58:28.000000000 -0400
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp 2008-12-07 10:08:52.000000000 +0100
|
||||
@@ -0,0 +1,252 @@
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -131,7 +135,7 @@
|
||||
+
|
||||
+ send_gdb "tbreak 19\n"
|
||||
+ gdb_expect {
|
||||
+ -re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
|
||||
+ -re "reakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
|
||||
+ pass "after attach-32, set tbreak postloop"
|
||||
+ }
|
||||
+ -re "$gdb_prompt $" {
|
||||
@ -287,8 +291,10 @@
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
--- gdb-6.3/gdb/testsuite/gdb.base/attach-32b.c.fix3 2005-07-21 14:23:57.000000000 -0400
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32b.c 2005-07-21 14:06:02.000000000 -0400
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c 2008-12-07 10:06:03.000000000 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
|
@ -3,21 +3,22 @@
|
||||
* valops.c (check_field_in): Use check_typedef for base classes
|
||||
to avoid problems with opaque type references.
|
||||
|
||||
Index: gdb-6.5/gdb/valops.c
|
||||
Index: gdb-6.8.50.20081128/gdb/valops.c
|
||||
===================================================================
|
||||
--- gdb-6.5.orig/gdb/valops.c 2005-12-17 20:34:03.000000000 -0200
|
||||
+++ gdb-6.5/gdb/valops.c 2006-07-07 02:35:09.000000000 -0300
|
||||
@@ -2257,8 +2257,13 @@ check_field_in (struct type *type, const
|
||||
--- gdb-6.8.50.20081128.orig/gdb/valops.c 2008-12-08 10:56:11.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/valops.c 2008-12-08 10:59:14.000000000 +0100
|
||||
@@ -2484,8 +2484,14 @@ check_field (struct type *type, const ch
|
||||
}
|
||||
|
||||
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
|
||||
- if (check_field_in (TYPE_BASECLASS (type, i), name))
|
||||
- if (check_field (TYPE_BASECLASS (type, i), name))
|
||||
- return 1;
|
||||
+ {
|
||||
+ /* Check the base classes. Make sure we have the real type for
|
||||
+ each base class as opposed to an opaque declaration. */
|
||||
+ struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
|
||||
+ if (check_field_in (baseclass, name))
|
||||
+
|
||||
+ if (check_field (baseclass, name))
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
|
@ -25,10 +25,10 @@
|
||||
|
||||
Port to GDB-6.7.
|
||||
|
||||
Index: gdb-6.7/gdb/symfile-mem.c
|
||||
Index: gdb-6.8.50.20081128/gdb/symfile-mem.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/symfile-mem.c 2007-10-13 05:29:58.000000000 +0200
|
||||
+++ gdb-6.7/gdb/symfile-mem.c 2007-10-15 21:37:54.000000000 +0200
|
||||
--- gdb-6.8.50.20081128.orig/gdb/symfile-mem.c 2008-01-01 23:53:13.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/symfile-mem.c 2008-12-02 22:15:53.000000000 +0100
|
||||
@@ -56,6 +56,14 @@
|
||||
#include "elf/common.h"
|
||||
|
||||
@ -53,11 +53,11 @@ Index: gdb-6.7/gdb/symfile-mem.c
|
||||
if (nbfd == NULL)
|
||||
error (_("Failed to read a valid object file image from memory."));
|
||||
|
||||
Index: gdb-6.7/gdb/target.c
|
||||
Index: gdb-6.8.50.20081128/gdb/target.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/target.c 2007-10-14 23:42:39.000000000 +0200
|
||||
+++ gdb-6.7/gdb/target.c 2007-10-15 21:37:54.000000000 +0200
|
||||
@@ -55,7 +55,7 @@ static int nosymbol (char *, CORE_ADDR *
|
||||
--- gdb-6.8.50.20081128.orig/gdb/target.c 2008-11-09 12:27:18.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/target.c 2008-12-02 22:17:28.000000000 +0100
|
||||
@@ -57,7 +57,7 @@ static int nosymbol (char *, CORE_ADDR *
|
||||
|
||||
static void tcomplain (void) ATTR_NORETURN;
|
||||
|
||||
@ -66,16 +66,16 @@ Index: gdb-6.7/gdb/target.c
|
||||
|
||||
static int return_zero (void);
|
||||
|
||||
@@ -275,7 +275,7 @@ target_load (char *arg, int from_tty)
|
||||
(*current_target.to_load) (arg, from_tty);
|
||||
@@ -299,7 +299,7 @@ void target_create_inferior (char *exec_
|
||||
}
|
||||
|
||||
|
||||
-static int
|
||||
+static LONGEST
|
||||
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
|
||||
struct target_ops *t)
|
||||
{
|
||||
@@ -518,7 +518,7 @@ update_current_target (void)
|
||||
@@ -530,7 +530,7 @@ update_current_target (void)
|
||||
(void (*) (struct regcache *))
|
||||
noprocess);
|
||||
de_fault (deprecated_xfer_memory,
|
||||
@ -84,7 +84,7 @@ Index: gdb-6.7/gdb/target.c
|
||||
nomemory);
|
||||
de_fault (to_files_info,
|
||||
(void (*) (struct target_ops *))
|
||||
@@ -1195,7 +1195,7 @@ target_xfer_partial (struct target_ops *
|
||||
@@ -1250,7 +1250,7 @@ target_xfer_partial (struct target_ops *
|
||||
it makes no progress, and then return how much was transferred). */
|
||||
|
||||
int
|
||||
@ -93,7 +93,7 @@ Index: gdb-6.7/gdb/target.c
|
||||
{
|
||||
if (target_read (¤t_target, TARGET_OBJECT_MEMORY, NULL,
|
||||
myaddr, memaddr, len) == len)
|
||||
@@ -1205,7 +1205,7 @@ target_read_memory (CORE_ADDR memaddr, g
|
||||
@@ -1260,7 +1260,7 @@ target_read_memory (CORE_ADDR memaddr, g
|
||||
}
|
||||
|
||||
int
|
||||
@ -102,7 +102,7 @@ Index: gdb-6.7/gdb/target.c
|
||||
{
|
||||
if (target_write (¤t_target, TARGET_OBJECT_MEMORY, NULL,
|
||||
myaddr, memaddr, len) == len)
|
||||
@@ -2228,8 +2228,8 @@ debug_to_prepare_to_store (struct regcac
|
||||
@@ -2690,8 +2690,8 @@ debug_to_prepare_to_store (struct regcac
|
||||
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ Index: gdb-6.7/gdb/target.c
|
||||
int write, struct mem_attrib *attrib,
|
||||
struct target_ops *target)
|
||||
{
|
||||
@@ -2239,9 +2239,9 @@ deprecated_debug_xfer_memory (CORE_ADDR
|
||||
@@ -2701,9 +2701,9 @@ deprecated_debug_xfer_memory (CORE_ADDR
|
||||
attrib, target);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -125,11 +125,11 @@ Index: gdb-6.7/gdb/target.c
|
||||
|
||||
if (retval > 0)
|
||||
{
|
||||
Index: gdb-6.7/gdb/target.h
|
||||
Index: gdb-6.8.50.20081128/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/target.h 2007-10-14 23:24:52.000000000 +0200
|
||||
+++ gdb-6.7/gdb/target.h 2007-10-15 21:39:20.000000000 +0200
|
||||
@@ -351,10 +351,10 @@ struct target_ops
|
||||
--- gdb-6.8.50.20081128.orig/gdb/target.h 2008-11-09 12:27:18.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/target.h 2008-12-02 22:15:53.000000000 +0100
|
||||
@@ -358,10 +358,10 @@ struct target_ops
|
||||
NOTE: cagney/2004-10-01: This has been entirely superseeded by
|
||||
to_xfer_partial and inferior inheritance. */
|
||||
|
||||
@ -144,7 +144,7 @@ Index: gdb-6.7/gdb/target.h
|
||||
|
||||
void (*to_files_info) (struct target_ops *);
|
||||
int (*to_insert_breakpoint) (struct bp_target_info *);
|
||||
@@ -615,13 +615,14 @@ extern DCACHE *target_dcache;
|
||||
@@ -661,13 +661,14 @@ extern DCACHE *target_dcache;
|
||||
|
||||
extern int target_read_string (CORE_ADDR, char **, int, int *);
|
||||
|
||||
@ -163,11 +163,11 @@ Index: gdb-6.7/gdb/target.h
|
||||
|
||||
/* Fetches the target's memory map. If one is found it is sorted
|
||||
and returned, after some consistency checking. Otherwise, NULL
|
||||
Index: gdb-6.7/gdb/dcache.c
|
||||
Index: gdb-6.8.50.20081128/gdb/dcache.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/dcache.c 2007-08-23 20:08:28.000000000 +0200
|
||||
+++ gdb-6.7/gdb/dcache.c 2007-10-15 21:37:54.000000000 +0200
|
||||
@@ -517,9 +517,9 @@ dcache_free (DCACHE *dcache)
|
||||
--- gdb-6.8.50.20081128.orig/gdb/dcache.c 2008-09-23 20:35:29.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/dcache.c 2008-12-02 22:15:53.000000000 +0100
|
||||
@@ -524,9 +524,9 @@ dcache_free (DCACHE *dcache)
|
||||
|
||||
This routine is indended to be called by remote_xfer_ functions. */
|
||||
|
||||
@ -179,10 +179,10 @@ Index: gdb-6.7/gdb/dcache.c
|
||||
{
|
||||
int i;
|
||||
int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr);
|
||||
Index: gdb-6.7/gdb/dcache.h
|
||||
Index: gdb-6.8.50.20081128/gdb/dcache.h
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/dcache.h 2007-08-23 20:08:28.000000000 +0200
|
||||
+++ gdb-6.7/gdb/dcache.h 2007-10-15 21:37:54.000000000 +0200
|
||||
--- gdb-6.8.50.20081128.orig/gdb/dcache.h 2008-01-01 23:53:09.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/dcache.h 2008-12-02 22:15:53.000000000 +0100
|
||||
@@ -35,7 +35,7 @@ void dcache_free (DCACHE *);
|
||||
|
||||
/* Simple to call from <remote>_xfer_memory */
|
||||
@ -193,11 +193,11 @@ Index: gdb-6.7/gdb/dcache.h
|
||||
+ LONGEST len, int should_write);
|
||||
|
||||
#endif /* DCACHE_H */
|
||||
Index: gdb-6.7/gdb/exec.c
|
||||
Index: gdb-6.8.50.20081128/gdb/exec.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/exec.c 2007-08-23 20:08:28.000000000 +0200
|
||||
+++ gdb-6.7/gdb/exec.c 2007-10-15 21:37:54.000000000 +0200
|
||||
@@ -453,8 +453,8 @@ map_vmap (bfd *abfd, bfd *arch)
|
||||
--- gdb-6.8.50.20081128.orig/gdb/exec.c 2008-10-30 19:42:28.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/exec.c 2008-12-02 22:15:53.000000000 +0100
|
||||
@@ -459,8 +459,8 @@ map_vmap (bfd *abfd, bfd *arch)
|
||||
The same routine is used to handle both core and exec files;
|
||||
we just tail-call it with more arguments to select between them. */
|
||||
|
||||
@ -208,11 +208,11 @@ Index: gdb-6.7/gdb/exec.c
|
||||
struct mem_attrib *attrib, struct target_ops *target)
|
||||
{
|
||||
int res;
|
||||
Index: gdb-6.7/gdb/linux-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/linux-nat.c 2007-10-15 00:13:52.000000000 +0200
|
||||
+++ gdb-6.7/gdb/linux-nat.c 2007-10-15 21:37:54.000000000 +0200
|
||||
@@ -3248,7 +3248,7 @@ linux_xfer_partial (struct target_ops *o
|
||||
--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c 2008-12-02 21:11:11.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/linux-nat.c 2008-12-02 22:15:53.000000000 +0100
|
||||
@@ -4053,7 +4053,7 @@ linux_xfer_partial (struct target_ops *o
|
||||
Revert when Bugzilla 147436 is fixed. */
|
||||
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
|
||||
{ /* This region contains ia64 rse registers, we have to re-read. */
|
||||
@ -221,10 +221,10 @@ Index: gdb-6.7/gdb/linux-nat.c
|
||||
|
||||
/* Re-read register stack area. */
|
||||
xxfer = super_xfer_partial (ops, object, annex,
|
||||
Index: gdb-6.7/gdb/remote.c
|
||||
Index: gdb-6.8.50.20081128/gdb/remote.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/remote.c 2007-10-14 23:42:39.000000000 +0200
|
||||
+++ gdb-6.7/gdb/remote.c 2007-10-15 21:37:54.000000000 +0200
|
||||
--- gdb-6.8.50.20081128.orig/gdb/remote.c 2008-11-24 17:53:44.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/remote.c 2008-12-02 22:17:00.000000000 +0100
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "gdb_string.h"
|
||||
#include <ctype.h>
|
||||
@ -233,7 +233,7 @@ Index: gdb-6.7/gdb/remote.c
|
||||
#include "inferior.h"
|
||||
#include "bfd.h"
|
||||
#include "symfile.h"
|
||||
@@ -4484,19 +4485,27 @@ remote_read_bytes (CORE_ADDR memaddr, gd
|
||||
@@ -5687,12 +5688,19 @@ handle_notification (char *buf, size_t l
|
||||
if SHOULD_WRITE is nonzero. Returns length of data written or
|
||||
read; 0 for error. TARGET is unused. */
|
||||
|
||||
@ -247,15 +247,15 @@ Index: gdb-6.7/gdb/remote.c
|
||||
int res;
|
||||
+ int len;
|
||||
+
|
||||
+
|
||||
+ /* This routine is not set up to handle > INT_MAX bytes. */
|
||||
+ if (mem_len >= (LONGEST)INT_MAX)
|
||||
+ return 0;
|
||||
+
|
||||
+ len = (int)mem_len;
|
||||
|
||||
if (should_write)
|
||||
res = remote_write_bytes (mem_addr, buffer, mem_len);
|
||||
set_general_thread (inferior_ptid);
|
||||
|
||||
@@ -5701,7 +5709,7 @@ remote_xfer_memory (CORE_ADDR mem_addr,
|
||||
else
|
||||
res = remote_read_bytes (mem_addr, buffer, mem_len);
|
||||
|
||||
@ -264,11 +264,11 @@ Index: gdb-6.7/gdb/remote.c
|
||||
}
|
||||
|
||||
/* Sends a packet with content determined by the printf format string
|
||||
Index: gdb-6.7/gdb/remote-sim.c
|
||||
Index: gdb-6.8.50.20081128/gdb/remote-sim.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/remote-sim.c 2007-08-23 20:08:36.000000000 +0200
|
||||
+++ gdb-6.7/gdb/remote-sim.c 2007-10-15 21:41:33.000000000 +0200
|
||||
@@ -747,11 +747,14 @@ gdbsim_prepare_to_store (struct regcache
|
||||
--- gdb-6.8.50.20081128.orig/gdb/remote-sim.c 2008-11-13 02:26:43.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/remote-sim.c 2008-12-02 22:15:53.000000000 +0100
|
||||
@@ -763,11 +763,14 @@ gdbsim_prepare_to_store (struct regcache
|
||||
|
||||
Returns the number of bytes transferred. */
|
||||
|
||||
@ -285,7 +285,7 @@ Index: gdb-6.7/gdb/remote-sim.c
|
||||
/* If no program is running yet, then ignore the simulator for
|
||||
memory. Pass the request down to the next target, hopefully
|
||||
an exec file. */
|
||||
@@ -767,22 +770,22 @@ gdbsim_xfer_inferior_memory (CORE_ADDR m
|
||||
@@ -783,22 +786,22 @@ gdbsim_xfer_inferior_memory (CORE_ADDR m
|
||||
printf_filtered ("gdbsim_xfer_inferior_memory: myaddr 0x");
|
||||
gdb_print_host_address (myaddr, gdb_stdout);
|
||||
printf_filtered (", memaddr 0x%s, len %d, write %d\n",
|
||||
|
@ -21,19 +21,19 @@
|
||||
|
||||
[ Remove decode_variable* for GDB-6.8+ as no longer needed. ]
|
||||
|
||||
Index: gdb-6.7/gdb/linespec.c
|
||||
Index: gdb-6.8.50.20081128/gdb/linespec.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/linespec.c 2007-08-23 20:08:35.000000000 +0200
|
||||
+++ gdb-6.7/gdb/linespec.c 2007-10-13 05:26:33.000000000 +0200
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "linespec.h"
|
||||
#include "exceptions.h"
|
||||
#include "language.h"
|
||||
--- gdb-6.8.50.20081128.orig/gdb/linespec.c 2008-09-05 13:37:17.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/linespec.c 2008-12-04 01:43:36.000000000 +0100
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "interps.h"
|
||||
#include "mi/mi-cmds.h"
|
||||
#include "target.h"
|
||||
+#include "gdb_assert.h"
|
||||
|
||||
/* We share this one with symtab.c, but it is not exported widely. */
|
||||
|
||||
@@ -75,7 +76,8 @@ static struct symtabs_and_lines find_met
|
||||
@@ -78,7 +79,8 @@ static struct symtabs_and_lines find_met
|
||||
|
||||
static int collect_methods (char *copy, struct type *t,
|
||||
struct symbol *sym_class,
|
||||
@ -43,7 +43,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
|
||||
static NORETURN void cplusplus_error (const char *name,
|
||||
const char *fmt, ...)
|
||||
@@ -84,11 +86,13 @@ static NORETURN void cplusplus_error (co
|
||||
@@ -87,11 +89,13 @@ static NORETURN void cplusplus_error (co
|
||||
static int total_number_of_methods (struct type *type);
|
||||
|
||||
static int find_methods (struct type *, char *,
|
||||
@ -59,7 +59,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
|
||||
static int add_constructors (int method_counter, struct type *t,
|
||||
enum language language,
|
||||
@@ -104,6 +108,9 @@ static int is_objc_method_format (const
|
||||
@@ -107,6 +111,9 @@ static int is_objc_method_format (const
|
||||
static struct symtabs_and_lines decode_line_2 (struct symbol *[],
|
||||
int, int, char ***);
|
||||
|
||||
@ -69,7 +69,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
static struct symtab *symtab_from_filename (char **argptr,
|
||||
char *p, int is_quote_enclosed,
|
||||
int *not_found_ptr);
|
||||
@@ -194,13 +201,18 @@ total_number_of_methods (struct type *ty
|
||||
@@ -196,13 +203,18 @@ total_number_of_methods (struct type *ty
|
||||
/* Recursive helper function for decode_line_1.
|
||||
Look for methods named NAME in type T.
|
||||
Return number of matches.
|
||||
@ -90,7 +90,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
{
|
||||
int i1 = 0;
|
||||
int ibase;
|
||||
@@ -243,7 +255,7 @@ find_methods (struct type *t, char *name
|
||||
@@ -244,7 +256,7 @@ find_methods (struct type *t, char *name
|
||||
if (strcmp_iw (name, method_name) == 0)
|
||||
/* Find all the overloaded methods with that name. */
|
||||
i1 += add_matching_methods (method_counter, t, language,
|
||||
@ -99,7 +99,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
else if (strncmp (class_name, name, name_len) == 0
|
||||
&& (class_name[name_len] == '\0'
|
||||
|| class_name[name_len] == '<'))
|
||||
@@ -266,21 +278,100 @@ find_methods (struct type *t, char *name
|
||||
@@ -267,21 +279,100 @@ find_methods (struct type *t, char *name
|
||||
if (i1 == 0)
|
||||
for (ibase = 0; ibase < TYPE_N_BASECLASSES (t); ibase++)
|
||||
i1 += find_methods (TYPE_BASECLASS (t, ibase), name,
|
||||
@ -202,7 +202,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
|
||||
for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
|
||||
field_counter >= 0;
|
||||
@@ -305,6 +396,16 @@ add_matching_methods (int method_counter
|
||||
@@ -306,6 +397,16 @@ add_matching_methods (int method_counter
|
||||
else
|
||||
phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
|
||||
|
||||
@ -229,7 +229,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
return i1;
|
||||
}
|
||||
|
||||
@@ -610,6 +714,146 @@ decode_line_2 (struct symbol *sym_arr[],
|
||||
@@ -630,6 +734,146 @@ See set/show multiple-symbol."));
|
||||
discard_cleanups (old_chain);
|
||||
return return_values;
|
||||
}
|
||||
@ -329,7 +329,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
+ {
|
||||
+ if (canonical_arr[i] == NULL)
|
||||
+ {
|
||||
+ symname = DEPRECATED_SYMBOL_NAME (msym_arr[i]);
|
||||
+ symname = SYMBOL_LINKAGE_NAME (msym_arr[i]);
|
||||
+ canonical_arr[i] = savestring (symname, strlen (symname));
|
||||
+ }
|
||||
+ }
|
||||
@ -352,7 +352,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
+ {
|
||||
+ if (canonical_arr)
|
||||
+ {
|
||||
+ symname = DEPRECATED_SYMBOL_NAME (msym_arr[num]);
|
||||
+ symname = SYMBOL_LINKAGE_NAME (msym_arr[num]);
|
||||
+ make_cleanup (xfree, symname);
|
||||
+ canonical_arr[i] = savestring (symname, strlen (symname));
|
||||
+ }
|
||||
@ -376,7 +376,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
|
||||
/* The parser of linespec itself. */
|
||||
|
||||
@@ -1414,35 +1658,46 @@ find_method (int funfirstline, char ***c
|
||||
@@ -1438,35 +1682,46 @@ find_method (int funfirstline, char ***c
|
||||
struct symbol **sym_arr = alloca (total_number_of_methods (t)
|
||||
* sizeof (struct symbol *));
|
||||
|
||||
@ -437,7 +437,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
return decode_line_2 (sym_arr, i1, funfirstline, canonical);
|
||||
}
|
||||
else
|
||||
@@ -1469,11 +1722,12 @@ find_method (int funfirstline, char ***c
|
||||
@@ -1493,11 +1748,12 @@ find_method (int funfirstline, char ***c
|
||||
}
|
||||
|
||||
/* Find all methods named COPY in the class whose type is T, and put
|
||||
@ -452,7 +452,7 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
{
|
||||
int i1 = 0; /* Counter for the symbol array. */
|
||||
|
||||
@@ -1495,7 +1749,7 @@ collect_methods (char *copy, struct type
|
||||
@@ -1518,7 +1774,7 @@ collect_methods (char *copy, struct type
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -461,15 +461,3 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
|
||||
return i1;
|
||||
}
|
||||
--- gdb-6.8/gdb/Makefile.in.orig 2008-08-27 12:59:59.000000000 +0200
|
||||
+++ gdb-6.8/gdb/Makefile.in 2008-08-27 13:00:19.000000000 +0200
|
||||
@@ -2341,7 +2341,8 @@ libunwind-frame.o: libunwind-frame.c $(d
|
||||
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
|
||||
$(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
|
||||
$(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \
|
||||
- $(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h)
|
||||
+ $(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h) \
|
||||
+ $(gdb_assert_h)
|
||||
linux-fork.o: linux-fork.c $(defs_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) \
|
||||
$(infcall_h) $(gdb_assert_h) $(gdb_string_h) $(linux_fork_h) \
|
||||
$(linux_nat_h) $(gdb_wait_h) $(gdb_dirent_h)
|
||||
|
@ -26,28 +26,19 @@
|
||||
|
||||
Fix scan_dyntag() for binaries provided by valgrind (BZ 460319).
|
||||
|
||||
--- ./gdb/Makefile.in 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/Makefile.in 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -1928,7 +1928,7 @@ amd64-tdep.o: amd64-tdep.c $(defs_h) $(a
|
||||
$(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
|
||||
$(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \
|
||||
$(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \
|
||||
- $(i387_tdep_h)
|
||||
+ $(i387_tdep_h) $(exceptions_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) $(buildsym_h) \
|
||||
--- ./gdb/amd64-tdep.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/amd64-tdep.c 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -36,6 +36,7 @@
|
||||
Index: gdb-6.8.50.20081209/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/amd64-tdep.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/amd64-tdep.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "regcache.h"
|
||||
#include "regset.h"
|
||||
#include "symfile.h"
|
||||
#include "dwarf2-frame.h"
|
||||
#include "gdb_assert.h"
|
||||
+#include "exceptions.h"
|
||||
|
||||
#include "amd64-tdep.h"
|
||||
#include "i387-tdep.h"
|
||||
@@ -731,16 +732,28 @@ amd64_alloc_frame_cache (void)
|
||||
#include "gdb_assert.h"
|
||||
|
||||
@@ -906,16 +907,28 @@ amd64_analyze_stack_align (CORE_ADDR pc,
|
||||
Any function that doesn't start with this sequence will be assumed
|
||||
to have no prologue and thus no valid frame pointer in %rbp. */
|
||||
|
||||
@ -78,9 +69,9 @@
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
op = read_memory_unsigned_integer (pc, 1);
|
||||
pc = amd64_analyze_stack_align (pc, current_pc, cache);
|
||||
|
||||
@@ -753,18 +766,57 @@ amd64_analyze_prologue (CORE_ADDR pc, CO
|
||||
@@ -930,18 +943,57 @@ amd64_analyze_prologue (CORE_ADDR pc, CO
|
||||
|
||||
/* If that's all, return now. */
|
||||
if (current_pc <= pc + 1)
|
||||
@ -141,18 +132,29 @@
|
||||
return pc;
|
||||
}
|
||||
|
||||
--- ./gdb/auxv.c 2008-01-16 17:27:37.000000000 +0100
|
||||
+++ ./gdb/auxv.c 2008-08-30 23:40:33.000000000 +0200
|
||||
Index: gdb-6.8.50.20081209/gdb/auxv.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/auxv.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/auxv.c 2008-12-14 14:57:58.000000000 +0100
|
||||
@@ -80,7 +80,7 @@ procfs_xfer_auxv (struct target_ops *ops
|
||||
Return 1 if an entry was read into *TYPEP and *VALP. */
|
||||
int
|
||||
default_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
|
||||
- gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
|
||||
+ gdb_byte *endptr, ULONGEST *typep, CORE_ADDR *valp)
|
||||
{
|
||||
const int sizeof_auxv_field = gdbarch_ptr_bit (target_gdbarch)
|
||||
/ TARGET_CHAR_BIT;
|
||||
@@ -107,7 +107,7 @@ default_auxv_parse (struct target_ops *o
|
||||
Return 1 if an entry was read into *TYPEP and *VALP. */
|
||||
int
|
||||
target_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
|
||||
- gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
|
||||
+ gdb_byte *endptr, ULONGEST *typep, CORE_ADDR *valp)
|
||||
{
|
||||
const int sizeof_auxv_field = TYPE_LENGTH (builtin_type_void_data_ptr);
|
||||
gdb_byte *ptr = *readptr;
|
||||
@@ -105,9 +105,10 @@ target_auxv_parse (struct target_ops *op
|
||||
struct target_ops *t;
|
||||
for (t = ops; t != NULL; t = t->beneath)
|
||||
@@ -122,9 +122,10 @@ target_auxv_parse (struct target_ops *op
|
||||
an error getting the information. On success, return 1 after
|
||||
storing the entry's value field in *VALP. */
|
||||
int
|
||||
@ -165,7 +167,7 @@
|
||||
gdb_byte *data;
|
||||
LONGEST n = target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL, &data);
|
||||
gdb_byte *ptr = data;
|
||||
@@ -117,10 +118,10 @@ target_auxv_search (struct target_ops *o
|
||||
@@ -134,10 +135,10 @@ target_auxv_search (struct target_ops *o
|
||||
return n;
|
||||
|
||||
while (1)
|
||||
@ -178,7 +180,7 @@
|
||||
{
|
||||
xfree (data);
|
||||
*valp = val;
|
||||
@@ -143,7 +144,8 @@ target_auxv_search (struct target_ops *o
|
||||
@@ -160,7 +161,8 @@ target_auxv_search (struct target_ops *o
|
||||
int
|
||||
fprint_target_auxv (struct ui_file *file, struct target_ops *ops)
|
||||
{
|
||||
@ -188,14 +190,13 @@
|
||||
gdb_byte *data;
|
||||
LONGEST len = target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL,
|
||||
&data);
|
||||
@@ -153,14 +155,14 @@ fprint_target_auxv (struct ui_file *file
|
||||
@@ -170,13 +172,13 @@ fprint_target_auxv (struct ui_file *file
|
||||
if (len <= 0)
|
||||
return len;
|
||||
|
||||
- while (target_auxv_parse (ops, &ptr, data + len, &type, &val) > 0)
|
||||
+ while (target_auxv_parse (ops, &ptr, data + len, &at_type, &val) > 0)
|
||||
{
|
||||
extern int addressprint;
|
||||
const char *name = "???";
|
||||
const char *description = "";
|
||||
enum { dec, hex, str } flavor = hex;
|
||||
@ -205,17 +206,28 @@
|
||||
{
|
||||
#define TAG(tag, text, kind) \
|
||||
case tag: name = #tag; description = text; flavor = kind; break
|
||||
@@ -213,7 +215,7 @@ fprint_target_auxv (struct ui_file *file
|
||||
@@ -231,7 +233,7 @@ fprint_target_auxv (struct ui_file *file
|
||||
}
|
||||
|
||||
fprintf_filtered (file, "%-4s %-20s %-30s ",
|
||||
- paddr_d (type), name, description);
|
||||
+ paddr_d (at_type), name, description);
|
||||
- plongest (type), name, description);
|
||||
+ plongest (at_type), name, description);
|
||||
switch (flavor)
|
||||
{
|
||||
case dec:
|
||||
--- ./gdb/auxv.h 2008-01-01 23:53:09.000000000 +0100
|
||||
+++ ./gdb/auxv.h 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -252,7 +254,7 @@ fprint_target_auxv (struct ui_file *file
|
||||
break;
|
||||
}
|
||||
++ents;
|
||||
- if (type == AT_NULL)
|
||||
+ if (at_type == AT_NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
Index: gdb-6.8.50.20081209/gdb/auxv.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/auxv.h 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/auxv.h 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -35,14 +35,14 @@ struct target_ops; /* Forward declarati
|
||||
Return 1 if an entry was read into *TYPEP and *VALP. */
|
||||
extern int target_auxv_parse (struct target_ops *ops,
|
||||
@ -233,9 +245,11 @@
|
||||
|
||||
/* Print the contents of the target's AUXV on the specified file. */
|
||||
extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
|
||||
--- ./gdb/breakpoint.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/breakpoint.c 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -3971,7 +3971,8 @@ describe_other_breakpoints (CORE_ADDR pc
|
||||
Index: gdb-6.8.50.20081209/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/breakpoint.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/breakpoint.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -3861,7 +3861,8 @@ describe_other_breakpoints (CORE_ADDR pc
|
||||
printf_filtered (" (thread %d)", b->thread);
|
||||
printf_filtered ("%s%s ",
|
||||
((b->enable_state == bp_disabled ||
|
||||
@ -245,8 +259,8 @@
|
||||
? " (disabled)"
|
||||
: b->enable_state == bp_permanent
|
||||
? " (permanent)"
|
||||
@@ -4623,6 +4624,62 @@ disable_breakpoints_in_unloaded_shlib (s
|
||||
}
|
||||
@@ -4692,6 +4693,61 @@ create_catchpoint (int tempflag, char *c
|
||||
return b;
|
||||
}
|
||||
|
||||
+void
|
||||
@ -303,14 +317,15 @@
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void
|
||||
create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
|
||||
enum bptype bp_kind)
|
||||
--- ./gdb/breakpoint.h 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/breakpoint.h 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -144,6 +144,7 @@ enum enable_state
|
||||
struct breakpoint_ops *ops)
|
||||
Index: gdb-6.8.50.20081209/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/breakpoint.h 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/breakpoint.h 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -126,6 +126,7 @@ enum enable_state
|
||||
automatically enabled and reset when the call
|
||||
"lands" (either completes, or stops at another
|
||||
eventpoint). */
|
||||
@ -318,7 +333,7 @@
|
||||
bp_permanent /* There is a breakpoint instruction hard-wired into
|
||||
the target's code. Don't try to write another
|
||||
breakpoint instruction on top of it, or restore
|
||||
@@ -828,6 +829,10 @@ extern void remove_thread_event_breakpoi
|
||||
@@ -818,6 +819,10 @@ extern void remove_thread_event_breakpoi
|
||||
|
||||
extern void disable_breakpoints_in_shlibs (void);
|
||||
|
||||
@ -329,9 +344,11 @@
|
||||
/* This function returns TRUE if ep is a catchpoint. */
|
||||
extern int ep_is_catchpoint (struct breakpoint *);
|
||||
|
||||
--- ./gdb/dwarf2read.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/dwarf2read.c 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -1222,7 +1222,7 @@ dwarf2_build_psymtabs (struct objfile *o
|
||||
Index: gdb-6.8.50.20081209/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/dwarf2read.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/dwarf2read.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -1295,7 +1295,7 @@ dwarf2_build_psymtabs (struct objfile *o
|
||||
else
|
||||
dwarf2_per_objfile->loc_buffer = NULL;
|
||||
|
||||
@ -340,9 +357,11 @@
|
||||
|| (objfile->global_psymbols.size == 0
|
||||
&& objfile->static_psymbols.size == 0))
|
||||
{
|
||||
--- ./gdb/elfread.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/elfread.c 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -673,7 +673,7 @@ elf_symfile_read (struct objfile *objfil
|
||||
Index: gdb-6.8.50.20081209/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/elfread.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/elfread.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -680,7 +680,7 @@ elf_symfile_read (struct objfile *objfil
|
||||
/* If we are reinitializing, or if we have never loaded syms yet,
|
||||
set table to empty. MAINLINE is cleared so that *_read_psymtab
|
||||
functions do not all also re-initialize the psymbol table. */
|
||||
@ -351,9 +370,11 @@
|
||||
{
|
||||
init_psymbol_list (objfile, 0);
|
||||
mainline = 0;
|
||||
--- ./gdb/infrun.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/infrun.c 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -2314,6 +2314,11 @@ process_event_stop_test:
|
||||
Index: gdb-6.8.50.20081209/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/infrun.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/infrun.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -3229,6 +3229,11 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (
|
||||
#endif
|
||||
target_terminal_inferior ();
|
||||
|
||||
@ -365,11 +386,13 @@
|
||||
/* If requested, stop when the dynamic linker notifies
|
||||
gdb of events. This allows the user to get control
|
||||
and place breakpoints in initializer routines for
|
||||
--- ./gdb/objfiles.c 2008-01-01 23:53:12.000000000 +0100
|
||||
+++ ./gdb/objfiles.c 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -49,6 +49,9 @@
|
||||
#include "source.h"
|
||||
#include "addrmap.h"
|
||||
Index: gdb-6.8.50.20081209/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/objfiles.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/objfiles.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -51,6 +51,9 @@
|
||||
#include "arch-utils.h"
|
||||
#include "exec.h"
|
||||
|
||||
+#include "auxv.h"
|
||||
+#include "elf/common.h"
|
||||
@ -377,7 +400,7 @@
|
||||
/* Prototypes for local functions */
|
||||
|
||||
static void objfile_alloc_data (struct objfile *objfile);
|
||||
@@ -260,7 +263,19 @@ init_entry_point_info (struct objfile *o
|
||||
@@ -271,7 +274,19 @@ init_entry_point_info (struct objfile *o
|
||||
CORE_ADDR
|
||||
entry_point_address (void)
|
||||
{
|
||||
@ -398,18 +421,19 @@
|
||||
}
|
||||
|
||||
/* Create the terminating entry of OBJFILE's minimal symbol table.
|
||||
--- ./gdb/solib-svr4.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/solib-svr4.c 2008-09-01 17:12:31.000000000 +0200
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "gdbcore.h"
|
||||
#include "target.h"
|
||||
#include "inferior.h"
|
||||
+#include "auxv.h"
|
||||
Index: gdb-6.8.50.20081209/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/solib-svr4.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/solib-svr4.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "exec.h"
|
||||
#include "auxv.h"
|
||||
#include "exceptions.h"
|
||||
+#include "command.h"
|
||||
|
||||
#include "gdb_assert.h"
|
||||
|
||||
@@ -246,7 +248,9 @@ static char *debug_loader_name;
|
||||
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
|
||||
static int svr4_have_link_map_offsets (void);
|
||||
@@ -286,7 +287,9 @@ static CORE_ADDR main_lm_addr;
|
||||
|
||||
/* Local function prototypes */
|
||||
|
||||
@ -419,7 +443,7 @@
|
||||
|
||||
static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
|
||||
|
||||
@@ -349,10 +353,12 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||
@@ -520,10 +523,12 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||
int arch_size, step, sect_size;
|
||||
long dyn_tag;
|
||||
CORE_ADDR dyn_ptr, dyn_addr;
|
||||
@ -432,7 +456,7 @@
|
||||
|
||||
if (abfd == NULL)
|
||||
return 0;
|
||||
@@ -360,19 +366,81 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||
@@ -531,19 +536,81 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||
if (arch_size == -1)
|
||||
return 0;
|
||||
|
||||
@ -516,7 +540,7 @@
|
||||
|
||||
/* Iterate over BUF and scan for DYNTAG. If found, set PTR and return. */
|
||||
step = (arch_size == 32) ? sizeof (Elf32_External_Dyn)
|
||||
@@ -393,25 +461,103 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||
@@ -564,26 +631,105 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||
dyn_tag = bfd_h_get_64 (abfd, (bfd_byte *) x_dynp_64->d_tag);
|
||||
dyn_ptr = bfd_h_get_64 (abfd, (bfd_byte *) x_dynp_64->d_un.d_ptr);
|
||||
}
|
||||
@ -562,13 +586,14 @@
|
||||
- entry. */
|
||||
- if (ptr)
|
||||
- {
|
||||
- struct type *ptr_type;
|
||||
- gdb_byte ptr_buf[8];
|
||||
- CORE_ADDR ptr_addr;
|
||||
-
|
||||
- ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
|
||||
- ptr_addr = dyn_addr + (buf - bufstart) + arch_size / 8;
|
||||
- if (target_read_memory (ptr_addr, ptr_buf, arch_size / 8) == 0)
|
||||
- dyn_ptr = extract_typed_address (ptr_buf,
|
||||
- builtin_type_void_data_ptr);
|
||||
- dyn_ptr = extract_typed_address (ptr_buf, ptr_type);
|
||||
- *ptr = dyn_ptr;
|
||||
- }
|
||||
- return 1;
|
||||
@ -612,8 +637,10 @@
|
||||
+
|
||||
+ if (got == 0)
|
||||
+ {
|
||||
+ dyn_ptr = extract_typed_address (ptr_buf,
|
||||
+ builtin_type_void_data_ptr);
|
||||
+ struct type *ptr_type;
|
||||
+
|
||||
+ ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
|
||||
+ dyn_ptr = extract_typed_address (ptr_buf, ptr_type);
|
||||
+ if (ptr != NULL)
|
||||
+ {
|
||||
+ if (debug_solib)
|
||||
@ -638,18 +665,18 @@
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -544,6 +690,10 @@ solib_svr4_r_map (void)
|
||||
{
|
||||
@@ -773,6 +919,10 @@ solib_svr4_r_map (void)
|
||||
struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
|
||||
struct type *ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
|
||||
|
||||
+ if (debug_solib)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "solib_svr4_r_map: read at 0x%s\n",
|
||||
+ paddr_nz (debug_base + lmo->r_map_offset));
|
||||
return read_memory_typed_address (debug_base + lmo->r_map_offset,
|
||||
builtin_type_void_data_ptr);
|
||||
return read_memory_typed_address (debug_base + lmo->r_map_offset, ptr_type);
|
||||
}
|
||||
@@ -713,6 +863,11 @@ svr4_current_sos (void)
|
||||
|
||||
@@ -944,6 +1094,11 @@ svr4_current_sos (void)
|
||||
struct so_list *head = 0;
|
||||
struct so_list **link_ptr = &head;
|
||||
CORE_ADDR ldsomap = 0;
|
||||
@ -661,7 +688,7 @@
|
||||
|
||||
/* Always locate the debug struct, in case it has moved. */
|
||||
debug_base = 0;
|
||||
@@ -721,10 +876,19 @@ svr4_current_sos (void)
|
||||
@@ -952,10 +1107,19 @@ svr4_current_sos (void)
|
||||
/* If we can't find the dynamic linker's base structure, this
|
||||
must not be a dynamically linked executable. Hmm. */
|
||||
if (! debug_base)
|
||||
@ -682,7 +709,7 @@
|
||||
lm = solib_svr4_r_map ();
|
||||
|
||||
while (lm)
|
||||
@@ -740,23 +904,103 @@ svr4_current_sos (void)
|
||||
@@ -972,26 +1136,104 @@ svr4_current_sos (void)
|
||||
new->lm_info->lm = xzalloc (lmo->link_map_size);
|
||||
make_cleanup (xfree, new->lm_info->lm);
|
||||
|
||||
@ -704,14 +731,17 @@
|
||||
does have a name, so we can no longer use a missing name to
|
||||
decide when to ignore it. */
|
||||
- if (IGNORE_FIRST_LINK_MAP_ENTRY (new) && ldsomap == 0)
|
||||
- free_so (new);
|
||||
+ if (exec_bfd != NULL && IGNORE_FIRST_LINK_MAP_ENTRY (new) && ldsomap == 0)
|
||||
+ {
|
||||
{
|
||||
- main_lm_addr = new->lm_info->lm_addr;
|
||||
- free_so (new);
|
||||
- }
|
||||
+ /* It is the first link map entry, i.e. it is the main executable. */
|
||||
+
|
||||
+ if (bfd_get_start_address (exec_bfd) == entry_point_address ())
|
||||
+ {
|
||||
+ /* Non-pie case, main executable has not been relocated. */
|
||||
+ main_lm_addr = new->lm_info->lm_addr;
|
||||
+ free_so (new);
|
||||
+ }
|
||||
+ else
|
||||
@ -788,7 +818,7 @@
|
||||
target_read_string (LM_NAME (new), &buffer,
|
||||
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
|
||||
if (errcode != 0)
|
||||
@@ -764,47 +1008,60 @@ svr4_current_sos (void)
|
||||
@@ -999,47 +1241,60 @@ svr4_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
{
|
||||
@ -834,15 +864,15 @@
|
||||
+ }
|
||||
+ else
|
||||
+ debug_print_missing (new->so_name, build_id_filename);
|
||||
+
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ }
|
||||
|
||||
- /* Missing the build-id matching separate debug info file
|
||||
- would be handled while SO_NAME gets loaded. */
|
||||
- name = build_id_to_filename (build_id, &build_id_filename, 0);
|
||||
- if (name != NULL)
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ }
|
||||
+
|
||||
+ if (debug_solib)
|
||||
{
|
||||
- strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
@ -882,7 +912,7 @@
|
||||
}
|
||||
|
||||
/* On Solaris, the dynamic linker is not in the normal list of
|
||||
@@ -820,6 +1077,9 @@ svr4_current_sos (void)
|
||||
@@ -1055,6 +1310,9 @@ svr4_current_sos (void)
|
||||
if (head == NULL)
|
||||
return svr4_default_sos ();
|
||||
|
||||
@ -892,7 +922,7 @@
|
||||
return head;
|
||||
}
|
||||
|
||||
@@ -921,7 +1181,7 @@ for (resolve = 0; resolve <= 1; resolve+
|
||||
@@ -1086,7 +1344,7 @@ svr4_fetch_objfile_link_map (struct objf
|
||||
/* On some systems, the only way to recognize the link map entry for
|
||||
the main executable file is by looking at its name. Return
|
||||
non-zero iff SONAME matches one of the known main executable names. */
|
||||
@ -901,7 +931,7 @@
|
||||
static int
|
||||
match_main (char *soname)
|
||||
{
|
||||
@@ -935,6 +1195,7 @@ match_main (char *soname)
|
||||
@@ -1100,6 +1358,7 @@ match_main (char *soname)
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -909,28 +939,25 @@
|
||||
|
||||
/* Return 1 if PC lies in the dynamic symbol resolution code of the
|
||||
SVR4 run time loader. */
|
||||
@@ -1086,11 +1347,17 @@ enable_break (void)
|
||||
/* Find the .interp section; if not found, warn the user and drop
|
||||
@@ -1250,15 +1509,29 @@ enable_break (void)
|
||||
/* Find the program interpreter; if not found, warn the user and drop
|
||||
into the old breakpoint at symbol code. */
|
||||
interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
|
||||
interp_name = find_program_interpreter ();
|
||||
+
|
||||
+ if (debug_solib)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "enable_break: search for .interp in %s\n",
|
||||
+ exec_bfd->filename);
|
||||
if (interp_sect)
|
||||
if (interp_name)
|
||||
{
|
||||
unsigned int interp_sect_size;
|
||||
char *buf;
|
||||
CORE_ADDR load_addr = 0;
|
||||
+ CORE_ADDR load_addr_mask = -1L;
|
||||
int load_addr_found = 0;
|
||||
int loader_found_in_list = 0;
|
||||
struct so_list *so;
|
||||
@@ -1098,6 +1365,14 @@ enable_break (void)
|
||||
bfd *tmp_bfd = NULL;
|
||||
struct target_ops *tmp_bfd_target;
|
||||
int tmp_fd = -1;
|
||||
char *tmp_pathname = NULL;
|
||||
volatile struct gdb_exception ex;
|
||||
+ int arch_size;
|
||||
+
|
||||
+ /* For 32bit inferiors with 64bit GDB we may get LOAD_ADDR at 0xff......
|
||||
@ -940,19 +967,19 @@
|
||||
+ if (arch_size > 0 && arch_size < sizeof (1UL) * 8)
|
||||
+ load_addr_mask = (1UL << arch_size) - 1;
|
||||
|
||||
/* Read the contents of the .interp section into a local buffer;
|
||||
the contents specify the dynamic linker this program uses. */
|
||||
@@ -1120,6 +1395,9 @@ enable_break (void)
|
||||
if (tmp_fd >= 0)
|
||||
tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
|
||||
sym_addr = 0;
|
||||
|
||||
@@ -1275,6 +1548,9 @@ enable_break (void)
|
||||
{
|
||||
tmp_bfd = solib_bfd_open (interp_name);
|
||||
}
|
||||
+ if (debug_solib)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "enable_break: opening %s\n", tmp_pathname);
|
||||
+ "enable_break: opening %s\n", interp_name);
|
||||
if (tmp_bfd == NULL)
|
||||
goto bkpt_at_symbol;
|
||||
|
||||
@@ -1181,16 +1459,16 @@ enable_break (void)
|
||||
@@ -1328,16 +1604,16 @@ enable_break (void)
|
||||
interp_sect = bfd_get_section_by_name (tmp_bfd, ".text");
|
||||
if (interp_sect)
|
||||
{
|
||||
@ -973,7 +1000,7 @@
|
||||
interp_plt_sect_high =
|
||||
interp_plt_sect_low + bfd_section_size (tmp_bfd, interp_sect);
|
||||
}
|
||||
@@ -1225,7 +1503,11 @@ enable_break (void)
|
||||
@@ -1372,7 +1648,11 @@ enable_break (void)
|
||||
|
||||
if (sym_addr != 0)
|
||||
{
|
||||
@ -983,19 +1010,19 @@
|
||||
+ if (debug_solib)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "enable_break: solib bp set\n");
|
||||
xfree (interp_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1486,6 +1768,8 @@ svr4_solib_create_inferior_hook (void)
|
||||
while (stop_signal != TARGET_SIGNAL_TRAP);
|
||||
stop_soon = NO_STOP_QUIETLY;
|
||||
@@ -1638,6 +1918,8 @@ svr4_solib_create_inferior_hook (void)
|
||||
while (tp->stop_signal != TARGET_SIGNAL_TRAP);
|
||||
inf->stop_soon = NO_STOP_QUIETLY;
|
||||
#endif /* defined(_SCO_DS) */
|
||||
+
|
||||
+ disable_breakpoints_at_startup (1);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1666,6 +1950,75 @@ svr4_lp64_fetch_link_map_offsets (void)
|
||||
@@ -1819,6 +2101,75 @@ svr4_lp64_fetch_link_map_offsets (void)
|
||||
|
||||
return lmp;
|
||||
}
|
||||
@ -1071,7 +1098,7 @@
|
||||
|
||||
|
||||
struct target_so_ops svr4_so_ops;
|
||||
@@ -1724,4 +2077,7 @@ _initialize_svr4_solib (void)
|
||||
@@ -1858,4 +2209,7 @@ _initialize_svr4_solib (void)
|
||||
svr4_so_ops.in_dynsym_resolve_code = svr4_in_dynsym_resolve_code;
|
||||
svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol;
|
||||
svr4_so_ops.same = svr4_same;
|
||||
@ -1079,9 +1106,11 @@
|
||||
+ add_info ("linkmap", info_linkmap_command,
|
||||
+ "Display the inferior's linkmap.");
|
||||
}
|
||||
--- ./gdb/solib.c 2008-01-07 16:19:58.000000000 +0100
|
||||
+++ ./gdb/solib.c 2008-09-01 17:16:12.000000000 +0200
|
||||
@@ -79,6 +79,8 @@ set_solib_ops (struct gdbarch *gdbarch,
|
||||
Index: gdb-6.8.50.20081209/gdb/solib.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/solib.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/solib.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -80,6 +80,8 @@ set_solib_ops (struct gdbarch *gdbarch,
|
||||
|
||||
/* external data declarations */
|
||||
|
||||
@ -1090,7 +1119,7 @@
|
||||
/* FIXME: gdbarch needs to control this variable, or else every
|
||||
configuration needs to call set_solib_ops. */
|
||||
struct target_so_ops *current_target_so_ops;
|
||||
@@ -102,6 +104,8 @@ The search path for loading non-absolute
|
||||
@@ -103,6 +105,8 @@ The search path for loading non-absolute
|
||||
value);
|
||||
}
|
||||
|
||||
@ -1099,7 +1128,7 @@
|
||||
/*
|
||||
|
||||
GLOBAL FUNCTION
|
||||
@@ -391,7 +395,6 @@ free_so (struct so_list *so)
|
||||
@@ -405,7 +409,6 @@ free_so (struct so_list *so)
|
||||
xfree (so);
|
||||
}
|
||||
|
||||
@ -1107,7 +1136,7 @@
|
||||
/* Return address of first so_list entry in master shared object list. */
|
||||
struct so_list *
|
||||
master_so_list (void)
|
||||
@@ -399,7 +402,6 @@ master_so_list (void)
|
||||
@@ -413,7 +416,6 @@ master_so_list (void)
|
||||
return so_list_head;
|
||||
}
|
||||
|
||||
@ -1115,7 +1144,7 @@
|
||||
/* A small stub to get us past the arg-passing pinhole of catch_errors. */
|
||||
|
||||
static int
|
||||
@@ -411,15 +413,40 @@ symbol_add_stub (void *arg)
|
||||
@@ -425,15 +427,40 @@ symbol_add_stub (void *arg)
|
||||
/* Have we already loaded this shared object? */
|
||||
ALL_OBJFILES (so->objfile)
|
||||
{
|
||||
@ -1159,7 +1188,7 @@
|
||||
free_section_addr_info (sap);
|
||||
|
||||
return (1);
|
||||
@@ -545,6 +572,10 @@ update_solib_list (int from_tty, struct
|
||||
@@ -565,6 +592,10 @@ update_solib_list (int from_tty, struct
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1170,7 +1199,7 @@
|
||||
if (! strcmp (gdb->so_original_name, i->so_original_name))
|
||||
break;
|
||||
}
|
||||
@@ -599,28 +630,7 @@ update_solib_list (int from_tty, struct
|
||||
@@ -619,28 +650,7 @@ update_solib_list (int from_tty, struct
|
||||
/* Fill in the rest of each of the `struct so_list' nodes. */
|
||||
for (i = inferior; i; i = i->next)
|
||||
{
|
||||
@ -1200,7 +1229,7 @@
|
||||
|
||||
/* Notify any observer that the shared object has been
|
||||
loaded now that we've added it to GDB's tables. */
|
||||
@@ -716,6 +726,41 @@ solib_add (char *pattern, int from_tty,
|
||||
@@ -736,6 +746,41 @@ solib_add (char *pattern, int from_tty,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1242,7 +1271,7 @@
|
||||
|
||||
/*
|
||||
|
||||
@@ -1035,4 +1080,12 @@ This takes precedence over the environme
|
||||
@@ -1053,4 +1098,12 @@ This takes precedence over the environme
|
||||
reload_shared_libraries,
|
||||
show_solib_search_path,
|
||||
&setlist, &showlist);
|
||||
@ -1255,8 +1284,10 @@
|
||||
+ NULL, NULL,
|
||||
+ &setdebuglist, &showdebuglist);
|
||||
}
|
||||
--- ./gdb/solist.h 2008-01-07 16:19:58.000000000 +0100
|
||||
+++ ./gdb/solist.h 2008-08-30 23:40:33.000000000 +0200
|
||||
Index: gdb-6.8.50.20081209/gdb/solist.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/solist.h 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/solist.h 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -61,6 +61,8 @@ struct so_list
|
||||
bfd *abfd;
|
||||
char symbols_loaded; /* flag: symbols read in yet? */
|
||||
@ -1266,31 +1297,21 @@
|
||||
struct objfile *objfile; /* objfile for loaded lib */
|
||||
struct section_table *sections;
|
||||
struct section_table *sections_end;
|
||||
@@ -127,9 +129,15 @@ void free_so (struct so_list *so);
|
||||
/* Return address of first so_list entry in master shared object list. */
|
||||
struct so_list *master_so_list (void);
|
||||
|
||||
+/* Return address of first so_list entry in master shared object list. */
|
||||
+struct so_list *master_so_list (void);
|
||||
+
|
||||
/* Find solib binary file and open it. */
|
||||
extern int solib_open (char *in_pathname, char **found_pathname);
|
||||
@@ -138,4 +140,10 @@ struct symbol *solib_global_lookup (cons
|
||||
const char *linkage_name,
|
||||
const domain_enum domain);
|
||||
|
||||
+/* Add the list of sections in so_list to the target to_sections. */
|
||||
+extern void add_to_target_sections (int, struct target_ops *, struct so_list *);
|
||||
+
|
||||
/* FIXME: gdbarch needs to control this variable */
|
||||
extern struct target_so_ops *current_target_so_ops;
|
||||
|
||||
@@ -140,4 +148,6 @@ struct symbol *solib_global_lookup (cons
|
||||
const domain_enum domain,
|
||||
struct symtab **symtab);
|
||||
|
||||
+/* Controls the printing of debugging output. */
|
||||
+extern int debug_solib;
|
||||
+
|
||||
#endif
|
||||
--- ./gdb/symfile-mem.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/symfile-mem.c 2008-08-30 23:40:33.000000000 +0200
|
||||
Index: gdb-6.8.50.20081209/gdb/symfile-mem.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/symfile-mem.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/symfile-mem.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -116,7 +116,7 @@ symbol_file_add_from_memory (struct bfd
|
||||
}
|
||||
|
||||
@ -1300,8 +1321,10 @@
|
||||
|
||||
/* This might change our ideas about frames already looked at. */
|
||||
reinit_frame_cache ();
|
||||
--- ./gdb/symfile.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/symfile.c 2008-08-30 23:41:48.000000000 +0200
|
||||
Index: gdb-6.8.50.20081209/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/symfile.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/symfile.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "readline/readline.h"
|
||||
#include "gdb_assert.h"
|
||||
@ -1310,7 +1333,7 @@
|
||||
#include "observer.h"
|
||||
#include "exec.h"
|
||||
#include "parser-defs.h"
|
||||
@@ -815,7 +816,7 @@ syms_from_objfile (struct objfile *objfi
|
||||
@@ -787,7 +788,7 @@ syms_from_objfile (struct objfile *objfi
|
||||
|
||||
/* Now either addrs or offsets is non-zero. */
|
||||
|
||||
@ -1319,16 +1342,16 @@
|
||||
{
|
||||
/* We will modify the main symbol table, make sure that all its users
|
||||
will be cleaned up if an error occurs during symbol reading. */
|
||||
@@ -843,7 +844,7 @@ syms_from_objfile (struct objfile *objfi
|
||||
@@ -815,7 +816,7 @@ syms_from_objfile (struct objfile *objfi
|
||||
|
||||
We no longer warn if the lowest section is not a text segment (as
|
||||
happens for the PA64 port. */
|
||||
- if (!mainline && addrs && addrs->other[0].name)
|
||||
+ if (/*!mainline &&*/ addrs && addrs->other[0].name)
|
||||
{
|
||||
asection *lower_sect;
|
||||
asection *sect;
|
||||
CORE_ADDR lower_offset = 0; /* Shut up the GCC warning. */
|
||||
@@ -1002,17 +1003,21 @@ new_symfile_objfile (struct objfile *obj
|
||||
@@ -916,17 +917,21 @@ new_symfile_objfile (struct objfile *obj
|
||||
/* If this is the main symbol file we have to clean up all users of the
|
||||
old main symbol file. Otherwise it is sufficient to fixup all the
|
||||
breakpoints that may have been redefined by this symbol file. */
|
||||
@ -1352,7 +1375,7 @@
|
||||
|
||||
/* We're done reading the symbol file; finish off complaints. */
|
||||
clear_complaints (&symfile_complaints, 0, verbo);
|
||||
@@ -1055,7 +1060,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
@@ -969,7 +974,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
interactively wiping out any existing symbols. */
|
||||
|
||||
if ((have_full_symbols () || have_partial_symbols ())
|
||||
@ -1361,7 +1384,7 @@
|
||||
&& from_tty
|
||||
&& !query ("Load new symbol table from \"%s\"? ", name))
|
||||
error (_("Not confirmed."));
|
||||
@@ -1242,6 +1247,10 @@ symbol_file_clear (int from_tty)
|
||||
@@ -1160,6 +1165,10 @@ symbol_file_clear (int from_tty)
|
||||
symfile_objfile->name)
|
||||
: !query (_("Discard symbol table? "))))
|
||||
error (_("Not confirmed."));
|
||||
@ -1372,7 +1395,7 @@
|
||||
free_all_objfiles ();
|
||||
|
||||
/* solib descriptors may have handles to objfiles. Since their
|
||||
@@ -3335,6 +3344,8 @@ reread_symbols (void)
|
||||
@@ -3259,6 +3268,8 @@ reread_symbols (void)
|
||||
/* Discard cleanups as symbol reading was successful. */
|
||||
discard_cleanups (old_cleanups);
|
||||
|
||||
@ -1381,7 +1404,7 @@
|
||||
/* If the mtime has changed between the time we set new_modtime
|
||||
and now, we *want* this to be out of date, so don't call stat
|
||||
again now. */
|
||||
@@ -3703,6 +3714,7 @@ clear_symtab_users (void)
|
||||
@@ -3628,6 +3639,7 @@ clear_symtab_users (void)
|
||||
breakpoint_re_set ();
|
||||
set_default_breakpoint (0, 0, 0, 0);
|
||||
clear_pc_function_cache ();
|
||||
@ -1389,9 +1412,11 @@
|
||||
observer_notify_new_objfile (NULL);
|
||||
|
||||
/* Clear globals which might have pointed into a removed objfile.
|
||||
--- ./gdb/varobj.c 2008-09-01 17:16:38.000000000 +0200
|
||||
+++ ./gdb/varobj.c 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -1075,6 +1075,62 @@ install_new_value (struct varobj *var, s
|
||||
Index: gdb-6.8.50.20081209/gdb/varobj.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/varobj.c 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/varobj.c 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -1116,6 +1116,62 @@ install_new_value (struct varobj *var, s
|
||||
return changed;
|
||||
}
|
||||
|
||||
@ -1454,12 +1479,27 @@
|
||||
/* Update the values for a variable and its children. This is a
|
||||
two-pronged attack. First, re-parse the value for the root's
|
||||
expression to see if it's changed. Then go all the way
|
||||
--- ./gdb/varobj.h 2008-01-30 08:17:31.000000000 +0100
|
||||
+++ ./gdb/varobj.h 2008-08-30 23:40:33.000000000 +0200
|
||||
@@ -122,4 +122,6 @@ extern void varobj_invalidate (void);
|
||||
Index: gdb-6.8.50.20081209/gdb/varobj.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/varobj.h 2008-12-14 14:55:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/varobj.h 2008-12-14 14:56:49.000000000 +0100
|
||||
@@ -141,4 +141,6 @@ extern int varobj_editable_p (struct var
|
||||
|
||||
extern int varobj_editable_p (struct varobj *var);
|
||||
extern int varobj_floating_p (struct varobj *var);
|
||||
|
||||
+extern void varobj_refresh(void);
|
||||
+
|
||||
#endif /* VAROBJ_H */
|
||||
Index: gdb-6.8.50.20081209/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/target.h 2008-12-14 11:52:54.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/target.h 2008-12-14 14:57:21.000000000 +0100
|
||||
@@ -524,7 +524,7 @@ struct target_ops
|
||||
Return -1 if there is insufficient buffer for a whole entry.
|
||||
Return 1 if an entry was read into *TYPEP and *VALP. */
|
||||
int (*to_auxv_parse) (struct target_ops *ops, gdb_byte **readptr,
|
||||
- gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp);
|
||||
+ gdb_byte *endptr, ULONGEST *typep, CORE_ADDR *valp);
|
||||
|
||||
/* Search SEARCH_SPACE_LEN bytes beginning at START_ADDR for the
|
||||
sequence of bytes in PATTERN with length PATTERN_LEN.
|
||||
|
@ -3,9 +3,11 @@
|
||||
* printcmd.c (build_address_symbolic): Find a section for the
|
||||
address.
|
||||
|
||||
--- ./gdb/printcmd.c.1 2004-11-24 17:54:27.316295608 -0500
|
||||
+++ ./gdb/printcmd.c 2004-11-24 17:59:20.069790312 -0500
|
||||
@@ -615,6 +615,20 @@
|
||||
Index: gdb-6.8.50.20081128/gdb/printcmd.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/printcmd.c 2008-12-04 01:36:05.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/printcmd.c 2008-12-04 01:37:18.000000000 +0100
|
||||
@@ -616,6 +616,14 @@ build_address_symbolic (CORE_ADDR addr,
|
||||
addr = overlay_mapped_address (addr, section);
|
||||
}
|
||||
}
|
||||
@ -16,13 +18,7 @@
|
||||
+ the normal section code (which almost always succeeds). */
|
||||
+ section = find_pc_overlay (addr);
|
||||
+ if (section == NULL)
|
||||
+ {
|
||||
+ struct obj_section *obj_section = find_pc_section (addr);
|
||||
+ if (obj_section == NULL)
|
||||
+ section = NULL;
|
||||
+ else
|
||||
+ section = obj_section->the_bfd_section;
|
||||
+ }
|
||||
+ section = find_pc_section (addr);
|
||||
|
||||
/* First try to find the address in the symbol table, then
|
||||
in the minsyms. Take the closest one. */
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-6.8/gdb/doc/gdb.texinfo
|
||||
Index: gdb-6.8.50.20081128/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/doc/gdb.texinfo 2008-03-26 19:38:21.000000000 +0100
|
||||
+++ gdb-6.8/gdb/doc/gdb.texinfo 2008-07-14 10:27:01.000000000 +0200
|
||||
@@ -983,6 +983,12 @@ Read each symbol file's entire symbol ta
|
||||
--- gdb-6.8.50.20081128.orig/gdb/doc/gdb.texinfo 2008-11-27 10:23:01.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/doc/gdb.texinfo 2008-12-02 19:07:35.000000000 +0100
|
||||
@@ -994,6 +994,12 @@ Read each symbol file's entire symbol ta
|
||||
the default, which is to read it incrementally as it is needed.
|
||||
This makes startup slower, but makes future operations faster.
|
||||
|
||||
@ -28,11 +28,11 @@ Index: gdb-6.8/gdb/doc/gdb.texinfo
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-6.8/gdb/main.c
|
||||
Index: gdb-6.8.50.20081128/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/main.c 2008-07-14 10:26:39.000000000 +0200
|
||||
+++ gdb-6.8/gdb/main.c 2008-07-14 10:27:01.000000000 +0200
|
||||
@@ -296,6 +296,7 @@ captured_main (void *data)
|
||||
--- gdb-6.8.50.20081128.orig/gdb/main.c 2008-12-02 18:07:21.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/main.c 2008-12-02 19:07:35.000000000 +0100
|
||||
@@ -295,6 +295,7 @@ captured_main (void *data)
|
||||
{"xdb", no_argument, &xdb_commands, 1},
|
||||
{"dbx", no_argument, &dbx_commands, 1},
|
||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||
@ -40,7 +40,7 @@ Index: gdb-6.8/gdb/main.c
|
||||
{"r", no_argument, &readnow_symbol_files, 1},
|
||||
{"quiet", no_argument, &quiet, 1},
|
||||
{"q", no_argument, &quiet, 1},
|
||||
@@ -947,6 +948,7 @@ Options:\n\n\
|
||||
@@ -895,6 +896,7 @@ Options:\n\n\
|
||||
fputs_unfiltered (_(" file.\n\
|
||||
--quiet Do not print version number on startup.\n\
|
||||
--readnow Fully read symbol files on first access.\n\
|
||||
@ -48,11 +48,11 @@ Index: gdb-6.8/gdb/main.c
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||
Index: gdb-6.8/gdb/symfile.c
|
||||
Index: gdb-6.8.50.20081128/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/symfile.c 2008-07-14 10:26:30.000000000 +0200
|
||||
+++ gdb-6.8/gdb/symfile.c 2008-07-14 10:27:01.000000000 +0200
|
||||
@@ -76,6 +76,7 @@ static void clear_symtab_users_cleanup (
|
||||
--- gdb-6.8.50.20081128.orig/gdb/symfile.c 2008-12-01 16:34:36.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/symfile.c 2008-12-02 19:07:35.000000000 +0100
|
||||
@@ -77,6 +77,7 @@ static void clear_symtab_users_cleanup (
|
||||
|
||||
/* Global variables owned by this file */
|
||||
int readnow_symbol_files; /* Read full symbols immediately */
|
||||
@ -60,32 +60,32 @@ Index: gdb-6.8/gdb/symfile.c
|
||||
|
||||
/* External variables and functions referenced. */
|
||||
|
||||
Index: gdb-6.8/gdb/dwarf2read.c
|
||||
Index: gdb-6.8.50.20081128/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/dwarf2read.c 2008-07-14 10:26:09.000000000 +0200
|
||||
+++ gdb-6.8/gdb/dwarf2read.c 2008-07-14 10:27:01.000000000 +0200
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "dwarf2loc.h"
|
||||
#include "cp-support.h"
|
||||
#include "hashtab.h"
|
||||
+#include "top.h"
|
||||
--- gdb-6.8.50.20081128.orig/gdb/dwarf2read.c 2008-11-15 19:49:50.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/dwarf2read.c 2008-12-02 19:08:53.000000000 +0100
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "command.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "addrmap.h"
|
||||
+#include "top.h"
|
||||
|
||||
@@ -1106,7 +1107,8 @@ dwarf2_has_info (struct objfile *objfile
|
||||
#include <fcntl.h>
|
||||
#include "gdb_string.h"
|
||||
@@ -1122,7 +1123,8 @@ dwarf2_has_info (struct objfile *objfile
|
||||
dwarf_loc_section = 0;
|
||||
|
||||
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
|
||||
- return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
|
||||
+ return (!readnever_symbol_files
|
||||
+ && dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
|
||||
+ return !readnever_symbol_files
|
||||
+ && dwarf_info_section != NULL && dwarf_abbrev_section != NULL;
|
||||
}
|
||||
|
||||
/* This function is mapped across the sections and remembers the
|
||||
Index: gdb-6.8/gdb/top.h
|
||||
/* When loading sections, we can either look for ".<name>", or for
|
||||
Index: gdb-6.8.50.20081128/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/top.h 2008-01-01 23:53:13.000000000 +0100
|
||||
+++ gdb-6.8/gdb/top.h 2008-07-14 10:27:01.000000000 +0200
|
||||
--- gdb-6.8.50.20081128.orig/gdb/top.h 2008-01-01 23:53:13.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/top.h 2008-12-02 19:07:35.000000000 +0100
|
||||
@@ -59,6 +59,7 @@ extern void set_prompt (char *);
|
||||
|
||||
/* From random places. */
|
||||
|
@ -1,3 +1,6 @@
|
||||
http://sourceware.org/ml/gdb-patches/2005-05/threads.html#00637
|
||||
Proposed upstream but never committed upstream.
|
||||
|
||||
2005-06-09 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* gdb.base/gdbinit.exp: New testcase.
|
||||
@ -16,11 +19,11 @@
|
||||
(source_command): Update documentation. Check permissions if
|
||||
FROM_TTY is -1.
|
||||
|
||||
Index: gdb-6.6/gdb/cli/cli-cmds.c
|
||||
Index: gdb-6.8.50.20081128/gdb/cli/cli-cmds.c
|
||||
===================================================================
|
||||
--- gdb-6.6.orig/gdb/cli/cli-cmds.c
|
||||
+++ gdb-6.6/gdb/cli/cli-cmds.c
|
||||
@@ -38,6 +38,7 @@
|
||||
--- gdb-6.8.50.20081128.orig/gdb/cli/cli-cmds.c 2008-12-07 10:12:24.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/cli/cli-cmds.c 2008-12-07 13:04:06.000000000 +0100
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "objfiles.h"
|
||||
#include "source.h"
|
||||
#include "disasm.h"
|
||||
@ -28,7 +31,7 @@ Index: gdb-6.6/gdb/cli/cli-cmds.c
|
||||
|
||||
#include "ui-out.h"
|
||||
|
||||
@@ -461,12 +462,31 @@ source_script (char *file, int from_tty)
|
||||
@@ -460,7 +461,7 @@ source_script (char *file, int from_tty)
|
||||
|
||||
if (fd == -1)
|
||||
{
|
||||
@ -36,23 +39,29 @@ Index: gdb-6.6/gdb/cli/cli-cmds.c
|
||||
+ if (from_tty > 0)
|
||||
perror_with_name (file);
|
||||
else
|
||||
return;
|
||||
{
|
||||
@@ -469,9 +470,33 @@ source_script (char *file, int from_tty)
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GETUID
|
||||
+ if (from_tty == -1)
|
||||
+ {
|
||||
+ struct stat statbuf;
|
||||
+
|
||||
+ if (fstat (fd, &statbuf) < 0)
|
||||
+ {
|
||||
+ perror_with_name (file);
|
||||
+ close (fd);
|
||||
+ return;
|
||||
+ /* Do not do_cleanups (old_cleanups) as FILE is allocated there.
|
||||
+ perror_with_name calls error which should call the cleanups. */
|
||||
+ perror_with_name (file);
|
||||
+ }
|
||||
+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH))
|
||||
+ {
|
||||
+ /* FILE gets freed by do_cleanups (old_cleanups). */
|
||||
+ warning (_("not using untrusted file \"%s\""), file);
|
||||
+ close (fd);
|
||||
+ do_cleanups (old_cleanups);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
@ -61,10 +70,14 @@ Index: gdb-6.6/gdb/cli/cli-cmds.c
|
||||
stream = fdopen (fd, FOPEN_RT);
|
||||
script_from_file (stream, file);
|
||||
|
||||
Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
+ /* FILE gets freed by do_cleanups (old_cleanups). */
|
||||
do_cleanups (old_cleanups);
|
||||
}
|
||||
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/gdbinit.exp 2008-12-07 10:13:01.000000000 +0100
|
||||
@@ -0,0 +1,98 @@
|
||||
+# Copyright 2005
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -164,17 +177,17 @@ Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
+}
|
||||
+
|
||||
+remote_exec build "rm .gdbinit"
|
||||
Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.sample
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/gdbinit.sample
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ gdb-6.6/gdb/testsuite/gdb.base/gdbinit.sample
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/gdbinit.sample 2008-12-07 10:13:01.000000000 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+echo "\nin gdbinit"
|
||||
Index: gdb-6.6/gdb/main.c
|
||||
Index: gdb-6.8.50.20081128/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-6.6.orig/gdb/main.c
|
||||
+++ gdb-6.6/gdb/main.c
|
||||
@@ -644,7 +644,7 @@ extern int gdbtk_test (char *);
|
||||
--- gdb-6.8.50.20081128.orig/gdb/main.c 2008-12-07 10:12:24.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/main.c 2008-12-07 12:58:37.000000000 +0100
|
||||
@@ -690,7 +690,7 @@ Excess command line arguments ignored. (
|
||||
|
||||
if (!inhibit_gdbinit)
|
||||
{
|
||||
@ -183,7 +196,7 @@ Index: gdb-6.6/gdb/main.c
|
||||
}
|
||||
|
||||
/* Do stats; no need to do them elsewhere since we'll only
|
||||
@@ -722,7 +722,7 @@ extern int gdbtk_test (char *);
|
||||
@@ -778,7 +778,7 @@ Can't attach to process and specify a co
|
||||
|| memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
|
||||
if (!inhibit_gdbinit)
|
||||
{
|
||||
@ -192,16 +205,3 @@ Index: gdb-6.6/gdb/main.c
|
||||
}
|
||||
|
||||
for (i = 0; i < ncmd; i++)
|
||||
Index: gdb-6.6/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.6.orig/gdb/Makefile.in
|
||||
+++ gdb-6.6/gdb/Makefile.in
|
||||
@@ -2927,7 +2927,7 @@ cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(d
|
||||
$(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \
|
||||
$(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \
|
||||
$(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \
|
||||
- $(tui_h)
|
||||
+ $(tui_h) $(gdb_stat_h)
|
||||
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
|
||||
cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
|
||||
$(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \
|
||||
|
@ -4,11 +4,11 @@
|
||||
print a warning.
|
||||
(find_separate_debug_file): Pass in the objfile's name.
|
||||
|
||||
Index: gdb-6.8/gdb/symfile.c
|
||||
Index: gdb-6.8.50.20081128/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/symfile.c 2008-01-29 23:47:20.000000000 +0100
|
||||
+++ gdb-6.8/gdb/symfile.c 2008-07-14 10:26:30.000000000 +0200
|
||||
@@ -1348,7 +1348,8 @@ get_debug_link_info (struct objfile *obj
|
||||
--- 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
|
||||
@ -17,23 +17,10 @@ Index: gdb-6.8/gdb/symfile.c
|
||||
+ const char *parent_name)
|
||||
{
|
||||
unsigned long file_crc = 0;
|
||||
int fd;
|
||||
@@ -1357,6 +1358,12 @@ separate_debug_file_exists (const char *
|
||||
bfd *abfd;
|
||||
@@ -1316,7 +1317,15 @@ separate_debug_file_exists (const char *
|
||||
|
||||
fd = open (name, O_RDONLY | O_BINARY);
|
||||
if (fd < 0)
|
||||
+ /* Fail silently, this preserves existing behavior. The
|
||||
+ assumption here is that the file wasn't found because there's
|
||||
+ no file to find (we shouldn't be printing warnings about
|
||||
+ missing debug info files when the user hasn't installed them).
|
||||
+ The alternative is to complain here - that better belongs in a
|
||||
+ warning. */
|
||||
return 0;
|
||||
|
||||
while ((count = read (fd, buffer, sizeof (buffer))) > 0)
|
||||
@@ -1364,7 +1371,16 @@ separate_debug_file_exists (const char *
|
||||
|
||||
close (fd);
|
||||
bfd_close (abfd);
|
||||
|
||||
- return crc == file_crc;
|
||||
+ if (crc != file_crc)
|
||||
@ -44,12 +31,11 @@ Index: gdb-6.8/gdb/symfile.c
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* No worries! */
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
char *debug_file_directory = NULL;
|
||||
@@ -1416,6 +1432,8 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1368,6 +1377,8 @@ find_separate_debug_file (struct objfile
|
||||
basename = get_debug_link_info (objfile, &crc32);
|
||||
|
||||
if (basename == NULL)
|
||||
@ -58,7 +44,7 @@ Index: gdb-6.8/gdb/symfile.c
|
||||
return NULL;
|
||||
|
||||
dir = xstrdup (objfile->name);
|
||||
@@ -1443,7 +1461,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1395,7 +1406,7 @@ find_separate_debug_file (struct objfile
|
||||
strcpy (debugfile, dir);
|
||||
strcat (debugfile, basename);
|
||||
|
||||
@ -67,7 +53,7 @@ Index: gdb-6.8/gdb/symfile.c
|
||||
{
|
||||
xfree (basename);
|
||||
xfree (dir);
|
||||
@@ -1456,7 +1474,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1408,7 +1419,7 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, "/");
|
||||
strcat (debugfile, basename);
|
||||
|
||||
@ -76,7 +62,7 @@ Index: gdb-6.8/gdb/symfile.c
|
||||
{
|
||||
xfree (basename);
|
||||
xfree (dir);
|
||||
@@ -1469,7 +1487,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1421,7 +1432,7 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, dir);
|
||||
strcat (debugfile, basename);
|
||||
|
||||
@ -85,7 +71,7 @@ Index: gdb-6.8/gdb/symfile.c
|
||||
{
|
||||
xfree (basename);
|
||||
xfree (dir);
|
||||
@@ -1488,7 +1506,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1440,7 +1451,7 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, "/");
|
||||
strcat (debugfile, basename);
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
2004-06-21 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* i386-tdep.c (i386_gdbarch_init): Move the the dwarf2-frame
|
||||
sniffer registration to after the signal trampoline frame sniffer.
|
||||
* amd64-tdep.c (amd64_init_abi): Include "dwarf2-frame.h".
|
||||
Register the dwarf2-frame sniffer, but after the signal trampoline
|
||||
sniffer.
|
||||
|
||||
Index: gdb-6.8/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/amd64-tdep.c 2008-03-04 20:49:39.000000000 +0100
|
||||
+++ gdb-6.8/gdb/amd64-tdep.c 2008-07-14 10:24:54.000000000 +0200
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "regcache.h"
|
||||
#include "regset.h"
|
||||
#include "symfile.h"
|
||||
-
|
||||
+#include "dwarf2-frame.h"
|
||||
#include "gdb_assert.h"
|
||||
|
||||
#include "amd64-tdep.h"
|
||||
@@ -1167,6 +1167,8 @@ amd64_init_abi (struct gdbarch_info info
|
||||
set_gdbarch_unwind_dummy_id (gdbarch, amd64_unwind_dummy_id);
|
||||
|
||||
frame_unwind_append_sniffer (gdbarch, amd64_sigtramp_frame_sniffer);
|
||||
+ /* Hook in the DWARF CFI frame unwinder after sigtramp. */
|
||||
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
|
||||
frame_unwind_append_sniffer (gdbarch, amd64_frame_sniffer);
|
||||
frame_base_set_default (gdbarch, &amd64_frame_base);
|
||||
|
||||
Index: gdb-6.8/gdb/i386-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/i386-tdep.c 2008-03-04 20:49:39.000000000 +0100
|
||||
+++ gdb-6.8/gdb/i386-tdep.c 2008-07-14 10:24:54.000000000 +0200
|
||||
@@ -2480,15 +2480,14 @@ i386_gdbarch_init (struct gdbarch_info i
|
||||
/* Helper for function argument information. */
|
||||
set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument);
|
||||
|
||||
- /* Hook in the DWARF CFI frame unwinder. */
|
||||
- frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
|
||||
-
|
||||
frame_base_set_default (gdbarch, &i386_frame_base);
|
||||
|
||||
/* Hook in ABI-specific overrides, if they have been registered. */
|
||||
gdbarch_init_osabi (info, gdbarch);
|
||||
|
||||
frame_unwind_append_sniffer (gdbarch, i386_sigtramp_frame_sniffer);
|
||||
+ /* Hook in the DWARF CFI frame unwinder after sigtramp. */
|
||||
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
|
||||
frame_unwind_append_sniffer (gdbarch, i386_frame_sniffer);
|
||||
|
||||
/* If we have a register mapping, enable the generic core file
|
@ -3,10 +3,10 @@
|
||||
* testsuite/gdb.threads/step-thread-exit.c: New testcase.
|
||||
* testsuite/gdb.threads/step-thread-exit.exp: Ditto.
|
||||
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c 2006-07-12 03:18:47.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c 2008-12-08 22:21:26.000000000 +0100
|
||||
@@ -0,0 +1,50 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -58,11 +58,11 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c
|
||||
+}
|
||||
+
|
||||
+
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp 2006-07-12 03:22:30.000000000 -0300
|
||||
@@ -0,0 +1,123 @@
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp 2008-12-08 22:22:14.000000000 +0100
|
||||
@@ -0,0 +1,130 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
@ -113,6 +113,11 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
||||
+ gdb_suppress_tests
|
||||
+}
|
||||
+
|
||||
+# FIXME: Currently the main thread will escape/exit before our thread finishes
|
||||
+# without this setting.
|
||||
+gdb_test "set scheduler-locking step"
|
||||
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking first"
|
||||
+
|
||||
+set sleep_line [expr [gdb_get_line_number "sleep"]]
|
||||
+set end_line [expr [gdb_get_line_number "thread_function_end"]]
|
||||
+
|
||||
@ -128,7 +133,7 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ -re "Stepped over thread exit.*Program received signal SIGSTOP.*$gdb_prompt $" {
|
||||
+ -re "\[Thread .* exited\].*Program received signal SIGSTOP.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ -re "start_thread.*$gdb_prompt $" {
|
||||
@ -150,6 +155,8 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
||||
+gdb_test "bt" "main.*$sleep_line.*" "backtrace after step 1"
|
||||
+
|
||||
+runto_main
|
||||
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking second"
|
||||
+
|
||||
+gdb_breakpoint "$sleep_line"
|
||||
+gdb_breakpoint "$end_line"
|
||||
+set test "continue to thread_function 2"
|
||||
@ -174,10 +181,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ -re "Stepped over thread exit.*Break.*$sleep_line.*$gdb_prompt $" {
|
||||
+ -re "\[Thread .* exited\].*Break.*$sleep_line.*$gdb_prompt $" {
|
||||
+ pass "$test (breakpoint hit)"
|
||||
+ }
|
||||
+ -re "Stepped over thread exit.*$gdb_prompt $" {
|
||||
+ -re "\[Thread .* exited\].*$gdb_prompt $" {
|
||||
+ pass "$test (breakpoint not hit)"
|
||||
+ }
|
||||
+ -re "start_thread.*$gdb_prompt $" {
|
||||
|
@ -4,9 +4,12 @@
|
||||
* gdb.base/move-dir.c: Ditto.
|
||||
* gdb.base/move-dir.h: Ditto.
|
||||
|
||||
--- gdb-6.3/gdb/testsuite/gdb.base/move-dir.c.fix Tue Jan 25 19:13:14 2005
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.c Tue Jan 25 19:12:40 2005
|
||||
@@ -0,0 +1,9 @@
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c 2008-12-07 23:57:41.000000000 +0100
|
||||
@@ -0,0 +1,10 @@
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include "move-dir.h"
|
||||
+
|
||||
@ -16,8 +19,10 @@
|
||||
+ other();
|
||||
+}
|
||||
+
|
||||
--- gdb-6.3/gdb/testsuite/gdb.base/move-dir.exp.fix Tue Jan 25 19:13:21 2005
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.exp Tue Jan 25 19:12:40 2005
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp 2008-12-07 10:13:01.000000000 +0100
|
||||
@@ -0,0 +1,67 @@
|
||||
+# Copyright 2005
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -86,8 +91,10 @@
|
||||
+
|
||||
+set timeout $oldtimeout
|
||||
+return 0
|
||||
--- gdb-6.3/gdb/testsuite/gdb.base/move-dir.h.fix Tue Jan 25 19:17:50 2005
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.h Tue Jan 25 19:19:20 2005
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h 2008-12-07 10:13:01.000000000 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
|
@ -1,35 +1,40 @@
|
||||
--- gdb-6.8/gdb/testsuite/configure.ac.orig 2007-10-25 22:30:26.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/configure.ac 2008-08-26 18:02:17.000000000 +0200
|
||||
@@ -116,5 +116,5 @@ AC_OUTPUT([Makefile \
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/configure.ac
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/configure.ac 2008-12-09 17:02:39.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/configure.ac 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -116,6 +116,6 @@ AC_OUTPUT([Makefile \
|
||||
gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
|
||||
gdb.fortran/Makefile gdb.server/Makefile \
|
||||
gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile \
|
||||
- gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
|
||||
+ gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
|
||||
gdb.python/Makefile \
|
||||
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
|
||||
--- gdb-6.8/gdb/testsuite/configure.orig 2007-12-29 15:01:30.000000000 +0100
|
||||
+++ gdb-6.8/gdb/testsuite/configure 2008-08-26 18:02:02.000000000 +0200
|
||||
@@ -3104,7 +3104,7 @@ done
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/configure
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/configure 2008-12-09 17:02:39.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/configure 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -3131,7 +3131,7 @@ done
|
||||
|
||||
|
||||
|
||||
- ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
+ ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
- ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
+ ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
@@ -3671,6 +3671,7 @@ do
|
||||
@@ -3698,6 +3698,7 @@ do
|
||||
"gdb.objc/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.objc/Makefile" ;;
|
||||
"gdb.opt/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
|
||||
"gdb.pascal/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
|
||||
+ "gdb.pie/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.pie/Makefile" ;;
|
||||
"gdb.python/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
|
||||
"gdb.threads/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
|
||||
"gdb.trace/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.trace/Makefile" ;;
|
||||
"gdb.xml/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.xml/Makefile" ;;
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/attach.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/attach.c 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach.c 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -51,10 +56,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/attach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/attach2.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/attach2.c 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach2.c 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -80,10 +85,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/attach2.c
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/break.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/break.c 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.c 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -0,0 +1,146 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -231,10 +236,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/break.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/break1.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break1.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/break1.c 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break1.c 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -280,10 +285,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/break1.c
|
||||
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
||||
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
||||
+#endif
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/coremaker.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/coremaker.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/coremaker.c 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/coremaker.c 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -0,0 +1,142 @@
|
||||
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
||||
+ Free Software Foundation, Inc.
|
||||
@ -427,10 +432,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/coremaker.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/attach.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/attach.exp 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach.exp 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -0,0 +1,432 @@
|
||||
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -689,7 +694,7 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/attach.exp
|
||||
+ #
|
||||
+ send_gdb "tbreak 19\n"
|
||||
+ gdb_expect {
|
||||
+ -re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $"\
|
||||
+ -re "reakpoint .*at.*$srcfile, line 19.*$gdb_prompt $"\
|
||||
+ {pass "after attach2, set tbreak postloop"}
|
||||
+ -re "$gdb_prompt $" {fail "after attach2, set tbreak postloop"}
|
||||
+ timeout {fail "(timeout) after attach2, set tbreak postloop"}
|
||||
@ -864,10 +869,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/attach.exp
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/break.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/break.exp 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp 2008-12-09 17:24:34.000000000 +0100
|
||||
@@ -0,0 +1,973 @@
|
||||
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
+# 2000, 2002, 2003, 2004
|
||||
@ -1144,13 +1149,13 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/break.exp
|
||||
+# test temporary breakpoint at function
|
||||
+#
|
||||
+
|
||||
+gdb_test "tbreak main" "Breakpoint.*at.* file .*$srcfile, line.*" "Temporary breakpoint function"
|
||||
+gdb_test "tbreak main" "reakpoint.*at.* file .*$srcfile, line.*" "Temporary breakpoint function"
|
||||
+
|
||||
+#
|
||||
+# test break at function in file
|
||||
+#
|
||||
+
|
||||
+gdb_test "tbreak $srcfile:factorial" "Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
+gdb_test "tbreak $srcfile:factorial" "reakpoint.*at.* file .*$srcfile, line.*" \
|
||||
+ "Temporary breakpoint function in file"
|
||||
+
|
||||
+#
|
||||
@ -1158,25 +1163,25 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/break.exp
|
||||
+#
|
||||
+send_gdb "tbreak $bp_location1\n"
|
||||
+gdb_expect {
|
||||
+ -re "Breakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
|
||||
+ -re "reakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
|
||||
+ -re ".*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
|
||||
+ timeout { fail "breakpoint line number #1 (timeout)" }
|
||||
+}
|
||||
+
|
||||
+gdb_test "tbreak $bp_location6" "Breakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
|
||||
+gdb_test "tbreak $bp_location6" "reakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
|
||||
+
|
||||
+#
|
||||
+# test break at line number in file
|
||||
+#
|
||||
+send_gdb "tbreak $srcfile:$bp_location2\n"
|
||||
+gdb_expect {
|
||||
+ -re "Breakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
|
||||
+ -re "reakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
|
||||
+ -re ".*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
|
||||
+ timeout { fail "Temporary breakpoint line number in file #1 (timeout)" }
|
||||
+}
|
||||
+
|
||||
+set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
|
||||
+gdb_test "tbreak $srcfile:$bp_location11" "Breakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
|
||||
+gdb_test "tbreak $srcfile:$bp_location11" "reakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
|
||||
+
|
||||
+#
|
||||
+# check to see what breakpoints are set (temporary this time)
|
||||
@ -1842,10 +1847,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/break.exp
|
||||
+ send_gdb "set args main\n"
|
||||
+ gdb_expect -re ".*$gdb_prompt $" {}
|
||||
+}
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/corefile.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/corefile.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/corefile.exp 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/corefile.exp 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -0,0 +1,243 @@
|
||||
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -2090,10 +2095,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.pie/corefile.exp
|
||||
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\).*" "up in corefile.exp (reinit)"
|
||||
+
|
||||
+gdb_test "core" "No core file now."
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.pie/Makefile.in
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/Makefile.in
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.pie/Makefile.in 2006-07-07 01:13:23.000000000 -0300
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/Makefile.in 2008-12-09 17:02:55.000000000 +0100
|
||||
@@ -0,0 +1,19 @@
|
||||
+VPATH = @srcdir@
|
||||
+srcdir = @srcdir@
|
||||
|
@ -1,29 +0,0 @@
|
||||
2004-12-13 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* dwarf2read.c (read_type_die): Ensure that structures, unions,
|
||||
enumerations, and base types create symbols.
|
||||
|
||||
Index: gdb-6.8/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/dwarf2read.c 2008-03-10 15:18:10.000000000 +0100
|
||||
+++ gdb-6.8/gdb/dwarf2read.c 2008-07-14 10:26:01.000000000 +0200
|
||||
@@ -7711,9 +7711,11 @@ read_type_die (struct die_info *die, str
|
||||
case DW_TAG_structure_type:
|
||||
case DW_TAG_union_type:
|
||||
read_structure_type (die, cu);
|
||||
+ process_structure_scope (die, cu);
|
||||
break;
|
||||
case DW_TAG_enumeration_type:
|
||||
read_enumeration_type (die, cu);
|
||||
+ process_enumeration_scope (die, cu);
|
||||
break;
|
||||
case DW_TAG_subprogram:
|
||||
case DW_TAG_subroutine_type:
|
||||
@@ -7751,6 +7753,7 @@ read_type_die (struct die_info *die, str
|
||||
break;
|
||||
case DW_TAG_base_type:
|
||||
read_base_type (die, cu);
|
||||
+ new_symbol (die, die->type, cu);
|
||||
break;
|
||||
case DW_TAG_unspecified_type:
|
||||
read_unspecified_type (die, cu);
|
@ -1,104 +1,207 @@
|
||||
[base]
|
||||
http://sourceware.org/ml/gdb-patches/2008-12/msg00243.html
|
||||
|
||||
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Check return values of functions declared with warn_unused_result
|
||||
attribute in GLIBC 2.8.
|
||||
* cli/cli-cmds.c (pwd_command): Check return value from getcwd.
|
||||
* inflow.c (check_syscall): New function.
|
||||
(new_tty): Use check_syscall to check return values from open and dup.
|
||||
* linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
|
||||
* main.c (captured_main): Call cwd after setting up gdb_stderr;
|
||||
check for errors from getcwd.
|
||||
* mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
|
||||
* ui-file.c (stdio_file_write): Check return value from fwrite.
|
||||
(stdio_file_fputs): Check return value from fputs.
|
||||
* utils.c (internal_vproblem): abort if last-ditch error message
|
||||
write fails.
|
||||
|
||||
Port to GDB-6.7.
|
||||
[ +linespec.c: Fedora patch. ]
|
||||
[ +top.c: Fedora patch. ]
|
||||
|
||||
Index: gdb-6.7/gdb/mi/mi-cmd-env.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/mi/mi-cmd-env.c 2007-10-14 23:42:39.000000000 +0200
|
||||
+++ gdb-6.7/gdb/mi/mi-cmd-env.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -78,7 +78,8 @@ mi_cmd_env_pwd (char *command, char **ar
|
||||
---
|
||||
gdb/ChangeLog | 14 ++++++++++++++
|
||||
gdb/cli/cli-cmds.c | 4 +++-
|
||||
gdb/inflow.c | 22 ++++++++++++++--------
|
||||
gdb/linux-nat.c | 6 ++++--
|
||||
gdb/main.c | 12 +++++++++---
|
||||
gdb/mi/mi-cmd-env.c | 5 ++++-
|
||||
gdb/ui-file.c | 6 ++++--
|
||||
gdb/utils.c | 8 +++++++-
|
||||
8 files changed, 59 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
|
||||
index 806a68a..b80bdfc 100644
|
||||
--- a/gdb/cli/cli-cmds.c
|
||||
+++ b/gdb/cli/cli-cmds.c
|
||||
@@ -323,7 +323,9 @@ pwd_command (char *args, int from_tty)
|
||||
{
|
||||
if (args)
|
||||
error (_("The \"pwd\" command does not take an argument: %s"), args);
|
||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
||||
+ if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
|
||||
+ error (_("Error finding name of working directory: %s"),
|
||||
+ safe_strerror (errno));
|
||||
|
||||
if (strcmp (gdb_dirbuf, current_directory) != 0)
|
||||
printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
|
||||
diff --git a/gdb/inflow.c b/gdb/inflow.c
|
||||
index e82514e..7ecb5ab 100644
|
||||
--- a/gdb/inflow.c
|
||||
+++ b/gdb/inflow.c
|
||||
@@ -523,6 +523,16 @@ new_tty_prefork (const char *ttyname)
|
||||
inferior_thisrun_terminal = ttyname;
|
||||
}
|
||||
|
||||
+static void
|
||||
+check_syscall (const char *msg, int result)
|
||||
+{
|
||||
+ if (result < 0)
|
||||
+ {
|
||||
+ print_sys_errmsg (msg, errno);
|
||||
+ _exit (1);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void
|
||||
new_tty (void)
|
||||
{
|
||||
@@ -549,27 +559,23 @@ new_tty (void)
|
||||
|
||||
/* Now open the specified new terminal. */
|
||||
tty = open (inferior_thisrun_terminal, O_RDWR | O_NOCTTY);
|
||||
- if (tty == -1)
|
||||
- {
|
||||
- print_sys_errmsg (inferior_thisrun_terminal, errno);
|
||||
- _exit (1);
|
||||
- }
|
||||
+ check_syscall (inferior_thisrun_terminal, tty);
|
||||
|
||||
/* Avoid use of dup2; doesn't exist on all systems. */
|
||||
if (tty != 0)
|
||||
{
|
||||
close (0);
|
||||
- dup (tty);
|
||||
+ check_syscall ("dup'ing tty into fd 0", dup (tty));
|
||||
}
|
||||
if (tty != 1)
|
||||
{
|
||||
close (1);
|
||||
- dup (tty);
|
||||
+ check_syscall ("dup'ing tty into fd 1", dup (tty));
|
||||
}
|
||||
if (tty != 2)
|
||||
{
|
||||
close (2);
|
||||
- dup (tty);
|
||||
+ check_syscall ("dup'ing tty into fd 2", dup (tty));
|
||||
}
|
||||
|
||||
#ifdef TIOCSCTTY
|
||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
index 913bfec..a829eb8 100644
|
||||
--- a/gdb/linux-nat.c
|
||||
+++ b/gdb/linux-nat.c
|
||||
@@ -3666,8 +3666,10 @@ linux_nat_info_proc_cmd (char *args, int from_tty)
|
||||
if ((procfile = fopen (fname1, "r")) != NULL)
|
||||
{
|
||||
struct cleanup *cleanup = make_cleanup_fclose (procfile);
|
||||
- fgets (buffer, sizeof (buffer), procfile);
|
||||
- printf_filtered ("cmdline = '%s'\n", buffer);
|
||||
+ if (fgets (buffer, sizeof (buffer), procfile))
|
||||
+ printf_filtered ("cmdline = '%s'\n", buffer);
|
||||
+ else
|
||||
+ warning (_("unable to read '/proc/%lld/cmdline'"), pid);
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
else
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index a53002d..a9fd988 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -195,9 +195,6 @@ captured_main (void *data)
|
||||
line[0] = '\0'; /* Terminate saved (now empty) cmd line */
|
||||
instream = stdin;
|
||||
|
||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
||||
- current_directory = gdb_dirbuf;
|
||||
-
|
||||
gdb_stdout = stdio_fileopen (stdout);
|
||||
gdb_stderr = stdio_fileopen (stderr);
|
||||
gdb_stdlog = gdb_stderr; /* for moment */
|
||||
@@ -206,6 +203,15 @@ captured_main (void *data)
|
||||
gdb_stdtargerr = gdb_stderr; /* for moment */
|
||||
gdb_stdtargin = gdb_stdin; /* for moment */
|
||||
|
||||
+ if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
|
||||
+ /* Don't use *_filtered or warning() (which relies on
|
||||
+ current_target) until after initialize_all_files(). */
|
||||
+ fprintf_unfiltered (gdb_stderr,
|
||||
+ _("%s: warning: error finding working directory: %s\n"),
|
||||
+ argv[0], safe_strerror (errno));
|
||||
+
|
||||
+ current_directory = gdb_dirbuf;
|
||||
+
|
||||
/* Set the sysroot path. */
|
||||
#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
|
||||
gdb_sysroot = make_relative_prefix (argv[0], BINDIR, TARGET_SYSTEM_ROOT);
|
||||
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
|
||||
index 327ddc5..0103153 100644
|
||||
--- a/gdb/mi/mi-cmd-env.c
|
||||
+++ b/gdb/mi/mi-cmd-env.c
|
||||
@@ -78,7 +78,10 @@ mi_cmd_env_pwd (char *command, char **argv, int argc)
|
||||
|
||||
/* Otherwise the mi level is 2 or higher. */
|
||||
|
||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
||||
+ /* Unused result. */
|
||||
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
||||
+ if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
|
||||
+ error (_("mi_cmd_env_pwd: error finding name of working directory: %s"),
|
||||
+ safe_strerror (errno));
|
||||
+
|
||||
ui_out_field_string (uiout, "cwd", gdb_dirbuf);
|
||||
|
||||
return MI_CMD_DONE;
|
||||
Index: gdb-6.7/gdb/testsuite/gdb.base/move-dir.h
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/testsuite/gdb.base/move-dir.h 2007-10-14 23:31:22.000000000 +0200
|
||||
+++ gdb-6.7/gdb/testsuite/gdb.base/move-dir.h 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
|
||||
void other() {
|
||||
const char* ostring = "other";
|
||||
Index: gdb-6.7/gdb/testsuite/gdb.base/sigrepeat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/testsuite/gdb.base/sigrepeat.c 2007-08-23 20:08:49.000000000 +0200
|
||||
+++ gdb-6.7/gdb/testsuite/gdb.base/sigrepeat.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
+#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
static volatile int done[2];
|
||||
Index: gdb-6.7/gdb/s390-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/s390-tdep.c 2007-10-02 21:26:42.000000000 +0200
|
||||
+++ gdb-6.7/gdb/s390-tdep.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -2214,6 +2214,9 @@ s390_return_value (struct gdbarch *gdbar
|
||||
case RETURN_VALUE_STRUCT_CONVENTION:
|
||||
error (_("Cannot set function return value."));
|
||||
break;
|
||||
+
|
||||
+ default:
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
else if (out)
|
||||
@@ -2246,6 +2249,9 @@ s390_return_value (struct gdbarch *gdbar
|
||||
case RETURN_VALUE_STRUCT_CONVENTION:
|
||||
error (_("Function return value unknown."));
|
||||
break;
|
||||
+
|
||||
+ default:
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
Index: gdb-6.7/gdb/f-exp.y
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/f-exp.y 2007-06-12 17:33:03.000000000 +0200
|
||||
+++ gdb-6.7/gdb/f-exp.y 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -567,6 +567,8 @@ ptype : typebase
|
||||
case tp_function:
|
||||
follow_type = lookup_function_type (follow_type);
|
||||
break;
|
||||
+ default:
|
||||
+ break;
|
||||
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
|
||||
index 9a1d892..2ed304f 100644
|
||||
--- a/gdb/ui-file.c
|
||||
+++ b/gdb/ui-file.c
|
||||
@@ -481,7 +481,8 @@ stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
|
||||
if (stdio->magic != &stdio_file_magic)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("stdio_file_write: bad magic number"));
|
||||
- fwrite (buf, length_buf, 1, stdio->file);
|
||||
+ if (fwrite (buf, length_buf, 1, stdio->file) != 1)
|
||||
+ error ("stdio_file_write: %s", safe_strerror (errno));
|
||||
}
|
||||
$$ = follow_type;
|
||||
|
||||
static void
|
||||
@@ -491,7 +492,8 @@ stdio_file_fputs (const char *linebuffer, struct ui_file *file)
|
||||
if (stdio->magic != &stdio_file_magic)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("stdio_file_fputs: bad magic number"));
|
||||
- fputs (linebuffer, stdio->file);
|
||||
+ if (fputs (linebuffer, stdio->file) == EOF)
|
||||
+ error ("stdio_file_fputs: %s", safe_strerror (errno));
|
||||
}
|
||||
Index: gdb-6.7/gdb/source.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/source.c 2007-08-23 20:08:38.000000000 +0200
|
||||
+++ gdb-6.7/gdb/source.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -170,7 +170,7 @@ get_current_source_symtab_and_line (void
|
||||
void
|
||||
set_default_source_symtab_and_line (void)
|
||||
{
|
||||
- struct symtab_and_line cursal;
|
||||
+ struct symtab_and_line cursal = {0};
|
||||
|
||||
if (!have_full_symbols () && !have_partial_symbols ())
|
||||
error (_("No symbol table is loaded. Use the \"file\" command."));
|
||||
@@ -1439,7 +1439,7 @@ static void
|
||||
line_info (char *arg, int from_tty)
|
||||
{
|
||||
struct symtabs_and_lines sals;
|
||||
- struct symtab_and_line sal;
|
||||
+ struct symtab_and_line sal = {0};
|
||||
CORE_ADDR start_pc, end_pc;
|
||||
int i;
|
||||
|
||||
static int
|
||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
index d14009f..725f00b 100644
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -865,7 +865,13 @@ internal_vproblem (struct internal_problem *problem,
|
||||
abort (); /* NOTE: GDB has only three calls to abort(). */
|
||||
default:
|
||||
dejavu = 3;
|
||||
- write (STDERR_FILENO, msg, sizeof (msg));
|
||||
+ /* Newer GLIBC versions put the warn_unused_result attribute
|
||||
+ on write, but this is one of those rare cases where
|
||||
+ ignoring the return value is correct. Casting to (void)
|
||||
+ does not fix this problem. This is the solution suggested
|
||||
+ at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509. */
|
||||
+ if (write (STDERR_FILENO, msg, sizeof (msg)) != sizeof (msg))
|
||||
+ abort ();
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
Index: gdb-6.7/gdb/linespec.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/linespec.c 2007-10-14 23:31:03.000000000 +0200
|
||||
@ -112,208 +215,6 @@ Index: gdb-6.7/gdb/linespec.c
|
||||
struct symbol *sym = NULL;
|
||||
int i1; /* Counter for the symbol array. */
|
||||
struct symbol **sym_arr = alloca (total_number_of_methods (t)
|
||||
Index: gdb-6.7/gdb/gdb-events.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/gdb-events.c 2007-08-23 20:08:31.000000000 +0200
|
||||
+++ gdb-6.7/gdb/gdb-events.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -319,6 +319,8 @@ gdb_events_deliver (struct gdb_events *v
|
||||
case architecture_changed:
|
||||
vector->architecture_changed ();
|
||||
break;
|
||||
+ default:
|
||||
+ break;
|
||||
}
|
||||
delivering_events = event->next;
|
||||
xfree (event);
|
||||
Index: gdb-6.7/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/dwarf2read.c 2007-10-14 23:31:22.000000000 +0200
|
||||
+++ gdb-6.7/gdb/dwarf2read.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -9585,6 +9585,7 @@ dwarf_decode_macros (struct line_header
|
||||
for (;;)
|
||||
{
|
||||
enum dwarf_macinfo_record_type macinfo_type;
|
||||
+ int tmp;
|
||||
|
||||
/* Do we at least have room for a macinfo type byte? */
|
||||
if (mac_ptr >= mac_end)
|
||||
@@ -9596,13 +9597,16 @@ dwarf_decode_macros (struct line_header
|
||||
macinfo_type = read_1_byte (abfd, mac_ptr);
|
||||
mac_ptr++;
|
||||
|
||||
+ /* Check for a zero macinfo type which indicates the end of the macro
|
||||
+ information. We do this as the compiler may warn us if we
|
||||
+ try and look for 0 in the switch below because 0 is not
|
||||
+ an enumerated value. */
|
||||
+ tmp = (int)macinfo_type;
|
||||
+ if (tmp == 0)
|
||||
+ return;
|
||||
+
|
||||
switch (macinfo_type)
|
||||
{
|
||||
- /* A zero macinfo type indicates the end of the macro
|
||||
- information. */
|
||||
- case 0:
|
||||
- return;
|
||||
-
|
||||
case DW_MACINFO_define:
|
||||
case DW_MACINFO_undef:
|
||||
{
|
||||
Index: gdb-6.7/gdb/stabsread.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/stabsread.c 2007-10-09 00:44:32.000000000 +0200
|
||||
+++ gdb-6.7/gdb/stabsread.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -1842,7 +1842,8 @@ again:
|
||||
struct type *domain = read_type (pp, objfile);
|
||||
struct type *return_type;
|
||||
struct field *args;
|
||||
- int nargs, varargs;
|
||||
+ int nargs = 0;
|
||||
+ int varargs = 0;
|
||||
|
||||
if (**pp != ',')
|
||||
/* Invalid member type data format. */
|
||||
Index: gdb-6.7/gdb/dwarf2expr.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/dwarf2expr.c 2007-08-23 20:08:28.000000000 +0200
|
||||
+++ gdb-6.7/gdb/dwarf2expr.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -594,6 +594,8 @@ execute_stack_op (struct dwarf_expr_cont
|
||||
op_ptr = read_uleb128 (op_ptr, op_end, ®);
|
||||
result += reg;
|
||||
break;
|
||||
+ default:
|
||||
+ break;
|
||||
}
|
||||
break;
|
||||
|
||||
Index: gdb-6.7/gdb/varobj.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/varobj.c 2007-10-13 05:29:58.000000000 +0200
|
||||
+++ gdb-6.7/gdb/varobj.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -347,8 +347,7 @@ static struct language_specific language
|
||||
c_value_of_variable}
|
||||
,
|
||||
/* C */
|
||||
- {
|
||||
- vlang_c,
|
||||
+ {vlang_c,
|
||||
c_number_of_children,
|
||||
c_name_of_variable,
|
||||
c_name_of_child,
|
||||
@@ -360,8 +359,7 @@ static struct language_specific language
|
||||
c_value_of_variable}
|
||||
,
|
||||
/* C++ */
|
||||
- {
|
||||
- vlang_cplus,
|
||||
+ {vlang_cplus,
|
||||
cplus_number_of_children,
|
||||
cplus_name_of_variable,
|
||||
cplus_name_of_child,
|
||||
@@ -373,8 +371,7 @@ static struct language_specific language
|
||||
cplus_value_of_variable}
|
||||
,
|
||||
/* Java */
|
||||
- {
|
||||
- vlang_java,
|
||||
+ {vlang_java,
|
||||
java_number_of_children,
|
||||
java_name_of_variable,
|
||||
java_name_of_child,
|
||||
Index: gdb-6.7/gdb/doublest.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/doublest.c 2007-08-23 20:08:28.000000000 +0200
|
||||
+++ gdb-6.7/gdb/doublest.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -92,15 +92,10 @@ get_field (const bfd_byte *data, enum fl
|
||||
{
|
||||
result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
|
||||
cur_bitshift += FLOATFORMAT_CHAR_BIT;
|
||||
- switch (order)
|
||||
- {
|
||||
- case floatformat_little:
|
||||
- ++cur_byte;
|
||||
- break;
|
||||
- case floatformat_big:
|
||||
- --cur_byte;
|
||||
- break;
|
||||
- }
|
||||
+ if (order == floatformat_little)
|
||||
+ ++cur_byte;
|
||||
+ else
|
||||
+ --cur_byte;
|
||||
}
|
||||
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
|
||||
/* Mask out bits which are not part of the field */
|
||||
Index: gdb-6.7/gdb/cli/cli-cmds.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/cli/cli-cmds.c 2007-08-23 20:08:47.000000000 +0200
|
||||
+++ gdb-6.7/gdb/cli/cli-cmds.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -320,7 +320,8 @@ pwd_command (char *args, int from_tty)
|
||||
{
|
||||
if (args)
|
||||
error (_("The \"pwd\" command does not take an argument: %s"), args);
|
||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
||||
+ /* Unused result. */
|
||||
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
||||
|
||||
if (strcmp (gdb_dirbuf, current_directory) != 0)
|
||||
printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
|
||||
Index: gdb-6.7/gdb/inflow.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/inflow.c 2007-08-23 20:08:35.000000000 +0200
|
||||
+++ gdb-6.7/gdb/inflow.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -547,17 +547,20 @@ new_tty (void)
|
||||
if (tty != 0)
|
||||
{
|
||||
close (0);
|
||||
- dup (tty);
|
||||
+ /* Unused result. */
|
||||
+ 1 && dup (tty);
|
||||
}
|
||||
if (tty != 1)
|
||||
{
|
||||
close (1);
|
||||
- dup (tty);
|
||||
+ /* Unused result. */
|
||||
+ 1 && dup (tty);
|
||||
}
|
||||
if (tty != 2)
|
||||
{
|
||||
close (2);
|
||||
- dup (tty);
|
||||
+ /* Unused result. */
|
||||
+ 1 && dup (tty);
|
||||
}
|
||||
if (tty > 2)
|
||||
close (tty);
|
||||
Index: gdb-6.7/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/linux-nat.c 2007-10-14 23:31:22.000000000 +0200
|
||||
+++ gdb-6.7/gdb/linux-nat.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -2895,7 +2895,8 @@ linux_nat_info_proc_cmd (char *args, int
|
||||
sprintf (fname1, "/proc/%lld/cmdline", pid);
|
||||
if ((procfile = fopen (fname1, "r")) != NULL)
|
||||
{
|
||||
- fgets (buffer, sizeof (buffer), procfile);
|
||||
+ /* Unused result. */
|
||||
+ 1 && fgets (buffer, sizeof (buffer), procfile);
|
||||
printf_filtered ("cmdline = '%s'\n", buffer);
|
||||
fclose (procfile);
|
||||
}
|
||||
Index: gdb-6.7/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/main.c 2007-08-23 20:08:36.000000000 +0200
|
||||
+++ gdb-6.7/gdb/main.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -193,7 +193,8 @@ captured_main (void *data)
|
||||
line[0] = '\0'; /* Terminate saved (now empty) cmd line */
|
||||
instream = stdin;
|
||||
|
||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
||||
+ /* Unused result. */
|
||||
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
||||
current_directory = gdb_dirbuf;
|
||||
|
||||
gdb_stdout = stdio_fileopen (stdout);
|
||||
Index: gdb-6.7/gdb/top.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/top.c 2007-10-14 23:38:27.000000000 +0200
|
||||
@ -328,62 +229,3 @@ Index: gdb-6.7/gdb/top.c
|
||||
current_directory = gdb_dirbuf;
|
||||
|
||||
#ifdef __MSDOS__
|
||||
Index: gdb-6.7/gdb/ui-file.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/ui-file.c 2007-08-23 20:08:46.000000000 +0200
|
||||
+++ gdb-6.7/gdb/ui-file.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -480,7 +480,8 @@ stdio_file_write (struct ui_file *file,
|
||||
if (stdio->magic != &stdio_file_magic)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("stdio_file_write: bad magic number"));
|
||||
- fwrite (buf, length_buf, 1, stdio->file);
|
||||
+ /* Unused result. */
|
||||
+ 1 && fwrite (buf, length_buf, 1, stdio->file);
|
||||
}
|
||||
|
||||
static void
|
||||
Index: gdb-6.7/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/utils.c 2007-08-23 20:08:46.000000000 +0200
|
||||
+++ gdb-6.7/gdb/utils.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -716,7 +716,8 @@ internal_vproblem (struct internal_probl
|
||||
abort (); /* NOTE: GDB has only three calls to abort(). */
|
||||
default:
|
||||
dejavu = 3;
|
||||
- write (STDERR_FILENO, msg, sizeof (msg));
|
||||
+ /* Unused result. */
|
||||
+ 1 && write (STDERR_FILENO, msg, sizeof (msg));
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
Index: gdb-6.7/gdb/gdbserver/gdbreplay.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/gdbserver/gdbreplay.c 2007-08-23 20:08:48.000000000 +0200
|
||||
+++ gdb-6.7/gdb/gdbserver/gdbreplay.c 2007-10-14 23:42:39.000000000 +0200
|
||||
@@ -356,7 +356,12 @@ expect (FILE *fp)
|
||||
{
|
||||
break;
|
||||
}
|
||||
- read (remote_desc, &fromgdb, 1);
|
||||
+ if (read (remote_desc, &fromgdb, 1) != 1)
|
||||
+ {
|
||||
+ /* Error gets reported below. */
|
||||
+ fromlog = 0;
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
while (fromlog == fromgdb);
|
||||
if (fromlog != EOL)
|
||||
@@ -383,7 +388,11 @@ play (FILE *fp)
|
||||
while ((fromlog = logchar (fp)) != EOL)
|
||||
{
|
||||
ch = fromlog;
|
||||
- write (remote_desc, &ch, 1);
|
||||
+ if (write (remote_desc, &ch, 1) != 1)
|
||||
+ {
|
||||
+ sync_error (fp, "Sync error during write of gdb packet", ch, 0);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=181390
|
||||
|
||||
* gdb/utils.c (paddress): Disable cutting of the printed addresses
|
||||
to the target's address bit size; user wants to see everything.
|
||||
* gdb/value.c (value_as_address_core): Original `value_as_address'.
|
||||
* gdb/value.c (value_as_address1): Original `value_as_address'.
|
||||
(value_as_address): New `value_as_address' wrapper - cut memory address
|
||||
to the target's address bit size, bugreport by John Reiser.
|
||||
|
||||
@ -56,7 +56,7 @@ Index: gdb-6.7.50.20080227/gdb/value.c
|
||||
-value_as_address (struct value *val)
|
||||
+/* See `value_as_address' below - core of value to C pointer extraction. */
|
||||
+static CORE_ADDR
|
||||
+value_as_address_core (struct value *val)
|
||||
+value_as_address1 (struct value *val)
|
||||
{
|
||||
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
|
||||
whether we want this to be true eventually. */
|
||||
@ -74,7 +74,7 @@ Index: gdb-6.7.50.20080227/gdb/value.c
|
||||
+ CORE_ADDR addr;
|
||||
+ int addr_bit;
|
||||
+
|
||||
+ addr = value_as_address_core (val);
|
||||
+ addr = value_as_address1 (val);
|
||||
+
|
||||
+ /* Truncate address to the size of a target address, avoiding shifts
|
||||
+ larger or equal than the width of a CORE_ADDR. The local
|
||||
|
@ -30,11 +30,11 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
|
||||
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
||||
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
|
||||
Index: gdb-6.8.50.20081128/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/dwarf2read.c 2008-02-19 17:27:21.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/dwarf2read.c 2008-02-20 13:35:19.000000000 +0100
|
||||
@@ -5679,8 +5679,8 @@ read_partial_die (struct partial_die_inf
|
||||
--- gdb-6.8.50.20081128.orig/gdb/dwarf2read.c 2008-12-04 10:26:18.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/dwarf2read.c 2008-12-04 10:26:40.000000000 +0100
|
||||
@@ -5886,8 +5886,8 @@ read_partial_die (struct partial_die_inf
|
||||
{
|
||||
case DW_AT_name:
|
||||
|
||||
@ -45,7 +45,7 @@ Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
|
||||
part_die->name = DW_STRING (&attr);
|
||||
break;
|
||||
case DW_AT_comp_dir:
|
||||
@@ -5688,7 +5688,9 @@ read_partial_die (struct partial_die_inf
|
||||
@@ -5895,7 +5895,9 @@ read_partial_die (struct partial_die_inf
|
||||
part_die->dirname = DW_STRING (&attr);
|
||||
break;
|
||||
case DW_AT_MIPS_linkage_name:
|
||||
@ -56,7 +56,7 @@ Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
|
||||
break;
|
||||
case DW_AT_low_pc:
|
||||
has_low_pc_attr = 1;
|
||||
@@ -7936,9 +7938,13 @@ dwarf2_linkage_name (struct die_info *di
|
||||
@@ -8129,9 +8131,13 @@ dwarf2_linkage_name (struct die_info *di
|
||||
{
|
||||
struct attribute *attr;
|
||||
|
||||
@ -73,11 +73,11 @@ Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
|
||||
attr = dwarf2_attr (die, DW_AT_name, cu);
|
||||
if (attr && DW_STRING (attr))
|
||||
return DW_STRING (attr);
|
||||
Index: gdb-6.8cvs20080219/gdb/gdbtypes.c
|
||||
Index: gdb-6.8.50.20081128/gdb/gdbtypes.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/gdbtypes.c 2008-02-14 23:03:57.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/gdbtypes.c 2008-02-20 13:35:19.000000000 +0100
|
||||
@@ -3106,6 +3106,8 @@ gdbtypes_post_init (struct gdbarch *gdba
|
||||
--- gdb-6.8.50.20081128.orig/gdb/gdbtypes.c 2008-11-10 21:53:43.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/gdbtypes.c 2008-12-04 10:26:40.000000000 +0100
|
||||
@@ -3141,6 +3141,8 @@ gdbtypes_post_init (struct gdbarch *gdba
|
||||
init_type (TYPE_CODE_INT,
|
||||
gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
|
||||
0, "int", (struct objfile *) NULL);
|
||||
@ -86,7 +86,7 @@ Index: gdb-6.8cvs20080219/gdb/gdbtypes.c
|
||||
builtin_type->builtin_unsigned_int =
|
||||
init_type (TYPE_CODE_INT,
|
||||
gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
|
||||
@@ -3215,6 +3217,11 @@ gdbtypes_post_init (struct gdbarch *gdba
|
||||
@@ -3250,6 +3252,11 @@ gdbtypes_post_init (struct gdbarch *gdba
|
||||
"<text variable, no debug info>", NULL);
|
||||
TYPE_TARGET_TYPE (builtin_type->nodebug_text_symbol) =
|
||||
builtin_type->builtin_int;
|
||||
@ -98,11 +98,11 @@ Index: gdb-6.8cvs20080219/gdb/gdbtypes.c
|
||||
builtin_type->nodebug_data_symbol =
|
||||
init_type (TYPE_CODE_INT,
|
||||
gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,
|
||||
Index: gdb-6.8cvs20080219/gdb/gdbtypes.h
|
||||
Index: gdb-6.8.50.20081128/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/gdbtypes.h 2008-02-14 23:03:57.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/gdbtypes.h 2008-02-20 13:35:19.000000000 +0100
|
||||
@@ -942,6 +942,7 @@ struct builtin_type
|
||||
--- gdb-6.8.50.20081128.orig/gdb/gdbtypes.h 2008-10-28 18:19:56.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/gdbtypes.h 2008-12-04 10:26:40.000000000 +0100
|
||||
@@ -975,6 +975,7 @@ struct builtin_type
|
||||
|
||||
/* Types used for symbols with no debug information. */
|
||||
struct type *nodebug_text_symbol;
|
||||
@ -110,7 +110,7 @@ Index: gdb-6.8cvs20080219/gdb/gdbtypes.h
|
||||
struct type *nodebug_data_symbol;
|
||||
struct type *nodebug_unknown_symbol;
|
||||
struct type *nodebug_tls_symbol;
|
||||
@@ -960,6 +961,7 @@ struct builtin_type
|
||||
@@ -987,6 +988,7 @@ struct builtin_type
|
||||
struct type *builtin_char;
|
||||
struct type *builtin_short;
|
||||
struct type *builtin_int;
|
||||
@ -118,11 +118,11 @@ Index: gdb-6.8cvs20080219/gdb/gdbtypes.h
|
||||
struct type *builtin_long;
|
||||
struct type *builtin_signed_char;
|
||||
struct type *builtin_unsigned_char;
|
||||
Index: gdb-6.8cvs20080219/gdb/parse.c
|
||||
Index: gdb-6.8.50.20081128/gdb/parse.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/parse.c 2008-01-02 00:04:03.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/parse.c 2008-02-20 13:35:19.000000000 +0100
|
||||
@@ -437,7 +437,12 @@ write_exp_msymbol (struct minimal_symbol
|
||||
--- gdb-6.8.50.20081128.orig/gdb/parse.c 2008-11-24 18:05:43.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/parse.c 2008-12-04 10:26:40.000000000 +0100
|
||||
@@ -449,7 +449,12 @@ write_exp_msymbol (struct minimal_symbol
|
||||
case mst_text:
|
||||
case mst_file_text:
|
||||
case mst_solib_trampoline:
|
||||
@ -136,12 +136,12 @@ Index: gdb-6.8cvs20080219/gdb/parse.c
|
||||
break;
|
||||
|
||||
case mst_data:
|
||||
Index: gdb-6.8cvs20080219/gdb/target.c
|
||||
Index: gdb-6.8.50.20081128/gdb/target.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/target.c 2008-02-19 17:22:33.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/target.c 2008-02-20 13:36:17.000000000 +0100
|
||||
@@ -812,6 +812,25 @@ pop_target (void)
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
--- gdb-6.8.50.20081128.orig/gdb/target.c 2008-12-04 10:24:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/target.c 2008-12-04 10:29:07.000000000 +0100
|
||||
@@ -850,6 +850,25 @@ pop_all_targets (int quitting)
|
||||
pop_all_targets_above (dummy_stratum, quitting);
|
||||
}
|
||||
|
||||
+static int
|
||||
@ -166,7 +166,7 @@ Index: gdb-6.8cvs20080219/gdb/target.c
|
||||
/* Using the objfile specified in OBJFILE, find the address for the
|
||||
current thread's thread-local storage with offset OFFSET. */
|
||||
CORE_ADDR
|
||||
@@ -893,7 +912,28 @@ target_translate_tls_address (struct obj
|
||||
@@ -931,7 +950,28 @@ target_translate_tls_address (struct obj
|
||||
/* It wouldn't be wrong here to try a gdbarch method, too; finding
|
||||
TLS is an ABI-specific thing. But we don't do that yet. */
|
||||
else
|
||||
@ -177,13 +177,13 @@ Index: gdb-6.8cvs20080219/gdb/target.c
|
||||
+ msymbol = lookup_minimal_symbol ("errno", NULL, NULL);
|
||||
+ if (msymbol != NULL
|
||||
+ && SYMBOL_VALUE_ADDRESS (msymbol) == offset
|
||||
+ && (SYMBOL_BFD_SECTION (msymbol)->owner == objfile->obfd
|
||||
+ && (SYMBOL_OBJ_SECTION (msymbol)->objfile == objfile
|
||||
+ || (objfile->separate_debug_objfile != NULL
|
||||
+ && SYMBOL_BFD_SECTION (msymbol)->owner
|
||||
+ == objfile->separate_debug_objfile->obfd)
|
||||
+ && SYMBOL_OBJ_SECTION (msymbol)->objfile
|
||||
+ == objfile->separate_debug_objfile)
|
||||
+ || (objfile->separate_debug_objfile_backlink != NULL
|
||||
+ && SYMBOL_BFD_SECTION (msymbol)->owner
|
||||
+ == objfile->separate_debug_objfile_backlink->obfd)))
|
||||
+ && SYMBOL_OBJ_SECTION (msymbol)->objfile
|
||||
+ == objfile->separate_debug_objfile_backlink)))
|
||||
+ {
|
||||
+ if (!catch_errors (resolve_errno, (void *) &addr, "",
|
||||
+ RETURN_MASK_ALL))
|
||||
@ -196,22 +196,10 @@ Index: gdb-6.8cvs20080219/gdb/target.c
|
||||
|
||||
return addr;
|
||||
}
|
||||
--- ./gdb/elfread.c 2008-08-03 11:02:10.000000000 +0200
|
||||
+++ ./gdb/elfread.c 2008-08-03 11:01:21.000000000 +0200
|
||||
@@ -318,7 +318,8 @@ elf_symtab_read (struct objfile *objfile
|
||||
/* Bfd symbols are section relative. */
|
||||
symaddr = sym->value + sym->section->vma;
|
||||
/* Relocate all non-absolute symbols by the section offset. */
|
||||
- if (sym->section != &bfd_abs_section)
|
||||
+ if (sym->section != &bfd_abs_section
|
||||
+ && (sym->section->flags & SEC_THREAD_LOCAL) == 0)
|
||||
{
|
||||
symaddr += offset;
|
||||
}
|
||||
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2008-02-20 13:35:19.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2008-12-04 10:26:40.000000000 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -241,10 +229,10 @@ Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
+
|
||||
+ return 0; /* breakpoint */
|
||||
+}
|
||||
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2008-02-20 13:35:19.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2008-12-04 10:26:40.000000000 +0100
|
||||
@@ -0,0 +1,67 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -7,37 +7,23 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190810
|
||||
(remote_async_wait): Likewise.
|
||||
|
||||
|
||||
Index: gdb-6.8/gdb/remote.c
|
||||
Index: gdb-6.8.50.20081128/gdb/remote.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/remote.c 2008-07-14 10:27:07.000000000 +0200
|
||||
+++ gdb-6.8/gdb/remote.c 2008-07-14 10:27:17.000000000 +0200
|
||||
@@ -3509,8 +3509,13 @@ Packet: '%s'\n"),
|
||||
reg->regnum, regs);
|
||||
--- gdb-6.8.50.20081128.orig/gdb/remote.c 2008-12-09 16:59:51.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/remote.c 2008-12-09 17:00:04.000000000 +0100
|
||||
@@ -4329,8 +4329,13 @@ Packet: '%s'\n"),
|
||||
VEC_safe_push (cached_reg_t, event->regcache, &cached_reg);
|
||||
}
|
||||
|
||||
- if (*p != ';')
|
||||
- error (_("Remote register badly formatted: %s\nhere: %s"),
|
||||
+ /* It may also occur on amd64 which defaults to 32-bit i386
|
||||
+ target. gdbserver(1) is not aware of the `set architecture'
|
||||
+ name itself as it is not using libbfd. */
|
||||
if (*p++ != ';')
|
||||
- error (_("Remote register badly formatted: %s\nhere: %s"),
|
||||
+ if (*p != ';')
|
||||
+ error (_("Remote register badly formatted: %s\nhere: %s"
|
||||
+ "\nTry to load the executable by `file' first,"
|
||||
+ "\nyou may also check `set/show architecture'."),
|
||||
buf, p);
|
||||
}
|
||||
}
|
||||
@@ -3737,8 +3742,13 @@ Packet: '%s'\n"),
|
||||
reg->regnum, regs);
|
||||
}
|
||||
|
||||
+ /* It may also occur on amd64 which defaults to 32-bit i386
|
||||
+ target. gdbserver(1) is not aware of the `set architecture'
|
||||
+ name itself as it is not using libbfd. */
|
||||
if (*p++ != ';')
|
||||
- error (_("Remote register badly formatted: %s\nhere: %s"),
|
||||
+ error (_("Remote register badly formatted: %s\nhere: %s"
|
||||
+ "\nTry to load the executable by `file' first,"
|
||||
+ "\nyou may also check `set/show architecture'."),
|
||||
buf, p);
|
||||
}
|
||||
++p;
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
|
||||
|
||||
FIXME: This workaround should be dropped and
|
||||
glibc/sysdeps/unix/sysv/linux/x86_64/clone.S should get CFI for the child
|
||||
instead.
|
||||
|
||||
2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
@ -20,10 +23,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
|
||||
|
||||
Port to GDB-6.7.
|
||||
|
||||
Index: gdb-6.7/gdb/amd64-linux-tdep.c
|
||||
Index: gdb-6.8.50.20081128/gdb/amd64-linux-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/amd64-linux-tdep.c 2007-08-23 20:08:26.000000000 +0200
|
||||
+++ gdb-6.7/gdb/amd64-linux-tdep.c 2007-10-16 15:57:03.000000000 +0200
|
||||
--- gdb-6.8.50.20081128.orig/gdb/amd64-linux-tdep.c 2008-12-08 10:56:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/amd64-linux-tdep.c 2008-12-08 21:11:08.000000000 +0100
|
||||
@@ -234,6 +234,80 @@ amd64_linux_register_reggroup_p (struct
|
||||
|
||||
/* Set the program counter for process PTID to PC. */
|
||||
@ -65,12 +68,12 @@ Index: gdb-6.7/gdb/amd64-linux-tdep.c
|
||||
+#define LINUX_CLONE_LEN (sizeof linux_clone_code)
|
||||
+
|
||||
+static int
|
||||
+amd64_linux_clone_running (struct frame_info *next_frame)
|
||||
+amd64_linux_clone_running (struct frame_info *this_frame)
|
||||
+{
|
||||
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
|
||||
+ CORE_ADDR pc = get_frame_pc (this_frame);
|
||||
+ unsigned char buf[LINUX_CLONE_LEN];
|
||||
+
|
||||
+ if (!safe_frame_unwind_memory (next_frame, pc - LINUX_CLONE_LEN, buf,
|
||||
+ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_LEN, buf,
|
||||
+ LINUX_CLONE_LEN))
|
||||
+ return 0;
|
||||
+
|
||||
@ -81,9 +84,9 @@ Index: gdb-6.7/gdb/amd64-linux-tdep.c
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+amd64_linux_outermost_frame (struct frame_info *next_frame)
|
||||
+amd64_linux_outermost_frame (struct frame_info *this_frame)
|
||||
+{
|
||||
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
|
||||
+ CORE_ADDR pc = get_frame_pc (this_frame);
|
||||
+ char *name;
|
||||
+
|
||||
+ find_pc_partial_function (pc, &name, NULL, NULL);
|
||||
@ -97,7 +100,7 @@ Index: gdb-6.7/gdb/amd64-linux-tdep.c
|
||||
+ subtle changes in specific glibc revisions. */
|
||||
+ if (name == NULL || strcmp (name, "clone") == 0
|
||||
+ || strcmp ("__clone", name) == 0)
|
||||
+ return (amd64_linux_clone_running (next_frame) != 0);
|
||||
+ return (amd64_linux_clone_running (this_frame) != 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
@ -114,32 +117,32 @@ Index: gdb-6.7/gdb/amd64-linux-tdep.c
|
||||
/* GNU/Linux uses SVR4-style shared libraries. */
|
||||
set_solib_svr4_fetch_link_map_offsets
|
||||
(gdbarch, svr4_lp64_fetch_link_map_offsets);
|
||||
Index: gdb-6.7/gdb/amd64-tdep.c
|
||||
Index: gdb-6.8.50.20081128/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/amd64-tdep.c 2007-10-12 17:48:39.000000000 +0200
|
||||
+++ gdb-6.7/gdb/amd64-tdep.c 2007-10-16 15:57:03.000000000 +0200
|
||||
@@ -849,11 +849,16 @@ amd64_frame_this_id (struct frame_info *
|
||||
--- gdb-6.8.50.20081128.orig/gdb/amd64-tdep.c 2008-12-08 10:56:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/amd64-tdep.c 2008-12-08 21:05:12.000000000 +0100
|
||||
@@ -1044,11 +1044,16 @@ amd64_frame_this_id (struct frame_info *
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_frame_cache (next_frame, this_cache);
|
||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
||||
amd64_frame_cache (this_frame, this_cache);
|
||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
|
||||
|
||||
/* This marks the outermost frame. */
|
||||
if (cache->base == 0)
|
||||
return;
|
||||
|
||||
+ /* Detect OS dependent outermost frames; such as `clone'. */
|
||||
+ if (tdep->outermost_frame_p && tdep->outermost_frame_p (next_frame))
|
||||
+ if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
|
||||
+ return;
|
||||
+
|
||||
(*this_id) = frame_id_build (cache->base + 16, cache->pc);
|
||||
}
|
||||
|
||||
Index: gdb-6.7/gdb/i386-tdep.c
|
||||
Index: gdb-6.8.50.20081128/gdb/i386-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/i386-tdep.c 2007-10-12 17:48:39.000000000 +0200
|
||||
+++ gdb-6.7/gdb/i386-tdep.c 2007-10-16 15:57:03.000000000 +0200
|
||||
@@ -2355,6 +2355,9 @@ i386_gdbarch_init (struct gdbarch_info i
|
||||
--- gdb-6.8.50.20081128.orig/gdb/i386-tdep.c 2008-12-08 10:56:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/i386-tdep.c 2008-12-08 11:00:43.000000000 +0100
|
||||
@@ -2698,6 +2698,9 @@ i386_gdbarch_init (struct gdbarch_info i
|
||||
tdep->sc_pc_offset = -1;
|
||||
tdep->sc_sp_offset = -1;
|
||||
|
||||
@ -149,24 +152,24 @@ Index: gdb-6.7/gdb/i386-tdep.c
|
||||
/* The format used for `long double' on almost all i386 targets is
|
||||
the i387 extended floating-point format. In fact, of all targets
|
||||
in the GCC 2.95 tree, only OSF/1 does it different, and insists
|
||||
Index: gdb-6.7/gdb/i386-tdep.h
|
||||
Index: gdb-6.8.50.20081128/gdb/i386-tdep.h
|
||||
===================================================================
|
||||
--- gdb-6.7.orig/gdb/i386-tdep.h 2007-08-23 20:08:34.000000000 +0200
|
||||
+++ gdb-6.7/gdb/i386-tdep.h 2007-10-16 15:57:32.000000000 +0200
|
||||
--- gdb-6.8.50.20081128.orig/gdb/i386-tdep.h 2008-12-08 10:56:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/i386-tdep.h 2008-12-08 21:07:47.000000000 +0100
|
||||
@@ -106,6 +106,9 @@ struct gdbarch_tdep
|
||||
/* ISA-specific data types. */
|
||||
struct type *i386_mmx_type;
|
||||
struct type *i386_sse_type;
|
||||
+
|
||||
+ /* Detect OS dependent outermost frames; such as `clone'. */
|
||||
+ int (*outermost_frame_p) (struct frame_info *next_frame);
|
||||
+ int (*outermost_frame_p) (struct frame_info *this_frame);
|
||||
};
|
||||
|
||||
/* Floating-point registers. */
|
||||
Index: gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.c 2007-10-16 15:57:03.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.c 2008-12-08 11:00:43.000000000 +0100
|
||||
@@ -0,0 +1,39 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -207,10 +210,10 @@ Index: gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
+ for (;;)
|
||||
+ pause();
|
||||
+}
|
||||
Index: gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2007-10-16 15:57:03.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2008-12-08 11:00:43.000000000 +0100
|
||||
@@ -0,0 +1,61 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -1,19 +1,19 @@
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||
|
||||
|
||||
Index: gdb-6.6/gdb/minsyms.c
|
||||
Index: gdb-6.8.50.20081128/gdb/minsyms.c
|
||||
===================================================================
|
||||
--- gdb-6.6.orig/gdb/minsyms.c 2007-01-20 13:53:48.000000000 +0100
|
||||
+++ gdb-6.6/gdb/minsyms.c 2007-01-20 13:58:47.000000000 +0100
|
||||
@@ -490,6 +490,11 @@ lookup_minimal_symbol_by_pc_section (COR
|
||||
--- gdb-6.8.50.20081128.orig/gdb/minsyms.c 2008-10-01 18:56:52.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/minsyms.c 2008-12-02 23:24:27.000000000 +0100
|
||||
@@ -544,6 +544,11 @@ lookup_minimal_symbol_by_pc_section_1 (C
|
||||
don't fill the bfd_section member, so don't
|
||||
throw away symbols on those platforms. */
|
||||
&& SYMBOL_BFD_SECTION (&msymbol[hi]) != NULL
|
||||
&& SYMBOL_OBJ_SECTION (&msymbol[hi]) != NULL
|
||||
+ /* Don't ignore symbols for solib trampolines.
|
||||
+ Limit its sideeffects - only for non-0 sized trampolines.
|
||||
+ Red Hat Bug 200533 with its regression Bug 218379. */
|
||||
+ && (MSYMBOL_TYPE (&msymbol[hi]) != mst_solib_trampoline
|
||||
+ || MSYMBOL_SIZE (&msymbol[hi]))
|
||||
&& (!matching_bfd_sections
|
||||
(SYMBOL_BFD_SECTION (&msymbol[hi]), section)))
|
||||
&& (!matching_obj_sections
|
||||
(SYMBOL_OBJ_SECTION (&msymbol[hi]), section)))
|
||||
{
|
||||
|
@ -23,40 +23,10 @@
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/Makefile.in
|
||||
Index: gdb-6.8.50.20081128/gdb/amd64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/Makefile.in 2008-02-19 16:52:21.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/Makefile.in 2008-02-20 13:39:08.000000000 +0100
|
||||
@@ -785,6 +785,7 @@ gdb_expat_h = gdb_expat.h
|
||||
gdb_locale_h = gdb_locale.h
|
||||
gdb_obstack_h = gdb_obstack.h $(obstack_h)
|
||||
gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
|
||||
+gdb_procfs32_h = gdb_procfs32.h $(gdb_user32_h)
|
||||
gdb_ptrace_h = gdb_ptrace.h
|
||||
gdb_regex_h = gdb_regex.h $(xregex_h)
|
||||
gdb_select_h = gdb_select.h
|
||||
@@ -794,6 +795,7 @@ gdb_string_h = gdb_string.h
|
||||
gdb_thread_db_h = gdb_thread_db.h
|
||||
gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h)
|
||||
gdbtypes_h = gdbtypes.h $(hashtab_h)
|
||||
+gdb_user32_h = gdb_user32.h $(gdb_stdint_h)
|
||||
gdb_vfork_h = gdb_vfork.h
|
||||
gdb_wait_h = gdb_wait.h
|
||||
glibc_tdep_h = glibc-tdep.h
|
||||
@@ -1888,7 +1890,8 @@ amd64fbsd-tdep.o: amd64fbsd-tdep.c $(def
|
||||
amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
|
||||
$(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
|
||||
$(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \
|
||||
- $(i386_linux_tdep_h) $(amd64_nat_h) $(amd64_linux_tdep_h)
|
||||
+ $(i386_linux_tdep_h) $(amd64_nat_h) $(amd64_linux_tdep_h) \
|
||||
+ $(i387_tdep_h) $(elf_bfd_h) $(gdb_procfs32_h)
|
||||
amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
|
||||
$(regcache_h) $(osabi_h) $(symtab_h) $(gdb_string_h) $(amd64_tdep_h) \
|
||||
$(solib_svr4_h) $(gdbtypes_h) $(reggroups_h) $(amd64_linux_tdep_h)
|
||||
Index: gdb-6.8cvs20080219/gdb/amd64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/amd64-linux-nat.c 2008-02-16 19:10:27.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/amd64-linux-nat.c 2008-02-20 13:39:08.000000000 +0100
|
||||
--- gdb-6.8.50.20081128.orig/gdb/amd64-linux-nat.c 2008-03-01 05:39:36.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/amd64-linux-nat.c 2008-12-02 23:06:16.000000000 +0100
|
||||
@@ -50,6 +50,9 @@
|
||||
#include "amd64-tdep.h"
|
||||
#include "i386-linux-tdep.h"
|
||||
@ -200,7 +170,7 @@ Index: gdb-6.8cvs20080219/gdb/amd64-linux-nat.c
|
||||
/* Transfering the general-purpose registers between GDB, inferiors
|
||||
and core files. */
|
||||
|
||||
@@ -429,6 +551,11 @@ _initialize_amd64_linux_nat (void)
|
||||
@@ -431,6 +553,11 @@ _initialize_amd64_linux_nat (void)
|
||||
t->to_fetch_registers = amd64_linux_fetch_inferior_registers;
|
||||
t->to_store_registers = amd64_linux_store_inferior_registers;
|
||||
|
||||
@ -212,11 +182,11 @@ Index: gdb-6.8cvs20080219/gdb/amd64-linux-nat.c
|
||||
/* Register the target. */
|
||||
linux_nat_add_target (t);
|
||||
linux_nat_set_new_thread (t, amd64_linux_new_thread);
|
||||
Index: gdb-6.8cvs20080219/gdb/config.in
|
||||
Index: gdb-6.8.50.20081128/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/config.in 2008-01-10 19:17:06.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/config.in 2008-02-20 13:39:08.000000000 +0100
|
||||
@@ -385,6 +385,9 @@
|
||||
--- gdb-6.8.50.20081128.orig/gdb/config.in 2008-08-06 21:41:31.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/config.in 2008-12-02 23:06:16.000000000 +0100
|
||||
@@ -456,6 +456,9 @@
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
@ -226,7 +196,7 @@ Index: gdb-6.8cvs20080219/gdb/config.in
|
||||
/* Define to 1 if you have the <sys/procfs.h> header file. */
|
||||
#undef HAVE_SYS_PROCFS_H
|
||||
|
||||
@@ -412,6 +415,9 @@
|
||||
@@ -483,6 +486,9 @@
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
@ -236,14 +206,16 @@ Index: gdb-6.8cvs20080219/gdb/config.in
|
||||
/* Define to 1 if you have the <sys/user.h> header file. */
|
||||
#undef HAVE_SYS_USER_H
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/configure
|
||||
Index: gdb-6.8.50.20081128/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/configure 2008-02-14 23:03:56.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/configure 2008-02-20 13:39:08.000000000 +0100
|
||||
@@ -11140,6 +11140,157 @@ done
|
||||
|
||||
--- gdb-6.8.50.20081128.orig/gdb/configure 2008-11-21 23:35:57.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/configure 2008-12-02 23:08:29.000000000 +0100
|
||||
@@ -12026,6 +12026,157 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
+
|
||||
+
|
||||
+for ac_header in sys/user32.h sys/procfs32.h
|
||||
+do
|
||||
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
@ -393,28 +365,26 @@ Index: gdb-6.8cvs20080219/gdb/configure
|
||||
+
|
||||
+done
|
||||
+
|
||||
+
|
||||
+
|
||||
for ac_header in sys/wait.h wait.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
Index: gdb-6.8cvs20080219/gdb/configure.ac
|
||||
# elf_hp.h is for HP/UX 64-bit shared library support.
|
||||
# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
|
||||
# unconditionally, so what's the point in checking these?
|
||||
Index: gdb-6.8.50.20081128/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/configure.ac 2008-02-14 23:03:56.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/configure.ac 2008-02-20 13:39:08.000000000 +0100
|
||||
@@ -523,6 +523,7 @@ AC_CHECK_HEADERS(sys/user.h, [], [],
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
])
|
||||
+AC_CHECK_HEADERS(sys/user32.h sys/procfs32.h)
|
||||
AC_CHECK_HEADERS(sys/wait.h wait.h)
|
||||
AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
|
||||
AC_CHECK_HEADERS(unistd.h)
|
||||
Index: gdb-6.8cvs20080219/gdb/gcore.c
|
||||
--- gdb-6.8.50.20081128.orig/gdb/configure.ac 2008-11-21 23:35:58.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/configure.ac 2008-12-02 23:07:33.000000000 +0100
|
||||
@@ -686,6 +686,7 @@ AC_SUBST(PYTHON_CFLAGS)
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STAT
|
||||
AC_HEADER_STDC
|
||||
+AC_CHECK_HEADERS([sys/user32.h sys/procfs32.h])
|
||||
# elf_hp.h is for HP/UX 64-bit shared library support.
|
||||
# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
|
||||
# unconditionally, so what's the point in checking these?
|
||||
Index: gdb-6.8.50.20081128/gdb/gcore.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/gcore.c 2008-02-19 16:52:21.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/gcore.c 2008-02-20 13:39:08.000000000 +0100
|
||||
@@ -317,6 +317,11 @@ gcore_create_callback (CORE_ADDR vaddr,
|
||||
--- gdb-6.8.50.20081128.orig/gdb/gcore.c 2008-12-01 16:39:04.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/gcore.c 2008-12-02 23:06:16.000000000 +0100
|
||||
@@ -320,6 +320,11 @@ gcore_create_callback (CORE_ADDR vaddr,
|
||||
asection *osec;
|
||||
flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
|
||||
|
||||
@ -426,10 +396,10 @@ Index: gdb-6.8cvs20080219/gdb/gcore.c
|
||||
/* If the memory segment has no permissions set, ignore it, otherwise
|
||||
when we later try to access it for read/write, we'll get an error
|
||||
or jam the kernel. */
|
||||
Index: gdb-6.8cvs20080219/gdb/gdb_procfs32.h
|
||||
Index: gdb-6.8.50.20081128/gdb/gdb_procfs32.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8cvs20080219/gdb/gdb_procfs32.h 2008-02-20 13:39:08.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/gdb_procfs32.h 2008-12-02 23:06:16.000000000 +0100
|
||||
@@ -0,0 +1,128 @@
|
||||
+#ifdef HAVE_SYS_PROCFS32_H
|
||||
+#include <sys/procfs32.h>
|
||||
@ -559,10 +529,10 @@ Index: gdb-6.8cvs20080219/gdb/gdb_procfs32.h
|
||||
+#endif /* _SYS_PROCFS32_H */
|
||||
+
|
||||
+#endif /* HAVE_SYS_PROCFS32_H */
|
||||
Index: gdb-6.8cvs20080219/gdb/gdb_user32.h
|
||||
Index: gdb-6.8.50.20081128/gdb/gdb_user32.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8cvs20080219/gdb/gdb_user32.h 2008-02-20 13:39:08.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/gdb_user32.h 2008-12-02 23:06:16.000000000 +0100
|
||||
@@ -0,0 +1,108 @@
|
||||
+#ifdef HAVE_SYS_USER32_H
|
||||
+#include <sys/user32.h>
|
||||
@ -672,11 +642,11 @@ Index: gdb-6.8cvs20080219/gdb/gdb_user32.h
|
||||
+#endif /* _SYS_USER32_H */
|
||||
+
|
||||
+#endif /* HAVE_SYS_USER32_H */
|
||||
Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/linux-nat.c 2008-02-19 17:27:21.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/linux-nat.c 2008-02-20 13:39:08.000000000 +0100
|
||||
@@ -104,6 +104,21 @@ static LONGEST (*super_xfer_partial) (st
|
||||
--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c 2008-12-02 22:15:53.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/linux-nat.c 2008-12-02 23:13:18.000000000 +0100
|
||||
@@ -209,6 +209,21 @@ static LONGEST (*super_xfer_partial) (st
|
||||
const gdb_byte *,
|
||||
ULONGEST, LONGEST);
|
||||
|
||||
@ -698,40 +668,29 @@ Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
||||
static int debug_linux_nat;
|
||||
static void
|
||||
show_debug_linux_nat (struct ui_file *file, int from_tty,
|
||||
@@ -2716,11 +2731,11 @@ linux_nat_do_thread_registers (bfd *obfd
|
||||
@@ -3470,7 +3485,7 @@ linux_nat_do_thread_registers (bfd *obfd
|
||||
else
|
||||
fill_gregset (regcache, &gregs, -1);
|
||||
|
||||
- note_data = (char *) elfcore_write_prstatus (obfd,
|
||||
- note_data,
|
||||
- note_size,
|
||||
- lwp,
|
||||
- stop_signal, &gregs);
|
||||
+ note_data = (char *) linux_elfcore_write_prstatus (obfd,
|
||||
+ note_data,
|
||||
+ note_size,
|
||||
+ lwp,
|
||||
+ stop_signal, &gregs);
|
||||
|
||||
if (core_regset_p
|
||||
&& (regset = gdbarch_regset_from_core_section (gdbarch, ".reg2",
|
||||
@@ -2731,10 +2746,11 @@ linux_nat_do_thread_registers (bfd *obfd
|
||||
note_data,
|
||||
note_size,
|
||||
lwp,
|
||||
@@ -3520,10 +3535,10 @@ linux_nat_do_thread_registers (bfd *obfd
|
||||
else
|
||||
fill_fpregset (regcache, &fpregs, -1);
|
||||
|
||||
- note_data = (char *) elfcore_write_prfpreg (obfd,
|
||||
- note_data,
|
||||
- note_size,
|
||||
- &fpregs, sizeof (fpregs));
|
||||
+ note_data = (char *) linux_elfcore_write_prfpreg (obfd,
|
||||
+ note_data,
|
||||
+ note_size,
|
||||
+ &fpregs, sizeof (fpregs),
|
||||
+ regcache);
|
||||
note_data,
|
||||
note_size,
|
||||
- &fpregs, sizeof (fpregs));
|
||||
+ &fpregs, sizeof (fpregs), regcache);
|
||||
}
|
||||
|
||||
#ifdef FILL_FPXREGSET
|
||||
if (core_regset_p
|
||||
@@ -2828,9 +2844,9 @@ linux_nat_make_corefile_notes (bfd *obfd
|
||||
return note_data;
|
||||
@@ -3592,9 +3607,9 @@ linux_nat_make_corefile_notes (bfd *obfd
|
||||
psargs_end - string_end);
|
||||
}
|
||||
}
|
||||
@ -744,11 +703,11 @@ Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
||||
}
|
||||
|
||||
/* Dump information for threads. */
|
||||
Index: gdb-6.8cvs20080219/gdb/linux-nat.h
|
||||
Index: gdb-6.8.50.20081128/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/linux-nat.h 2008-02-19 14:26:32.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/linux-nat.h 2008-02-20 13:39:37.000000000 +0100
|
||||
@@ -124,3 +124,12 @@ void linux_nat_switch_fork (ptid_t new_p
|
||||
--- gdb-6.8.50.20081128.orig/gdb/linux-nat.h 2008-12-01 15:58:23.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/linux-nat.h 2008-12-02 23:06:16.000000000 +0100
|
||||
@@ -134,3 +134,12 @@ void linux_nat_switch_fork (ptid_t new_p
|
||||
|
||||
/* Return the saved siginfo associated with PTID. */
|
||||
struct siginfo *linux_nat_get_siginfo (ptid_t ptid);
|
||||
|
@ -3,6 +3,9 @@ If you provided some relative path to the shared library, such as with
|
||||
then gdb would fail to match the shared library name during the TLS lookup.
|
||||
|
||||
|
||||
Dropped the workaround/fix for gdb-6.8.50.20081128 - is it still needed?
|
||||
|
||||
|
||||
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
|
||||
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||
|
||||
@ -20,57 +23,6 @@ The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||
|
||||
Port to gdb-6.7.50.20080227.
|
||||
|
||||
Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/solib-svr4.c 2008-02-27 08:59:06.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/solib-svr4.c 2008-02-27 09:00:44.000000000 +0100
|
||||
@@ -1017,10 +1017,14 @@ CORE_ADDR
|
||||
svr4_fetch_objfile_link_map (struct objfile *objfile)
|
||||
{
|
||||
CORE_ADDR lm;
|
||||
+ int resolve;
|
||||
|
||||
if (locate_base () == 0)
|
||||
return 0; /* failed somehow... */
|
||||
|
||||
+for (resolve = 0; resolve <= 1; resolve++)
|
||||
+{
|
||||
+
|
||||
/* Position ourselves on the first link map. */
|
||||
lm = solib_svr4_r_map ();
|
||||
while (lm)
|
||||
@@ -1059,6 +1063,21 @@ svr4_fetch_objfile_link_map (struct objf
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
{
|
||||
+ /* solib_svr4_r_map() may contain relative pathnames while
|
||||
+ `objfile->name' is absolute. */
|
||||
+ if (resolve && buffer && buffer[0] != '/')
|
||||
+ {
|
||||
+ char *absolute;
|
||||
+ int fd;
|
||||
+
|
||||
+ fd = solib_open (buffer, &absolute);
|
||||
+ if (fd != -1)
|
||||
+ {
|
||||
+ make_cleanup (xfree, absolute);
|
||||
+ buffer = absolute;
|
||||
+ close (fd);
|
||||
+ }
|
||||
+ }
|
||||
/* Is this the linkmap for the file we want? */
|
||||
/* If the file is not a shared library and has no name,
|
||||
we are sure it is the main executable, so we return that. */
|
||||
@@ -1077,6 +1096,9 @@ svr4_fetch_objfile_link_map (struct objf
|
||||
builtin_type_void_data_ptr);
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
+
|
||||
+} /* resolve */
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
|
@ -47,9 +47,11 @@
|
||||
Fix found by Denys Vlasenko <dvlasenk@redhat.com>.
|
||||
Fixes Red Hat Bug 459414.
|
||||
|
||||
--- ./gdb/Makefile.in 2008-08-21 00:29:46.000000000 +0200
|
||||
+++ ./gdb/Makefile.in 2008-08-21 00:28:43.000000000 +0200
|
||||
@@ -340,7 +340,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
|
||||
Index: gdb-6.8.50.20081128/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/Makefile.in 2008-12-04 10:33:25.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/Makefile.in 2008-12-04 10:34:31.000000000 +0100
|
||||
@@ -363,7 +363,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
|
||||
# your system doesn't have fcntl.h in /usr/include (which is where it
|
||||
# should be according to Posix).
|
||||
DEFS = @DEFS@
|
||||
@ -58,55 +60,19 @@
|
||||
|
||||
# MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
|
||||
GLOBAL_CFLAGS = $(MH_CFLAGS)
|
||||
@@ -392,7 +392,7 @@ INSTALLED_LIBS=-lbfd -lreadline -lopcode
|
||||
@@ -415,7 +415,7 @@ INSTALLED_LIBS=-lbfd -lreadline -lopcode
|
||||
CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
|
||||
$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
|
||||
$(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
|
||||
$(LIBICONV) $(LIBEXPAT) \
|
||||
- $(LIBIBERTY) $(WIN32LIBS)
|
||||
+ $(LIBIBERTY) $(WIN32LIBS) -lrpm
|
||||
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
|
||||
$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
|
||||
- $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU)
|
||||
+ $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) -lrpm
|
||||
CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
|
||||
$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
|
||||
|
||||
@@ -2029,7 +2029,8 @@ corelow.o: corelow.c $(defs_h) $(arch_ut
|
||||
$(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \
|
||||
$(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \
|
||||
$(exec_h) $(readline_h) $(gdb_assert_h) \
|
||||
- $(exceptions_h) $(solib_h) $(filenames_h)
|
||||
+ $(exceptions_h) $(solib_h) $(filenames_h) $(auxv_h) $(elf_common_h) \
|
||||
+ $(objfiles_h) $(gdbcmd_h)
|
||||
core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \
|
||||
$(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(gregset_h)
|
||||
cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \
|
||||
@@ -2117,7 +2118,7 @@ event-loop.o: event-loop.c $(defs_h) $(e
|
||||
event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
|
||||
$(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \
|
||||
$(exceptions_h) $(cli_script_h) $(gdbcmd_h) $(readline_h) \
|
||||
- $(readline_history_h)
|
||||
+ $(readline_history_h) $(symfile_h)
|
||||
exceptions.o: exceptions.c $(defs_h) $(exceptions_h) $(breakpoint_h) \
|
||||
$(target_h) $(inferior_h) $(annotate_h) $(ui_out_h) $(gdb_assert_h) \
|
||||
$(gdb_string_h) $(serial_h)
|
||||
@@ -2884,7 +2885,8 @@ symfile.o: symfile.c $(defs_h) $(bfdlink
|
||||
$(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \
|
||||
$(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \
|
||||
$(gdb_string_h) $(gdb_stat_h) $(observer_h) $(exec_h) \
|
||||
- $(parser_defs_h) $(varobj_h) $(elf_bfd_h) $(solib_h)
|
||||
+ $(parser_defs_h) $(varobj_h) $(elf_bfd_h) $(solib_h) $(gdb_stdint_h) \
|
||||
+ $(libbfd_h) $(elf_bfd_h) $(elf_external_h)
|
||||
symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \
|
||||
$(objfiles_h) $(exceptions_h) $(gdbcmd_h) $(target_h) $(value_h) \
|
||||
$(symfile_h) $(observer_h) $(auxv_h) $(elf_common_h)
|
||||
@@ -3325,7 +3327,7 @@ tui-hooks.o: $(srcdir)/tui/tui-hooks.c $
|
||||
tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \
|
||||
$(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \
|
||||
$(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h) \
|
||||
- $(exceptions_h)
|
||||
+ $(exceptions_h) $(symfile_h)
|
||||
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
|
||||
tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(target_h) \
|
||||
$(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(tui_h) \
|
||||
--- ./gdb/corelow.c 2008-02-09 14:45:33.000000000 +0100
|
||||
+++ ./gdb/corelow.c 2008-08-21 00:28:43.000000000 +0200
|
||||
Index: gdb-6.8.50.20081128/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/corelow.c 2008-11-09 12:27:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/corelow.c 2008-12-04 10:34:31.000000000 +0100
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "exceptions.h"
|
||||
#include "solib.h"
|
||||
@ -118,8 +84,8 @@
|
||||
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
@@ -248,6 +252,56 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = pid_to_ptid (thread_id); /* Yes, make it current */
|
||||
@@ -262,6 +266,56 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = ptid; /* Yes, make it current */
|
||||
}
|
||||
|
||||
+static int build_id_core_loads = 1;
|
||||
@ -175,23 +141,20 @@
|
||||
/* This routine opens and sets up the core file bfd. */
|
||||
|
||||
static void
|
||||
@@ -344,6 +398,15 @@ core_open (char *filename, int from_tty)
|
||||
ontop = !push_target (&core_ops);
|
||||
@@ -358,6 +412,12 @@ core_open (char *filename, int from_tty)
|
||||
push_target (&core_ops);
|
||||
discard_cleanups (old_chain);
|
||||
|
||||
+ if (ontop)
|
||||
+ {
|
||||
+ /* Find the build_id identifiers. If it gets executed after
|
||||
+ POST_CREATE_INFERIOR we would clash with asking to discard the already
|
||||
+ loaded VDSO symbols. */
|
||||
+ if (build_id_core_loads != 0)
|
||||
+ build_id_locate_exec (from_tty);
|
||||
+ }
|
||||
+
|
||||
/* This is done first, before anything has a chance to query the
|
||||
inferior for information such as symbols. */
|
||||
post_create_inferior (&core_ops, from_tty);
|
||||
@@ -692,4 +755,11 @@ _initialize_corelow (void)
|
||||
add_inferior_silent (corelow_pid);
|
||||
|
||||
/* Do this before acknowledging the inferior, so if
|
||||
@@ -737,4 +797,11 @@ _initialize_corelow (void)
|
||||
|
||||
if (!coreops_suppress_target)
|
||||
add_target (&core_ops);
|
||||
@ -203,9 +166,11 @@
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
--- ./gdb/doc/gdb.texinfo 2008-08-21 00:29:46.000000000 +0200
|
||||
+++ ./gdb/doc/gdb.texinfo 2008-08-21 00:28:43.000000000 +0200
|
||||
@@ -12195,6 +12195,27 @@ information files.
|
||||
Index: gdb-6.8.50.20081128/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/doc/gdb.texinfo 2008-12-04 10:34:04.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/doc/gdb.texinfo 2008-12-04 10:34:31.000000000 +0100
|
||||
@@ -13138,6 +13138,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -233,17 +198,19 @@
|
||||
@cindex @code{.gnu_debuglink} sections
|
||||
@cindex debug link sections
|
||||
A debug link is a special section of the executable file named
|
||||
--- ./gdb/event-top.c 2008-01-01 23:53:09.000000000 +0100
|
||||
+++ ./gdb/event-top.c 2008-08-21 00:28:43.000000000 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <signal.h>
|
||||
#include "exceptions.h"
|
||||
Index: gdb-6.8.50.20081128/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/event-top.c 2008-09-08 23:46:21.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/event-top.c 2008-12-04 10:34:31.000000000 +0100
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "cli/cli-script.h" /* for reset_command_nest_depth */
|
||||
#include "main.h"
|
||||
#include "gdbthread.h"
|
||||
+#include "symfile.h"
|
||||
|
||||
/* For dont_repeat() */
|
||||
#include "gdbcmd.h"
|
||||
@@ -192,6 +193,8 @@ cli_command_loop (void)
|
||||
@@ -193,6 +194,8 @@ cli_command_loop (void)
|
||||
char *a_prompt;
|
||||
char *gdb_prompt = get_prompt ();
|
||||
|
||||
@ -252,7 +219,7 @@
|
||||
/* Tell readline what the prompt to display is and what function it
|
||||
will need to call after a whole line is read. This also displays
|
||||
the first prompt. */
|
||||
@@ -263,6 +266,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
@@ -264,6 +267,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -261,9 +228,11 @@
|
||||
/* Each interpreter has its own rules on displaying the command
|
||||
prompt. */
|
||||
if (!current_interp_display_prompt_p ())
|
||||
--- ./gdb/solib-svr4.c 2008-08-21 00:29:46.000000000 +0200
|
||||
+++ ./gdb/solib-svr4.c 2008-08-21 00:28:43.000000000 +0200
|
||||
@@ -764,9 +764,33 @@ svr4_current_sos (void)
|
||||
Index: gdb-6.8.50.20081128/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/solib-svr4.c 2008-12-04 01:34:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/solib-svr4.c 2008-12-04 10:34:31.000000000 +0100
|
||||
@@ -999,9 +999,33 @@ svr4_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
{
|
||||
@ -300,19 +269,20 @@
|
||||
}
|
||||
xfree (buffer);
|
||||
|
||||
--- ./gdb/symfile.c 2008-08-21 00:29:46.000000000 +0200
|
||||
+++ ./gdb/symfile.c 2008-08-21 00:29:18.000000000 +0200
|
||||
@@ -53,6 +53,9 @@
|
||||
#include "varobj.h"
|
||||
Index: gdb-6.8.50.20081128/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/symfile.c 2008-12-04 10:26:12.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/symfile.c 2008-12-04 10:36:18.000000000 +0100
|
||||
@@ -54,6 +54,8 @@
|
||||
#include "elf-bfd.h"
|
||||
#include "solib.h"
|
||||
+#include "gdb_stdint.h"
|
||||
#include "remote.h"
|
||||
+#include "libbfd.h"
|
||||
+#include "elf/external.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
@@ -61,6 +64,7 @@
|
||||
@@ -62,6 +64,7 @@
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
@ -320,7 +290,7 @@
|
||||
|
||||
|
||||
int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
|
||||
@@ -1226,16 +1230,65 @@ symbol_file_clear (int from_tty)
|
||||
@@ -1168,16 +1171,65 @@ symbol_file_clear (int from_tty)
|
||||
printf_unfiltered (_("No symbol file now.\n"));
|
||||
}
|
||||
|
||||
@ -388,7 +358,7 @@
|
||||
{
|
||||
struct build_id *retval;
|
||||
|
||||
@@ -1251,6 +1304,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
@@ -1193,6 +1245,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -737,7 +707,7 @@
|
||||
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
|
||||
|
||||
static int
|
||||
@@ -1265,7 +1660,7 @@ build_id_verify (const char *filename, s
|
||||
@@ -1210,7 +1604,7 @@ build_id_verify (const char *filename, s
|
||||
if (abfd == NULL)
|
||||
return 0;
|
||||
|
||||
@ -746,7 +716,7 @@
|
||||
|
||||
if (found == NULL)
|
||||
warning (_("File \"%s\" has no build-id, file skipped"), filename);
|
||||
@@ -1281,8 +1676,9 @@ build_id_verify (const char *filename, s
|
||||
@@ -1229,8 +1623,9 @@ build_id_verify (const char *filename, s
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -758,7 +728,7 @@
|
||||
{
|
||||
char *link, *s, *retval = NULL;
|
||||
gdb_byte *data = build_id->data;
|
||||
@@ -1290,7 +1686,9 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1238,7 +1633,9 @@ build_id_to_debug_filename (struct build
|
||||
|
||||
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
|
||||
link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
|
||||
@ -769,7 +739,7 @@
|
||||
s = link + sprintf (link, "%s/.build-id/", debug_file_directory);
|
||||
if (size > 0)
|
||||
{
|
||||
@@ -1301,12 +1699,14 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1249,12 +1646,14 @@ build_id_to_debug_filename (struct build
|
||||
*s++ = '/';
|
||||
while (size-- > 0)
|
||||
s += sprintf (s, "%02x", (unsigned) *data++);
|
||||
@ -786,7 +756,7 @@
|
||||
|
||||
if (retval != NULL && !build_id_verify (retval, build_id))
|
||||
{
|
||||
@@ -1314,9 +1714,424 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1262,9 +1661,424 @@ build_id_to_debug_filename (struct build
|
||||
retval = NULL;
|
||||
}
|
||||
|
||||
@ -795,9 +765,9 @@
|
||||
+ else
|
||||
+ xfree (link);
|
||||
+
|
||||
return retval;
|
||||
}
|
||||
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
+#include <rpm/rpmlib.h>
|
||||
+#include <rpm/rpmts.h>
|
||||
+#include <rpm/rpmdb.h>
|
||||
@ -1083,9 +1053,9 @@
|
||||
+
|
||||
+ retval = obstack_alloc (&missing_filepair_obstack, size);
|
||||
+ memset (retval, 0, size);
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
return retval;
|
||||
}
|
||||
|
||||
+static hashval_t
|
||||
+missing_filepair_hash_func (const struct missing_filepair *elem)
|
||||
+{
|
||||
@ -1120,7 +1090,7 @@
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+debug_print_executable_changed (void *unused)
|
||||
+debug_print_executable_changed (void)
|
||||
+{
|
||||
+ missing_rpm_change ();
|
||||
+ missing_filepair_change ();
|
||||
@ -1211,7 +1181,7 @@
|
||||
static char *
|
||||
get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
|
||||
{
|
||||
@@ -1402,32 +2231,36 @@ static char *
|
||||
@@ -1347,32 +2161,36 @@ static char *
|
||||
find_separate_debug_file (struct objfile *objfile)
|
||||
{
|
||||
asection *sect;
|
||||
@ -1237,9 +1207,8 @@
|
||||
char *build_id_name;
|
||||
|
||||
- build_id_name = build_id_to_debug_filename (build_id);
|
||||
- free (build_id);
|
||||
+ build_id_name = build_id_to_filename (build_id, &build_id_filename, 1);
|
||||
+ xfree (build_id);
|
||||
xfree (build_id);
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0)
|
||||
{
|
||||
@ -1257,7 +1226,7 @@
|
||||
}
|
||||
|
||||
basename = get_debug_link_info (objfile, &crc32);
|
||||
@@ -1435,7 +2268,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1380,7 +2198,7 @@ find_separate_debug_file (struct objfile
|
||||
if (basename == NULL)
|
||||
/* There's no separate debug info, hence there's no way we could
|
||||
load it => no warning. */
|
||||
@ -1266,7 +1235,7 @@
|
||||
|
||||
dir = xstrdup (objfile->name);
|
||||
|
||||
@@ -1451,23 +2284,19 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1396,23 +2214,19 @@ find_separate_debug_file (struct objfile
|
||||
gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
|
||||
dir[i+1] = '\0';
|
||||
|
||||
@ -1297,7 +1266,7 @@
|
||||
|
||||
/* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */
|
||||
strcpy (debugfile, dir);
|
||||
@@ -1476,11 +2305,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1421,11 +2235,7 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, basename);
|
||||
|
||||
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
||||
@ -1310,7 +1279,7 @@
|
||||
|
||||
/* Then try in the global debugfile directory. */
|
||||
strcpy (debugfile, debug_file_directory);
|
||||
@@ -1489,11 +2314,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1434,11 +2244,7 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, basename);
|
||||
|
||||
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
||||
@ -1323,7 +1292,7 @@
|
||||
|
||||
/* If the file is in the sysroot, try using its base path in the
|
||||
global debugfile directory. */
|
||||
@@ -1508,20 +2329,18 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1453,20 +2259,18 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, basename);
|
||||
|
||||
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
||||
@ -1352,10 +1321,10 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -4208,4 +5027,16 @@ the global debug-file directory prepende
|
||||
@@ -4196,4 +5000,16 @@ Show printing of symbol loading messages
|
||||
NULL,
|
||||
show_debug_file_directory,
|
||||
&setlist, &showlist);
|
||||
NULL,
|
||||
&setprintlist, &showprintlist);
|
||||
+
|
||||
+ add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose,
|
||||
+ _("\
|
||||
@ -1369,9 +1338,11 @@
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
}
|
||||
--- ./gdb/symfile.h 2008-02-03 23:13:29.000000000 +0100
|
||||
+++ ./gdb/symfile.h 2008-08-21 00:28:43.000000000 +0200
|
||||
@@ -358,6 +358,14 @@ extern int symfile_map_offsets_to_segmen
|
||||
Index: gdb-6.8.50.20081128/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/symfile.h 2008-09-05 13:37:17.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/symfile.h 2008-12-04 10:34:31.000000000 +0100
|
||||
@@ -365,6 +365,14 @@ extern int symfile_map_offsets_to_segmen
|
||||
struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
|
||||
void free_symfile_segment_data (struct symfile_segment_data *data);
|
||||
|
||||
@ -1386,9 +1357,11 @@
|
||||
/* From dwarf2read.c */
|
||||
|
||||
extern int dwarf2_has_info (struct objfile *);
|
||||
--- ./gdb/testsuite/lib/gdb.exp 2008-08-21 00:29:46.000000000 +0200
|
||||
+++ ./gdb/testsuite/lib/gdb.exp 2008-08-21 00:28:43.000000000 +0200
|
||||
@@ -1199,6 +1199,16 @@ proc default_gdb_start { } {
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/lib/gdb.exp 2008-12-04 01:33:56.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/lib/gdb.exp 2008-12-04 10:34:31.000000000 +0100
|
||||
@@ -1227,6 +1227,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -1405,8 +1378,10 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- ./gdb/tui/tui-interp.c 2008-01-01 23:53:22.000000000 +0100
|
||||
+++ ./gdb/tui/tui-interp.c 2008-08-21 00:28:43.000000000 +0200
|
||||
Index: gdb-6.8.50.20081128/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/tui/tui-interp.c 2008-03-14 20:55:51.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/tui/tui-interp.c 2008-12-04 10:34:31.000000000 +0100
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
|
@ -3,10 +3,11 @@
|
||||
Suppress messages `(no debugging symbols found)' on the commandline
|
||||
option -readnever.
|
||||
|
||||
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.6-orig/gdb/symfile.c gdb-6.6/gdb/symfile.c
|
||||
--- gdb-6.6-orig/gdb/symfile.c 2008-01-12 22:10:40.000000000 +0100
|
||||
+++ gdb-6.6/gdb/symfile.c 2008-01-22 02:15:46.000000000 +0100
|
||||
@@ -996,8 +996,10 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
Index: gdb-6.8.50.20081128/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/symfile.c 2008-12-02 23:39:09.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/symfile.c 2008-12-02 23:52:23.000000000 +0100
|
||||
@@ -1028,8 +1028,10 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
|
||||
/* If the file has its own symbol tables it has no separate debug info.
|
||||
`.dynsym'/`.symtab' go to MSYMBOLS, `.debug_info' goes to SYMTABS/PSYMTABS.
|
||||
@ -19,17 +20,16 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.6-orig/gdb/symfile.c gdb-6.6/gd
|
||||
debugfile = find_separate_debug_file (objfile);
|
||||
if (debugfile)
|
||||
{
|
||||
@@ -1021,7 +1023,8 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
xfree (debugfile);
|
||||
@@ -1054,7 +1056,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
}
|
||||
|
||||
- if (!have_partial_symbols () && !have_full_symbols ())
|
||||
+ if (!readnever_symbol_files && !have_partial_symbols ()
|
||||
+ && !have_full_symbols ())
|
||||
if (!have_partial_symbols () && !have_full_symbols ()
|
||||
- && print_symbol_loading)
|
||||
+ && print_symbol_loading && !readnever_symbol_files)
|
||||
{
|
||||
wrap_here ("");
|
||||
printf_filtered (_("(no debugging symbols found)"));
|
||||
@@ -2770,7 +2959,8 @@ reread_symbols (void)
|
||||
printf_unfiltered (_("(no debugging symbols found)"));
|
||||
@@ -3239,7 +3241,8 @@ reread_symbols (void)
|
||||
zero is OK since dbxread.c also does what it needs to do if
|
||||
objfile->global_psymbols.size is 0. */
|
||||
(*objfile->sf->sym_read) (objfile, 0);
|
||||
|
@ -1,9 +1,11 @@
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
|
||||
|
||||
|
||||
--- gdb-6.6-orig/gdb/Makefile.in 2007-04-08 20:49:10.000000000 +0200
|
||||
+++ gdb-6.6/gdb/Makefile.in 2007-04-08 23:22:40.000000000 +0200
|
||||
@@ -1672,17 +1672,19 @@ po/$(PACKAGE).pot: force
|
||||
Index: gdb-6.8.50.20081128/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/Makefile.in 2008-12-02 23:06:16.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/Makefile.in 2008-12-02 23:28:02.000000000 +0100
|
||||
@@ -1490,8 +1490,10 @@ po/$(PACKAGE).pot: force
|
||||
|
||||
.SUFFIXES: .y .l
|
||||
.y.c:
|
||||
@ -16,8 +18,9 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
|
||||
-e '/extern.*realloc/d' \
|
||||
-e '/extern.*free/d' \
|
||||
-e '/include.*malloc.h/d' \
|
||||
-e 's/\([^x]\)malloc/\1xmalloc/g' \
|
||||
-e 's/\([^x]\)realloc/\1xrealloc/g' \
|
||||
@@ -1500,9 +1502,9 @@ po/$(PACKAGE).pot: force
|
||||
-e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
|
||||
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
|
||||
-e '/^#line.*y.tab.c/d' \
|
||||
- < $@.tmp > $@.new
|
||||
- -rm $@.tmp
|
||||
|
@ -3,8 +3,10 @@
|
||||
* gdb.threads/atomic-seq-threaded.c,
|
||||
gdb.threads/atomic-seq-threaded.exp: New files.
|
||||
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.threads/atomic-seq-threaded.c 25 Jun 2007 20:38:21 -0000
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c 2008-12-08 22:27:01.000000000 +0100
|
||||
@@ -0,0 +1,171 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -177,8 +179,10 @@
|
||||
+
|
||||
+ return 0; /* _exit_ */
|
||||
+}
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.threads/atomic-seq-threaded.exp 25 Jun 2007 20:38:21 -0000
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp 2008-12-08 22:31:01.000000000 +0100
|
||||
@@ -0,0 +1,84 @@
|
||||
+# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
|
||||
+# This variant testcases the code for stepping another thread while skipping
|
||||
@ -230,7 +234,7 @@
|
||||
+# Pass after pthread_create () without any watchpoint active.
|
||||
+set line [gdb_get_line_number "_create_after_"]
|
||||
+gdb_test "tbreak $line" \
|
||||
+ "Breakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \
|
||||
+ "reakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \
|
||||
+ "set breakpoint after pthread_create ()"
|
||||
+gdb_test "c" \
|
||||
+ ".*/\\* _create_after_ \\*/.*" \
|
||||
@ -254,7 +258,7 @@
|
||||
+# Critical code path is stepped through at this point.
|
||||
+set line [gdb_get_line_number "_exit_"]
|
||||
+gdb_test "tbreak $line" \
|
||||
+ "Breakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \
|
||||
+ "reakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \
|
||||
+ "set breakpoint at _exit_"
|
||||
+gdb_test "c" \
|
||||
+ ".*/\\* _exit_ \\*/.*" \
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
||||
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/linux-nat.c 2008-02-21 12:03:38.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/linux-nat.c 2008-02-21 12:05:01.000000000 +0100
|
||||
@@ -1570,6 +1570,31 @@ linux_handle_extended_wait (struct lwp_i
|
||||
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:27:34.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:28:14.000000000 +0100
|
||||
@@ -1981,6 +1981,31 @@ linux_handle_extended_wait (struct lwp_i
|
||||
_("unknown ptrace event %d"), event);
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
||||
/* Wait for LP to stop. Returns the wait status, or 0 if the LWP has
|
||||
exited. */
|
||||
|
||||
@@ -1577,16 +1602,31 @@ static int
|
||||
@@ -1988,16 +2013,31 @@ static int
|
||||
wait_lwp (struct lwp_info *lp)
|
||||
{
|
||||
pid_t pid;
|
||||
@ -82,23 +82,19 @@ Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
||||
if (pid == -1 && errno == ECHILD)
|
||||
{
|
||||
/* The thread has previously exited. We need to delete it
|
||||
@@ -3451,10 +3491,12 @@ linux_proc_pending_signals (int pid, sig
|
||||
fclose (procfile);
|
||||
@@ -4153,8 +4193,10 @@ linux_nat_xfer_osdata (struct target_ops
|
||||
return len;
|
||||
}
|
||||
|
||||
+/* Transfer from the specific LWP currently set by PID of INFERIOR_PTID. */
|
||||
+
|
||||
static LONGEST
|
||||
-linux_xfer_partial (struct target_ops *ops, enum target_object object,
|
||||
- const char *annex, gdb_byte *readbuf,
|
||||
- const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
||||
+linux_xfer_partial_lwp (struct target_ops *ops, enum target_object object,
|
||||
+ const char *annex, gdb_byte *readbuf,
|
||||
+ const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
||||
const char *annex, gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
||||
{
|
||||
LONGEST xfer;
|
||||
|
||||
@@ -3495,6 +3537,45 @@ linux_xfer_partial (struct target_ops *o
|
||||
@@ -4201,6 +4243,45 @@ linux_xfer_partial (struct target_ops *o
|
||||
offset, len);
|
||||
}
|
||||
|
||||
|
@ -28,10 +28,10 @@ http://sourceware.org/ml/gdb-patches/2008-01/msg00042.html
|
||||
* s390-nat.c (s390_fix_watch_points): Fix its compilation failure
|
||||
- rename it to S390_FIX_WATCH_POINTS_LIST.
|
||||
|
||||
Index: gdb-6.7.50.20080227/gdb/amd64-linux-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/amd64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/amd64-linux-nat.c 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/amd64-linux-nat.c 2008-03-01 16:33:40.000000000 +0100
|
||||
--- gdb-6.8.50.20081128.orig/gdb/amd64-linux-nat.c 2008-12-07 10:09:19.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/amd64-linux-nat.c 2008-12-07 10:10:20.000000000 +0100
|
||||
@@ -408,25 +408,43 @@ amd64_linux_dr_set (ptid_t ptid, int reg
|
||||
void
|
||||
amd64_linux_dr_set_control (unsigned long control)
|
||||
@ -128,7 +128,7 @@ Index: gdb-6.7.50.20080227/gdb/amd64-linux-nat.c
|
||||
|
||||
|
||||
/* This function is called by libthread_db as part of its handling of
|
||||
@@ -520,6 +573,41 @@ amd64_linux_child_post_startup_inferior
|
||||
@@ -520,6 +573,43 @@ amd64_linux_child_post_startup_inferior
|
||||
i386_cleanup_dregs ();
|
||||
super_post_startup_inferior (ptid);
|
||||
}
|
||||
@ -152,7 +152,9 @@ Index: gdb-6.7.50.20080227/gdb/amd64-linux-nat.c
|
||||
+ parent_pid = ptid_get_lwp (last_ptid);
|
||||
+ if (parent_pid == 0)
|
||||
+ parent_pid = ptid_get_pid (last_ptid);
|
||||
+ child_pid = last_status.value.related_pid;
|
||||
+ child_pid = ptid_get_lwp (last_status.value.related_pid);
|
||||
+ if (child_pid == 0)
|
||||
+ child_pid = ptid_get_pid (last_status.value.related_pid);
|
||||
+
|
||||
+ if (! follow_child)
|
||||
+ {
|
||||
@ -170,7 +172,7 @@ Index: gdb-6.7.50.20080227/gdb/amd64-linux-nat.c
|
||||
|
||||
|
||||
/* Provide a prototype to silence -Wmissing-prototypes. */
|
||||
@@ -556,6 +644,9 @@ _initialize_amd64_linux_nat (void)
|
||||
@@ -558,6 +648,9 @@ _initialize_amd64_linux_nat (void)
|
||||
linux_elfcore_write_prstatus = amd64_linux_elfcore_write_prstatus;
|
||||
linux_elfcore_write_prfpreg = amd64_linux_elfcore_write_prfpreg;
|
||||
|
||||
@ -180,24 +182,24 @@ Index: gdb-6.7.50.20080227/gdb/amd64-linux-nat.c
|
||||
/* Register the target. */
|
||||
linux_nat_add_target (t);
|
||||
linux_nat_set_new_thread (t, amd64_linux_new_thread);
|
||||
Index: gdb-6.7.50.20080227/gdb/config/i386/nm-i386.h
|
||||
Index: gdb-6.8.50.20081128/gdb/config/i386/nm-i386.h
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/config/i386/nm-i386.h 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/config/i386/nm-i386.h 2008-03-01 10:50:39.000000000 +0100
|
||||
@@ -110,6 +110,8 @@ extern int i386_stopped_by_watchpoint (v
|
||||
#define target_remove_hw_breakpoint(bp_tgt) \
|
||||
i386_remove_hw_breakpoint (bp_tgt)
|
||||
--- gdb-6.8.50.20081128.orig/gdb/config/i386/nm-i386.h 2008-03-01 05:39:36.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/config/i386/nm-i386.h 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -120,6 +120,8 @@ extern int i386_stopped_by_watchpoint (v
|
||||
|
||||
#endif /* I386_WATCHPOINTS_IN_TARGET_VECTOR */
|
||||
|
||||
+extern void i386_detach_breakpoints (int detached_pid);
|
||||
+
|
||||
#endif /* I386_USE_GENERIC_WATCHPOINTS */
|
||||
|
||||
#endif /* NM_I386_H */
|
||||
Index: gdb-6.7.50.20080227/gdb/i386-linux-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/i386-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/i386-linux-nat.c 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/i386-linux-nat.c 2008-03-01 16:33:40.000000000 +0100
|
||||
@@ -655,21 +655,42 @@ i386_linux_dr_set_control (unsigned long
|
||||
--- gdb-6.8.50.20081128.orig/gdb/i386-linux-nat.c 2008-03-13 13:22:13.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/i386-linux-nat.c 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -634,21 +634,42 @@ i386_linux_dr_set_control (unsigned long
|
||||
ptid_t ptid;
|
||||
|
||||
i386_linux_dr[DR_CONTROL] = control;
|
||||
@ -247,7 +249,7 @@ Index: gdb-6.7.50.20080227/gdb/i386-linux-nat.c
|
||||
}
|
||||
|
||||
void
|
||||
@@ -694,6 +715,41 @@ i386_linux_new_thread (ptid_t ptid)
|
||||
@@ -673,6 +694,41 @@ i386_linux_new_thread (ptid_t ptid)
|
||||
|
||||
i386_linux_dr_set (ptid, DR_CONTROL, i386_linux_dr[DR_CONTROL]);
|
||||
}
|
||||
@ -289,7 +291,7 @@ Index: gdb-6.7.50.20080227/gdb/i386-linux-nat.c
|
||||
|
||||
|
||||
/* Called by libthread_db. Returns a pointer to the thread local
|
||||
@@ -833,6 +889,40 @@ i386_linux_child_post_startup_inferior (
|
||||
@@ -812,6 +868,40 @@ i386_linux_child_post_startup_inferior (
|
||||
super_post_startup_inferior (ptid);
|
||||
}
|
||||
|
||||
@ -312,7 +314,7 @@ Index: gdb-6.7.50.20080227/gdb/i386-linux-nat.c
|
||||
+ parent_pid = ptid_get_lwp (last_ptid);
|
||||
+ if (parent_pid == 0)
|
||||
+ parent_pid = ptid_get_pid (last_ptid);
|
||||
+ child_pid = last_status.value.related_pid;
|
||||
+ child_pid = ptid_get_pid (last_status.value.related_pid);
|
||||
+
|
||||
+ if (! follow_child)
|
||||
+ {
|
||||
@ -330,7 +332,7 @@ Index: gdb-6.7.50.20080227/gdb/i386-linux-nat.c
|
||||
void
|
||||
_initialize_i386_linux_nat (void)
|
||||
{
|
||||
@@ -852,6 +942,9 @@ _initialize_i386_linux_nat (void)
|
||||
@@ -833,6 +923,9 @@ _initialize_i386_linux_nat (void)
|
||||
t->to_fetch_registers = i386_linux_fetch_inferior_registers;
|
||||
t->to_store_registers = i386_linux_store_inferior_registers;
|
||||
|
||||
@ -340,11 +342,11 @@ Index: gdb-6.7.50.20080227/gdb/i386-linux-nat.c
|
||||
/* Register the target. */
|
||||
linux_nat_add_target (t);
|
||||
linux_nat_set_new_thread (t, i386_linux_new_thread);
|
||||
Index: gdb-6.7.50.20080227/gdb/i386-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/i386-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/i386-nat.c 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/i386-nat.c 2008-03-01 10:50:39.000000000 +0100
|
||||
@@ -544,6 +544,17 @@ i386_remove_watchpoint (CORE_ADDR addr,
|
||||
--- gdb-6.8.50.20081128.orig/gdb/i386-nat.c 2008-03-01 05:39:36.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/i386-nat.c 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -545,6 +545,17 @@ i386_remove_watchpoint (CORE_ADDR addr,
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -362,10 +364,10 @@ Index: gdb-6.7.50.20080227/gdb/i386-nat.c
|
||||
/* Return non-zero if we can watch a memory region that starts at
|
||||
address ADDR and whose length is LEN bytes. */
|
||||
|
||||
Index: gdb-6.7.50.20080227/gdb/ia64-linux-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/ia64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/ia64-linux-nat.c 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/ia64-linux-nat.c 2008-03-01 10:50:39.000000000 +0100
|
||||
--- gdb-6.8.50.20081128.orig/gdb/ia64-linux-nat.c 2008-12-07 10:06:03.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/ia64-linux-nat.c 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -583,6 +583,12 @@ ia64_linux_insert_watchpoint (CORE_ADDR
|
||||
return 0;
|
||||
}
|
||||
@ -437,7 +439,7 @@ Index: gdb-6.7.50.20080227/gdb/ia64-linux-nat.c
|
||||
+ parent_pid = ptid_get_lwp (last_ptid);
|
||||
+ if (parent_pid == 0)
|
||||
+ parent_pid = ptid_get_pid (last_ptid);
|
||||
+ child_pid = last_status.value.related_pid;
|
||||
+ child_pid = ptid_get_pid (last_status.value.related_pid);
|
||||
+
|
||||
+ if (! follow_child)
|
||||
+ {
|
||||
@ -465,11 +467,11 @@ Index: gdb-6.7.50.20080227/gdb/ia64-linux-nat.c
|
||||
/* Register the target. */
|
||||
linux_nat_add_target (t);
|
||||
linux_nat_set_new_thread (t, ia64_linux_new_thread);
|
||||
Index: gdb-6.7.50.20080227/gdb/ppc-linux-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/ppc-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/ppc-linux-nat.c 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/ppc-linux-nat.c 2008-03-01 10:50:39.000000000 +0100
|
||||
@@ -847,6 +847,12 @@ ppc_linux_insert_watchpoint (CORE_ADDR a
|
||||
--- gdb-6.8.50.20081128.orig/gdb/ppc-linux-nat.c 2008-11-18 22:39:47.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/ppc-linux-nat.c 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -1118,6 +1118,12 @@ ppc_linux_insert_watchpoint (CORE_ADDR a
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -482,7 +484,7 @@ Index: gdb-6.7.50.20080227/gdb/ppc-linux-nat.c
|
||||
static int
|
||||
ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw)
|
||||
{
|
||||
@@ -854,6 +860,11 @@ ppc_linux_remove_watchpoint (CORE_ADDR a
|
||||
@@ -1125,6 +1131,11 @@ ppc_linux_remove_watchpoint (CORE_ADDR a
|
||||
ptid_t ptid;
|
||||
long dabr_value = 0;
|
||||
|
||||
@ -494,7 +496,7 @@ Index: gdb-6.7.50.20080227/gdb/ppc-linux-nat.c
|
||||
saved_dabr_value = 0;
|
||||
ALL_LWPS (lp, ptid)
|
||||
if (ptrace (PTRACE_SET_DEBUGREG, TIDGET (ptid), 0, saved_dabr_value) < 0)
|
||||
@@ -867,6 +878,15 @@ ppc_linux_new_thread (ptid_t ptid)
|
||||
@@ -1138,6 +1149,15 @@ ppc_linux_new_thread (ptid_t ptid)
|
||||
ptrace (PTRACE_SET_DEBUGREG, TIDGET (ptid), 0, saved_dabr_value);
|
||||
}
|
||||
|
||||
@ -510,8 +512,8 @@ Index: gdb-6.7.50.20080227/gdb/ppc-linux-nat.c
|
||||
static int
|
||||
ppc_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
|
||||
{
|
||||
@@ -976,6 +996,40 @@ ppc_linux_read_description (struct targe
|
||||
return NULL;
|
||||
@@ -1318,6 +1338,40 @@ ppc_linux_read_description (struct targe
|
||||
return isa205? tdesc_powerpc_isa205_32l : tdesc_powerpc_32l;
|
||||
}
|
||||
|
||||
+static int (*ppc_linux_super_follow_fork) (struct target_ops *ops,
|
||||
@ -533,7 +535,7 @@ Index: gdb-6.7.50.20080227/gdb/ppc-linux-nat.c
|
||||
+ parent_pid = ptid_get_lwp (last_ptid);
|
||||
+ if (parent_pid == 0)
|
||||
+ parent_pid = ptid_get_pid (last_ptid);
|
||||
+ child_pid = last_status.value.related_pid;
|
||||
+ child_pid = ptid_get_pid (last_status.value.related_pid);
|
||||
+
|
||||
+ if (! follow_child)
|
||||
+ {
|
||||
@ -551,7 +553,7 @@ Index: gdb-6.7.50.20080227/gdb/ppc-linux-nat.c
|
||||
void _initialize_ppc_linux_nat (void);
|
||||
|
||||
void
|
||||
@@ -1000,6 +1054,9 @@ _initialize_ppc_linux_nat (void)
|
||||
@@ -1343,6 +1397,9 @@ _initialize_ppc_linux_nat (void)
|
||||
|
||||
t->to_read_description = ppc_linux_read_description;
|
||||
|
||||
@ -561,10 +563,10 @@ Index: gdb-6.7.50.20080227/gdb/ppc-linux-nat.c
|
||||
/* Register the target. */
|
||||
linux_nat_add_target (t);
|
||||
linux_nat_set_new_thread (t, ppc_linux_new_thread);
|
||||
Index: gdb-6.7.50.20080227/gdb/s390-nat.c
|
||||
Index: gdb-6.8.50.20081128/gdb/s390-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/s390-nat.c 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/s390-nat.c 2008-03-01 10:50:39.000000000 +0100
|
||||
--- gdb-6.8.50.20081128.orig/gdb/s390-nat.c 2007-11-07 07:36:57.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/s390-nat.c 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -283,21 +283,15 @@ s390_stopped_by_watchpoint (void)
|
||||
}
|
||||
|
||||
@ -642,7 +644,7 @@ Index: gdb-6.7.50.20080227/gdb/s390-nat.c
|
||||
for (parea = &watch_base; *parea; parea = &(*parea)->next)
|
||||
if ((*parea)->lo_addr == addr
|
||||
&& (*parea)->hi_addr == addr + len - 1)
|
||||
@@ -378,8 +378,10 @@ s390_remove_watchpoint (CORE_ADDR addr,
|
||||
@@ -361,8 +378,10 @@ s390_remove_watchpoint (CORE_ADDR addr,
|
||||
|
||||
if (!*parea)
|
||||
{
|
||||
@ -653,7 +655,7 @@ Index: gdb-6.7.50.20080227/gdb/s390-nat.c
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -375,6 +392,15 @@ s390_remove_watchpoint (CORE_ADDR addr,
|
||||
@@ -375,6 +394,15 @@ s390_remove_watchpoint (CORE_ADDR addr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -669,7 +671,7 @@ Index: gdb-6.7.50.20080227/gdb/s390-nat.c
|
||||
static int
|
||||
s390_can_use_hw_breakpoint (int type, int cnt, int othertype)
|
||||
{
|
||||
@@ -387,6 +413,39 @@ s390_region_ok_for_hw_watchpoint (CORE_A
|
||||
@@ -387,6 +415,39 @@ s390_region_ok_for_hw_watchpoint (CORE_A
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -691,7 +693,7 @@ Index: gdb-6.7.50.20080227/gdb/s390-nat.c
|
||||
+ parent_pid = ptid_get_lwp (last_ptid);
|
||||
+ if (parent_pid == 0)
|
||||
+ parent_pid = ptid_get_pid (last_ptid);
|
||||
+ child_pid = last_status.value.related_pid;
|
||||
+ child_pid = ptid_get_pid (last_status.value.related_pid);
|
||||
+
|
||||
+ if (! follow_child)
|
||||
+ {
|
||||
@ -709,7 +711,7 @@ Index: gdb-6.7.50.20080227/gdb/s390-nat.c
|
||||
|
||||
void _initialize_s390_nat (void);
|
||||
|
||||
@@ -410,6 +469,9 @@ _initialize_s390_nat (void)
|
||||
@@ -410,6 +471,9 @@ _initialize_s390_nat (void)
|
||||
t->to_insert_watchpoint = s390_insert_watchpoint;
|
||||
t->to_remove_watchpoint = s390_remove_watchpoint;
|
||||
|
||||
@ -719,8 +721,10 @@ Index: gdb-6.7.50.20080227/gdb/s390-nat.c
|
||||
/* Register the target. */
|
||||
linux_nat_add_target (t);
|
||||
linux_nat_set_new_thread (t, s390_fix_watch_points);
|
||||
--- /dev/null 2008-03-30 17:41:11.547000906 -0400
|
||||
+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/watchpoint-fork-forkoff.c 2008-03-30 18:09:25.000000000 -0400
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork-forkoff.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork-forkoff.c 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -0,0 +1,172 @@
|
||||
+/* Test case for forgotten hw-watchpoints after fork()-off of a process.
|
||||
+
|
||||
@ -894,10 +898,10 @@ Index: gdb-6.7.50.20080227/gdb/s390-nat.c
|
||||
+#else
|
||||
+# error "!FOLLOW_PARENT && !FOLLOW_CHILD"
|
||||
+#endif
|
||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c 2008-03-01 10:50:39.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -0,0 +1,154 @@
|
||||
+/* Test case for forgotten hw-watchpoints after fork()-off of a process.
|
||||
+
|
||||
@ -1053,10 +1057,10 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.c 2008-03-01 10:50:39.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork.c 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -0,0 +1,56 @@
|
||||
+/* Test case for forgotten hw-watchpoints after fork()-off of a process.
|
||||
+
|
||||
@ -1114,10 +1118,10 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.exp 2008-03-01 10:50:39.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork.exp 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -0,0 +1,140 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1259,11 +1263,11 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.exp
|
||||
+if {[istarget "*-*-linux*"]} {
|
||||
+ test child FOLLOW_CHILD
|
||||
+}
|
||||
Index: gdb-6.7.50.20080227/gdb/doc/gdb.texinfo
|
||||
Index: gdb-6.8.50.20081128/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/doc/gdb.texinfo 2008-03-01 10:50:39.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/doc/gdb.texinfo 2008-03-01 10:50:39.000000000 +0100
|
||||
@@ -3386,6 +3386,14 @@ confident that no other thread can becom
|
||||
--- gdb-6.8.50.20081128.orig/gdb/doc/gdb.texinfo 2008-12-07 10:09:20.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/doc/gdb.texinfo 2008-12-07 10:10:20.000000000 +0100
|
||||
@@ -3587,6 +3587,14 @@ confident that no other thread can becom
|
||||
software watchpoints as usual. However, @value{GDBN} may not notice
|
||||
when a non-current thread's activity changes the expression. (Hardware
|
||||
watchpoints, in contrast, watch an expression in all threads.)
|
||||
@ -1278,11 +1282,11 @@ Index: gdb-6.7.50.20080227/gdb/doc/gdb.texinfo
|
||||
@end quotation
|
||||
|
||||
@xref{set remote hardware-watchpoint-limit}.
|
||||
Index: gdb-6.7.50.20080227/gdb/config/i386/nm-linux.h
|
||||
Index: gdb-6.8.50.20081128/gdb/config/i386/nm-linux.h
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/config/i386/nm-linux.h 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/config/i386/nm-linux.h 2008-03-01 10:50:39.000000000 +0100
|
||||
@@ -44,6 +44,17 @@ extern void i386_linux_dr_reset_addr (in
|
||||
--- gdb-6.8.50.20081128.orig/gdb/config/i386/nm-linux.h 2008-03-01 05:39:36.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/config/i386/nm-linux.h 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -45,6 +45,16 @@ extern void i386_linux_dr_reset_addr (in
|
||||
extern unsigned long i386_linux_dr_get_status (void);
|
||||
#define I386_DR_LOW_GET_STATUS() \
|
||||
i386_linux_dr_get_status ()
|
||||
@ -1294,17 +1298,16 @@ Index: gdb-6.7.50.20080227/gdb/config/i386/nm-linux.h
|
||||
+
|
||||
+/* Override basic i386 macros for watchpoint and hardware breakpoint
|
||||
+ insertion/removal to support threads. */
|
||||
+#undef target_remove_watchpoint
|
||||
+#define target_remove_watchpoint(addr, len, type) \
|
||||
+ i386_linux_remove_watchpoint (addr, len, type)
|
||||
|
||||
|
||||
#ifdef HAVE_PTRACE_GETFPXREGS
|
||||
Index: gdb-6.7.50.20080227/gdb/config/i386/nm-linux64.h
|
||||
Index: gdb-6.8.50.20081128/gdb/config/i386/nm-linux64.h
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/config/i386/nm-linux64.h 2008-03-01 10:38:02.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/config/i386/nm-linux64.h 2008-03-01 10:50:39.000000000 +0100
|
||||
@@ -50,4 +50,15 @@ extern unsigned long amd64_linux_dr_get_
|
||||
--- gdb-6.8.50.20081128.orig/gdb/config/i386/nm-linux64.h 2008-03-01 05:39:36.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/config/i386/nm-linux64.h 2008-12-07 10:09:20.000000000 +0100
|
||||
@@ -51,4 +51,14 @@ extern unsigned long amd64_linux_dr_get_
|
||||
#define I386_DR_LOW_GET_STATUS() \
|
||||
amd64_linux_dr_get_status ()
|
||||
|
||||
@ -1315,8 +1318,21 @@ Index: gdb-6.7.50.20080227/gdb/config/i386/nm-linux64.h
|
||||
+
|
||||
+/* Override basic amd64 macros for watchpoint and hardware breakpoint
|
||||
+ insertion/removal to support threads. */
|
||||
+#undef target_remove_watchpoint
|
||||
+#define target_remove_watchpoint(addr, len, type) \
|
||||
+ amd64_linux_remove_watchpoint (addr, len, type)
|
||||
+
|
||||
#endif /* nm-linux64.h */
|
||||
Index: gdb-6.8.50.20081128/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/target.h 2008-12-07 10:09:19.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/target.h 2008-12-07 10:10:38.000000000 +0100
|
||||
@@ -1123,7 +1123,9 @@ extern char *normal_pid_to_str (ptid_t p
|
||||
#ifndef target_insert_watchpoint
|
||||
#define target_insert_watchpoint(addr, len, type) \
|
||||
(*current_target.to_insert_watchpoint) (addr, len, type)
|
||||
+#endif
|
||||
|
||||
+#ifndef target_remove_watchpoint
|
||||
#define target_remove_watchpoint(addr, len, type) \
|
||||
(*current_target.to_remove_watchpoint) (addr, len, type)
|
||||
#endif
|
||||
|
@ -1,6 +1,8 @@
|
||||
--- ./gdb/infrun.c 22 Jun 2007 12:47:48 -0000 1.243
|
||||
+++ ./gdb/infrun.c 25 Jun 2007 20:43:18 -0000
|
||||
@@ -466,7 +467,7 @@ static const char *scheduler_enums[] = {
|
||||
Index: gdb-6.8.50.20081128/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/infrun.c 2008-12-09 15:56:16.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/infrun.c 2008-12-09 15:56:59.000000000 +0100
|
||||
@@ -931,7 +931,7 @@ static const char *scheduler_enums[] = {
|
||||
schedlock_step,
|
||||
NULL
|
||||
};
|
||||
@ -9,3 +11,31 @@
|
||||
static void
|
||||
show_scheduler_mode (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.mi/mi-console.exp 2008-08-06 14:52:08.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp 2008-12-09 15:59:34.000000000 +0100
|
||||
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
|
||||
mi_run_to_main
|
||||
|
||||
+# thread-id=\"all\" vs. thread-id=\"1\" below:
|
||||
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
|
||||
+
|
||||
# Next over the hello() call which will produce lots of output
|
||||
mi_gdb_test "220-exec-next" \
|
||||
"220\\^running(\r\n\\*running,thread-id=\"all\")?" \
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2008-08-06 14:52:08.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp 2008-12-09 16:00:33.000000000 +0100
|
||||
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
|
||||
mi_run_to_main
|
||||
|
||||
+# thread-id=\"all\" vs. thread-id=\"1\" below:
|
||||
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
|
||||
+
|
||||
# Next over the hello() call which will produce lots of output
|
||||
send_gdb "220-exec-next\n"
|
||||
gdb_expect {
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/inferior.h
|
||||
Index: gdb-6.8.50.20081209/gdb/inferior.h
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/inferior.h 2008-02-14 23:03:57.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/inferior.h 2008-02-19 14:15:01.000000000 +0100
|
||||
@@ -179,7 +179,15 @@ extern void reopen_exec_file (void);
|
||||
--- gdb-6.8.50.20081209.orig/gdb/inferior.h 2008-11-20 01:35:23.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/inferior.h 2008-12-10 01:22:23.000000000 +0100
|
||||
@@ -168,7 +168,15 @@ extern void reopen_exec_file (void);
|
||||
/* The `resume' routine should only be called in special circumstances.
|
||||
Normally, use `proceed', which handles a lot of bookkeeping. */
|
||||
|
||||
@ -42,21 +42,20 @@ Index: gdb-6.8cvs20080219/gdb/inferior.h
|
||||
|
||||
/* From misc files */
|
||||
|
||||
Index: gdb-6.8cvs20080219/gdb/infrun.c
|
||||
Index: gdb-6.8.50.20081209/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/infrun.c 2008-02-14 23:03:57.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/infrun.c 2008-02-19 14:24:37.000000000 +0100
|
||||
@@ -74,7 +74,8 @@ static void set_schedlock_func (char *ar
|
||||
--- gdb-6.8.50.20081209.orig/gdb/infrun.c 2008-12-02 20:20:23.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/infrun.c 2008-12-10 01:23:46.000000000 +0100
|
||||
@@ -73,7 +73,7 @@ static int follow_fork (void);
|
||||
static void set_schedlock_func (char *args, int from_tty,
|
||||
struct cmd_list_element *c);
|
||||
|
||||
struct execution_control_state;
|
||||
-static int currently_stepping (struct thread_info *tp);
|
||||
+static enum resume_step currently_stepping (struct thread_info *tp);
|
||||
|
||||
-static int currently_stepping (struct execution_control_state *ecs);
|
||||
+static enum resume_step currently_stepping (struct execution_control_state
|
||||
+ *ecs);
|
||||
static int currently_stepping_callback (struct thread_info *tp, void *data);
|
||||
|
||||
static void xdb_handle_command (char *args, int from_tty);
|
||||
|
||||
@@ -508,15 +509,18 @@ set_schedlock_func (char *args, int from
|
||||
@@ -961,7 +961,7 @@ set_schedlock_func (char *args, int from
|
||||
STEP nonzero if we should step (zero to continue instead).
|
||||
SIG is the signal to give the inferior (zero for none). */
|
||||
void
|
||||
@ -65,25 +64,29 @@ Index: gdb-6.8cvs20080219/gdb/infrun.c
|
||||
{
|
||||
int should_resume = 1;
|
||||
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
|
||||
@@ -975,10 +975,12 @@ resume (int step, enum target_signal sig
|
||||
QUIT;
|
||||
|
||||
if (debug_infrun)
|
||||
- fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%d, signal=%d)\n",
|
||||
- step, sig);
|
||||
+ fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d)\n",
|
||||
- fprintf_unfiltered (gdb_stdlog,
|
||||
- "infrun: resume (step=%d, signal=%d), "
|
||||
- "trap_expected=%d\n",
|
||||
- step, sig, tp->trap_expected);
|
||||
+ fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d), "
|
||||
+ "trap_expected=%d\n",
|
||||
+ (step == RESUME_STEP_CONTINUE ? "RESUME_STEP_CONTINUE"
|
||||
+ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
|
||||
+ : "RESUME_STEP_NEEDED")),
|
||||
+ sig);
|
||||
+ sig, tp->trap_expected);
|
||||
|
||||
/* FIXME: calling breakpoint_here_p (read_pc ()) three times! */
|
||||
|
||||
@@ -632,9 +636,10 @@ a command like `return' or `jump' to con
|
||||
/* Some targets (e.g. Solaris x86) have a kernel bug when stepping
|
||||
over an instruction that causes a page fault without triggering
|
||||
@@ -1127,9 +1129,10 @@ a command like `return' or `jump' to con
|
||||
individually. */
|
||||
resume_ptid = inferior_ptid;
|
||||
}
|
||||
|
||||
- if ((scheduler_mode == schedlock_on)
|
||||
+ if (scheduler_mode == schedlock_on
|
||||
- else if ((scheduler_mode == schedlock_on)
|
||||
+ else if (scheduler_mode == schedlock_on
|
||||
|| (scheduler_mode == schedlock_step
|
||||
- && (step || singlestep_breakpoints_inserted_p)))
|
||||
+ && (step == RESUME_STEP_USER
|
||||
@ -91,23 +94,23 @@ Index: gdb-6.8cvs20080219/gdb/infrun.c
|
||||
{
|
||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||
resume_ptid = inferior_ptid;
|
||||
@@ -742,7 +747,7 @@ static CORE_ADDR prev_pc;
|
||||
void
|
||||
proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
|
||||
{
|
||||
@@ -1302,7 +1305,7 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
struct thread_info *tp;
|
||||
CORE_ADDR pc = regcache_read_pc (regcache);
|
||||
- int oneproc = 0;
|
||||
+ enum resume_step resume_step = RESUME_STEP_CONTINUE;
|
||||
|
||||
if (step > 0)
|
||||
step_start_function = find_pc_function (read_pc ());
|
||||
@@ -756,13 +761,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
step one instruction before inserting breakpoints so that
|
||||
we do not stop right away (and report a second hit at this
|
||||
breakpoint). */
|
||||
step_start_function = find_pc_function (pc);
|
||||
@@ -1322,13 +1325,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
actually be executing the breakpoint insn anyway.
|
||||
We'll be (un-)executing the previous instruction. */
|
||||
|
||||
- oneproc = 1;
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
else if (gdbarch_single_step_through_delay_p (current_gdbarch)
|
||||
&& gdbarch_single_step_through_delay (current_gdbarch,
|
||||
else if (gdbarch_single_step_through_delay_p (gdbarch)
|
||||
&& gdbarch_single_step_through_delay (gdbarch,
|
||||
get_current_frame ()))
|
||||
/* We stepped onto an instruction that needs to be stepped
|
||||
again before re-inserting the breakpoint, do so. */
|
||||
@ -116,21 +119,25 @@ Index: gdb-6.8cvs20080219/gdb/infrun.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -786,9 +791,9 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
that reported the most recent event. If a step-over is required
|
||||
it returns TRUE and sets the current thread to the old thread. */
|
||||
@@ -1359,13 +1362,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
is required it returns TRUE and sets the current thread to
|
||||
the old thread. */
|
||||
if (prepare_to_proceed (step))
|
||||
- oneproc = 1;
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
}
|
||||
|
||||
/* prepare_to_proceed may change the current thread. */
|
||||
tp = inferior_thread ();
|
||||
|
||||
- if (oneproc)
|
||||
+ if (resume_step == RESUME_STEP_USER)
|
||||
/* We will get a trace trap after one instruction.
|
||||
Continue it automatically and insert breakpoints then. */
|
||||
stepping_over_breakpoint = 1;
|
||||
@@ -832,8 +837,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
updated correctly when the inferior is stopped. */
|
||||
prev_pc = read_pc ();
|
||||
{
|
||||
tp->trap_expected = 1;
|
||||
/* If displaced stepping is enabled, we can step over the
|
||||
@@ -1451,8 +1454,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
/* Reset to normal state. */
|
||||
init_infwait_state ();
|
||||
|
||||
+ if (step)
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
@ -138,30 +145,21 @@ Index: gdb-6.8cvs20080219/gdb/infrun.c
|
||||
+ resume_step = RESUME_STEP_NEEDED;
|
||||
+
|
||||
/* Resume inferior. */
|
||||
- resume (oneproc || step || bpstat_should_step (), stop_signal);
|
||||
+ resume (resume_step, stop_signal);
|
||||
- resume (oneproc || step || bpstat_should_step (), tp->stop_signal);
|
||||
+ resume (resume_step, tp->stop_signal);
|
||||
|
||||
/* Wait for it to stop (if not standalone)
|
||||
and in any case decode why it stopped, and act accordingly. */
|
||||
@@ -2723,14 +2733,21 @@ process_event_stop_test:
|
||||
|
||||
/* Are we in the middle of stepping? */
|
||||
@@ -3690,10 +3698,16 @@ currently_stepping_callback (struct thre
|
||||
return tp != data && currently_stepping_thread (tp);
|
||||
}
|
||||
|
||||
-static int
|
||||
+static enum resume_step
|
||||
currently_stepping (struct execution_control_state *ecs)
|
||||
currently_stepping (struct thread_info *tp)
|
||||
{
|
||||
- return ((!ecs->handling_longjmp
|
||||
- && ((step_range_end && step_resume_breakpoint == NULL)
|
||||
- || stepping_over_breakpoint))
|
||||
- || ecs->stepping_through_solib_after_catch
|
||||
- || bpstat_should_step ());
|
||||
+ if (!ecs->handling_longjmp
|
||||
+ && ((step_range_end && step_resume_breakpoint == NULL)
|
||||
+ || stepping_over_breakpoint))
|
||||
+ return RESUME_STEP_USER;
|
||||
+
|
||||
+ if (ecs->stepping_through_solib_after_catch)
|
||||
- return currently_stepping_thread (tp) || bpstat_should_step ();
|
||||
+ if (currently_stepping_thread (tp))
|
||||
+ return RESUME_STEP_USER;
|
||||
+
|
||||
+ if (bpstat_should_step ())
|
||||
@ -170,12 +168,12 @@ Index: gdb-6.8cvs20080219/gdb/infrun.c
|
||||
+ return RESUME_STEP_CONTINUE;
|
||||
}
|
||||
|
||||
/* Subroutine call with source code we should not step over. Do step
|
||||
Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
||||
/* Inferior has stepped into a subroutine call with source code that
|
||||
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/linux-nat.c 2008-02-14 23:03:57.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/linux-nat.c 2008-02-19 14:15:01.000000000 +0100
|
||||
@@ -1751,7 +1751,10 @@ count_events_callback (struct lwp_info *
|
||||
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-02 08:57:36.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:22:23.000000000 +0100
|
||||
@@ -2343,7 +2343,10 @@ count_events_callback (struct lwp_info *
|
||||
static int
|
||||
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
|
||||
{
|
||||
@ -187,10 +185,10 @@ Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
Index: gdb-6.8cvs20080219/gdb/linux-nat.h
|
||||
Index: gdb-6.8.50.20081209/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-6.8cvs20080219.orig/gdb/linux-nat.h 2008-02-14 23:03:58.000000000 +0100
|
||||
+++ gdb-6.8cvs20080219/gdb/linux-nat.h 2008-02-19 14:15:01.000000000 +0100
|
||||
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.h 2008-07-27 23:12:40.000000000 +0200
|
||||
+++ gdb-6.8.50.20081209/gdb/linux-nat.h 2008-12-10 01:22:23.000000000 +0100
|
||||
@@ -55,8 +55,8 @@ struct lwp_info
|
||||
/* If non-zero, a pending wait status. */
|
||||
int status;
|
||||
|
@ -1,7 +1,8 @@
|
||||
diff -up -rup gdb-6.8-clean/gdb/linux-nat.c gdb-6.8-new/gdb/linux-nat.c
|
||||
--- gdb-6.8-clean/gdb/linux-nat.c 2008-08-26 00:04:08.000000000 +0200
|
||||
+++ gdb-6.8-new/gdb/linux-nat.c 2008-08-26 00:04:50.000000000 +0200
|
||||
@@ -1083,15 +1083,17 @@ resume_set_callback (struct lwp_info *lp
|
||||
Index: gdb-6.8.50.20081128/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c 2008-12-04 01:44:26.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/linux-nat.c 2008-12-04 10:21:32.000000000 +0100
|
||||
@@ -1661,15 +1661,17 @@ resume_set_callback (struct lwp_info *lp
|
||||
}
|
||||
|
||||
static void
|
||||
@ -21,7 +22,7 @@ diff -up -rup gdb-6.8-clean/gdb/linux-nat.c gdb-6.8-new/gdb/linux-nat.c
|
||||
target_pid_to_str (ptid),
|
||||
signo ? strsignal (signo) : "0",
|
||||
target_pid_to_str (inferior_ptid));
|
||||
@@ -2076,6 +2078,9 @@ retry:
|
||||
@@ -2586,6 +2588,9 @@ linux_nat_filter_event (int lwpid, int s
|
||||
/* Check if the thread has exited. */
|
||||
if ((WIFEXITED (status) || WIFSIGNALED (status)) && num_lwps > 1)
|
||||
{
|
||||
@ -31,29 +32,17 @@ diff -up -rup gdb-6.8-clean/gdb/linux-nat.c gdb-6.8-new/gdb/linux-nat.c
|
||||
/* If this is the main thread, we must stop all threads and
|
||||
verify if they are still alive. This is because in the nptl
|
||||
thread model, there is no signal issued for exiting LWPs
|
||||
@@ -2096,6 +2101,10 @@ retry:
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LLW: %s exited.\n",
|
||||
target_pid_to_str (lp->ptid));
|
||||
+ /* Backward compatibility with:
|
||||
+ gdb-6.3-step-thread-exit-20050211.patch */
|
||||
+ if (step == RESUME_STEP_USER)
|
||||
+ printf_unfiltered ("[Stepped over thread exit]\n");
|
||||
@@ -2609,6 +2614,26 @@ linux_nat_filter_event (int lwpid, int s
|
||||
|
||||
exit_lwp (lp);
|
||||
|
||||
@@ -2104,8 +2113,29 @@ retry:
|
||||
ignored. */
|
||||
if (num_lwps > 0)
|
||||
{
|
||||
- /* Make sure there is at least one thread running. */
|
||||
- gdb_assert (iterate_over_lwps (running_callback, NULL));
|
||||
+ if (step == RESUME_STEP_USER)
|
||||
+ {
|
||||
+ /* Now stop the closest LWP's ... */
|
||||
+ lp = find_lwp_pid (pid_to_ptid (pid));
|
||||
+ if (!lp)
|
||||
+ lp = lwp_list;
|
||||
+ gdb_assert (lp != NULL);
|
||||
+ errno = 0;
|
||||
+ ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
|
||||
+ (void *) (unsigned long) SIGSTOP);
|
||||
@ -66,11 +55,7 @@ diff -up -rup gdb-6.8-clean/gdb/linux-nat.c gdb-6.8-new/gdb/linux-nat.c
|
||||
+ /* Avoid the silent `delayed SIGSTOP' handling. */
|
||||
+ lp->signalled = 0;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Make sure there is at least one thread running. */
|
||||
+ gdb_assert (iterate_over_lwps (running_callback, NULL));
|
||||
+ }
|
||||
|
||||
/* Discard the event. */
|
||||
status = 0;
|
||||
+
|
||||
/* If there is at least one more LWP, then the exit signal was
|
||||
not the end of the debugged application and should be
|
||||
ignored. */
|
||||
|
@ -1,114 +0,0 @@
|
||||
Fix i386-on-x86_64 debugging giving the warning:
|
||||
warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4
|
||||
|
||||
[base]
|
||||
|
||||
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.7.
|
||||
|
||||
Index: gdb-6.8/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/symfile.c 2008-07-14 10:28:15.000000000 +0200
|
||||
+++ gdb-6.8/gdb/symfile.c 2008-07-14 10:28:21.000000000 +0200
|
||||
@@ -715,6 +715,38 @@ default_symfile_segments (bfd *abfd)
|
||||
return data;
|
||||
}
|
||||
|
||||
+/* Find lowest loadable section to be used as starting point for continguous
|
||||
+ sections. FIXME!! won't work without call to find .text first, but this
|
||||
+ assumes text is lowest section. vDSO was seen for i386-on-amd64 processes
|
||||
+ to have no `.text' as it has `.text.vsyscall', `.text.sigreturn' etc.
|
||||
+ instead. Execution of this function has been delayed till it is really
|
||||
+ needed as it is broken for vDSOs, fortunately it is never needed on
|
||||
+ GNU/Linux. */
|
||||
+
|
||||
+static CORE_ADDR
|
||||
+find_lower_offset (struct objfile *objfile)
|
||||
+{
|
||||
+ asection *lower_sect;
|
||||
+
|
||||
+ lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
|
||||
+ if (lower_sect == NULL)
|
||||
+ bfd_map_over_sections (objfile->obfd, find_lowest_section,
|
||||
+ &lower_sect);
|
||||
+ if (lower_sect == NULL)
|
||||
+ warning (_("no loadable sections found in added symbol-file %s"),
|
||||
+ objfile->name);
|
||||
+ else
|
||||
+ if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0)
|
||||
+ warning (_("Lowest section in %s is %s at %s"),
|
||||
+ objfile->name,
|
||||
+ bfd_section_name (objfile->obfd, lower_sect),
|
||||
+ paddr (bfd_section_vma (objfile->obfd, lower_sect)));
|
||||
+ if (lower_sect != NULL)
|
||||
+ return bfd_section_vma (objfile->obfd, lower_sect);
|
||||
+ else
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* Process a symbol file, as either the main file or as a dynamically
|
||||
loaded file.
|
||||
|
||||
@@ -813,32 +845,11 @@ syms_from_objfile (struct objfile *objfi
|
||||
happens for the PA64 port. */
|
||||
if (!mainline && addrs && addrs->other[0].name)
|
||||
{
|
||||
- asection *lower_sect;
|
||||
asection *sect;
|
||||
- CORE_ADDR lower_offset;
|
||||
+ CORE_ADDR lower_offset = 0; /* Shut up the GCC warning. */
|
||||
+ int lower_offset_set = 0;
|
||||
int i;
|
||||
|
||||
- /* Find lowest loadable section to be used as starting point for
|
||||
- continguous sections. FIXME!! won't work without call to find
|
||||
- .text first, but this assumes text is lowest section. */
|
||||
- lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
|
||||
- if (lower_sect == NULL)
|
||||
- bfd_map_over_sections (objfile->obfd, find_lowest_section,
|
||||
- &lower_sect);
|
||||
- if (lower_sect == NULL)
|
||||
- warning (_("no loadable sections found in added symbol-file %s"),
|
||||
- objfile->name);
|
||||
- else
|
||||
- if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0)
|
||||
- warning (_("Lowest section in %s is %s at %s"),
|
||||
- objfile->name,
|
||||
- bfd_section_name (objfile->obfd, lower_sect),
|
||||
- paddr (bfd_section_vma (objfile->obfd, lower_sect)));
|
||||
- if (lower_sect != NULL)
|
||||
- lower_offset = bfd_section_vma (objfile->obfd, lower_sect);
|
||||
- else
|
||||
- lower_offset = 0;
|
||||
-
|
||||
/* Calculate offsets for the loadable sections.
|
||||
FIXME! Sections must be in order of increasing loadable section
|
||||
so that contiguous sections can use the lower-offset!!!
|
||||
@@ -860,6 +871,7 @@ syms_from_objfile (struct objfile *objfi
|
||||
addrs->other[i].addr
|
||||
-= bfd_section_vma (objfile->obfd, sect);
|
||||
lower_offset = addrs->other[i].addr;
|
||||
+ lower_offset_set = 1;
|
||||
/* This is the index used by BFD. */
|
||||
addrs->other[i].sectindex = sect->index ;
|
||||
}
|
||||
@@ -872,7 +884,17 @@ syms_from_objfile (struct objfile *objfi
|
||||
}
|
||||
}
|
||||
else
|
||||
- addrs->other[i].addr = lower_offset;
|
||||
+ {
|
||||
+ /* Delay finding LOWER_OFFSET only if it is needed. Otherwise
|
||||
+ we would print a warning to detect a values never used. */
|
||||
+ if (!lower_offset_set)
|
||||
+ {
|
||||
+ lower_offset = find_lower_offset (objfile);
|
||||
+ lower_offset_set = 1;
|
||||
+ }
|
||||
+
|
||||
+ addrs->other[i].addr = lower_offset;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
2007-10-29 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* symfile.c (reread_symbols): Reread also EXEC_BFD if changed.
|
||||
|
||||
2008-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* symfile.c (reread_symbols): Reload whole EXEC_BFD by the EXEC module
|
||||
as its in-place patching did cause regressions.
|
||||
|
||||
Testcase: Regressed by the gdb-6.7 version of `gdb-6.3-pie-20050110.patch':
|
||||
Running ../../../gdb/testsuite/gdb.base/reread.exp ...
|
||||
PASS: gdb.base/reread.exp: breakpoint foo in first file (PRMS 13484)
|
||||
PASS: gdb.base/reread.exp: run to foo() (PRMS 13484)
|
||||
-PASS: gdb.base/reread.exp: run to foo() second time
|
||||
+FAIL: gdb.base/reread.exp: run to foo() second time
|
||||
PASS: gdb.base/reread.exp: second pass: breakpoint foo in first file
|
||||
-PASS: gdb.base/reread.exp: second pass: run to foo()
|
||||
-PASS: gdb.base/reread.exp: second pass: continue to completion
|
||||
-PASS: gdb.base/reread.exp: second pass: run to foo() second time
|
||||
+FAIL: gdb.base/reread.exp: second pass: run to foo()
|
||||
+FAIL: gdb.base/reread.exp: second pass: continue to completion
|
||||
+FAIL: gdb.base/reread.exp: second pass: run to foo() second time
|
||||
|
||||
--- gdb-6.7-orig/gdb/symfile.c 2007-10-29 01:04:35.000000000 +0100
|
||||
+++ gdb-6.7-patched/gdb/symfile.c 2007-10-29 01:03:13.000000000 +0100
|
||||
@@ -2810,6 +2810,12 @@ reread_symbols (void)
|
||||
/* We need to do this whenever any symbols go away. */
|
||||
make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/);
|
||||
|
||||
+ if (exec_bfd != NULL && strcmp (bfd_get_filename (objfile->obfd),
|
||||
+ bfd_get_filename (exec_bfd)) == 0)
|
||||
+ {
|
||||
+ exec_ops.to_open (bfd_get_filename (objfile->obfd), 0);
|
||||
+ }
|
||||
+
|
||||
/* Clean up any state BFD has sitting around. We don't need
|
||||
to close the descriptor but BFD lacks a way of closing the
|
||||
BFD without closing the descriptor. */
|
@ -91,39 +91,6 @@
|
||||
|
||||
|
||||
|
||||
2008-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* ada-lang.c (get_selections): Variable PROMPT made non-const and
|
||||
initialized with a trailing space now. Use PROMPT_ARG of
|
||||
COMMAND_LINE_INPUT instead of printing it ourselves.
|
||||
|
||||
--- ./gdb/ada-lang.c 6 Apr 2008 08:56:36 -0000 1.137
|
||||
+++ ./gdb/ada-lang.c 21 Apr 2008 13:33:42 -0000
|
||||
@@ -3424,18 +3424,15 @@ get_selections (int *choices, int n_choi
|
||||
int is_all_choice, char *annotation_suffix)
|
||||
{
|
||||
char *args;
|
||||
- const char *prompt;
|
||||
+ char *prompt;
|
||||
int n_chosen;
|
||||
int first_choice = is_all_choice ? 2 : 1;
|
||||
|
||||
prompt = getenv ("PS2");
|
||||
if (prompt == NULL)
|
||||
- prompt = ">";
|
||||
+ prompt = "> ";
|
||||
|
||||
- printf_unfiltered (("%s "), prompt);
|
||||
- gdb_flush (gdb_stdout);
|
||||
-
|
||||
- args = command_line_input ((char *) NULL, 0, annotation_suffix);
|
||||
+ args = command_line_input (prompt, 0, annotation_suffix);
|
||||
|
||||
if (args == NULL)
|
||||
error_no_arg (_("one or more choice numbers"));
|
||||
|
||||
|
||||
|
||||
Found on RHEL-5.s390x.
|
||||
|
||||
--- sources/gdb/testsuite/gdb.base/dump.exp-orig 2008-08-28 11:44:40.000000000 +0200
|
||||
|
@ -1,7 +1,8 @@
|
||||
diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/linux-nat.c gdb-6.8/gdb/linux-nat.c
|
||||
--- gdb-6.8-base/gdb/linux-nat.c 2008-08-27 18:09:35.000000000 +0200
|
||||
+++ gdb-6.8/gdb/linux-nat.c 2008-08-27 18:48:40.000000000 +0200
|
||||
@@ -117,6 +117,9 @@
|
||||
Index: gdb-6.8.50.20081128/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c 2008-12-06 21:48:18.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/linux-nat.c 2008-12-06 22:00:42.000000000 +0100
|
||||
@@ -199,6 +199,9 @@ blocked. */
|
||||
static struct target_ops *linux_ops;
|
||||
static struct target_ops linux_ops_saved;
|
||||
|
||||
@ -11,19 +12,23 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/linux-nat.c gdb
|
||||
/* The method to call, if any, when a new thread is attached. */
|
||||
static void (*linux_nat_new_thread) (ptid_t);
|
||||
|
||||
@@ -531,6 +534,11 @@ linux_child_follow_fork (struct target_o
|
||||
@@ -871,7 +874,14 @@ linux_child_follow_fork (struct target_o
|
||||
fork_save_infrun_state (fp, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
- target_detach (NULL, 0);
|
||||
+ {
|
||||
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
|
||||
+ In this point of code it cannot be 1 as we would not get FORK
|
||||
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
|
||||
+ We would have to first TARGET_STOP and WAITPID it as with running
|
||||
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
|
||||
target_detach (NULL, 0);
|
||||
}
|
||||
+ target_detach (NULL, 0);
|
||||
+ }
|
||||
|
||||
@@ -936,6 +944,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
inferior_ptid = ptid_build (child_pid, child_pid, 0);
|
||||
add_inferior (child_pid);
|
||||
@@ -1203,6 +1213,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNPAW: Attaching to a stopped process\n");
|
||||
@ -31,9 +36,9 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/linux-nat.c gdb
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1128,6 +1137,9 @@ get_pending_status (struct lwp_info *lp,
|
||||
else
|
||||
@@ -1535,6 +1546,9 @@ GPT: lwp %s had signal %s, but it is in
|
||||
*status = lp->status;
|
||||
}
|
||||
|
||||
+ if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
|
||||
+ *status = W_STOPCODE (SIGSTOP);
|
||||
@ -41,16 +46,16 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/linux-nat.c gdb
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1207,6 +1219,8 @@ linux_nat_detach (char *args, int from_t
|
||||
|
||||
trap_ptid = null_ptid;
|
||||
@@ -1631,6 +1645,8 @@ linux_nat_detach (struct target_ops *ops
|
||||
inferior_ptid = pid_to_ptid (pid);
|
||||
linux_ops->to_detach (ops, args, from_tty);
|
||||
|
||||
+ pid_was_stopped = 0;
|
||||
+
|
||||
/* Destroy LWP info; it's no longer valid. */
|
||||
init_lwp_list ();
|
||||
|
||||
@@ -1340,6 +1354,14 @@ linux_nat_resume (ptid_t ptid, int step,
|
||||
if (target_can_async_p ())
|
||||
drain_queued_events (pid);
|
||||
}
|
||||
@@ -1787,6 +1803,14 @@ linux_nat_resume (ptid_t ptid, int step_
|
||||
resume_callback. */
|
||||
lp->stopped = 0;
|
||||
|
||||
@ -65,9 +70,19 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/linux-nat.c gdb
|
||||
if (resume_all)
|
||||
iterate_over_lwps (resume_callback, NULL);
|
||||
|
||||
diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attach-into-signal.c gdb-6.8/gdb/testsuite/gdb.threads/attach-into-signal.c
|
||||
--- gdb-6.8-base/gdb/testsuite/gdb.threads/attach-into-signal.c 2008-08-27 17:44:23.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.threads/attach-into-signal.c 2008-08-27 18:13:41.000000000 +0200
|
||||
@@ -3281,6 +3305,8 @@ linux_nat_mourn_inferior (struct target_
|
||||
there are other viable forks to debug. Delete the exiting
|
||||
one and context-switch to the first available. */
|
||||
linux_fork_mourn_inferior ();
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
}
|
||||
|
||||
static LONGEST
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-into-signal.c 2008-05-01 20:50:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.c 2008-12-06 21:57:23.000000000 +0100
|
||||
@@ -1,19 +1,20 @@
|
||||
/* This testcase is part of GDB, the GNU debugger.
|
||||
|
||||
@ -106,9 +121,10 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.t
|
||||
|
||||
abort ();
|
||||
/* NOTREACHED */
|
||||
diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attach-into-signal.exp gdb-6.8/gdb/testsuite/gdb.threads/attach-into-signal.exp
|
||||
--- gdb-6.8-base/gdb/testsuite/gdb.threads/attach-into-signal.exp 2008-08-27 17:44:23.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.threads/attach-into-signal.exp 2008-08-27 18:13:41.000000000 +0200
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-into-signal.exp 2008-05-01 20:50:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.exp 2008-12-06 21:57:23.000000000 +0100
|
||||
@@ -1,27 +1,29 @@
|
||||
-# Copyright 2008
|
||||
-# Free Software Foundation, Inc.
|
||||
@ -240,9 +256,10 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.t
|
||||
-gdb_test "set debug lin-lwp 1" "" ""
|
||||
-
|
||||
corefunc threaded
|
||||
diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attach-stopped.c gdb-6.8/gdb/testsuite/gdb.threads/attach-stopped.c
|
||||
--- gdb-6.8-base/gdb/testsuite/gdb.threads/attach-stopped.c 2008-08-27 17:44:23.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.threads/attach-stopped.c 2008-08-27 18:13:41.000000000 +0200
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-stopped.c 2008-05-01 20:50:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.c 2008-12-06 21:57:23.000000000 +0100
|
||||
@@ -1,19 +1,20 @@
|
||||
/* This testcase is part of GDB, the GNU debugger.
|
||||
|
||||
@ -268,9 +285,10 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.t
|
||||
|
||||
/* This program is intended to be started outside of gdb, then
|
||||
manually stopped via a signal. */
|
||||
diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attach-stopped.exp gdb-6.8/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
--- gdb-6.8-base/gdb/testsuite/gdb.threads/attach-stopped.exp 2008-08-27 17:44:23.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.threads/attach-stopped.exp 2008-08-27 18:13:41.000000000 +0200
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2008-05-01 20:50:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.exp 2008-12-06 21:57:23.000000000 +0100
|
||||
@@ -1,26 +1,33 @@
|
||||
-# Copyright 2008
|
||||
-# Free Software Foundation, Inc.
|
||||
@ -380,9 +398,10 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.t
|
||||
|
||||
set test "$threadtype: attach2 to stopped, after setting file"
|
||||
gdb_test_multiple "attach $testpid" "$test" {
|
||||
diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attachstop-mt.c gdb-6.8/gdb/testsuite/gdb.threads/attachstop-mt.c
|
||||
--- gdb-6.8-base/gdb/testsuite/gdb.threads/attachstop-mt.c 2008-08-27 17:44:23.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.threads/attachstop-mt.c 2008-08-27 18:13:41.000000000 +0200
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attachstop-mt.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attachstop-mt.c 2008-05-01 20:50:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attachstop-mt.c 2008-12-06 21:57:23.000000000 +0100
|
||||
@@ -1,19 +1,20 @@
|
||||
/* This testcase is part of GDB, the GNU debugger.
|
||||
|
||||
@ -408,52 +427,11 @@ diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.t
|
||||
|
||||
/* This program is intended to be started outside of gdb, then
|
||||
manually stopped via a signal. */
|
||||
diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attachstop-mt.exp gdb-6.8/gdb/testsuite/gdb.threads/attachstop-mt.exp
|
||||
--- gdb-6.8-base/gdb/testsuite/gdb.threads/attachstop-mt.exp 2008-08-27 17:44:23.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.threads/attachstop-mt.exp 2008-08-27 18:13:41.000000000 +0200
|
||||
@@ -1,26 +1,33 @@
|
||||
-# Copyright 2008
|
||||
-# Free Software Foundation, Inc.
|
||||
+# Copyright 2006
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
-# the Free Software Foundation; either version 3 of the License, or
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
-#
|
||||
+#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
-#
|
||||
+#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# This test was created by modifying gdb.threads/attachstop.
|
||||
# This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
||||
# Regression for: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=197584
|
||||
|
||||
+if $tracelevel then {
|
||||
+ strace $tracelevel
|
||||
+}
|
||||
+
|
||||
+set prms_id 0
|
||||
+set bug_id 0
|
||||
+
|
||||
# This test only works on Linux
|
||||
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
|
||||
- continue
|
||||
+if { ![istarget "*-*-linux-gnu*"] } {
|
||||
+ return 0
|
||||
}
|
||||
|
||||
set testfile "attachstop-mt"
|
||||
@@ -169,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" "
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attachstop-mt.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attachstop-mt.exp 2008-09-28 13:39:45.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attachstop-mt.exp 2008-12-06 21:57:23.000000000 +0100
|
||||
@@ -176,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" "
|
||||
# Exit and detach the process.
|
||||
gdb_exit
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@
|
||||
--- gdb-6.8/gdb/Makefile.in-orig 2008-06-17 15:16:20.000000000 +0200
|
||||
+++ gdb-6.8/gdb/Makefile.in 2008-06-17 15:17:01.000000000 +0200
|
||||
@@ -1100,16 +1100,22 @@ YYOBJ = c-exp.o \
|
||||
|
||||
DISTSTUFF = $(YYFILES)
|
||||
|
||||
+DEPDIR = .deps
|
||||
+
|
||||
# Prevent Sun make from putting in the machine type. Setting
|
||||
# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
|
||||
.c.o:
|
||||
- $(CC) -c $(INTERNAL_CFLAGS) $<
|
||||
+ @mkdir -p $(DEPDIR)
|
||||
+ $(CC) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c $(INTERNAL_CFLAGS) $<
|
||||
+ @mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
|
||||
all: gdb$(EXEEXT) $(CONFIG_ALL)
|
||||
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
|
||||
.PHONY: all-tui
|
||||
all-tui: $(TUI)$(EXEEXT)
|
||||
|
||||
+-include $(DEPDIR)/*.Po
|
||||
+
|
||||
installcheck:
|
||||
|
||||
# The check target can not use subdir_do, because subdir_do does not
|
@ -1,18 +0,0 @@
|
||||
A part of:
|
||||
http://sourceware.org/ml/gdb-cvs/2008-06/msg00160.html
|
||||
|
||||
It was crashing the RH testcase `gdb.threads/watchthreads2.exp'.
|
||||
|
||||
diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/breakpoint.c gdb-6.8-patched/gdb/breakpoint.c
|
||||
--- gdb-6.8/gdb/breakpoint.c 2008-08-28 11:56:56.000000000 +0200
|
||||
+++ gdb-6.8-patched/gdb/breakpoint.c 2008-08-28 11:53:43.000000000 +0200
|
||||
@@ -3173,6 +3173,9 @@ bpstat_what (bpstat bs)
|
||||
/* I suspect this can happen if it was a momentary breakpoint
|
||||
which has since been deleted. */
|
||||
continue;
|
||||
+ if (bs->breakpoint_at->owner == NULL)
|
||||
+ bs_class = bp_nostop;
|
||||
+ else
|
||||
switch (bs->breakpoint_at->owner->type)
|
||||
{
|
||||
case bp_none:
|
@ -1,7 +1,8 @@
|
||||
diff -d -urpN gdb-6.8.4/bfd/elf-bfd.h gdb-6.8.7/bfd/elf-bfd.h
|
||||
--- gdb-6.8.4/bfd/elf-bfd.h 2008-07-25 16:16:15.000000000 +0200
|
||||
+++ gdb-6.8.7/bfd/elf-bfd.h 2008-07-29 12:29:20.000000000 +0200
|
||||
@@ -2125,7 +2125,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
|
||||
Index: gdb-6.8.50.20081209/bfd/elf-bfd.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/bfd/elf-bfd.h 2008-12-03 15:50:57.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/bfd/elf-bfd.h 2008-12-10 01:35:08.000000000 +0100
|
||||
@@ -2154,7 +2154,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
|
||||
extern char *elfcore_write_note
|
||||
(bfd *, char *, int *, const char *, int, const void *, int);
|
||||
extern char *elfcore_write_prpsinfo
|
||||
@ -10,10 +11,11 @@ diff -d -urpN gdb-6.8.4/bfd/elf-bfd.h gdb-6.8.7/bfd/elf-bfd.h
|
||||
extern char *elfcore_write_prstatus
|
||||
(bfd *, char *, int *, long, int, const void *);
|
||||
extern char * elfcore_write_pstatus
|
||||
diff -d -urpN gdb-6.8.4/bfd/elf.c gdb-6.8.7/bfd/elf.c
|
||||
--- gdb-6.8.4/bfd/elf.c 2008-07-25 16:16:15.000000000 +0200
|
||||
+++ gdb-6.8.7/bfd/elf.c 2008-07-29 12:45:52.000000000 +0200
|
||||
@@ -8256,6 +8256,7 @@ char *
|
||||
Index: gdb-6.8.50.20081209/bfd/elf.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/bfd/elf.c 2008-12-03 15:50:57.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/bfd/elf.c 2008-12-10 01:35:08.000000000 +0100
|
||||
@@ -8345,6 +8345,7 @@ char *
|
||||
elfcore_write_prpsinfo (bfd *abfd,
|
||||
char *buf,
|
||||
int *bufsiz,
|
||||
@ -21,7 +23,7 @@ diff -d -urpN gdb-6.8.4/bfd/elf.c gdb-6.8.7/bfd/elf.c
|
||||
const char *fname,
|
||||
const char *psargs)
|
||||
{
|
||||
@@ -8282,9 +8283,15 @@ elfcore_write_prpsinfo (bfd *abfd,
|
||||
@@ -8371,9 +8372,15 @@ elfcore_write_prpsinfo (bfd *abfd,
|
||||
int note_type = NT_PRPSINFO;
|
||||
#endif
|
||||
|
||||
@ -40,7 +42,7 @@ diff -d -urpN gdb-6.8.4/bfd/elf.c gdb-6.8.7/bfd/elf.c
|
||||
return elfcore_write_note (abfd, buf, bufsiz,
|
||||
note_name, note_type, &data, sizeof (data));
|
||||
}
|
||||
@@ -8299,9 +8306,15 @@ elfcore_write_prpsinfo (bfd *abfd,
|
||||
@@ -8388,9 +8395,15 @@ elfcore_write_prpsinfo (bfd *abfd,
|
||||
int note_type = NT_PRPSINFO;
|
||||
#endif
|
||||
|
||||
@ -59,9 +61,10 @@ diff -d -urpN gdb-6.8.4/bfd/elf.c gdb-6.8.7/bfd/elf.c
|
||||
return elfcore_write_note (abfd, buf, bufsiz,
|
||||
note_name, note_type, &data, sizeof (data));
|
||||
}
|
||||
diff -d -urpN gdb-6.8.4/gdb/amd64-linux-nat.c gdb-6.8.7/gdb/amd64-linux-nat.c
|
||||
--- gdb-6.8.4/gdb/amd64-linux-nat.c 2008-07-25 16:16:15.000000000 +0200
|
||||
+++ gdb-6.8.7/gdb/amd64-linux-nat.c 2008-07-29 12:46:02.000000000 +0200
|
||||
Index: gdb-6.8.50.20081209/gdb/amd64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/amd64-linux-nat.c 2008-12-10 01:28:28.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/amd64-linux-nat.c 2008-12-10 01:35:08.000000000 +0100
|
||||
@@ -139,6 +139,7 @@ static int amd64_linux_gregset32_reg_off
|
||||
|
||||
static char *
|
||||
@ -95,10 +98,11 @@ diff -d -urpN gdb-6.8.4/gdb/amd64-linux-nat.c gdb-6.8.7/gdb/amd64-linux-nat.c
|
||||
}
|
||||
|
||||
static void
|
||||
diff -d -urpN gdb-6.8.4/gdb/fbsd-nat.c gdb-6.8.7/gdb/fbsd-nat.c
|
||||
--- gdb-6.8.4/gdb/fbsd-nat.c 2008-07-25 16:16:15.000000000 +0200
|
||||
+++ gdb-6.8.7/gdb/fbsd-nat.c 2008-07-29 12:29:20.000000000 +0200
|
||||
@@ -184,6 +184,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
|
||||
Index: gdb-6.8.50.20081209/gdb/fbsd-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/fbsd-nat.c 2008-10-28 16:22:12.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/fbsd-nat.c 2008-12-10 01:35:08.000000000 +0100
|
||||
@@ -210,6 +210,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
|
||||
psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
|
||||
|
||||
note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
|
||||
@ -106,18 +110,19 @@ diff -d -urpN gdb-6.8.4/gdb/fbsd-nat.c gdb-6.8.7/gdb/fbsd-nat.c
|
||||
fname, psargs);
|
||||
}
|
||||
|
||||
diff -d -urpN gdb-6.8.4/gdb/linux-nat.c gdb-6.8.7/gdb/linux-nat.c
|
||||
--- gdb-6.8.4/gdb/linux-nat.c 2008-07-25 16:16:15.000000000 +0200
|
||||
+++ gdb-6.8.7/gdb/linux-nat.c 2008-07-29 13:50:52.000000000 +0200
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "gdbthread.h" /* for struct thread_info etc. */
|
||||
#include "gdb_stat.h" /* for struct stat */
|
||||
#include <fcntl.h> /* for O_RDONLY */
|
||||
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:28:14.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:35:25.000000000 +0100
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <sys/types.h>
|
||||
#include "gdb_dirent.h"
|
||||
#include "xml-support.h"
|
||||
+#include "gdb_procfs32.h" /* for struct elf_prpsinfo32 */
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
@@ -108,7 +109,7 @@ static LONGEST (*super_xfer_partial) (st
|
||||
#ifdef HAVE_PERSONALITY
|
||||
# include <sys/personality.h>
|
||||
@@ -216,7 +217,7 @@ static LONGEST (*super_xfer_partial) (st
|
||||
/* This functions make elfcore note sections.
|
||||
They may get overriden by code adjusting data for multi-target builds. */
|
||||
char *(*linux_elfcore_write_prpsinfo)
|
||||
@ -126,8 +131,8 @@ diff -d -urpN gdb-6.8.4/gdb/linux-nat.c gdb-6.8.7/gdb/linux-nat.c
|
||||
char *(*linux_elfcore_write_prstatus)
|
||||
(bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
|
||||
static char *
|
||||
@@ -2812,6 +2813,159 @@ linux_nat_do_registers (bfd *obfd, ptid_
|
||||
note_data, note_size);
|
||||
@@ -3614,6 +3615,159 @@ linux_nat_corefile_thread_callback (stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/* Should be always true for Linux */
|
||||
@ -286,7 +291,7 @@ diff -d -urpN gdb-6.8.4/gdb/linux-nat.c gdb-6.8.7/gdb/linux-nat.c
|
||||
/* Fills the "to_make_corefile_note" target vector. Builds the note
|
||||
section for a corefile, and returns it in a malloc buffer. */
|
||||
|
||||
@@ -2831,8 +2985,14 @@ linux_nat_make_corefile_notes (bfd *obfd
|
||||
@@ -3633,8 +3787,14 @@ linux_nat_make_corefile_notes (bfd *obfd
|
||||
|
||||
if (get_exec_file (0))
|
||||
{
|
||||
@ -301,7 +306,7 @@ diff -d -urpN gdb-6.8.4/gdb/linux-nat.c gdb-6.8.7/gdb/linux-nat.c
|
||||
if (get_inferior_args ())
|
||||
{
|
||||
char *string_end;
|
||||
@@ -2848,9 +3008,15 @@ linux_nat_make_corefile_notes (bfd *obfd
|
||||
@@ -3650,9 +3810,15 @@ linux_nat_make_corefile_notes (bfd *obfd
|
||||
psargs_end - string_end);
|
||||
}
|
||||
}
|
||||
@ -319,10 +324,11 @@ diff -d -urpN gdb-6.8.4/gdb/linux-nat.c gdb-6.8.7/gdb/linux-nat.c
|
||||
}
|
||||
|
||||
/* Dump information for threads. */
|
||||
diff -d -urpN gdb-6.8.4/gdb/linux-nat.h gdb-6.8.7/gdb/linux-nat.h
|
||||
--- gdb-6.8.4/gdb/linux-nat.h 2008-07-25 16:16:15.000000000 +0200
|
||||
+++ gdb-6.8.7/gdb/linux-nat.h 2008-07-29 12:29:20.000000000 +0200
|
||||
@@ -133,7 +133,7 @@ struct siginfo *linux_nat_get_siginfo (p
|
||||
Index: gdb-6.8.50.20081209/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.h 2008-12-10 01:27:33.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/linux-nat.h 2008-12-10 01:35:08.000000000 +0100
|
||||
@@ -138,7 +138,7 @@ struct siginfo *linux_nat_get_siginfo (p
|
||||
/* These functions make elfcore note sections.
|
||||
They may get overriden by code adjusting data for multi-target builds. */
|
||||
extern char *(*linux_elfcore_write_prpsinfo)
|
||||
@ -331,10 +337,11 @@ diff -d -urpN gdb-6.8.4/gdb/linux-nat.h gdb-6.8.7/gdb/linux-nat.h
|
||||
extern char *(*linux_elfcore_write_prstatus)
|
||||
(bfd *, char *, int *, long, int, const void *);
|
||||
extern char *(*linux_elfcore_write_prfpreg)
|
||||
diff -d -urpN gdb-6.8.4/gdb/procfs.c gdb-6.8.7/gdb/procfs.c
|
||||
--- gdb-6.8.4/gdb/procfs.c 2008-07-25 16:16:15.000000000 +0200
|
||||
+++ gdb-6.8.7/gdb/procfs.c 2008-07-29 12:29:20.000000000 +0200
|
||||
@@ -6118,6 +6118,7 @@ procfs_make_note_section (bfd *obfd, int
|
||||
Index: gdb-6.8.50.20081209/gdb/procfs.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/procfs.c 2008-11-09 12:27:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/procfs.c 2008-12-10 01:35:08.000000000 +0100
|
||||
@@ -6181,6 +6181,7 @@ procfs_make_note_section (bfd *obfd, int
|
||||
note_data = (char *) elfcore_write_prpsinfo (obfd,
|
||||
note_data,
|
||||
note_size,
|
||||
|
@ -1,545 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2008-10/msg00019.html
|
||||
|
||||
gdb/
|
||||
2008-10-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
|
||||
* c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
|
||||
(m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
|
||||
valops.c (value_cast), varobj.c (c_number_of_children): Replace
|
||||
TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
|
||||
TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
|
||||
* parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
|
||||
* f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
|
||||
(f77_get_upperbound): ... this function handling now only
|
||||
TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
|
||||
(f77_get_dynamic_lowerbound): Replace with ...
|
||||
(f77_get_lowerbound): ... this function handling now only
|
||||
TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
|
||||
(f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
|
||||
Update their callers.
|
||||
* eval.c (evaluate_subexp_standard): Update their callers.
|
||||
* f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
|
||||
(f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
|
||||
prototypes.
|
||||
(BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
|
||||
* f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
|
||||
the lower_bound_was_default variable. Update the
|
||||
f77_get_dynamic_upperbound, f77_get_upperbound and
|
||||
TYPE_ARRAY_UPPER_BOUND_TYPE calls.
|
||||
* gdbtypes.c (print_bound_type): Remove the function.
|
||||
(recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
|
||||
LOWER_BOUND_TYPE.
|
||||
* gdbtypes.h (enum array_bound_type): Remove.
|
||||
(struct main_type): Remove the fields upper_bound_type and
|
||||
lower_bound_type. Comment the new overload of the field artificial.
|
||||
(TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
|
||||
(TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
|
||||
(TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
|
||||
(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.
|
||||
|
||||
gdb/testsuite/
|
||||
2008-10-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/maint.exp (maint print type): Remove printing
|
||||
UPPER_BOUND_TYPE and LOWER_BOUND_TYPE.
|
||||
|
||||
[ Ported to gdb-6.8fedora. ]
|
||||
|
||||
--- ./gdb/c-typeprint.c 2008-01-01 23:53:09.000000000 +0100
|
||||
+++ ./gdb/c-typeprint.c 2008-10-29 10:55:07.000000000 +0100
|
||||
@@ -542,7 +542,7 @@ c_type_print_varspec_suffix (struct type
|
||||
|
||||
fprintf_filtered (stream, "[");
|
||||
if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
|
||||
- && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
|
||||
+ && !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
fprintf_filtered (stream, "%d",
|
||||
(TYPE_LENGTH (type)
|
||||
/ TYPE_LENGTH (TYPE_TARGET_TYPE (type))));
|
||||
--- ./gdb/eval.c 2008-10-29 10:50:23.000000000 +0100
|
||||
+++ ./gdb/eval.c 2008-10-29 10:55:07.000000000 +0100
|
||||
@@ -1674,13 +1674,8 @@ evaluate_subexp_standard (struct type *e
|
||||
/* Internal type of array is arranged right to left */
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
- retcode = f77_get_dynamic_upperbound (tmp_type, &upper);
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- error (_("Cannot obtain dynamic upper bound"));
|
||||
-
|
||||
- retcode = f77_get_dynamic_lowerbound (tmp_type, &lower);
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- error (_("Cannot obtain dynamic lower bound"));
|
||||
+ upper = f77_get_upperbound (tmp_type);
|
||||
+ lower = f77_get_lowerbound (tmp_type);
|
||||
|
||||
array_size_array[nargs - i - 1] = upper - lower + 1;
|
||||
|
||||
--- ./gdb/f-lang.h 2008-10-29 10:50:23.000000000 +0100
|
||||
+++ ./gdb/f-lang.h 2008-10-29 10:55:07.000000000 +0100
|
||||
@@ -83,9 +83,6 @@ extern SAVED_F77_COMMON_PTR find_common_
|
||||
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
|
||||
#define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
|
||||
|
||||
-#define BOUND_FETCH_OK 1
|
||||
-#define BOUND_FETCH_ERROR -999
|
||||
-
|
||||
/* When reasonable array bounds cannot be fetched, such as when
|
||||
you ask to 'mt print symbols' and there is no stack frame and
|
||||
therefore no way of knowing the bounds of stack-based arrays,
|
||||
@@ -97,9 +94,9 @@ extern SAVED_F77_COMMON_PTR find_common_
|
||||
extern char *real_main_name; /* Name of main function */
|
||||
extern int real_main_c_value; /* C_value field of main function */
|
||||
|
||||
-extern int f77_get_dynamic_upperbound (struct type *, int *);
|
||||
+extern int f77_get_upperbound (struct type *);
|
||||
|
||||
-extern int f77_get_dynamic_lowerbound (struct type *, int *);
|
||||
+extern int f77_get_lowerbound (struct type *);
|
||||
|
||||
extern void f77_get_dynamic_array_length (struct type *);
|
||||
|
||||
--- ./gdb/f-typeprint.c 2008-10-29 10:50:23.000000000 +0100
|
||||
+++ ./gdb/f-typeprint.c 2008-10-29 10:55:07.000000000 +0100
|
||||
@@ -150,7 +150,6 @@ f_type_print_varspec_suffix (struct type
|
||||
int show, int passed_a_ptr, int demangled_args)
|
||||
{
|
||||
int upper_bound, lower_bound;
|
||||
- int lower_bound_was_default = 0;
|
||||
static int arrayprint_recurse_level = 0;
|
||||
int retcode;
|
||||
|
||||
@@ -173,35 +172,19 @@ f_type_print_varspec_suffix (struct type
|
||||
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY)
|
||||
f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
|
||||
|
||||
- retcode = f77_get_dynamic_lowerbound (type, &lower_bound);
|
||||
-
|
||||
- lower_bound_was_default = 0;
|
||||
-
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- fprintf_filtered (stream, "???");
|
||||
- else if (lower_bound == 1) /* The default */
|
||||
- lower_bound_was_default = 1;
|
||||
- else
|
||||
- fprintf_filtered (stream, "%d", lower_bound);
|
||||
-
|
||||
- if (lower_bound_was_default)
|
||||
- lower_bound_was_default = 0;
|
||||
- else
|
||||
- fprintf_filtered (stream, ":");
|
||||
+ lower_bound = f77_get_lowerbound (type);
|
||||
+ if (lower_bound != 1) /* Not the default. */
|
||||
+ fprintf_filtered (stream, "%d:", lower_bound);
|
||||
|
||||
/* Make sure that, if we have an assumed size array, we
|
||||
print out a warning and print the upperbound as '*' */
|
||||
|
||||
- if (TYPE_ARRAY_UPPER_BOUND_TYPE (type) == BOUND_CANNOT_BE_DETERMINED)
|
||||
+ if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
fprintf_filtered (stream, "*");
|
||||
else
|
||||
{
|
||||
- retcode = f77_get_dynamic_upperbound (type, &upper_bound);
|
||||
-
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- fprintf_filtered (stream, "???");
|
||||
- else
|
||||
- fprintf_filtered (stream, "%d", upper_bound);
|
||||
+ upper_bound = f77_get_upperbound (type);
|
||||
+ fprintf_filtered (stream, "%d", upper_bound);
|
||||
}
|
||||
|
||||
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
@@ -351,16 +334,12 @@ f_type_print_base (struct type *type, st
|
||||
case TYPE_CODE_STRING:
|
||||
/* Strings may have dynamic upperbounds (lengths) like arrays. */
|
||||
|
||||
- if (TYPE_ARRAY_UPPER_BOUND_TYPE (type) == BOUND_CANNOT_BE_DETERMINED)
|
||||
+ if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
fprintfi_filtered (level, stream, "character*(*)");
|
||||
else
|
||||
{
|
||||
- retcode = f77_get_dynamic_upperbound (type, &upper_bound);
|
||||
-
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- fprintf_filtered (stream, "character*???");
|
||||
- else
|
||||
- fprintf_filtered (stream, "character*%d", upper_bound);
|
||||
+ upper_bound = f77_get_upperbound (type);
|
||||
+ fprintf_filtered (stream, "character*%d", upper_bound);
|
||||
}
|
||||
break;
|
||||
|
||||
--- ./gdb/f-valprint.c 2008-10-29 10:50:23.000000000 +0100
|
||||
+++ ./gdb/f-valprint.c 2008-10-29 20:48:30.000000000 +0100
|
||||
@@ -61,130 +61,28 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIM
|
||||
#define F77_DIM_OFFSET(n) (f77_array_offset_tbl[n][0])
|
||||
|
||||
int
|
||||
-f77_get_dynamic_lowerbound (struct type *type, int *lower_bound)
|
||||
+f77_get_lowerbound (struct type *type)
|
||||
{
|
||||
- struct frame_info *frame;
|
||||
- CORE_ADDR current_frame_addr;
|
||||
- CORE_ADDR ptr_to_lower_bound;
|
||||
-
|
||||
- switch (TYPE_ARRAY_LOWER_BOUND_TYPE (type))
|
||||
- {
|
||||
- case BOUND_BY_VALUE_ON_STACK:
|
||||
- frame = deprecated_safe_get_selected_frame ();
|
||||
- current_frame_addr = get_frame_base (frame);
|
||||
- if (current_frame_addr > 0)
|
||||
- {
|
||||
- *lower_bound =
|
||||
- read_memory_integer (current_frame_addr +
|
||||
- TYPE_ARRAY_LOWER_BOUND_VALUE (type),
|
||||
- 4);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *lower_bound = DEFAULT_LOWER_BOUND;
|
||||
- return BOUND_FETCH_ERROR;
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
- case BOUND_SIMPLE:
|
||||
- *lower_bound = TYPE_ARRAY_LOWER_BOUND_VALUE (type);
|
||||
- break;
|
||||
-
|
||||
- case BOUND_CANNOT_BE_DETERMINED:
|
||||
- error (_("Lower bound may not be '*' in F77"));
|
||||
- break;
|
||||
-
|
||||
- case BOUND_BY_REF_ON_STACK:
|
||||
- frame = deprecated_safe_get_selected_frame ();
|
||||
- current_frame_addr = get_frame_base (frame);
|
||||
- if (current_frame_addr > 0)
|
||||
- {
|
||||
- ptr_to_lower_bound =
|
||||
- read_memory_typed_address (current_frame_addr +
|
||||
- TYPE_ARRAY_LOWER_BOUND_VALUE (type),
|
||||
- builtin_type_void_data_ptr);
|
||||
- *lower_bound = read_memory_integer (ptr_to_lower_bound, 4);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *lower_bound = DEFAULT_LOWER_BOUND;
|
||||
- return BOUND_FETCH_ERROR;
|
||||
- }
|
||||
- break;
|
||||
+ if (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED (type))
|
||||
+ error (_("Lower bound may not be '*' in F77"));
|
||||
|
||||
- case BOUND_BY_REF_IN_REG:
|
||||
- case BOUND_BY_VALUE_IN_REG:
|
||||
- default:
|
||||
- error (_("??? unhandled dynamic array bound type ???"));
|
||||
- break;
|
||||
- }
|
||||
- return BOUND_FETCH_OK;
|
||||
+ return TYPE_ARRAY_LOWER_BOUND_VALUE (type);
|
||||
}
|
||||
|
||||
int
|
||||
-f77_get_dynamic_upperbound (struct type *type, int *upper_bound)
|
||||
+f77_get_upperbound (struct type *type)
|
||||
{
|
||||
- struct frame_info *frame;
|
||||
- CORE_ADDR current_frame_addr = 0;
|
||||
- CORE_ADDR ptr_to_upper_bound;
|
||||
-
|
||||
- switch (TYPE_ARRAY_UPPER_BOUND_TYPE (type))
|
||||
- {
|
||||
- case BOUND_BY_VALUE_ON_STACK:
|
||||
- frame = deprecated_safe_get_selected_frame ();
|
||||
- current_frame_addr = get_frame_base (frame);
|
||||
- if (current_frame_addr > 0)
|
||||
- {
|
||||
- *upper_bound =
|
||||
- read_memory_integer (current_frame_addr +
|
||||
- TYPE_ARRAY_UPPER_BOUND_VALUE (type),
|
||||
- 4);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *upper_bound = DEFAULT_UPPER_BOUND;
|
||||
- return BOUND_FETCH_ERROR;
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
- case BOUND_SIMPLE:
|
||||
- *upper_bound = TYPE_ARRAY_UPPER_BOUND_VALUE (type);
|
||||
- break;
|
||||
-
|
||||
- case BOUND_CANNOT_BE_DETERMINED:
|
||||
- /* we have an assumed size array on our hands. Assume that
|
||||
- upper_bound == lower_bound so that we show at least
|
||||
- 1 element.If the user wants to see more elements, let
|
||||
- him manually ask for 'em and we'll subscript the
|
||||
- array and show him */
|
||||
- f77_get_dynamic_lowerbound (type, upper_bound);
|
||||
- break;
|
||||
-
|
||||
- case BOUND_BY_REF_ON_STACK:
|
||||
- frame = deprecated_safe_get_selected_frame ();
|
||||
- current_frame_addr = get_frame_base (frame);
|
||||
- if (current_frame_addr > 0)
|
||||
- {
|
||||
- ptr_to_upper_bound =
|
||||
- read_memory_typed_address (current_frame_addr +
|
||||
- TYPE_ARRAY_UPPER_BOUND_VALUE (type),
|
||||
- builtin_type_void_data_ptr);
|
||||
- *upper_bound = read_memory_integer (ptr_to_upper_bound, 4);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *upper_bound = DEFAULT_UPPER_BOUND;
|
||||
- return BOUND_FETCH_ERROR;
|
||||
- }
|
||||
- break;
|
||||
+ if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
+ {
|
||||
+ /* We have an assumed size array on our hands. Assume that
|
||||
+ upper_bound == lower_bound so that we show at least 1 element.
|
||||
+ If the user wants to see more elements, let him manually ask for 'em
|
||||
+ and we'll subscript the array and show him. */
|
||||
|
||||
- case BOUND_BY_REF_IN_REG:
|
||||
- case BOUND_BY_VALUE_IN_REG:
|
||||
- default:
|
||||
- error (_("??? unhandled dynamic array bound type ???"));
|
||||
- break;
|
||||
+ return f77_get_lowerbound (type);
|
||||
}
|
||||
- return BOUND_FETCH_OK;
|
||||
+
|
||||
+ return TYPE_ARRAY_UPPER_BOUND_VALUE (type);
|
||||
}
|
||||
|
||||
/* Obtain F77 adjustable array dimensions */
|
||||
@@ -210,13 +108,8 @@ f77_get_dynamic_length_of_aggregate (str
|
||||
f77_get_dynamic_length_of_aggregate (TYPE_TARGET_TYPE (type));
|
||||
|
||||
/* Recursion ends here, start setting up lengths. */
|
||||
- retcode = f77_get_dynamic_lowerbound (type, &lower_bound);
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- error (_("Cannot obtain valid array lower bound"));
|
||||
-
|
||||
- retcode = f77_get_dynamic_upperbound (type, &upper_bound);
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- error (_("Cannot obtain valid array upper bound"));
|
||||
+ lower_bound = f77_get_lowerbound (type);
|
||||
+ upper_bound = f77_get_upperbound (type);
|
||||
|
||||
/* Patch in a valid length value. */
|
||||
|
||||
@@ -239,16 +132,8 @@ f77_create_arrayprint_offset_tbl (struct
|
||||
|
||||
while ((TYPE_CODE (tmp_type) == TYPE_CODE_ARRAY))
|
||||
{
|
||||
- if (TYPE_ARRAY_UPPER_BOUND_TYPE (tmp_type) == BOUND_CANNOT_BE_DETERMINED)
|
||||
- fprintf_filtered (stream, "<assumed size array> ");
|
||||
-
|
||||
- retcode = f77_get_dynamic_upperbound (tmp_type, &upper);
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- error (_("Cannot obtain dynamic upper bound"));
|
||||
-
|
||||
- retcode = f77_get_dynamic_lowerbound (tmp_type, &lower);
|
||||
- if (retcode == BOUND_FETCH_ERROR)
|
||||
- error (_("Cannot obtain dynamic lower bound"));
|
||||
+ upper = f77_get_upperbound (tmp_type);
|
||||
+ lower = f77_get_lowerbound (tmp_type);
|
||||
|
||||
F77_DIM_SIZE (ndimen) = upper - lower + 1;
|
||||
|
||||
--- ./gdb/gdbtypes.c 2008-10-29 10:50:23.000000000 +0100
|
||||
+++ ./gdb/gdbtypes.c 2008-10-29 10:55:07.000000000 +0100
|
||||
@@ -2529,35 +2529,6 @@ print_cplus_stuff (struct type *type, in
|
||||
}
|
||||
}
|
||||
|
||||
-static void
|
||||
-print_bound_type (int bt)
|
||||
-{
|
||||
- switch (bt)
|
||||
- {
|
||||
- case BOUND_CANNOT_BE_DETERMINED:
|
||||
- printf_filtered ("(BOUND_CANNOT_BE_DETERMINED)");
|
||||
- break;
|
||||
- case BOUND_BY_REF_ON_STACK:
|
||||
- printf_filtered ("(BOUND_BY_REF_ON_STACK)");
|
||||
- break;
|
||||
- case BOUND_BY_VALUE_ON_STACK:
|
||||
- printf_filtered ("(BOUND_BY_VALUE_ON_STACK)");
|
||||
- break;
|
||||
- case BOUND_BY_REF_IN_REG:
|
||||
- printf_filtered ("(BOUND_BY_REF_IN_REG)");
|
||||
- break;
|
||||
- case BOUND_BY_VALUE_IN_REG:
|
||||
- printf_filtered ("(BOUND_BY_VALUE_IN_REG)");
|
||||
- break;
|
||||
- case BOUND_SIMPLE:
|
||||
- printf_filtered ("(BOUND_SIMPLE)");
|
||||
- break;
|
||||
- default:
|
||||
- printf_filtered (_("(unknown bound type)"));
|
||||
- break;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
static struct obstack dont_print_type_obstack;
|
||||
|
||||
void
|
||||
@@ -2692,14 +2663,6 @@ recursive_dump_type (struct type *type,
|
||||
}
|
||||
puts_filtered ("\n");
|
||||
printfi_filtered (spaces, "length %d\n", TYPE_LENGTH (type));
|
||||
- printfi_filtered (spaces, "upper_bound_type 0x%x ",
|
||||
- TYPE_ARRAY_UPPER_BOUND_TYPE (type));
|
||||
- print_bound_type (TYPE_ARRAY_UPPER_BOUND_TYPE (type));
|
||||
- puts_filtered ("\n");
|
||||
- printfi_filtered (spaces, "lower_bound_type 0x%x ",
|
||||
- TYPE_ARRAY_LOWER_BOUND_TYPE (type));
|
||||
- print_bound_type (TYPE_ARRAY_LOWER_BOUND_TYPE (type));
|
||||
- puts_filtered ("\n");
|
||||
printfi_filtered (spaces, "objfile ");
|
||||
gdb_print_host_address (TYPE_OBJFILE (type), gdb_stdout);
|
||||
printf_filtered ("\n");
|
||||
@@ -2942,10 +2942,6 @@ copy_type_recursive (struct objfile *obj
|
||||
|
||||
/* Copy the common fields of types. */
|
||||
TYPE_CODE (new_type) = TYPE_CODE (type);
|
||||
- TYPE_ARRAY_UPPER_BOUND_TYPE (new_type) =
|
||||
- TYPE_ARRAY_UPPER_BOUND_TYPE (type);
|
||||
- TYPE_ARRAY_LOWER_BOUND_TYPE (new_type) =
|
||||
- TYPE_ARRAY_LOWER_BOUND_TYPE (type);
|
||||
if (TYPE_NAME (type))
|
||||
TYPE_NAME (new_type) = xstrdup (TYPE_NAME (type));
|
||||
if (TYPE_TAG_NAME (type))
|
||||
--- ./gdb/gdbtypes.h 2008-10-29 10:50:23.000000000 +0100
|
||||
+++ ./gdb/gdbtypes.h 2008-10-29 10:56:05.000000000 +0100
|
||||
@@ -310,17 +310,6 @@ enum type_code
|
||||
#define TYPE_FLAG_NOTTEXT (1 << 17)
|
||||
#define TYPE_NOTTEXT(t) (TYPE_FLAGS (t) & TYPE_FLAG_NOTTEXT)
|
||||
|
||||
-/* Array bound type. */
|
||||
-enum array_bound_type
|
||||
-{
|
||||
- BOUND_SIMPLE = 0,
|
||||
- BOUND_BY_VALUE_IN_REG,
|
||||
- BOUND_BY_REF_IN_REG,
|
||||
- BOUND_BY_VALUE_ON_STACK,
|
||||
- BOUND_BY_REF_ON_STACK,
|
||||
- BOUND_CANNOT_BE_DETERMINED
|
||||
-};
|
||||
-
|
||||
/* This structure is space-critical.
|
||||
Its layout has been tweaked to reduce the space used. */
|
||||
|
||||
@@ -330,12 +319,6 @@ struct main_type
|
||||
|
||||
ENUM_BITFIELD(type_code) code : 8;
|
||||
|
||||
- /* Array bounds. These fields appear at this location because
|
||||
- they pack nicely here. */
|
||||
-
|
||||
- ENUM_BITFIELD(array_bound_type) upper_bound_type : 4;
|
||||
- ENUM_BITFIELD(array_bound_type) lower_bound_type : 4;
|
||||
-
|
||||
/* Name of this type, or NULL if none.
|
||||
|
||||
This is used for printing only, except by poorly designed C++ code.
|
||||
@@ -437,7 +420,8 @@ struct main_type
|
||||
|
||||
/* For a function or member type, this is 1 if the argument is marked
|
||||
artificial. Artificial arguments should not be shown to the
|
||||
- user. */
|
||||
+ user. For TYPE_CODE_RANGE it is set if the specific bound is not
|
||||
+ defined. */
|
||||
unsigned int artificial : 1;
|
||||
|
||||
/* This flag is zero for non-static fields, 1 for fields whose location
|
||||
@@ -802,10 +786,10 @@ extern void allocate_cplus_struct_type (
|
||||
|
||||
/* Moto-specific stuff for FORTRAN arrays */
|
||||
|
||||
-#define TYPE_ARRAY_UPPER_BOUND_TYPE(thistype) \
|
||||
- TYPE_MAIN_TYPE(thistype)->upper_bound_type
|
||||
-#define TYPE_ARRAY_LOWER_BOUND_TYPE(thistype) \
|
||||
- TYPE_MAIN_TYPE(thistype)->lower_bound_type
|
||||
+#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \
|
||||
+ (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),1))
|
||||
+#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
|
||||
+ (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),0))
|
||||
|
||||
#define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
|
||||
(TYPE_FIELD_BITPOS((TYPE_FIELD_TYPE((arraytype),0)),1))
|
||||
--- ./gdb/m2-typeprint.c 2008-01-01 23:53:11.000000000 +0100
|
||||
+++ ./gdb/m2-typeprint.c 2008-10-29 10:55:12.000000000 +0100
|
||||
@@ -202,7 +202,7 @@ static void m2_array (struct type *type,
|
||||
{
|
||||
fprintf_filtered (stream, "ARRAY [");
|
||||
if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
|
||||
- && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
|
||||
+ && !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
{
|
||||
if (TYPE_INDEX_TYPE (type) != 0)
|
||||
{
|
||||
--- ./gdb/p-typeprint.c 2008-01-01 23:53:12.000000000 +0100
|
||||
+++ ./gdb/p-typeprint.c 2008-10-29 10:55:12.000000000 +0100
|
||||
@@ -251,7 +251,7 @@ pascal_type_print_varspec_prefix (struct
|
||||
fprintf_filtered (stream, "(");
|
||||
fprintf_filtered (stream, "array ");
|
||||
if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
|
||||
- && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
|
||||
+ && !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
fprintf_filtered (stream, "[%d..%d] ",
|
||||
TYPE_ARRAY_LOWER_BOUND_VALUE (type),
|
||||
TYPE_ARRAY_UPPER_BOUND_VALUE (type)
|
||||
--- ./gdb/parse.c 2008-10-29 10:47:18.000000000 +0100
|
||||
+++ ./gdb/parse.c 2008-10-29 10:55:12.000000000 +0100
|
||||
@@ -1175,8 +1175,7 @@ follow_types (struct type *follow_type)
|
||||
create_array_type ((struct type *) NULL,
|
||||
follow_type, range_type);
|
||||
if (array_size < 0)
|
||||
- TYPE_ARRAY_UPPER_BOUND_TYPE (follow_type)
|
||||
- = BOUND_CANNOT_BE_DETERMINED;
|
||||
+ TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (follow_type) = 1;
|
||||
break;
|
||||
case tp_function:
|
||||
/* FIXME-type-allocation: need a way to free this type when we are
|
||||
--- ./gdb/testsuite/gdb.base/maint.exp 2008-01-28 19:06:59.000000000 +0100
|
||||
+++ ./gdb/testsuite/gdb.base/maint.exp 2008-10-29 20:50:33.000000000 +0100
|
||||
@@ -404,7 +404,7 @@ gdb_expect {
|
||||
|
||||
send_gdb "maint print type argc\n"
|
||||
gdb_expect {
|
||||
- -re "type node $hex\r\nname .int. \\($hex\\)\r\ntagname .<NULL>. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength \[24\]\r\nupper_bound_type $hex \\(BOUND_SIMPLE\\)\r\nlower_bound_type $hex \\(BOUND_SIMPLE\\)\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\ntype_chain $hex\r\ninstance_flags $hex\r\nflags $hex\r\nnfields 0 $hex\r\nvptr_basetype $hex\r\nvptr_fieldno -1\r\ntype_specific $hex\r\n$gdb_prompt $"\
|
||||
+ -re "type node $hex\r\nname .int. \\($hex\\)\r\ntagname .<NULL>. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength \[24\]\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\ntype_chain $hex\r\ninstance_flags $hex\r\nflags $hex\r\nnfields 0 $hex\r\nvptr_basetype $hex\r\nvptr_fieldno -1\r\ntype_specific $hex\r\n$gdb_prompt $"\
|
||||
{ pass "maint print type" }
|
||||
-re ".*$gdb_prompt $" { fail "maint print type" }
|
||||
timeout { fail "(timeout) maint print type" }
|
||||
--- ./gdb/valops.c 2008-10-29 10:50:23.000000000 +0100
|
||||
+++ ./gdb/valops.c 2008-10-29 10:55:12.000000000 +0100
|
||||
@@ -291,8 +291,7 @@ value_cast (struct type *type, struct va
|
||||
{
|
||||
struct type *element_type = TYPE_TARGET_TYPE (type);
|
||||
unsigned element_length = TYPE_LENGTH (check_typedef (element_type));
|
||||
- if (element_length > 0
|
||||
- && TYPE_ARRAY_UPPER_BOUND_TYPE (type) == BOUND_CANNOT_BE_DETERMINED)
|
||||
+ if (element_length > 0 && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
{
|
||||
struct type *range_type = TYPE_INDEX_TYPE (type);
|
||||
int val_length = TYPE_LENGTH (type2);
|
||||
--- ./gdb/varobj.c 2008-10-29 10:47:21.000000000 +0100
|
||||
+++ ./gdb/varobj.c 2008-10-29 10:55:12.000000000 +0100
|
||||
@@ -1988,7 +1988,7 @@ c_number_of_children (struct varobj *var
|
||||
{
|
||||
case TYPE_CODE_ARRAY:
|
||||
if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (target) > 0
|
||||
- && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
|
||||
+ && !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
children = TYPE_LENGTH (type) / TYPE_LENGTH (target);
|
||||
else
|
||||
/* If we don't know how many elements there are, don't display
|
@ -1,579 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2008-10/msg00099.html
|
||||
|
||||
2008-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Convert static_kind into loc_kind enum.
|
||||
* gdbtypes.h (enum field_loc_kind): New.
|
||||
(union field_location): New field dwarf_block.
|
||||
(struct field): Rename static_kind as loc_kind.
|
||||
(FIELD_STATIC_KIND): Rename to ...
|
||||
(FIELD_LOC_KIND): ... here.
|
||||
(TYPE_FIELD_STATIC_KIND): Rename to ...
|
||||
(TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
|
||||
(TYPE_FIELD_STATIC_HAS_ADDR): Remove.
|
||||
(TYPE_FIELD_STATIC): Remove.
|
||||
(TYPE_FIELD_BITPOS): Reformat.
|
||||
(SET_FIELD_BITPOS): New.
|
||||
(FIELD_PHYSADDR): Rename to ...
|
||||
(FIELD_STATIC_PHYSADDR): ... here.
|
||||
(TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
|
||||
(SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
|
||||
(FIELD_PHYSNAME): Rename to ...
|
||||
(FIELD_STATIC_PHYSNAME): ... here.
|
||||
(TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
|
||||
(SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
|
||||
(FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
|
||||
(field_is_static): New declaration.
|
||||
* gdbtypes.c (field_is_static): New function.
|
||||
(copy_type_recursive): Update throughout.
|
||||
* amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
|
||||
eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
|
||||
p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
|
||||
|
||||
[ Ported to gdb-6.8fedora. ]
|
||||
|
||||
--- ./gdb/amd64-tdep.c 2008-10-29 10:47:21.000000000 +0100
|
||||
+++ ./gdb/amd64-tdep.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -317,7 +317,7 @@ amd64_classify_aggregate (struct type *t
|
||||
enum amd64_reg_class subclass[2];
|
||||
|
||||
/* Ignore static fields. */
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
continue;
|
||||
|
||||
gdb_assert (pos == 0 || pos == 1);
|
||||
--- ./gdb/c-typeprint.c 2008-10-29 10:55:07.000000000 +0100
|
||||
+++ ./gdb/c-typeprint.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -872,14 +872,12 @@ c_type_print_base (struct type *type, st
|
||||
}
|
||||
|
||||
print_spaces_filtered (level + 4, stream);
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
- {
|
||||
- fprintf_filtered (stream, "static ");
|
||||
- }
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
+ fprintf_filtered (stream, "static ");
|
||||
c_print_type (TYPE_FIELD_TYPE (type, i),
|
||||
TYPE_FIELD_NAME (type, i),
|
||||
stream, show - 1, level + 4);
|
||||
- if (!TYPE_FIELD_STATIC (type, i)
|
||||
+ if (!field_is_static (&TYPE_FIELD (type, i))
|
||||
&& TYPE_FIELD_PACKED (type, i))
|
||||
{
|
||||
/* It is a bitfield. This code does not attempt
|
||||
--- ./gdb/coffread.c 2008-01-16 12:21:42.000000000 +0100
|
||||
+++ ./gdb/coffread.c 2008-10-29 20:58:56.000000000 +0100
|
||||
@@ -1946,9 +1946,8 @@ coff_read_struct_type (int index, int le
|
||||
strlen (name),
|
||||
¤t_objfile->objfile_obstack);
|
||||
FIELD_TYPE (list->field) = decode_type (ms, ms->c_type, &sub_aux);
|
||||
- FIELD_BITPOS (list->field) = 8 * ms->c_value;
|
||||
+ SET_FIELD_BITPOS (list->field, 8 * ms->c_value);
|
||||
FIELD_BITSIZE (list->field) = 0;
|
||||
- FIELD_STATIC_KIND (list->field) = 0;
|
||||
nfields++;
|
||||
break;
|
||||
|
||||
@@ -1965,9 +1964,8 @@ coff_read_struct_type (int index, int le
|
||||
strlen (name),
|
||||
¤t_objfile->objfile_obstack);
|
||||
FIELD_TYPE (list->field) = decode_type (ms, ms->c_type, &sub_aux);
|
||||
- FIELD_BITPOS (list->field) = ms->c_value;
|
||||
+ SET_FIELD_BITPOS (list->field, ms->c_value);
|
||||
FIELD_BITSIZE (list->field) = sub_aux.x_sym.x_misc.x_lnsz.x_size;
|
||||
- FIELD_STATIC_KIND (list->field) = 0;
|
||||
nfields++;
|
||||
break;
|
||||
|
||||
@@ -2083,11 +2081,10 @@ coff_read_enum_type (int index, int leng
|
||||
struct symbol *xsym = syms->symbol[j];
|
||||
SYMBOL_TYPE (xsym) = type;
|
||||
TYPE_FIELD_NAME (type, n) = DEPRECATED_SYMBOL_NAME (xsym);
|
||||
- TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
|
||||
+ SET_FIELD_BITPOS (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
|
||||
if (SYMBOL_VALUE (xsym) < 0)
|
||||
unsigned_enum = 0;
|
||||
TYPE_FIELD_BITSIZE (type, n) = 0;
|
||||
- TYPE_FIELD_STATIC_KIND (type, n) = 0;
|
||||
}
|
||||
if (syms == osyms)
|
||||
break;
|
||||
--- ./gdb/cp-valprint.c 2008-01-01 23:53:09.000000000 +0100
|
||||
+++ ./gdb/cp-valprint.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -192,7 +192,8 @@ cp_print_value_fields (struct type *type
|
||||
for (i = n_baseclasses; i < len; i++)
|
||||
{
|
||||
/* If requested, skip printing of static fields. */
|
||||
- if (!static_field_print && TYPE_FIELD_STATIC (type, i))
|
||||
+ if (!static_field_print
|
||||
+ && field_is_static (&TYPE_FIELD (type, i)))
|
||||
continue;
|
||||
|
||||
if (fields_seen)
|
||||
@@ -225,7 +226,7 @@ cp_print_value_fields (struct type *type
|
||||
fputs_filtered ("\"( ptr \"", stream);
|
||||
else
|
||||
fputs_filtered ("\"( nodef \"", stream);
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fputs_filtered ("static ", stream);
|
||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||
current_language->la_language,
|
||||
@@ -240,7 +241,7 @@ cp_print_value_fields (struct type *type
|
||||
{
|
||||
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
||||
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fputs_filtered ("static ", stream);
|
||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||
current_language->la_language,
|
||||
@@ -252,7 +253,8 @@ cp_print_value_fields (struct type *type
|
||||
annotate_field_value ();
|
||||
}
|
||||
|
||||
- if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
|
||||
+ if (!field_is_static (&TYPE_FIELD (type, i))
|
||||
+ && TYPE_FIELD_PACKED (type, i))
|
||||
{
|
||||
struct value *v;
|
||||
|
||||
@@ -277,7 +279,7 @@ cp_print_value_fields (struct type *type
|
||||
{
|
||||
fputs_filtered ("<optimized out or zero length>", stream);
|
||||
}
|
||||
- else if (TYPE_FIELD_STATIC (type, i))
|
||||
+ else if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
struct value *v = value_static_field (type, i);
|
||||
if (v == NULL)
|
||||
--- ./gdb/dwarf2read.c 2008-10-29 10:50:56.000000000 +0100
|
||||
+++ ./gdb/dwarf2read.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -3492,7 +3492,7 @@ dwarf2_add_field (struct field_info *fip
|
||||
/* Get type of field. */
|
||||
fp->type = die_type (die, cu);
|
||||
|
||||
- FIELD_STATIC_KIND (*fp) = 0;
|
||||
+ SET_FIELD_BITPOS (*fp, 0);
|
||||
|
||||
/* Get bit size of field (zero if none). */
|
||||
attr = dwarf2_attr (die, DW_AT_bit_size, cu);
|
||||
@@ -3521,10 +3521,8 @@ dwarf2_add_field (struct field_info *fip
|
||||
else
|
||||
byte_offset = decode_locdesc (DW_BLOCK (attr), cu);
|
||||
|
||||
- FIELD_BITPOS (*fp) = byte_offset * bits_per_byte;
|
||||
+ SET_FIELD_BITPOS (*fp, byte_offset * bits_per_byte);
|
||||
}
|
||||
- else
|
||||
- FIELD_BITPOS (*fp) = 0;
|
||||
attr = dwarf2_attr (die, DW_AT_bit_offset, cu);
|
||||
if (attr)
|
||||
{
|
||||
@@ -3617,10 +3615,9 @@ dwarf2_add_field (struct field_info *fip
|
||||
/* C++ base class field. */
|
||||
attr = dwarf2_attr (die, DW_AT_data_member_location, cu);
|
||||
if (attr)
|
||||
- FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu)
|
||||
- * bits_per_byte);
|
||||
+ SET_FIELD_BITPOS (*fp, decode_locdesc (DW_BLOCK (attr), cu)
|
||||
+ * bits_per_byte);
|
||||
FIELD_BITSIZE (*fp) = 0;
|
||||
- FIELD_STATIC_KIND (*fp) = 0;
|
||||
FIELD_TYPE (*fp) = die_type (die, cu);
|
||||
FIELD_NAME (*fp) = type_name_no_tag (fp->type);
|
||||
fip->nbaseclasses++;
|
||||
@@ -4379,9 +4376,8 @@ process_enumeration_scope (struct die_in
|
||||
|
||||
FIELD_NAME (fields[num_fields]) = DEPRECATED_SYMBOL_NAME (sym);
|
||||
FIELD_TYPE (fields[num_fields]) = NULL;
|
||||
- FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym);
|
||||
+ SET_FIELD_BITPOS (fields[num_fields], SYMBOL_VALUE (sym));
|
||||
FIELD_BITSIZE (fields[num_fields]) = 0;
|
||||
- FIELD_STATIC_KIND (fields[num_fields]) = 0;
|
||||
|
||||
num_fields++;
|
||||
}
|
||||
--- ./gdb/eval.c 2008-10-29 10:55:07.000000000 +0100
|
||||
+++ ./gdb/eval.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -288,7 +288,8 @@ evaluate_struct_tuple (struct value *str
|
||||
fieldno++;
|
||||
/* Skip static fields. */
|
||||
while (fieldno < TYPE_NFIELDS (struct_type)
|
||||
- && TYPE_FIELD_STATIC_KIND (struct_type, fieldno))
|
||||
+ && field_is_static (&TYPE_FIELD (struct_type,
|
||||
+ fieldno)))
|
||||
fieldno++;
|
||||
subfieldno = fieldno;
|
||||
if (fieldno >= TYPE_NFIELDS (struct_type))
|
||||
--- ./gdb/gdbtypes.c 2008-10-29 10:55:07.000000000 +0100
|
||||
+++ ./gdb/gdbtypes.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -2407,6 +2407,20 @@ print_arg_types (struct field *args, int
|
||||
}
|
||||
}
|
||||
|
||||
+int
|
||||
+field_is_static (struct field *f)
|
||||
+{
|
||||
+ /* "static" fields are the fields whose location is not relative
|
||||
+ to the address of the enclosing struct. It would be nice to
|
||||
+ have a dedicated flag that would be set for static fields when
|
||||
+ the type is being created. But in practice, checking the field
|
||||
+ loc_kind should give us an accurate answer (at least as long as
|
||||
+ we assume that DWARF block locations are not going to be used
|
||||
+ for static fields). FIXME? */
|
||||
+ return (FIELD_LOC_KIND (*f) == FIELD_LOC_KIND_PHYSNAME
|
||||
+ || FIELD_LOC_KIND (*f) == FIELD_LOC_KIND_PHYSADDR);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
dump_fn_fieldlists (struct type *type, int spaces)
|
||||
{
|
||||
@@ -2939,18 +2953,25 @@ copy_type_recursive (struct objfile *obj
|
||||
if (TYPE_FIELD_NAME (type, i))
|
||||
TYPE_FIELD_NAME (new_type, i) =
|
||||
xstrdup (TYPE_FIELD_NAME (type, i));
|
||||
- if (TYPE_FIELD_STATIC_HAS_ADDR (type, i))
|
||||
- SET_FIELD_PHYSADDR (TYPE_FIELD (new_type, i),
|
||||
- TYPE_FIELD_STATIC_PHYSADDR (type, i));
|
||||
- else if (TYPE_FIELD_STATIC (type, i))
|
||||
- SET_FIELD_PHYSNAME (TYPE_FIELD (new_type, i),
|
||||
- xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type,
|
||||
- i)));
|
||||
- else
|
||||
+ switch (TYPE_FIELD_LOC_KIND (type, i))
|
||||
{
|
||||
- TYPE_FIELD_BITPOS (new_type, i) =
|
||||
- TYPE_FIELD_BITPOS (type, i);
|
||||
- TYPE_FIELD_STATIC_KIND (new_type, i) = 0;
|
||||
+ case FIELD_LOC_KIND_BITPOS:
|
||||
+ SET_FIELD_BITPOS (TYPE_FIELD (new_type, i),
|
||||
+ TYPE_FIELD_BITPOS (type, i));
|
||||
+ break;
|
||||
+ case FIELD_LOC_KIND_PHYSADDR:
|
||||
+ SET_FIELD_PHYSADDR (TYPE_FIELD (new_type, i),
|
||||
+ TYPE_FIELD_STATIC_PHYSADDR (type, i));
|
||||
+ break;
|
||||
+ case FIELD_LOC_KIND_PHYSNAME:
|
||||
+ SET_FIELD_PHYSNAME (TYPE_FIELD (new_type, i),
|
||||
+ xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type,
|
||||
+ i)));
|
||||
+ break;
|
||||
+ default:
|
||||
+ internal_error (__FILE__, __LINE__,
|
||||
+ _("Unexpected type field location kind: %d"),
|
||||
+ TYPE_FIELD_LOC_KIND (type, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
--- ./gdb/gdbtypes.h 2008-10-29 10:56:05.000000000 +0100
|
||||
+++ ./gdb/gdbtypes.h 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -310,6 +310,16 @@ enum type_code
|
||||
#define TYPE_FLAG_NOTTEXT (1 << 17)
|
||||
#define TYPE_NOTTEXT(t) (TYPE_FLAGS (t) & TYPE_FLAG_NOTTEXT)
|
||||
|
||||
+/* Determine which field of the union main_type.fields[x].loc is used. */
|
||||
+
|
||||
+enum field_loc_kind
|
||||
+ {
|
||||
+ FIELD_LOC_KIND_BITPOS, /* bitpos */
|
||||
+ FIELD_LOC_KIND_PHYSADDR, /* physaddr */
|
||||
+ FIELD_LOC_KIND_PHYSNAME, /* physname */
|
||||
+ FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */
|
||||
+ };
|
||||
+
|
||||
/* This structure is space-critical.
|
||||
Its layout has been tweaked to reduce the space used. */
|
||||
|
||||
@@ -415,6 +425,12 @@ struct main_type
|
||||
|
||||
CORE_ADDR physaddr;
|
||||
char *physname;
|
||||
+
|
||||
+ /* The field location can be computed by evaluating the following DWARF
|
||||
+ block. This can be used in Fortran variable-length arrays, for
|
||||
+ instance. */
|
||||
+
|
||||
+ struct dwarf2_locexpr_baton *dwarf_block;
|
||||
}
|
||||
loc;
|
||||
|
||||
@@ -424,11 +440,8 @@ struct main_type
|
||||
defined. */
|
||||
unsigned int artificial : 1;
|
||||
|
||||
- /* This flag is zero for non-static fields, 1 for fields whose location
|
||||
- is specified by the label loc.physname, and 2 for fields whose location
|
||||
- is specified by loc.physaddr. */
|
||||
-
|
||||
- unsigned int static_kind : 2;
|
||||
+ /* Discriminant for union field_location. */
|
||||
+ ENUM_BITFIELD(field_loc_kind) loc_kind : 2;
|
||||
|
||||
/* Size of this field, in bits, or zero if not packed.
|
||||
For an unpacked field, the field's type's length
|
||||
@@ -824,20 +837,34 @@ extern void allocate_cplus_struct_type (
|
||||
|
||||
#define FIELD_TYPE(thisfld) ((thisfld).type)
|
||||
#define FIELD_NAME(thisfld) ((thisfld).name)
|
||||
+#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
|
||||
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
|
||||
+#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||
+#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
+#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
|
||||
+#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
+ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
|
||||
+ FIELD_BITPOS (thisfld) = (bitpos))
|
||||
+#define SET_FIELD_PHYSNAME(thisfld, name) \
|
||||
+ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
||||
+ FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
||||
+#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
+ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
+ FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
+#define SET_FIELD_DWARF_BLOCK(thisfld, addr) \
|
||||
+ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_DWARF_BLOCK, \
|
||||
+ FIELD_DWARF_BLOCK (thisfld) = (addr))
|
||||
#define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial)
|
||||
#define FIELD_BITSIZE(thisfld) ((thisfld).bitsize)
|
||||
-#define FIELD_STATIC_KIND(thisfld) ((thisfld).static_kind)
|
||||
-#define FIELD_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||
-#define FIELD_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
-#define SET_FIELD_PHYSNAME(thisfld, name) \
|
||||
- ((thisfld).static_kind = 1, FIELD_PHYSNAME(thisfld) = (name))
|
||||
-#define SET_FIELD_PHYSADDR(thisfld, name) \
|
||||
- ((thisfld).static_kind = 2, FIELD_PHYSADDR(thisfld) = (name))
|
||||
+
|
||||
#define TYPE_FIELD(thistype, n) TYPE_MAIN_TYPE(thistype)->fields[n]
|
||||
#define TYPE_FIELD_TYPE(thistype, n) FIELD_TYPE(TYPE_FIELD(thistype, n))
|
||||
#define TYPE_FIELD_NAME(thistype, n) FIELD_NAME(TYPE_FIELD(thistype, n))
|
||||
-#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS(TYPE_FIELD(thistype,n))
|
||||
+#define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
|
||||
+#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
||||
+#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
||||
+#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
||||
+#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
||||
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
|
||||
#define TYPE_FIELD_PACKED(thistype, n) (FIELD_BITSIZE(TYPE_FIELD(thistype,n))!=0)
|
||||
@@ -873,12 +900,6 @@ extern void allocate_cplus_struct_type (
|
||||
(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
|
||||
: B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n)))
|
||||
|
||||
-#define TYPE_FIELD_STATIC(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind != 0)
|
||||
-#define TYPE_FIELD_STATIC_KIND(thistype, n) TYPE_MAIN_TYPE (thistype)->fields[n].static_kind
|
||||
-#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind == 2)
|
||||
-#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_PHYSNAME(TYPE_FIELD(thistype, n))
|
||||
-#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_PHYSADDR(TYPE_FIELD(thistype, n))
|
||||
-
|
||||
#define TYPE_FN_FIELDLISTS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists
|
||||
#define TYPE_FN_FIELDLIST(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n]
|
||||
#define TYPE_FN_FIELDLIST1(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n].fn_fields
|
||||
@@ -1331,6 +1352,8 @@ extern int rank_one_type (struct type *,
|
||||
|
||||
extern void recursive_dump_type (struct type *, int);
|
||||
|
||||
+extern int field_is_static (struct field *);
|
||||
+
|
||||
/* printcmd.c */
|
||||
|
||||
extern void print_scalar_formatted (const void *, struct type *, int, int,
|
||||
--- ./gdb/jv-typeprint.c 2008-01-01 23:53:11.000000000 +0100
|
||||
+++ ./gdb/jv-typeprint.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -185,7 +185,7 @@ java_type_print_base (struct type *type,
|
||||
fprintf_filtered (stream, "public ");
|
||||
}
|
||||
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fprintf_filtered (stream, "static ");
|
||||
|
||||
java_print_type (TYPE_FIELD_TYPE (type, i),
|
||||
--- ./gdb/jv-valprint.c 2008-01-01 23:53:11.000000000 +0100
|
||||
+++ ./gdb/jv-valprint.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -302,7 +302,7 @@ java_print_value_fields (struct type *ty
|
||||
for (i = n_baseclasses; i < len; i++)
|
||||
{
|
||||
/* If requested, skip printing of static fields. */
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
char *name = TYPE_FIELD_NAME (type, i);
|
||||
if (!static_field_print)
|
||||
@@ -340,7 +340,7 @@ java_print_value_fields (struct type *ty
|
||||
fputs_filtered ("\"( ptr \"", stream);
|
||||
else
|
||||
fputs_filtered ("\"( nodef \"", stream);
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fputs_filtered ("static ", stream);
|
||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||
language_cplus,
|
||||
@@ -355,7 +355,7 @@ java_print_value_fields (struct type *ty
|
||||
{
|
||||
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
||||
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fputs_filtered ("static ", stream);
|
||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||
language_cplus,
|
||||
@@ -365,7 +365,8 @@ java_print_value_fields (struct type *ty
|
||||
annotate_field_value ();
|
||||
}
|
||||
|
||||
- if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
|
||||
+ if (!field_is_static (&TYPE_FIELD (type, i))
|
||||
+ && TYPE_FIELD_PACKED (type, i))
|
||||
{
|
||||
struct value *v;
|
||||
|
||||
@@ -389,7 +390,7 @@ java_print_value_fields (struct type *ty
|
||||
{
|
||||
fputs_filtered ("<optimized out or zero length>", stream);
|
||||
}
|
||||
- else if (TYPE_FIELD_STATIC (type, i))
|
||||
+ else if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
struct value *v = value_static_field (type, i);
|
||||
if (v == NULL)
|
||||
--- ./gdb/mdebugread.c 2008-01-01 23:53:12.000000000 +0100
|
||||
+++ ./gdb/mdebugread.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -1053,11 +1053,10 @@ parse_symbol (SYMR *sh, union aux_ext *a
|
||||
if (tsym.st != stMember)
|
||||
break;
|
||||
|
||||
- FIELD_BITPOS (*f) = tsym.value;
|
||||
+ SET_FIELD_BITPOS (*f, tsym.value);
|
||||
FIELD_TYPE (*f) = t;
|
||||
FIELD_NAME (*f) = debug_info->ss + cur_fdr->issBase + tsym.iss;
|
||||
FIELD_BITSIZE (*f) = 0;
|
||||
- FIELD_STATIC_KIND (*f) = 0;
|
||||
|
||||
enum_sym = ((struct symbol *)
|
||||
obstack_alloc (¤t_objfile->objfile_obstack,
|
||||
@@ -1247,11 +1246,10 @@ parse_symbol (SYMR *sh, union aux_ext *a
|
||||
case stMember: /* member of struct or union */
|
||||
f = &TYPE_FIELDS (top_stack->cur_type)[top_stack->cur_field++];
|
||||
FIELD_NAME (*f) = name;
|
||||
- FIELD_BITPOS (*f) = sh->value;
|
||||
+ SET_FIELD_BITPOS (*f, sh->value);
|
||||
bitsize = 0;
|
||||
FIELD_TYPE (*f) = parse_type (cur_fd, ax, sh->index, &bitsize, bigend, name);
|
||||
FIELD_BITSIZE (*f) = bitsize;
|
||||
- FIELD_STATIC_KIND (*f) = 0;
|
||||
break;
|
||||
|
||||
case stIndirect: /* forward declaration on Irix5 */
|
||||
--- ./gdb/p-typeprint.c 2008-10-29 10:55:12.000000000 +0100
|
||||
+++ ./gdb/p-typeprint.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -575,14 +575,12 @@ pascal_type_print_base (struct type *typ
|
||||
}
|
||||
|
||||
print_spaces_filtered (level + 4, stream);
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
- {
|
||||
- fprintf_filtered (stream, "static ");
|
||||
- }
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
+ fprintf_filtered (stream, "static ");
|
||||
pascal_print_type (TYPE_FIELD_TYPE (type, i),
|
||||
TYPE_FIELD_NAME (type, i),
|
||||
stream, show - 1, level + 4);
|
||||
- if (!TYPE_FIELD_STATIC (type, i)
|
||||
+ if (!field_is_static (&TYPE_FIELD (type, i))
|
||||
&& TYPE_FIELD_PACKED (type, i))
|
||||
{
|
||||
/* It is a bitfield. This code does not attempt
|
||||
--- ./gdb/p-valprint.c 2008-01-01 23:53:12.000000000 +0100
|
||||
+++ ./gdb/p-valprint.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -671,7 +671,8 @@ pascal_object_print_value_fields (struct
|
||||
for (i = n_baseclasses; i < len; i++)
|
||||
{
|
||||
/* If requested, skip printing of static fields. */
|
||||
- if (!pascal_static_field_print && TYPE_FIELD_STATIC (type, i))
|
||||
+ if (!pascal_static_field_print
|
||||
+ && field_is_static (&TYPE_FIELD (type, i)))
|
||||
continue;
|
||||
if (fields_seen)
|
||||
fprintf_filtered (stream, ", ");
|
||||
@@ -703,7 +704,7 @@ pascal_object_print_value_fields (struct
|
||||
fputs_filtered ("\"( ptr \"", stream);
|
||||
else
|
||||
fputs_filtered ("\"( nodef \"", stream);
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fputs_filtered ("static ", stream);
|
||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||
language_cplus,
|
||||
@@ -718,7 +719,7 @@ pascal_object_print_value_fields (struct
|
||||
{
|
||||
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
||||
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fputs_filtered ("static ", stream);
|
||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||
language_cplus,
|
||||
@@ -728,7 +729,8 @@ pascal_object_print_value_fields (struct
|
||||
annotate_field_value ();
|
||||
}
|
||||
|
||||
- if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
|
||||
+ if (!field_is_static (&TYPE_FIELD (type, i))
|
||||
+ && TYPE_FIELD_PACKED (type, i))
|
||||
{
|
||||
struct value *v;
|
||||
|
||||
@@ -752,7 +754,7 @@ pascal_object_print_value_fields (struct
|
||||
{
|
||||
fputs_filtered ("<optimized out or zero length>", stream);
|
||||
}
|
||||
- else if (TYPE_FIELD_STATIC (type, i))
|
||||
+ else if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
/* struct value *v = value_static_field (type, i); v4.17 specific */
|
||||
struct value *v;
|
||||
--- ./gdb/valops.c 2008-10-29 10:55:12.000000000 +0100
|
||||
+++ ./gdb/valops.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -1269,7 +1269,7 @@ search_struct_field (char *name, struct
|
||||
if (t_field_name && (strcmp_iw (t_field_name, name) == 0))
|
||||
{
|
||||
struct value *v;
|
||||
- if (TYPE_FIELD_STATIC (type, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
v = value_static_field (type, i);
|
||||
if (v == 0)
|
||||
@@ -2382,7 +2382,7 @@ value_struct_elt_for_reference (struct t
|
||||
|
||||
if (t_field_name && strcmp (t_field_name, name) == 0)
|
||||
{
|
||||
- if (TYPE_FIELD_STATIC (t, i))
|
||||
+ if (field_is_static (&TYPE_FIELD (t, i)))
|
||||
{
|
||||
v = value_static_field (t, i);
|
||||
if (v == NULL)
|
||||
--- ./gdb/value.c 2008-10-29 10:47:18.000000000 +0100
|
||||
+++ ./gdb/value.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -1261,7 +1261,7 @@ value_static_field (struct type *type, i
|
||||
{
|
||||
struct value *retval;
|
||||
|
||||
- if (TYPE_FIELD_STATIC_HAS_ADDR (type, fieldno))
|
||||
+ if (TYPE_FIELD_LOC_KIND (type, fieldno) == FIELD_LOC_KIND_PHYSADDR)
|
||||
{
|
||||
retval = value_at (TYPE_FIELD_TYPE (type, fieldno),
|
||||
TYPE_FIELD_STATIC_PHYSADDR (type, fieldno));
|
||||
--- ./gdb/varobj.c 2008-10-29 10:55:12.000000000 +0100
|
||||
+++ ./gdb/varobj.c 2008-10-29 20:56:57.000000000 +0100
|
||||
@@ -2050,7 +2050,7 @@ value_struct_element_index (struct value
|
||||
|
||||
TRY_CATCH (e, RETURN_MASK_ERROR)
|
||||
{
|
||||
- if (TYPE_FIELD_STATIC (type, type_index))
|
||||
+ if (field_is_static (&TYPE_FIELD (type, type_index)))
|
||||
result = value_static_field (type, type_index);
|
||||
else
|
||||
result = value_primitive_field (value, 0, type_index, type);
|
File diff suppressed because it is too large
Load Diff
@ -1,24 +1,24 @@
|
||||
Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
|
||||
--- ./gdb/dwarf2loc.c-orig 2008-11-06 22:17:45.000000000 +0100
|
||||
+++ ./gdb/dwarf2loc.c 2008-11-06 22:18:01.000000000 +0100
|
||||
@@ -57,9 +57,12 @@ find_location_expression (struct dwarf2_
|
||||
Index: gdb-6.8.50.20081128/gdb/dwarf2loc.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/dwarf2loc.c 2008-12-08 11:00:45.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/dwarf2loc.c 2008-12-08 18:02:49.000000000 +0100
|
||||
@@ -55,7 +55,9 @@ find_location_expression (struct dwarf2_
|
||||
CORE_ADDR low, high;
|
||||
gdb_byte *loc_ptr, *buf_end;
|
||||
int length;
|
||||
unsigned int addr_size = gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT;
|
||||
- struct objfile *objfile = dwarf2_per_cu_objfile (baton->per_cu);
|
||||
+ struct objfile *objfile1 = dwarf2_per_cu_objfile (baton->per_cu);
|
||||
+ struct objfile *objfile = objfile1->separate_debug_objfile
|
||||
+ ? objfile1->separate_debug_objfile : objfile1;
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
unsigned int addr_size = dwarf2_per_cu_addr_size (baton->per_cu);
|
||||
CORE_ADDR base_mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
|
||||
+ struct objfile *objfile = (baton->objfile->separate_debug_objfile
|
||||
+ ? baton->objfile->separate_debug_objfile
|
||||
+ : baton->objfile);
|
||||
/* Adjust base_address for relocatable objects. */
|
||||
- CORE_ADDR base_offset = ANOFFSET (baton->objfile->section_offsets,
|
||||
- SECT_OFF_TEXT (baton->objfile));
|
||||
+ CORE_ADDR base_offset = ANOFFSET (objfile->section_offsets,
|
||||
+ SECT_OFF_TEXT (objfile));
|
||||
CORE_ADDR base_address = baton->base_address + base_offset;
|
||||
|
||||
loc_ptr = baton->data;
|
||||
--- /dev/null 2008-11-06 15:02:28.406299691 +0100
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2008-11-06 23:11:02.000000000 +0100
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2008-12-08 18:00:43.000000000 +0100
|
||||
@@ -0,0 +1,102 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -122,8 +122,10 @@ Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
+
|
||||
+# `abort' can get expressed as `*__GI_abort'.
|
||||
+gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\ti = -?\[0-9\].*in main \\(.*" "Backtrace after abort()"
|
||||
--- /dev/null 2008-11-06 15:02:28.406299691 +0100
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c 2008-11-06 22:59:05.000000000 +0100
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c 2008-12-08 18:00:43.000000000 +0100
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -151,8 +153,10 @@ Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
+ func ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null 2008-11-06 15:02:28.406299691 +0100
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S 2008-11-06 22:49:50.000000000 +0100
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S 2008-12-08 18:00:43.000000000 +0100
|
||||
@@ -0,0 +1,328 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
|
@ -18,11 +18,11 @@
|
||||
gdb.base/watchpoint.c (global_ptr_ptr): New variable.
|
||||
(func4): New testing code for GLOBAL_PTR_PTR.
|
||||
|
||||
Index: gdb-6.8/gdb/breakpoint.c
|
||||
Index: gdb-6.8.50.20081128/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/breakpoint.c 2008-07-14 10:28:30.000000000 +0200
|
||||
+++ gdb-6.8/gdb/breakpoint.c 2008-07-14 10:28:36.000000000 +0200
|
||||
@@ -846,7 +846,15 @@ is_hardware_watchpoint (struct breakpoin
|
||||
--- gdb-6.8.50.20081128.orig/gdb/breakpoint.c 2008-12-01 16:13:12.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/breakpoint.c 2008-12-03 00:00:08.000000000 +0100
|
||||
@@ -770,7 +770,15 @@ is_hardware_watchpoint (struct breakpoin
|
||||
If VAL_CHAIN is non-NULL, *VAL_CHAIN will be released from the
|
||||
value chain. The caller must free the values individually. If
|
||||
VAL_CHAIN is NULL, all generated values will be left on the value
|
||||
@ -39,7 +39,7 @@ Index: gdb-6.8/gdb/breakpoint.c
|
||||
|
||||
static void
|
||||
fetch_watchpoint_value (struct expression *exp, struct value **valp,
|
||||
@@ -5705,7 +5713,7 @@ watch_command_1 (char *arg, int accessfl
|
||||
@@ -5824,7 +5832,7 @@ watch_command_1 (char *arg, int accessfl
|
||||
struct symtab_and_line sal;
|
||||
struct expression *exp;
|
||||
struct block *exp_valid_block;
|
||||
@ -48,7 +48,7 @@ Index: gdb-6.8/gdb/breakpoint.c
|
||||
struct frame_info *frame;
|
||||
struct frame_info *prev_frame = NULL;
|
||||
char *exp_start = NULL;
|
||||
@@ -5791,6 +5799,27 @@ watch_command_1 (char *arg, int accessfl
|
||||
@@ -5910,6 +5918,27 @@ watch_command_1 (char *arg, int accessfl
|
||||
exp_valid_block = innermost_block;
|
||||
mark = value_mark ();
|
||||
fetch_watchpoint_value (exp, &val, NULL, NULL);
|
||||
@ -76,11 +76,11 @@ Index: gdb-6.8/gdb/breakpoint.c
|
||||
if (val != NULL)
|
||||
release_value (val);
|
||||
|
||||
Index: gdb-6.8/gdb/gdbtypes.h
|
||||
Index: gdb-6.8.50.20081128/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/gdbtypes.h 2008-07-14 10:28:30.000000000 +0200
|
||||
+++ gdb-6.8/gdb/gdbtypes.h 2008-07-14 10:28:36.000000000 +0200
|
||||
@@ -69,7 +69,22 @@ enum type_code
|
||||
--- gdb-6.8.50.20081128.orig/gdb/gdbtypes.h 2008-12-02 22:53:14.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/gdbtypes.h 2008-12-03 00:00:08.000000000 +0100
|
||||
@@ -70,7 +70,22 @@ enum type_code
|
||||
TYPE_CODE_UNION, /* C union or Pascal variant part */
|
||||
TYPE_CODE_ENUM, /* Enumeration type */
|
||||
TYPE_CODE_FLAGS, /* Bit flags type */
|
||||
@ -104,11 +104,11 @@ Index: gdb-6.8/gdb/gdbtypes.h
|
||||
TYPE_CODE_INT, /* Integer type */
|
||||
|
||||
/* Floating type. This is *NOT* a complex type. Beware, there are parts
|
||||
Index: gdb-6.8/gdb/doc/gdb.texinfo
|
||||
Index: gdb-6.8.50.20081128/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/doc/gdb.texinfo 2008-07-14 10:28:29.000000000 +0200
|
||||
+++ gdb-6.8/gdb/doc/gdb.texinfo 2008-07-14 10:28:36.000000000 +0200
|
||||
@@ -3267,6 +3267,18 @@ This command prints a list of watchpoint
|
||||
--- gdb-6.8.50.20081128.orig/gdb/doc/gdb.texinfo 2008-12-02 23:43:49.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/doc/gdb.texinfo 2008-12-03 00:00:08.000000000 +0100
|
||||
@@ -3479,6 +3479,18 @@ This command prints a list of watchpoint
|
||||
it is the same as @code{info break} (@pxref{Set Breaks}).
|
||||
@end table
|
||||
|
||||
@ -127,10 +127,10 @@ Index: gdb-6.8/gdb/doc/gdb.texinfo
|
||||
@value{GDBN} sets a @dfn{hardware watchpoint} if possible. Hardware
|
||||
watchpoints execute very quickly, and the debugger reports a change in
|
||||
value at the exact instruction where the change occurs. If @value{GDBN}
|
||||
Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/watchpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/watchpoint.c 2008-07-14 10:28:30.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c 2008-07-14 10:28:36.000000000 +0200
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.base/watchpoint.c 2008-03-03 14:24:12.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/watchpoint.c 2008-12-03 00:00:08.000000000 +0100
|
||||
@@ -40,6 +40,7 @@ struct foo struct1, struct2, *ptr1, *ptr
|
||||
int doread = 0;
|
||||
|
||||
@ -150,11 +150,11 @@ Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c
|
||||
}
|
||||
|
||||
int main ()
|
||||
Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/watchpoint.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/watchpoint.exp 2008-07-14 10:28:30.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp 2008-07-14 10:28:36.000000000 +0200
|
||||
@@ -644,7 +644,21 @@ proc test_watchpoint_and_breakpoint {} {
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.base/watchpoint.exp 2008-08-06 14:52:07.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/watchpoint.exp 2008-12-03 00:01:07.000000000 +0100
|
||||
@@ -641,7 +641,21 @@ proc test_watchpoint_and_breakpoint {} {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -177,7 +177,7 @@ Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp
|
||||
proc test_inaccessible_watchpoint {} {
|
||||
global gdb_prompt
|
||||
|
||||
@@ -653,7 +667,8 @@ proc test_inaccessible_watchpoint {} {
|
||||
@@ -650,7 +664,8 @@ proc test_inaccessible_watchpoint {} {
|
||||
|
||||
if [runto func4] then {
|
||||
gdb_test "watch *global_ptr" ".*atchpoint \[0-9\]+: \\*global_ptr"
|
||||
@ -187,7 +187,7 @@ Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp
|
||||
gdb_test_multiple "next" "next over ptr init" {
|
||||
-re ".*atchpoint \[0-9\]+: \\*global_ptr\r\n\r\nOld value = .*\r\nNew value = 3 .*\r\n.*$gdb_prompt $" {
|
||||
# We can not test for <unknown> here because NULL may be readable.
|
||||
@@ -666,6 +681,28 @@ proc test_inaccessible_watchpoint {} {
|
||||
@@ -663,6 +678,28 @@ proc test_inaccessible_watchpoint {} {
|
||||
pass "next over buffer set"
|
||||
}
|
||||
}
|
||||
@ -216,7 +216,7 @@ Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,6 +871,17 @@ if [initialize] then {
|
||||
@@ -830,6 +867,17 @@ if [initialize] then {
|
||||
}
|
||||
|
||||
test_watchpoint_and_breakpoint
|
||||
|
@ -1,544 +0,0 @@
|
||||
2008-06-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* configure.ac: Add check for HAVE_PERSONALITY and
|
||||
HAVE_DECL_ADDR_NO_RANDOMIZE.
|
||||
* configure, config.in: Regenerate.
|
||||
* fork-child.c: New include <errno.h>.
|
||||
[HAVE_PERSONALITY]: New include <sys/personality.h>.
|
||||
[HAVE_PERSONALITY] (set_disable_randomization): New function.
|
||||
(disable_randomization, show_disable_randomization): New.
|
||||
(fork_inferior) [HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
|
||||
ADDR_NO_RANDOMIZE.
|
||||
(fork_inferior) [HAVE_PERSONALITY]: Disable randomization upon the
|
||||
variable DISABLE_RANDOMIZATION.
|
||||
(_initialize_fork_child): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
|
||||
DISABLE_RANDOMIZATION.
|
||||
|
||||
2008-06-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.texinfo (Starting): Document "set disable-randomization".
|
||||
|
||||
2008-06-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/randomize.exp, gdb.base/randomize.c: New files.
|
||||
|
||||
[ Ported for Fedora GDB. ]
|
||||
|
||||
Index: gdb-6.8/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/config.in 2008-07-14 10:27:27.000000000 +0200
|
||||
+++ gdb-6.8/gdb/config.in 2008-07-14 10:28:50.000000000 +0200
|
||||
@@ -64,6 +64,10 @@
|
||||
/* Define to 1 if you have the <curses.h> header file. */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
+/* Define to 1 if you have the declaration of `ADDR_NO_RANDOMIZE', and to 0 if
|
||||
+ you don't. */
|
||||
+#undef HAVE_DECL_ADDR_NO_RANDOMIZE
|
||||
+
|
||||
/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_FREE
|
||||
@@ -203,6 +207,9 @@
|
||||
/* Define to 1 if you have the <nlist.h> header file. */
|
||||
#undef HAVE_NLIST_H
|
||||
|
||||
+/* Define if you support the personality syscall. */
|
||||
+#undef HAVE_PERSONALITY
|
||||
+
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#undef HAVE_POLL
|
||||
|
||||
Index: gdb-6.8/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/configure 2008-07-14 10:27:27.000000000 +0200
|
||||
+++ gdb-6.8/gdb/configure 2008-07-14 10:28:50.000000000 +0200
|
||||
@@ -22911,6 +22911,188 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
+echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5
|
||||
+echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6
|
||||
+if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+else
|
||||
+ cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+#include <sys/personality.h>
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+#ifndef ADDR_NO_RANDOMIZE
|
||||
+ char *p = (char *) ADDR_NO_RANDOMIZE;
|
||||
+#endif
|
||||
+
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+rm -f conftest.$ac_objext
|
||||
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>conftest.er1
|
||||
+ ac_status=$?
|
||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||||
+ rm -f conftest.er1
|
||||
+ cat conftest.err >&5
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } &&
|
||||
+ { ac_try='test -z "$ac_c_werror_flag"
|
||||
+ || test ! -s conftest.err'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; } &&
|
||||
+ { ac_try='test -s conftest.$ac_objext'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; }; then
|
||||
+ ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes
|
||||
+else
|
||||
+ echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+ac_cv_have_decl_ADDR_NO_RANDOMIZE=no
|
||||
+fi
|
||||
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
+fi
|
||||
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5
|
||||
+echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6
|
||||
+if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then
|
||||
+
|
||||
+cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_DECL_ADDR_NO_RANDOMIZE 1
|
||||
+_ACEOF
|
||||
+
|
||||
+
|
||||
+else
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
|
||||
+_ACEOF
|
||||
+
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
+if test "$cross_compiling" = yes; then
|
||||
+ cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+#include <sys/personality.h>
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+
|
||||
+# if !HAVE_DECL_ADDR_NO_RANDOMIZE
|
||||
+# define ADDR_NO_RANDOMIZE 0x0040000
|
||||
+# endif
|
||||
+ /* Test the flag could be set and stays set. */
|
||||
+ personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
|
||||
+ if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
|
||||
+ return 1
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
+ (eval $ac_link) 2>conftest.er1
|
||||
+ ac_status=$?
|
||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||||
+ rm -f conftest.er1
|
||||
+ cat conftest.err >&5
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } &&
|
||||
+ { ac_try='test -z "$ac_c_werror_flag"
|
||||
+ || test ! -s conftest.err'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; } &&
|
||||
+ { ac_try='test -s conftest$ac_exeext'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; }; then
|
||||
+ have_personality=true
|
||||
+else
|
||||
+ echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+have_personality=false
|
||||
+fi
|
||||
+rm -f conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+else
|
||||
+ cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+#include <sys/personality.h>
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+
|
||||
+# if !HAVE_DECL_ADDR_NO_RANDOMIZE
|
||||
+# define ADDR_NO_RANDOMIZE 0x0040000
|
||||
+# endif
|
||||
+ /* Test the flag could be set and stays set. */
|
||||
+ personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
|
||||
+ if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
|
||||
+ return 1
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+rm -f conftest$ac_exeext
|
||||
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
+ (eval $ac_link) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; }; then
|
||||
+ have_personality=true
|
||||
+else
|
||||
+ echo "$as_me: program exited with status $ac_status" >&5
|
||||
+echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+( exit $ac_status )
|
||||
+have_personality=false
|
||||
+fi
|
||||
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
+fi
|
||||
+if $have_personality
|
||||
+then
|
||||
+
|
||||
+cat >>confdefs.h <<\_ACEOF
|
||||
+#define HAVE_PERSONALITY 1
|
||||
+_ACEOF
|
||||
+
|
||||
+fi
|
||||
+
|
||||
|
||||
|
||||
# Check whether --with-sysroot or --without-sysroot was given.
|
||||
Index: gdb-6.8/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/configure.ac 2008-07-14 10:27:27.000000000 +0200
|
||||
+++ gdb-6.8/gdb/configure.ac 2008-07-14 10:28:50.000000000 +0200
|
||||
@@ -1254,6 +1254,29 @@ if test "x$gdb_cv_sys_syscall_h_has_tkil
|
||||
AC_DEFINE(HAVE_TKILL_SYSCALL, 1, [Define if you support the tkill syscall.])
|
||||
fi
|
||||
|
||||
+dnl Check if we can disable the virtual address space randomization.
|
||||
+dnl The functionality of setarch -R.
|
||||
+AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])
|
||||
+define([PERSONALITY_TEST], [AC_LANG_PROGRAM([#include <sys/personality.h>], [
|
||||
+# if !HAVE_DECL_ADDR_NO_RANDOMIZE
|
||||
+# define ADDR_NO_RANDOMIZE 0x0040000
|
||||
+# endif
|
||||
+ /* Test the flag could be set and stays set. */
|
||||
+ personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
|
||||
+ if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
|
||||
+ return 1])])
|
||||
+AC_RUN_IFELSE([PERSONALITY_TEST],
|
||||
+ [have_personality=true],
|
||||
+ [have_personality=false],
|
||||
+ [AC_LINK_IFELSE([PERSONALITY_TEST],
|
||||
+ [have_personality=true],
|
||||
+ [have_personality=false])])
|
||||
+if $have_personality
|
||||
+then
|
||||
+ AC_DEFINE([HAVE_PERSONALITY], 1,
|
||||
+ [Define if you support the personality syscall.])
|
||||
+fi
|
||||
+
|
||||
dnl Handle optional features that can be enabled.
|
||||
|
||||
AC_ARG_WITH(sysroot,
|
||||
Index: gdb-6.8/gdb/fork-child.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/fork-child.c 2008-01-29 22:11:24.000000000 +0100
|
||||
+++ gdb-6.8/gdb/fork-child.c 2008-07-14 10:28:50.000000000 +0200
|
||||
@@ -32,12 +32,45 @@
|
||||
#include "gdbthread.h"
|
||||
#include "command.h" /* for dont_repeat () */
|
||||
#include "solib.h"
|
||||
+#include "gdbcmd.h"
|
||||
|
||||
#include <signal.h>
|
||||
+#include <errno.h>
|
||||
+#ifdef HAVE_PERSONALITY
|
||||
+# include <sys/personality.h>
|
||||
+#endif
|
||||
|
||||
/* This just gets used as a default if we can't find SHELL. */
|
||||
#define SHELL_FILE "/bin/sh"
|
||||
|
||||
+static int disable_randomization =
|
||||
+#ifdef HAVE_PERSONALITY
|
||||
+ 1;
|
||||
+#else
|
||||
+ 0;
|
||||
+#endif
|
||||
+
|
||||
+#ifndef HAVE_PERSONALITY
|
||||
+static void
|
||||
+set_disable_randomization (char *args, int from_tty, struct cmd_list_element *c)
|
||||
+{
|
||||
+ if (disable_randomization)
|
||||
+ {
|
||||
+ disable_randomization = 0;
|
||||
+ error (_("Unsupported on this platform."));
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+show_disable_randomization (struct ui_file *file, int from_tty,
|
||||
+ struct cmd_list_element *c, const char *value)
|
||||
+{
|
||||
+ fprintf_filtered (file, _("\
|
||||
+Disabling randomization of debuggee's virtual address space is %s.\n"),
|
||||
+ value);
|
||||
+}
|
||||
+
|
||||
extern char **environ;
|
||||
|
||||
/* Break up SCRATCH into an argument vector suitable for passing to
|
||||
@@ -289,6 +322,24 @@ fork_inferior (char *exec_file_arg, char
|
||||
if (debug_fork)
|
||||
sleep (debug_fork);
|
||||
|
||||
+#ifdef HAVE_PERSONALITY
|
||||
+# if !HAVE_DECL_ADDR_NO_RANDOMIZE
|
||||
+# define ADDR_NO_RANDOMIZE 0x0040000
|
||||
+# endif
|
||||
+ if (disable_randomization)
|
||||
+ {
|
||||
+ int val;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ val = personality (0xffffffff);
|
||||
+ if (errno == 0)
|
||||
+ personality (val | ADDR_NO_RANDOMIZE);
|
||||
+ if (errno != 0 || !(personality (0xffffffff) & ADDR_NO_RANDOMIZE))
|
||||
+ warning (_("Currently enabled disable-randomization is unsupported "
|
||||
+ "on this platform."));
|
||||
+ }
|
||||
+#endif /* HAVE_PERSONALITY */
|
||||
+
|
||||
/* Run inferior in a separate process group. */
|
||||
debug_setpgrp = gdb_setpgid ();
|
||||
if (debug_setpgrp == -1)
|
||||
@@ -446,3 +497,23 @@ startup_inferior (int ntraps)
|
||||
}
|
||||
stop_soon = NO_STOP_QUIETLY;
|
||||
}
|
||||
+
|
||||
+void
|
||||
+_initialize_fork_child (void)
|
||||
+{
|
||||
+
|
||||
+ add_setshow_boolean_cmd ("disable-randomization", class_support,
|
||||
+ &disable_randomization, _("\
|
||||
+Set disabling of debuggee's virtual address space randomization."), _("\
|
||||
+Show disabling of debuggee's virtual address space randomization."), _("\
|
||||
+When this mode is on (which is the default), the randomization of\n\
|
||||
+the virtual address space is disabled. Standalone programs run with the\n\
|
||||
+randomization enabled by default on some platforms."),
|
||||
+#ifdef HAVE_PERSONALITY
|
||||
+ NULL,
|
||||
+#else
|
||||
+ &set_disable_randomization,
|
||||
+#endif
|
||||
+ &show_disable_randomization,
|
||||
+ &setlist, &showlist);
|
||||
+}
|
||||
Index: gdb-6.8/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/doc/gdb.texinfo 2008-07-14 10:28:36.000000000 +0200
|
||||
+++ gdb-6.8/gdb/doc/gdb.texinfo 2008-07-14 10:28:50.000000000 +0200
|
||||
@@ -1820,6 +1820,57 @@ argument to @value{GDBN} (@pxref{Invocat
|
||||
@value{GDBN}}), or by using the @code{file} or @code{exec-file} command
|
||||
(@pxref{Files, ,Commands to Specify Files}).
|
||||
|
||||
+@kindex set disable-randomization
|
||||
+@item set disable-randomization
|
||||
+@itemx set disable-randomization on
|
||||
+This option (enabled by default in @value{GDBN}) will turn off the native
|
||||
+randomization of the virtual address space of the started program. This option
|
||||
+is useful for multiple debugging sessions to make the execution better
|
||||
+reproducible and memory addresses reusable across debugging sessions.
|
||||
+
|
||||
+This feature is implemented at least on @sc{gnu}/Linux and OpenBSD. You can
|
||||
+get the same behavior using
|
||||
+
|
||||
+@smallexample
|
||||
+(@value{GDBP}) set exec-wrapper setarch `uname -m` -R
|
||||
+@end smallexample
|
||||
+
|
||||
+@item set disable-randomization off
|
||||
+Leave the behavior of the started executable unchanged. Some bugs rear their
|
||||
+ugly heads only when the program is loaded at certain addresses. If your bug
|
||||
+disappears when you run the program under @value{GDBN}, that might be because
|
||||
+@value{GDBN} by default disables the address randomization on platforms, such
|
||||
+as @sc{gnu}/Linux, which do that for stand-alone programs. Use @kbd{set
|
||||
+disable-randomization off} to try to reproduce such elusive bugs.
|
||||
+
|
||||
+The virtual address space randomization is implemented at least on
|
||||
+@sc{gnu}/Linux and OpenBSD. It protects the programs against some kinds of
|
||||
+security attacks. In these cases the attacker needs to know the exact location
|
||||
+of a concrete executable code. Randomizing its location makes it impossible to
|
||||
+inject jumps misusing a code at its expected addresses.
|
||||
+
|
||||
+Prelinking shared libraries provides a startup performance advantage but it
|
||||
+makes addresses in these libraries predictable for privileged processes by
|
||||
+having just unprivileged access at the target system. Reading the shared
|
||||
+library binary gives enough information for assembling the malicious code
|
||||
+misusing it. Still even a prelinked shared library can get loaded a a new
|
||||
+random address just requiring the regular relocation process during the
|
||||
+startup. Shared libraries not already prelinked are always loaded at
|
||||
+a randomly chosen address.
|
||||
+
|
||||
+Position independent executables (PIE) contain position independent code
|
||||
+similar to the shared libraries and therefore such executables get loaded at
|
||||
+a randomly chosen address upon startup. PIE executables always load even
|
||||
+already prelinked shared libraries at a random address. You can build such
|
||||
+executable using @command{gcc -fPIE -pie}.
|
||||
+
|
||||
+Heap (malloc storage), stack and custom mmap areas are always placed randomly
|
||||
+(as long as the randomization is enabled).
|
||||
+
|
||||
+@item show disable-randomization
|
||||
+Show the current setting of the explicit disable of the native randomization of
|
||||
+the virtual address space of the started program.
|
||||
+
|
||||
@end table
|
||||
|
||||
If you are running your program in an execution environment that
|
||||
Index: gdb-6.8/gdb/testsuite/gdb.base/randomize.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/randomize.c 2008-07-14 10:28:50.000000000 +0200
|
||||
@@ -0,0 +1,32 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ void *p;
|
||||
+
|
||||
+ p = malloc (1);
|
||||
+ printf ("address = %p\n", p);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-6.8/gdb/testsuite/gdb.base/randomize.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/randomize.exp 2008-07-14 10:28:50.000000000 +0200
|
||||
@@ -0,0 +1,63 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile randomize
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Get things started.
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+proc address_get { testname } {
|
||||
+ global gdb_prompt
|
||||
+
|
||||
+ if {![runto_main]} {
|
||||
+ return -1
|
||||
+ }
|
||||
+ gdb_test_multiple "continue" $testname {
|
||||
+ -re "address = (0x\[0-9a-f\]*).*Program exited normally..*$gdb_prompt $" {
|
||||
+ pass $testname
|
||||
+ return $expect_out(1,string)
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test "set disable-randomization off"
|
||||
+set addr1 [address_get "randomized first address"]
|
||||
+set addr2 [address_get "randomized second address"]
|
||||
+set test "randomized addresses should not match"
|
||||
+if {$addr1 eq $addr2} {
|
||||
+ fail $test
|
||||
+} else {
|
||||
+ pass $test
|
||||
+}
|
||||
+
|
||||
+gdb_test "set disable-randomization on"
|
||||
+set addr1 [address_get "fixed first address"]
|
||||
+set addr2 [address_get "fixed second address"]
|
||||
+set test "fixed addresses should match"
|
||||
+if {$addr1 eq $addr2} {
|
||||
+ pass $test
|
||||
+} else {
|
||||
+ fail $test
|
||||
+}
|
@ -1,88 +0,0 @@
|
||||
2008-06-18 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* configure.ac (--enable-tui): AC_MSG_ERROR for explicit --enable-tui.
|
||||
* configure: Regenerated.
|
||||
|
||||
--- ./gdb/configure.ac 9 Jun 2008 15:03:59 -0000 1.70
|
||||
+++ ./gdb/configure.ac 18 Jun 2008 17:14:21 -0000
|
||||
@@ -260,11 +260,11 @@ fi
|
||||
AC_ARG_ENABLE(tui,
|
||||
[ --enable-tui enable full-screen terminal user interface (TUI)],
|
||||
[case $enableval in
|
||||
- yes | no)
|
||||
+ yes | no | auto)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;;
|
||||
- esac],enable_tui=yes)
|
||||
+ esac],enable_tui=auto)
|
||||
|
||||
# Enable gdbtk.
|
||||
AC_ARG_ENABLE(gdbtk,
|
||||
@@ -1576,7 +1576,7 @@ AC_PATH_X
|
||||
|
||||
# Check whether we should enable the TUI, but only do so if we really
|
||||
# can.
|
||||
-if test x"$enable_tui" = xyes; then
|
||||
+if test x"$enable_tui" != xno; then
|
||||
if test -d $srcdir/tui; then
|
||||
if test "$ac_cv_search_waddstr" != no; then
|
||||
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
|
||||
@@ -1589,7 +1589,11 @@ if test x"$enable_tui" = xyes; then
|
||||
CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
|
||||
CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
|
||||
else
|
||||
- AC_MSG_WARN([no enhanced curses library found; disabling TUI])
|
||||
+ if test x"$enable_tui" = xyes; then
|
||||
+ AC_MSG_ERROR([no enhanced curses library found; disable TUI])
|
||||
+ else
|
||||
+ AC_MSG_WARN([no enhanced curses library found; disabling TUI])
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
--- ./gdb/configure 9 Jun 2008 15:03:58 -0000 1.250
|
||||
+++ ./gdb/configure 18 Jun 2008 17:14:12 -0000
|
||||
@@ -7540,7 +7540,7 @@ fi
|
||||
if test "${enable_tui+set}" = set; then
|
||||
enableval="$enable_tui"
|
||||
case $enableval in
|
||||
- yes | no)
|
||||
+ yes | no | auto)
|
||||
;;
|
||||
*)
|
||||
{ { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
|
||||
@@ -7548,7 +7548,7 @@ echo "$as_me: error: bad value $enableva
|
||||
{ (exit 1); exit 1; }; } ;;
|
||||
esac
|
||||
else
|
||||
- enable_tui=yes
|
||||
+ enable_tui=auto
|
||||
fi;
|
||||
|
||||
# Enable gdbtk.
|
||||
@@ -28324,7 +28324,7 @@ fi
|
||||
|
||||
# Check whether we should enable the TUI, but only do so if we really
|
||||
# can.
|
||||
-if test x"$enable_tui" = xyes; then
|
||||
+if test x"$enable_tui" != xno; then
|
||||
if test -d $srcdir/tui; then
|
||||
if test "$ac_cv_search_waddstr" != no; then
|
||||
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
|
||||
@@ -28337,8 +28337,14 @@ if test x"$enable_tui" = xyes; then
|
||||
CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
|
||||
CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
|
||||
else
|
||||
- { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
|
||||
+ if test x"$enable_tui" = xyes; then
|
||||
+ { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
|
||||
+echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
|
||||
+ { (exit 1); exit 1; }; }
|
||||
+ else
|
||||
+ { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
|
||||
echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
fi
|
@ -1,14 +0,0 @@
|
||||
--- ./gdb/dwarf2read.c 24 Aug 2008 16:39:56 -0000 1.277
|
||||
+++ ./gdb/dwarf2read.c 26 Aug 2008 18:51:28 -0000
|
||||
@@ -2761,7 +2769,10 @@ process_die (struct die_info *die, struc
|
||||
Fortran case, so we'll have to replace this gdb_assert if
|
||||
Fortran compilers start generating that info. */
|
||||
processing_has_namespace_info = 1;
|
||||
- gdb_assert (die->child == NULL);
|
||||
+ if (cu->language != language_fortran && die->child == NULL)
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("%s at offset %d has unexpected children"),
|
||||
+ dwarf_tag_name (die->tag), die->offset);
|
||||
break;
|
||||
default:
|
||||
new_symbol (die, NULL, cu);
|
@ -1,14 +1,16 @@
|
||||
--- ./gdb/dwarf2read.c 21 Aug 2008 18:57:34 -0000 1.276
|
||||
+++ ./gdb/dwarf2read.c 26 Aug 2008 17:54:37 -0000
|
||||
@@ -1798,6 +1798,7 @@ scan_partial_symbols (struct partial_die
|
||||
}
|
||||
Index: gdb-6.8.50.20081128/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/dwarf2read.c 2008-12-06 14:06:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/dwarf2read.c 2008-12-06 21:53:09.000000000 +0100
|
||||
@@ -1825,6 +1825,7 @@ scan_partial_symbols (struct partial_die
|
||||
add_partial_subprogram (pdi, lowpc, highpc, cu);
|
||||
break;
|
||||
case DW_TAG_variable:
|
||||
+ case DW_TAG_constant:
|
||||
case DW_TAG_typedef:
|
||||
case DW_TAG_union_type:
|
||||
if (!pdi->is_declaration)
|
||||
@@ -1983,6 +1984,7 @@ add_partial_symbol (struct partial_die_i
|
||||
@@ -2010,6 +2011,7 @@ add_partial_symbol (struct partial_die_i
|
||||
}
|
||||
break;
|
||||
case DW_TAG_variable:
|
||||
@ -16,7 +18,15 @@
|
||||
if (pdi->is_external)
|
||||
{
|
||||
/* Global Variable.
|
||||
@@ -3590,7 +3593,8 @@ dwarf2_add_field (struct field_info *fip
|
||||
@@ -2864,6 +2866,7 @@ dwarf2_full_name (struct die_info *die,
|
||||
if (!pdi_needs_namespace (die->tag)
|
||||
&& die->tag != DW_TAG_subprogram
|
||||
&& die->tag != DW_TAG_variable
|
||||
+ && die->tag != DW_TAG_constant
|
||||
&& die->tag != DW_TAG_member)
|
||||
return name;
|
||||
|
||||
@@ -3704,7 +3707,8 @@ dwarf2_add_field (struct field_info *fip
|
||||
fip->non_public_fields = 1;
|
||||
}
|
||||
}
|
||||
@ -26,7 +36,7 @@
|
||||
{
|
||||
/* C++ static member. */
|
||||
|
||||
@@ -4069,7 +4073,8 @@ read_structure_type (struct die_info *di
|
||||
@@ -4182,7 +4186,8 @@ read_structure_type (struct die_info *di
|
||||
while (child_die && child_die->tag)
|
||||
{
|
||||
if (child_die->tag == DW_TAG_member
|
||||
@ -36,7 +46,7 @@
|
||||
{
|
||||
/* NOTE: carlton/2002-11-05: A C++ static data member
|
||||
should be a DW_TAG_member that is a declaration, but
|
||||
@@ -4188,6 +4193,7 @@ process_structure_scope (struct die_info
|
||||
@@ -4301,6 +4306,7 @@ process_structure_scope (struct die_info
|
||||
{
|
||||
if (child_die->tag == DW_TAG_member
|
||||
|| child_die->tag == DW_TAG_variable
|
||||
@ -44,15 +54,15 @@
|
||||
|| child_die->tag == DW_TAG_inheritance)
|
||||
{
|
||||
/* Do nothing. */
|
||||
@@ -5565,6 +5571,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
||||
&& abbrev->tag != DW_TAG_enumerator
|
||||
@@ -5700,6 +5706,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
||||
&& abbrev->tag != DW_TAG_subprogram
|
||||
&& abbrev->tag != DW_TAG_lexical_block
|
||||
&& abbrev->tag != DW_TAG_variable
|
||||
+ && abbrev->tag != DW_TAG_constant
|
||||
&& abbrev->tag != DW_TAG_namespace
|
||||
&& abbrev->tag != DW_TAG_member)
|
||||
{
|
||||
@@ -5672,6 +5679,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
||||
@@ -5807,6 +5814,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
||||
if (load_all
|
||||
|| abbrev->tag == DW_TAG_subprogram
|
||||
|| abbrev->tag == DW_TAG_variable
|
||||
@ -60,7 +70,7 @@
|
||||
|| abbrev->tag == DW_TAG_namespace
|
||||
|| part_die->is_declaration)
|
||||
{
|
||||
@@ -7579,6 +7579,11 @@ new_symbol (struct die_info *die, struct
|
||||
@@ -7593,6 +7601,11 @@ new_symbol (struct die_info *die, struct
|
||||
/* Do not add the symbol to any lists. It will be found via
|
||||
BLOCK_FUNCTION from the blockvector. */
|
||||
break;
|
||||
|
@ -1,276 +0,0 @@
|
||||
gdb/
|
||||
2008-10-28 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix automatic restoration of breakpoints memory for ia64.
|
||||
* ia64-tdep.c (ia64_memory_insert_breakpoint): New comment part for
|
||||
SHADOW_CONTENTS content. Remova variable instr. New variable cleanup.
|
||||
Force automatic breakpoints restoration. PLACED_SIZE and SHADOW_LEN
|
||||
are now set larger, to BUNDLE_LEN - 2.
|
||||
(ia64_memory_remove_breakpoint): Rename variables bundle to bundle_mem
|
||||
and instr to instr_saved. New variables bundle_saved and
|
||||
instr_breakpoint. Comment new reasons why we need to disable automatic
|
||||
restoration of breakpoints. Assert PLACED_SIZE and SHADOW_LEN. New
|
||||
check of the original memory content.
|
||||
(ia64_breakpoint_from_pc): Array breakpoint extended to BUNDLE_LEN.
|
||||
Sanity check the PCPTR parameter SLOTNUM value. New #if check on
|
||||
BREAKPOINT_MAX vs. BUNDLE_LEN. Increase LENPTR to BUNDLE_LEN - 2.
|
||||
|
||||
gdb/testsuite/
|
||||
2008-10-28 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/breakpoint-shadow.exp, gdb.base/breakpoint-shadow.c: New.
|
||||
|
||||
[ RHEL-5 disable of `set breakpoint always-inserted'. ]
|
||||
|
||||
--- ./gdb/ia64-tdep.c 11 Sep 2008 14:23:15 -0000 1.184
|
||||
+++ ./gdb/ia64-tdep.c 28 Oct 2008 10:28:41 -0000
|
||||
@@ -545,7 +545,21 @@ fetch_instruction (CORE_ADDR addr, instr
|
||||
simulators. So I changed the pattern slightly to do "break.i 0x080001"
|
||||
instead. But that didn't work either (I later found out that this
|
||||
pattern was used by the simulator that I was using.) So I ended up
|
||||
- using the pattern seen below. */
|
||||
+ using the pattern seen below.
|
||||
+
|
||||
+ SHADOW_CONTENTS has byte-based addressing (PLACED_ADDRESS and SHADOW_LEN)
|
||||
+ while we need bit-based addressing as the instructions length is 41 bits and
|
||||
+ we must not modify/corrupt the adjacent ones in the same bundle.
|
||||
+ Fortunately we may store larger memory incl. the adjacent bits with the
|
||||
+ original memory content (not the possibly already stored breakpoints there).
|
||||
+ We need to be careful in ia64_memory_remove_breakpoint to always restore
|
||||
+ only the specific bits of this instruction ignoring any adjacent stored
|
||||
+ bits.
|
||||
+
|
||||
+ We use the original addressing with the low nibble 0..2 which gets
|
||||
+ incorrectly interpreted by the generic GDB code as the byte offset of
|
||||
+ SHADOW_CONTENTS. We store whole BUNDLE_LEN bytes just without these two
|
||||
+ possibly skipped bytes. */
|
||||
|
||||
#if 0
|
||||
#define IA64_BREAKPOINT 0x00002000040LL
|
||||
@@ -559,15 +573,21 @@ ia64_memory_insert_breakpoint (struct gd
|
||||
CORE_ADDR addr = bp_tgt->placed_address;
|
||||
char bundle[BUNDLE_LEN];
|
||||
int slotnum = (int) (addr & 0x0f) / SLOT_MULTIPLIER;
|
||||
- long long instr;
|
||||
int val;
|
||||
int template;
|
||||
+ struct cleanup *cleanup;
|
||||
|
||||
if (slotnum > 2)
|
||||
error (_("Can't insert breakpoint for slot numbers greater than 2."));
|
||||
|
||||
addr &= ~0x0f;
|
||||
|
||||
+ /* Enable the automatic memory restoration from breakpoints while
|
||||
+ we read our instruction bundle. Otherwise, we could store into
|
||||
+ SHADOW_CONTENTS an already stored breakpoint at the same location.
|
||||
+ In practice it is already being prevented by the DUPLICATE field and
|
||||
+ update_global_location_list. */
|
||||
+ cleanup = make_show_memory_breakpoints_cleanup (0);
|
||||
val = target_read_memory (addr, bundle, BUNDLE_LEN);
|
||||
|
||||
/* Check for L type instruction in 2nd slot, if present then
|
||||
@@ -578,13 +598,18 @@ ia64_memory_insert_breakpoint (struct gd
|
||||
slotnum = 2;
|
||||
}
|
||||
|
||||
- instr = slotN_contents (bundle, slotnum);
|
||||
- memcpy (bp_tgt->shadow_contents, &instr, sizeof (instr));
|
||||
- bp_tgt->placed_size = bp_tgt->shadow_len = sizeof (instr);
|
||||
+ /* Slot number 2 may skip at most 2 bytes at the beginning. */
|
||||
+ bp_tgt->placed_size = bp_tgt->shadow_len = BUNDLE_LEN - 2;
|
||||
+
|
||||
+ /* Store the whole bundle, except for the initial skipped bytes by the slot
|
||||
+ number interpreted as bytes offset in PLACED_ADDRESS. */
|
||||
+ memcpy (bp_tgt->shadow_contents, bundle + slotnum, bp_tgt->shadow_len);
|
||||
+
|
||||
replace_slotN_contents (bundle, IA64_BREAKPOINT, slotnum);
|
||||
if (val == 0)
|
||||
- target_write_memory (addr, bundle, BUNDLE_LEN);
|
||||
+ target_write_memory (addr + slotnum, bundle + slotnum, bp_tgt->shadow_len);
|
||||
|
||||
+ do_cleanups (cleanup);
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -593,9 +618,9 @@ ia64_memory_remove_breakpoint (struct gd
|
||||
struct bp_target_info *bp_tgt)
|
||||
{
|
||||
CORE_ADDR addr = bp_tgt->placed_address;
|
||||
- char bundle[BUNDLE_LEN];
|
||||
+ char bundle_mem[BUNDLE_LEN], bundle_saved[BUNDLE_LEN];
|
||||
int slotnum = (addr & 0x0f) / SLOT_MULTIPLIER;
|
||||
- long long instr;
|
||||
+ long long instr_breakpoint, instr_saved;
|
||||
int val;
|
||||
int template;
|
||||
struct cleanup *cleanup;
|
||||
@@ -604,23 +629,39 @@ ia64_memory_remove_breakpoint (struct gd
|
||||
|
||||
/* Disable the automatic memory restoration from breakpoints while
|
||||
we read our instruction bundle. Otherwise, the general restoration
|
||||
- mechanism kicks in and ends up corrupting our bundle, because it
|
||||
- is not aware of the concept of instruction bundles. */
|
||||
+ mechanism kicks in and we would possibly remove parts of the adjacent
|
||||
+ placed breakpoints. It is due to our SHADOW_CONTENTS overlapping the real
|
||||
+ breakpoint instruction bits region. */
|
||||
cleanup = make_show_memory_breakpoints_cleanup (1);
|
||||
- val = target_read_memory (addr, bundle, BUNDLE_LEN);
|
||||
+ val = target_read_memory (addr, bundle_mem, BUNDLE_LEN);
|
||||
|
||||
/* Check for L type instruction in 2nd slot, if present then
|
||||
bump up the slot number to the 3rd slot */
|
||||
- template = extract_bit_field (bundle, 0, 5);
|
||||
+ template = extract_bit_field (bundle_mem, 0, 5);
|
||||
if (slotnum == 1 && template_encoding_table[template][1] == L)
|
||||
{
|
||||
slotnum = 2;
|
||||
}
|
||||
|
||||
- memcpy (&instr, bp_tgt->shadow_contents, sizeof instr);
|
||||
- replace_slotN_contents (bundle, instr, slotnum);
|
||||
+ gdb_assert (bp_tgt->placed_size == BUNDLE_LEN - 2);
|
||||
+ gdb_assert (bp_tgt->placed_size == bp_tgt->shadow_len);
|
||||
+
|
||||
+ instr_breakpoint = slotN_contents (bundle_mem, slotnum);
|
||||
+ if (instr_breakpoint != IA64_BREAKPOINT)
|
||||
+ warning (_("Breakpoint removal cannot find the placed breakpoint at %s"),
|
||||
+ paddr_nz (bp_tgt->placed_address));
|
||||
+
|
||||
+ /* Extract the original saved instruction from SLOTNUM normalizing its
|
||||
+ bit-shift for INSTR_SAVED. */
|
||||
+ memcpy (bundle_saved, bundle_mem, BUNDLE_LEN);
|
||||
+ memcpy (bundle_saved + slotnum, bp_tgt->shadow_contents, bp_tgt->shadow_len);
|
||||
+ instr_saved = slotN_contents (bundle_saved, slotnum);
|
||||
+
|
||||
+ /* In BUNDLE_MEM be careful to modify only the bits belonging to SLOTNUM and
|
||||
+ never any other possibly also stored in SHADOW_CONTENTS. */
|
||||
+ replace_slotN_contents (bundle_mem, instr_saved, slotnum);
|
||||
if (val == 0)
|
||||
- target_write_memory (addr, bundle, BUNDLE_LEN);
|
||||
+ target_write_memory (addr, bundle_mem, BUNDLE_LEN);
|
||||
|
||||
do_cleanups (cleanup);
|
||||
return val;
|
||||
@@ -631,12 +672,18 @@ ia64_memory_remove_breakpoint (struct gd
|
||||
const unsigned char *
|
||||
ia64_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
|
||||
{
|
||||
- static unsigned char breakpoint[] =
|
||||
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
- *lenptr = sizeof (breakpoint);
|
||||
-#if 0
|
||||
- *pcptr &= ~0x0f;
|
||||
+ static unsigned char breakpoint[BUNDLE_LEN];
|
||||
+ int slotnum = (int) (*pcptr & 0x0f) / SLOT_MULTIPLIER;
|
||||
+
|
||||
+ if (slotnum > 2)
|
||||
+ error (_("Can't insert breakpoint for slot numbers greater than 2."));
|
||||
+
|
||||
+#if BREAKPOINT_MAX < BUNDLE_LEN
|
||||
+# error "BREAKPOINT_MAX < BUNDLE_LEN"
|
||||
#endif
|
||||
+
|
||||
+ *lenptr = BUNDLE_LEN - 2;
|
||||
+
|
||||
return breakpoint;
|
||||
}
|
||||
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.base/breakpoint-shadow.c 28 Oct 2008 10:28:41 -0000
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ volatile int i;
|
||||
+
|
||||
+ i = 1; /* break-first */
|
||||
+ i = 2; /* break-second */
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.base/breakpoint-shadow.exp 28 Oct 2008 10:28:41 -0000
|
||||
@@ -0,0 +1,65 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile breakpoint-shadow
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+# We need to start the inferior to place the breakpoints in the memory at all.
|
||||
+if { [gdb_start_cmd] < 0 } {
|
||||
+ untested start
|
||||
+ return -1
|
||||
+}
|
||||
+gdb_test "" "main \\(\\) at .*" "start"
|
||||
+
|
||||
+# The default "auto" mode removes all the breakpoints when we stop (and not
|
||||
+# running the nonstop mode). We would not be able to test the shadow.
|
||||
+#RHEL-5:
|
||||
+#gdb_test "set breakpoint always-inserted on"
|
||||
+#gdb_test "show breakpoint always-inserted" "Always inserted breakpoint mode is on."
|
||||
+
|
||||
+set match "\nDump of assembler code for function main:\r\n(.*)End of assembler dump.\r\n$gdb_prompt $"
|
||||
+
|
||||
+set test "disassembly without breakpoints"
|
||||
+gdb_test_multiple "disass main" $test {
|
||||
+ -re $match {
|
||||
+ set orig $expect_out(1,string)
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test "b [gdb_get_line_number "break-first"]" "Breakpoint \[0-9\] at .*" "First breakpoint placed"
|
||||
+gdb_test "b [gdb_get_line_number "break-second"]" "Breakpoint \[0-9\] at .*" "Second breakpoint placed"
|
||||
+
|
||||
+set test "disassembly with breakpoints"
|
||||
+gdb_test_multiple "disass main" $test {
|
||||
+ -re $match {
|
||||
+ set got $expect_out(1,string)
|
||||
+ if [string equal -nocase $orig $got] {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ fail $test
|
||||
+ }
|
||||
+ }
|
||||
+}
|
@ -1,119 +0,0 @@
|
||||
It is a regression from:
|
||||
http://sourceware.org/ml/gdb-patches/2007-03/msg00290.html
|
||||
http://sourceware.org/ml/gdb-cvs/2007-03/msg00114.html
|
||||
|
||||
Without started inferior the only target in the stack is `exec' which has no
|
||||
hardware-watchpoints support for sure.
|
||||
|
||||
--- /dev/null 2008-11-16 09:11:50.595000000 +0100
|
||||
+++ gdb-6.8/gdb/config/ia64/nm-linux.h 2008-11-18 11:00:34.000000000 +0100
|
||||
@@ -0,0 +1,31 @@
|
||||
+/* Native support for GNU/Linux, for GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 1999, 2000, 2001, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
+ Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#ifndef NM_LINUX_H
|
||||
+#define NM_LINUX_H
|
||||
+
|
||||
+#include "config/nm-linux.h"
|
||||
+
|
||||
+/* Hardware watchpoints */
|
||||
+
|
||||
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* #ifndef NM_LINUX_H */
|
||||
--- gdb-6.8/gdb/config/ia64/linux.mh-orig 2007-04-26 00:17:48.000000000 +0200
|
||||
+++ gdb-6.8/gdb/config/ia64/linux.mh 2008-11-18 11:09:33.000000000 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
# Host: Intel IA-64 running GNU/Linux
|
||||
|
||||
-NAT_FILE= config/nm-linux.h
|
||||
+NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= inf-ptrace.o fork-child.o corelow.o gcore.o \
|
||||
core-regset.o ia64-linux-nat.o \
|
||||
proc-service.o linux-thread-db.o linux-nat.o linux-fork.o
|
||||
--- /dev/null 2008-11-16 09:11:50.595000000 +0100
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/hw-watchpoint-available.exp 2008-11-18 11:28:40.000000000 +0100
|
||||
@@ -0,0 +1,35 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] && ![istarget "ia64-*-*"]
|
||||
+ && ![istarget "s390*-*-*"]} then {
|
||||
+ verbose "Skipping hw-watchpoint-available test."
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set testfile hw-watchpoint-available
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+gdb_test "watch watchee" "Hardware watchpoint 1: watchee"
|
||||
--- /dev/null 2008-11-16 09:11:50.595000000 +0100
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/hw-watchpoint-available.c 2008-11-18 11:24:38.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+int watchee;
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
272
gdb-6.8-inlining-addon.patch
Normal file
272
gdb-6.8-inlining-addon.patch
Normal file
@ -0,0 +1,272 @@
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-bt.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-bt.c 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-bt.c 2008-12-10 00:37:26.000000000 +0100
|
||||
@@ -13,10 +13,16 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
-int x, y;
|
||||
+/* VOLATILE forces all the inlining to happen as otherwise the whole program
|
||||
+ gets optimized by CSE to just simple assignments of the results. */
|
||||
+volatile int x, y;
|
||||
volatile int result;
|
||||
|
||||
-void bar(void);
|
||||
+inline void bar(void)
|
||||
+{
|
||||
+ x += y; /* set breakpoint 1 here */
|
||||
+}
|
||||
+
|
||||
|
||||
inline int func1(void)
|
||||
{
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-bt.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-bt.exp 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-bt.exp 2008-12-10 00:37:26.000000000 +0100
|
||||
@@ -41,18 +41,19 @@ if { [skip_inline_frame_tests] } {
|
||||
return
|
||||
}
|
||||
|
||||
-set line1 [gdb_get_line_number "set breakpoint 1 here" ${fullsrcfile2}]
|
||||
-gdb_breakpoint $srcfile2:$line1
|
||||
+set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile}]
|
||||
+gdb_breakpoint $srcfile:$line1
|
||||
|
||||
gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (1)"
|
||||
gdb_test "backtrace" "#0 bar.*#1 .*main.*" "backtrace from bar (1)"
|
||||
-gdb_test "info frame" ".*called by frame.*" "bar not inlined"
|
||||
+gdb_test "info frame" ".*inlined into frame.*" "bar inlined"
|
||||
|
||||
-gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (2)"
|
||||
-gdb_test "backtrace" "#0 bar.*#1 .*func1.*#2 .*main.*" \
|
||||
- "backtrace from bar (2)"
|
||||
-gdb_test "up" "#1 .*func1.*" "up from bar (2)"
|
||||
-gdb_test "info frame" ".*inlined into frame.*" "func1 inlined (2)"
|
||||
+# gcc-4.3.1 omits the line number information for (2).
|
||||
+#gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (2)"
|
||||
+#gdb_test "backtrace" "#0 bar.*#1 .*func1.*#2 .*main.*" \
|
||||
+# "backtrace from bar (2)"
|
||||
+#gdb_test "up" "#1 .*func1.*" "up from bar (2)"
|
||||
+#gdb_test "info frame" ".*inlined into frame.*" "func1 inlined (2)"
|
||||
|
||||
gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (3)"
|
||||
gdb_test "backtrace" "#0 bar.*#1 .*func1.*#2 .*func2.*#3 .*main.*" \
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.c 2008-12-10 00:37:26.000000000 +0100
|
||||
@@ -13,13 +13,19 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
-int x, y;
|
||||
+/* VOLATILE forces all the inlining to happen as otherwise the whole program
|
||||
+ gets optimized by CSE to just simple assignments of the results. */
|
||||
+volatile int x, y;
|
||||
volatile int result;
|
||||
|
||||
-void bar(void);
|
||||
void marker(void);
|
||||
void noinline(void);
|
||||
|
||||
+inline void bar(void)
|
||||
+{
|
||||
+ x += y; /* set breakpoint 1 here */
|
||||
+}
|
||||
+
|
||||
inline int func1(void)
|
||||
{
|
||||
bar ();
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.exp 2008-12-10 00:36:27.000000000 +0100
|
||||
@@ -45,9 +45,9 @@ if { [skip_inline_frame_tests] } {
|
||||
|
||||
# First, check that the things we expected to be inlined really were,
|
||||
# and those that shouldn't be weren't.
|
||||
-set line1 [gdb_get_line_number "set breakpoint 1 here" ${fullsrcfile2}]
|
||||
+set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile2}]
|
||||
gdb_breakpoint $srcfile2:$line1
|
||||
-set line2 [gdb_get_line_number "set breakpoint 2 here" ${fullsrcfile2}]
|
||||
+set line2 [gdb_get_line_number "set breakpoint 2 here" ${srcfile2}]
|
||||
gdb_breakpoint $srcfile2:$line2
|
||||
|
||||
gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (1)"
|
||||
@@ -66,7 +66,7 @@ gdb_test "info frame" ".*inlined into fr
|
||||
|
||||
gdb_test "continue" ".*set breakpoint 2 here.*" "continue to marker"
|
||||
gdb_test "backtrace" "#0 marker.*#1 .*main.*" "backtrace from marker"
|
||||
-gdb_test "info frame" ".*called by frame.*" "marker not inlined"
|
||||
+gdb_test "info frame" ".*\n called by frame.*" "marker not inlined"
|
||||
|
||||
# Next, check that we can next over inlined functions. We should not end up
|
||||
# inside any of them.
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-locals.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-locals.c 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-locals.c 2008-12-10 00:37:26.000000000 +0100
|
||||
@@ -13,11 +13,16 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
-int x, y;
|
||||
+/* VOLATILE forces all the inlining to happen as otherwise the whole program
|
||||
+ gets optimized by CSE to just simple assignments of the results. */
|
||||
+volatile int x, y;
|
||||
volatile int result;
|
||||
volatile int *array_p;
|
||||
|
||||
-void bar(void);
|
||||
+inline void bar(void)
|
||||
+{
|
||||
+ x += y; /* set breakpoint 1 here */
|
||||
+}
|
||||
|
||||
inline int func1(int arg1)
|
||||
{
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-locals.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-locals.exp 2008-12-10 00:37:26.000000000 +0100
|
||||
@@ -43,8 +43,8 @@ if { [skip_inline_var_tests] } {
|
||||
|
||||
set no_frames [skip_inline_frame_tests]
|
||||
|
||||
-set line1 [gdb_get_line_number "set breakpoint 1 here" ${fullsrcfile2}]
|
||||
-gdb_breakpoint $srcfile2:$line1
|
||||
+set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile}]
|
||||
+gdb_breakpoint $srcfile:$line1
|
||||
|
||||
gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (1)"
|
||||
|
||||
@@ -77,6 +77,9 @@ if { ! $no_frames } {
|
||||
|
||||
# Make sure that locals on the stack are found. This is an array to
|
||||
# prevent it from living in a register.
|
||||
+if [test_compiler_info "gcc-4-3-*"] {
|
||||
+ setup_kfail *-*-* "gcc/debug.optimization"
|
||||
+}
|
||||
gdb_test "print array\[0\]" "\\\$$decimal = 0" "print local (2)"
|
||||
|
||||
if { ! $no_frames } {
|
||||
@@ -115,4 +118,7 @@ if { ! $no_frames } {
|
||||
gdb_test "info locals" ".*arg2 = 184.*" "info locals above bar (3b)"
|
||||
}
|
||||
|
||||
+if [test_compiler_info "gcc-4-3-*"] {
|
||||
+ setup_kfail *-*-* "gcc/debug.optimization"
|
||||
+}
|
||||
gdb_test "print array\[0\]" "\\\$$decimal = 184" "print local (3)"
|
||||
Index: gdb-6.8.50.20081128/gdb/frame.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/frame.c 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/frame.c 2008-12-10 00:25:31.000000000 +0100
|
||||
@@ -269,7 +269,7 @@ fprint_frame (struct ui_file *file, stru
|
||||
static struct frame_info *
|
||||
skip_inlined_frames (struct frame_info *frame)
|
||||
{
|
||||
- while (get_frame_type (frame) == INLINE_FRAME)
|
||||
+ while (frame && get_frame_type (frame) == INLINE_FRAME)
|
||||
frame = get_prev_frame (frame);
|
||||
|
||||
return frame;
|
||||
Index: gdb-6.8.50.20081128/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/breakpoint.c 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/breakpoint.c 2008-12-10 00:36:27.000000000 +0100
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "top.h"
|
||||
#include "wrapper.h"
|
||||
#include "valprint.h"
|
||||
+#include "inline-frame.h"
|
||||
|
||||
#include "mi/mi-common.h"
|
||||
|
||||
@@ -2976,6 +2977,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
|
||||
bs->print = 0;
|
||||
}
|
||||
bs->commands = copy_command_lines (bs->commands);
|
||||
+
|
||||
+ /* Display the innermost inlined frame at a breakpont as it gives to
|
||||
+ most of the available information. */
|
||||
+ if (b->type != bp_until && b->type != bp_finish)
|
||||
+ while (inline_skipped_frames (ptid))
|
||||
+ step_into_inline_frame (ptid);
|
||||
}
|
||||
|
||||
/* Print nothing for this entry if we dont stop or if we dont print. */
|
||||
Index: gdb-6.8.50.20081128/gdb/inline-frame.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/inline-frame.c 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/inline-frame.c 2008-12-10 00:40:49.000000000 +0100
|
||||
@@ -183,6 +183,12 @@ inline_frame_sniffer (const struct frame
|
||||
if (frame_block == NULL)
|
||||
return 0;
|
||||
|
||||
+ /* For >=2 inlined functions SKIPPED_SYMBOL needs to be different after each
|
||||
+ step_into_inline_frame call. But skip_inline_frames is called only once
|
||||
+ and thus SKIPPED_SYMBOL needs to be calculated by INLINE_FRAME_SNIFFER. */
|
||||
+ if (state)
|
||||
+ state->skipped_symbol = NULL;
|
||||
+
|
||||
/* Calculate DEPTH, the number of inlined functions at this
|
||||
location. */
|
||||
depth = 0;
|
||||
@@ -192,6 +198,10 @@ inline_frame_sniffer (const struct frame
|
||||
if (block_inlined_p (cur_block))
|
||||
depth++;
|
||||
|
||||
+ if (state && depth == state->skipped_frames
|
||||
+ && state->skipped_symbol == NULL)
|
||||
+ state->skipped_symbol = BLOCK_FUNCTION (cur_block);
|
||||
+
|
||||
cur_block = BLOCK_SUPERBLOCK (cur_block);
|
||||
}
|
||||
|
||||
@@ -275,7 +285,6 @@ skip_inline_frames (ptid_t ptid)
|
||||
{
|
||||
CORE_ADDR this_pc;
|
||||
struct block *frame_block, *cur_block;
|
||||
- struct symbol *last_sym = NULL;
|
||||
int skip_count = 0;
|
||||
struct inline_state *state;
|
||||
|
||||
@@ -296,10 +305,7 @@ skip_inline_frames (ptid_t ptid)
|
||||
of BLOCK_START. */
|
||||
if (BLOCK_START (cur_block) == this_pc
|
||||
|| block_starting_point_at (this_pc, cur_block))
|
||||
- {
|
||||
- skip_count++;
|
||||
- last_sym = BLOCK_FUNCTION (cur_block);
|
||||
- }
|
||||
+ skip_count++;
|
||||
else
|
||||
break;
|
||||
}
|
||||
@@ -311,7 +317,6 @@ skip_inline_frames (ptid_t ptid)
|
||||
state = allocate_inline_frame_state (ptid);
|
||||
state->skipped_frames = skip_count;
|
||||
state->saved_pc = this_pc;
|
||||
- state->skipped_symbol = last_sym;
|
||||
|
||||
if (skip_count != 0)
|
||||
reinit_frame_cache ();
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-markers.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-markers.c 2008-12-10 00:25:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-markers.c 2008-12-10 00:37:26.000000000 +0100
|
||||
@@ -15,11 +15,6 @@
|
||||
|
||||
extern int x, y;
|
||||
|
||||
-void bar(void)
|
||||
-{
|
||||
- x += y; /* set breakpoint 1 here */
|
||||
-}
|
||||
-
|
||||
void marker(void)
|
||||
{
|
||||
x += y; /* set breakpoint 2 here */
|
@ -1,10 +1,11 @@
|
||||
Implement `b <funcname>' for <funcname> with concete inlined instances by
|
||||
a multiple-PC breakpoint.
|
||||
|
||||
diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/ada-lang.c sources-inline-works3/gdb/ada-lang.c
|
||||
--- sources-inline-works3-orig/gdb/ada-lang.c 2008-06-24 20:58:11.000000000 +0200
|
||||
+++ sources-inline-works3/gdb/ada-lang.c 2008-06-26 15:29:33.000000000 +0200
|
||||
@@ -4625,7 +4625,7 @@ remove_irrelevant_renamings (struct ada_
|
||||
Index: gdb-6.8.50.20081128/gdb/ada-lang.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/ada-lang.c 2008-11-25 00:21:15.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/ada-lang.c 2008-12-06 21:39:56.000000000 +0100
|
||||
@@ -4614,7 +4614,7 @@ remove_irrelevant_renamings (struct ada_
|
||||
if (current_block == NULL)
|
||||
return nsyms;
|
||||
|
||||
@ -13,7 +14,7 @@ diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/ad
|
||||
if (current_function == NULL)
|
||||
return nsyms;
|
||||
|
||||
@@ -6721,7 +6721,7 @@ ada_find_renaming_symbol (const char *na
|
||||
@@ -6625,7 +6625,7 @@ ada_find_renaming_symbol (const char *na
|
||||
static struct symbol *
|
||||
find_old_style_renaming_symbol (const char *name, struct block *block)
|
||||
{
|
||||
@ -22,10 +23,11 @@ diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/ad
|
||||
char *rename;
|
||||
|
||||
if (function_sym != NULL)
|
||||
diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/block.c sources-inline-works3/gdb/block.c
|
||||
--- sources-inline-works3-orig/gdb/block.c 2008-06-24 20:58:11.000000000 +0200
|
||||
+++ sources-inline-works3/gdb/block.c 2008-06-26 15:29:09.000000000 +0200
|
||||
@@ -73,6 +73,19 @@ block_linkage_function (const struct blo
|
||||
Index: gdb-6.8.50.20081128/gdb/block.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/block.c 2008-12-06 14:06:16.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/block.c 2008-12-06 21:40:29.000000000 +0100
|
||||
@@ -75,6 +75,19 @@ block_linkage_function (const struct blo
|
||||
return BLOCK_FUNCTION (bl);
|
||||
}
|
||||
|
||||
@ -42,13 +44,14 @@ diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/bl
|
||||
+ return BLOCK_FUNCTION (bl);
|
||||
+}
|
||||
+
|
||||
/* Return one if BLOCK represents an inlined function. */
|
||||
/* Return one if BL represents an inlined function. */
|
||||
|
||||
int
|
||||
diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/block.h sources-inline-works3/gdb/block.h
|
||||
--- sources-inline-works3-orig/gdb/block.h 2008-06-24 20:58:11.000000000 +0200
|
||||
+++ sources-inline-works3/gdb/block.h 2008-06-26 15:29:20.000000000 +0200
|
||||
@@ -137,6 +137,7 @@ struct blockvector
|
||||
Index: gdb-6.8.50.20081128/gdb/block.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/block.h 2008-12-06 14:06:16.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/block.h 2008-12-06 21:39:56.000000000 +0100
|
||||
@@ -133,6 +133,7 @@ struct blockvector
|
||||
enum { GLOBAL_BLOCK = 0, STATIC_BLOCK = 1, FIRST_LOCAL_BLOCK = 2 };
|
||||
|
||||
extern struct symbol *block_linkage_function (const struct block *);
|
||||
@ -56,10 +59,11 @@ diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/bl
|
||||
|
||||
extern int block_inlined_p (const struct block *block);
|
||||
|
||||
diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/blockframe.c sources-inline-works3/gdb/blockframe.c
|
||||
--- sources-inline-works3-orig/gdb/blockframe.c 2008-06-24 20:58:25.000000000 +0200
|
||||
+++ sources-inline-works3/gdb/blockframe.c 2008-06-26 15:34:44.000000000 +0200
|
||||
@@ -157,7 +157,7 @@ find_pc_sect_function (CORE_ADDR pc, str
|
||||
Index: gdb-6.8.50.20081128/gdb/blockframe.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/blockframe.c 2008-12-06 14:06:16.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/blockframe.c 2008-12-06 21:39:56.000000000 +0100
|
||||
@@ -143,7 +143,7 @@ find_pc_sect_function (CORE_ADDR pc, str
|
||||
struct block *b = block_for_pc_sect (pc, section);
|
||||
if (b == 0)
|
||||
return 0;
|
||||
@ -68,10 +72,11 @@ diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/bl
|
||||
}
|
||||
|
||||
/* Return the function containing pc value PC.
|
||||
diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/breakpoint.c sources-inline-works3/gdb/breakpoint.c
|
||||
--- sources-inline-works3-orig/gdb/breakpoint.c 2008-06-24 20:58:25.000000000 +0200
|
||||
+++ sources-inline-works3/gdb/breakpoint.c 2008-06-26 15:28:35.000000000 +0200
|
||||
@@ -5692,7 +5692,7 @@ resolve_sal_pc (struct symtab_and_line *
|
||||
Index: gdb-6.8.50.20081128/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/breakpoint.c 2008-12-06 14:06:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/breakpoint.c 2008-12-06 21:39:56.000000000 +0100
|
||||
@@ -5712,7 +5712,7 @@ resolve_sal_pc (struct symtab_and_line *
|
||||
bv = blockvector_for_pc_sect (sal->pc, 0, &b, sal->symtab);
|
||||
if (bv != NULL)
|
||||
{
|
||||
@ -80,19 +85,20 @@ diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/br
|
||||
if (sym != NULL)
|
||||
{
|
||||
fixup_symbol_section (sym, sal->symtab->objfile);
|
||||
diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/testsuite/gdb.opt/inline-cmds.exp sources-inline-works3/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
--- sources-inline-works3-orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2008-06-24 20:58:25.000000000 +0200
|
||||
+++ sources-inline-works3/gdb/testsuite/gdb.opt/inline-cmds.exp 2008-06-26 15:49:12.000000000 +0200
|
||||
@@ -42,8 +42,10 @@ if { [skip_inline_frame_tests] } {
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2008-12-06 21:37:27.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.exp 2008-12-06 21:41:37.000000000 +0100
|
||||
@@ -45,8 +45,10 @@ if { [skip_inline_frame_tests] } {
|
||||
|
||||
# First, check that the things we expected to be inlined really were,
|
||||
# and those that shouldn't be weren't.
|
||||
-set line1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
-gdb_breakpoint $line1
|
||||
-set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile2}]
|
||||
-gdb_breakpoint $srcfile2:$line1
|
||||
+# We test also inlining by the function name, otherwise we would use:
|
||||
+# set line1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
+# gdb_breakpoint $line1
|
||||
+# set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile2}]
|
||||
+# gdb_breakpoint $srcfile2:$line1
|
||||
+gdb_breakpoint "bar"
|
||||
set line2 [gdb_get_line_number "set breakpoint 2 here"]
|
||||
gdb_breakpoint $line2
|
||||
set line2 [gdb_get_line_number "set breakpoint 2 here" ${srcfile2}]
|
||||
gdb_breakpoint $srcfile2:$line2
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,9 +5,11 @@ Some of the threads may not be properly PTRACE_DETACHed which hurts if they
|
||||
should have been detached with SIGSTOP (as they are accidentally left running
|
||||
on the debugger termination).
|
||||
|
||||
--- ./gdb/defs.h 26 Jun 2008 15:51:28 -0000 1.227
|
||||
+++ ./gdb/defs.h 10 Jul 2008 10:37:32 -0000
|
||||
@@ -141,6 +141,7 @@ extern char *gdb_sysroot;
|
||||
Index: gdb-6.8.50.20081128/gdb/defs.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/defs.h 2008-11-27 10:23:01.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/defs.h 2008-12-06 21:49:32.000000000 +0100
|
||||
@@ -155,6 +155,7 @@ extern char *gdb_sysroot;
|
||||
extern char *debug_file_directory;
|
||||
|
||||
extern int quit_flag;
|
||||
@ -15,18 +17,20 @@ on the debugger termination).
|
||||
extern int immediate_quit;
|
||||
extern int sevenbit_strings;
|
||||
|
||||
@@ -159,7 +159,7 @@ extern void quit (void);
|
||||
#define QUIT_FIXME "ignoring redefinition of QUIT"
|
||||
#else
|
||||
@@ -168,7 +169,7 @@ extern void quit (void);
|
||||
needed. */
|
||||
|
||||
#define QUIT { \
|
||||
- if (quit_flag) quit (); \
|
||||
+ if (quit_flag && !quit_flag_cleanup) quit (); \
|
||||
if (deprecated_interactive_hook) deprecated_interactive_hook (); \
|
||||
}
|
||||
#endif
|
||||
--- ./gdb/event-top.c 9 Jul 2008 22:16:14 -0000 1.61
|
||||
+++ ./gdb/event-top.c 10 Jul 2008 10:37:33 -0000
|
||||
@@ -941,7 +941,7 @@ async_request_quit (gdb_client_data arg)
|
||||
|
||||
Index: gdb-6.8.50.20081128/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/event-top.c 2008-12-04 10:34:31.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/event-top.c 2008-12-06 21:49:07.000000000 +0100
|
||||
@@ -939,7 +939,7 @@ async_request_quit (gdb_client_data arg)
|
||||
is no reason to call quit again here, unless immediate_quit is
|
||||
set.*/
|
||||
|
||||
@ -35,9 +39,11 @@ on the debugger termination).
|
||||
quit ();
|
||||
}
|
||||
|
||||
--- ./gdb/top.c 9 Jul 2008 22:30:46 -0000 1.145
|
||||
+++ ./gdb/top.c 10 Jul 2008 10:37:37 -0000
|
||||
@@ -1263,7 +1263,9 @@ quit_force (char *args, int from_tty)
|
||||
Index: gdb-6.8.50.20081128/gdb/top.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/top.c 2008-12-04 10:23:12.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/top.c 2008-12-06 21:49:07.000000000 +0100
|
||||
@@ -1299,7 +1299,9 @@ quit_force (char *args, int from_tty)
|
||||
qt.args = args;
|
||||
qt.from_tty = from_tty;
|
||||
|
||||
@ -48,9 +54,11 @@ on the debugger termination).
|
||||
catch_errors (quit_target, &qt,
|
||||
"Quitting: ", RETURN_MASK_ALL);
|
||||
|
||||
--- ./gdb/utils.c 10 Jun 2008 09:29:15 -0000 1.189
|
||||
+++ ./gdb/utils.c 10 Jul 2008 10:37:38 -0000
|
||||
@@ -120,6 +120,11 @@ int job_control;
|
||||
Index: gdb-6.8.50.20081128/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/utils.c 2008-12-04 10:31:00.000000000 +0100
|
||||
+++ gdb-6.8.50.20081128/gdb/utils.c 2008-12-06 21:49:07.000000000 +0100
|
||||
@@ -114,6 +114,11 @@ int job_control;
|
||||
|
||||
int quit_flag;
|
||||
|
||||
|
@ -1,97 +0,0 @@
|
||||
diff -up gdb-6.8/gdb/sparc64-linux-tdep.c.sparc gdb-6.8/gdb/sparc64-linux-tdep.c
|
||||
--- gdb-6.8/gdb/sparc64-linux-tdep.c.sparc 2008-01-01 16:53:13.000000000 -0600
|
||||
+++ gdb-6.8/gdb/sparc64-linux-tdep.c 2008-05-15 14:08:57.000000000 -0500
|
||||
@@ -174,6 +174,30 @@ sparc64_linux_collect_core_fpregset (con
|
||||
sparc64_collect_fpregset (regcache, regnum, fpregs);
|
||||
}
|
||||
|
||||
+/* Set the program counter for process PTID to PC. */
|
||||
+
|
||||
+static void
|
||||
+sparc64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
+{
|
||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
|
||||
+ ULONGEST state;
|
||||
+
|
||||
+ regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
|
||||
+ regcache_cooked_write_unsigned (regcache, tdep->npc_regnum, pc + 4);
|
||||
+
|
||||
+ /* Clear the "in syscall" bit to prevent the kernel from
|
||||
+ messing with the PCs we just installed, if we happen to be
|
||||
+ within an interrupted system call that the kernel wants to
|
||||
+ restart.
|
||||
+
|
||||
+ Note that after we return from the dummy call, the TSTATE et al.
|
||||
+ registers will be automatically restored, and the kernel
|
||||
+ continues to restart the system call at this point. */
|
||||
+ regcache_cooked_read_unsigned (regcache, SPARC64_STATE_REGNUM, &state);
|
||||
+ state &= ~((ULONGEST)0x20);
|
||||
+ regcache_cooked_write_unsigned (regcache, SPARC64_STATE_REGNUM, state);
|
||||
+}
|
||||
+
|
||||
|
||||
|
||||
static void
|
||||
@@ -211,6 +235,8 @@ sparc64_linux_init_abi (struct gdbarch_i
|
||||
|
||||
/* Make sure we can single-step over signal return system calls. */
|
||||
tdep->step_trap = sparc64_linux_step_trap;
|
||||
+
|
||||
+ set_gdbarch_write_pc (gdbarch, sparc64_linux_write_pc);
|
||||
}
|
||||
|
||||
|
||||
diff -up gdb-6.8/gdb/sparc-linux-tdep.c.sparc gdb-6.8/gdb/sparc-linux-tdep.c
|
||||
--- gdb-6.8/gdb/sparc-linux-tdep.c.sparc 2008-01-01 16:53:13.000000000 -0600
|
||||
+++ gdb-6.8/gdb/sparc-linux-tdep.c 2008-05-15 14:08:12.000000000 -0500
|
||||
@@ -211,6 +211,30 @@ sparc32_linux_collect_core_fpregset (con
|
||||
sparc32_collect_fpregset (regcache, regnum, fpregs);
|
||||
}
|
||||
|
||||
+/* Set the program counter for process PTID to PC. */
|
||||
+
|
||||
+static void
|
||||
+sparc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
+{
|
||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
|
||||
+ ULONGEST psr;
|
||||
+
|
||||
+ regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
|
||||
+ regcache_cooked_write_unsigned (regcache, tdep->npc_regnum, pc + 4);
|
||||
+
|
||||
+ /* Clear the "in syscall" bit to prevent the kernel from
|
||||
+ messing with the PCs we just installed, if we happen to be
|
||||
+ within an interrupted system call that the kernel wants to
|
||||
+ restart.
|
||||
+
|
||||
+ Note that after we return from the dummy call, the PSR et al.
|
||||
+ registers will be automatically restored, and the kernel
|
||||
+ continues to restart the system call at this point. */
|
||||
+ regcache_cooked_read_unsigned (regcache, SPARC32_PSR_REGNUM, &psr);
|
||||
+ psr &= ~0x000004000;
|
||||
+ regcache_cooked_write_unsigned (regcache, SPARC32_PSR_REGNUM, psr);
|
||||
+}
|
||||
+
|
||||
|
||||
|
||||
static void
|
||||
@@ -238,10 +262,6 @@ sparc32_linux_init_abi (struct gdbarch_i
|
||||
prologue analysis. */
|
||||
tdep->plt_entry_size = 12;
|
||||
|
||||
- /* GNU/Linux doesn't support the 128-bit `long double' from the psABI. */
|
||||
- set_gdbarch_long_double_bit (gdbarch, 64);
|
||||
- set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
|
||||
-
|
||||
/* Enable TLS support. */
|
||||
set_gdbarch_fetch_tls_load_module_address (gdbarch,
|
||||
svr4_fetch_objfile_link_map);
|
||||
@@ -251,6 +271,8 @@ sparc32_linux_init_abi (struct gdbarch_i
|
||||
|
||||
/* Hook in the DWARF CFI frame unwinder. */
|
||||
frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
|
||||
+
|
||||
+ set_gdbarch_write_pc (gdbarch, sparc_linux_write_pc);
|
||||
}
|
||||
|
||||
/* Provide a prototype to silence -Wmissing-prototypes. */
|
File diff suppressed because it is too large
Load Diff
@ -1,482 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2008-02/msg00472.html
|
||||
|
||||
2008-02-28 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* breakpoint.c (fetch_watchpoint_value): New function.
|
||||
(update_watchpoint): Set and clear val_valid. Use
|
||||
fetch_watchpoint_value. Handle unreadable values on the
|
||||
value chain. Correct check for user-requested array watchpoints.
|
||||
(breakpoint_init_inferior): Clear val_valid.
|
||||
(watchpoint_value_print): New function.
|
||||
(print_it_typical): Use it. Do not free or clear old_val. Print
|
||||
watchpoints even if old_val == NULL.
|
||||
(watchpoint_check): Use fetch_watchpoint_value. Check for values
|
||||
becoming readable or unreadable.
|
||||
(watch_command_1): Use fetch_watchpoint_value. Set val_valid.
|
||||
(do_enable_watchpoint): Likewise.
|
||||
* breakpoint.h (struct breakpoint): Update comment for val. Add
|
||||
val_valid.
|
||||
* NEWS: Mention watchpoints on inaccessible memory.
|
||||
|
||||
2008-02-28 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* gdb.base/watchpoint.c (global_ptr, func4): New.
|
||||
(main): Call func4.
|
||||
* gdb.base/watchpoint.exp: Call test_inaccessible_watchpoint.
|
||||
(test_inaccessible_watchpoint): New.
|
||||
|
||||
[ Backported for GDB-6.8. ]
|
||||
|
||||
It fixes the regression since GDB-6.7.1rh on x86_64 -m64 -fPIE/-pie:
|
||||
-PASS: gdb.base/watchpoint.exp: run to marker1 in test_simple_watchpoint
|
||||
+FAIL: gdb.base/watchpoint.exp: run to marker1 in test_simple_watchpoint
|
||||
|
||||
Index: gdb-6.8/gdb/NEWS
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/NEWS 2008-04-19 20:48:13.000000000 +0200
|
||||
+++ gdb-6.8/gdb/NEWS 2008-04-19 20:50:24.000000000 +0200
|
||||
@@ -1,6 +1,9 @@
|
||||
What has changed in GDB?
|
||||
(Organized release by release)
|
||||
|
||||
+* Watchpoints can now be set on unreadable memory locations, e.g. addresses
|
||||
+which will be allocated using malloc later in program execution.
|
||||
+
|
||||
*** Changes in GDB 6.8
|
||||
|
||||
* New native configurations
|
||||
Index: gdb-6.8/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/breakpoint.c 2008-04-19 20:48:11.000000000 +0200
|
||||
+++ gdb-6.8/gdb/breakpoint.c 2008-04-19 20:51:49.000000000 +0200
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "memattr.h"
|
||||
#include "ada-lang.h"
|
||||
#include "top.h"
|
||||
+#include "wrapper.h"
|
||||
|
||||
#include "gdb-events.h"
|
||||
#include "mi/mi-common.h"
|
||||
@@ -826,7 +827,65 @@ is_hardware_watchpoint (struct breakpoin
|
||||
|| bpt->type == bp_access_watchpoint);
|
||||
}
|
||||
|
||||
-/* Assuming that B is a hardware breakpoint:
|
||||
+/* Find the current value of a watchpoint on EXP. Return the value in
|
||||
+ *VALP and *RESULTP and the chain of intermediate and final values
|
||||
+ in *VAL_CHAIN. RESULTP and VAL_CHAIN may be NULL if the caller does
|
||||
+ not need them.
|
||||
+
|
||||
+ If an error occurs while evaluating the expression, *RESULTP will
|
||||
+ be set to NULL. *RESULTP may be a lazy value, if the result could
|
||||
+ not be read from memory. It is used to determine whether a value
|
||||
+ is user-specified (we should watch the whole value) or intermediate
|
||||
+ (we should watch only the bit used to locate the final value).
|
||||
+
|
||||
+ If the final value, or any intermediate value, could not be read
|
||||
+ from memory, *VALP will be set to NULL. *VAL_CHAIN will still be
|
||||
+ set to any referenced values. *VALP will never be a lazy value.
|
||||
+ This is the value which we store in struct breakpoint.
|
||||
+
|
||||
+ If VAL_CHAIN is non-NULL, *VAL_CHAIN will be released from the
|
||||
+ value chain. The caller must free the values individually. If
|
||||
+ VAL_CHAIN is NULL, all generated values will be left on the value
|
||||
+ chain. */
|
||||
+
|
||||
+static void
|
||||
+fetch_watchpoint_value (struct expression *exp, struct value **valp,
|
||||
+ struct value **resultp, struct value **val_chain)
|
||||
+{
|
||||
+ struct value *mark, *new_mark, *result;
|
||||
+
|
||||
+ *valp = NULL;
|
||||
+ if (resultp)
|
||||
+ *resultp = NULL;
|
||||
+ if (val_chain)
|
||||
+ *val_chain = NULL;
|
||||
+
|
||||
+ /* Evaluate the expression. */
|
||||
+ mark = value_mark ();
|
||||
+ result = NULL;
|
||||
+ gdb_evaluate_expression (exp, &result);
|
||||
+ new_mark = value_mark ();
|
||||
+ if (mark == new_mark)
|
||||
+ return;
|
||||
+ if (resultp)
|
||||
+ *resultp = result;
|
||||
+
|
||||
+ /* Make sure it's not lazy, so that after the target stops again we
|
||||
+ have a non-lazy previous value to compare with. */
|
||||
+ if (result != NULL
|
||||
+ && (!value_lazy (result) || gdb_value_fetch_lazy (result)))
|
||||
+ *valp = result;
|
||||
+
|
||||
+ if (val_chain)
|
||||
+ {
|
||||
+ /* Return the chain of intermediate values. We use this to
|
||||
+ decide which addresses to watch. */
|
||||
+ *val_chain = new_mark;
|
||||
+ value_release_to_mark (mark);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* Assuming that B is a hardware watchpoint:
|
||||
- Reparse watchpoint expression, is REPARSE is non-zero
|
||||
- Evaluate expression and store the result in B->val
|
||||
- Update the list of values that must be watched in B->loc.
|
||||
@@ -837,7 +896,6 @@ static void
|
||||
update_watchpoint (struct breakpoint *b, int reparse)
|
||||
{
|
||||
int within_current_scope;
|
||||
- struct value *mark = value_mark ();
|
||||
struct frame_id saved_frame_id;
|
||||
struct bp_location *loc;
|
||||
bpstat bs;
|
||||
@@ -889,9 +947,9 @@ update_watchpoint (struct breakpoint *b,
|
||||
to the user when the old value and the new value may actually
|
||||
be completely different objects. */
|
||||
value_free (b->val);
|
||||
- b->val = NULL;
|
||||
+ b->val = NULL;
|
||||
+ b->val_valid = 0;
|
||||
}
|
||||
-
|
||||
|
||||
/* If we failed to parse the expression, for example because
|
||||
it refers to a global variable in a not-yet-loaded shared library,
|
||||
@@ -900,43 +958,37 @@ update_watchpoint (struct breakpoint *b,
|
||||
is different from out-of-scope watchpoint. */
|
||||
if (within_current_scope && b->exp)
|
||||
{
|
||||
- struct value *v, *next;
|
||||
+ struct value *val_chain, *v, *result, *next;
|
||||
+
|
||||
+ fetch_watchpoint_value (b->exp, &v, &result, &val_chain);
|
||||
|
||||
- /* Evaluate the expression and make sure it's not lazy, so that
|
||||
- after target stops again, we have a non-lazy previous value
|
||||
- to compare with. Also, making the value non-lazy will fetch
|
||||
- intermediate values as needed, which we use to decide which
|
||||
- addresses to watch.
|
||||
-
|
||||
- The value returned by evaluate_expression is stored in b->val.
|
||||
- In addition, we look at all values which were created
|
||||
- during evaluation, and set watchoints at addresses as needed.
|
||||
- Those values are explicitly deleted here. */
|
||||
- v = evaluate_expression (b->exp);
|
||||
/* Avoid setting b->val if it's already set. The meaning of
|
||||
b->val is 'the last value' user saw, and we should update
|
||||
it only if we reported that last value to user. As it
|
||||
happens, the code that reports it updates b->val directly. */
|
||||
- if (b->val == NULL)
|
||||
- b->val = v;
|
||||
- value_contents (v);
|
||||
- value_release_to_mark (mark);
|
||||
+ if (!b->val_valid)
|
||||
+ {
|
||||
+ b->val = v;
|
||||
+ b->val_valid = 1;
|
||||
+ }
|
||||
|
||||
/* Look at each value on the value chain. */
|
||||
- for (; v; v = next)
|
||||
+ for (v = val_chain; v; v = next)
|
||||
{
|
||||
/* If it's a memory location, and GDB actually needed
|
||||
its contents to evaluate the expression, then we
|
||||
- must watch it. */
|
||||
+ must watch it. If the first value returned is
|
||||
+ still lazy, that means an error occurred reading it;
|
||||
+ watch it anyway in case it becomes readable. */
|
||||
if (VALUE_LVAL (v) == lval_memory
|
||||
- && ! value_lazy (v))
|
||||
+ && (v == val_chain || ! value_lazy (v)))
|
||||
{
|
||||
struct type *vtype = check_typedef (value_type (v));
|
||||
|
||||
/* We only watch structs and arrays if user asked
|
||||
for it explicitly, never if they just happen to
|
||||
appear in the middle of some value chain. */
|
||||
- if (v == b->val
|
||||
+ if (v == result
|
||||
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
|
||||
&& TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
|
||||
{
|
||||
@@ -1682,6 +1734,7 @@ breakpoint_init_inferior (enum inf_conte
|
||||
if (b->val)
|
||||
value_free (b->val);
|
||||
b->val = NULL;
|
||||
+ b->val_valid = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -2104,6 +2157,17 @@ top:
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
|
||||
+/* Print out the (old or new) value associated with a watchpoint. */
|
||||
+
|
||||
+static void
|
||||
+watchpoint_value_print (struct value *val, struct ui_file *stream)
|
||||
+{
|
||||
+ if (val == NULL)
|
||||
+ fprintf_unfiltered (stream, _("<unreadable>"));
|
||||
+ else
|
||||
+ value_print (val, stream, 0, Val_pretty_default);
|
||||
+}
|
||||
+
|
||||
/* This is the normal print function for a bpstat. In the future,
|
||||
much of this logic could (should?) be moved to bpstat_stop_status,
|
||||
by having it set different print_it values.
|
||||
@@ -2222,26 +2286,21 @@ print_it_typical (bpstat bs)
|
||||
|
||||
case bp_watchpoint:
|
||||
case bp_hardware_watchpoint:
|
||||
- if (bs->old_val != NULL)
|
||||
- {
|
||||
- annotate_watchpoint (b->number);
|
||||
- if (ui_out_is_mi_like_p (uiout))
|
||||
- ui_out_field_string
|
||||
- (uiout, "reason",
|
||||
- async_reason_lookup (EXEC_ASYNC_WATCHPOINT_TRIGGER));
|
||||
- mention (b);
|
||||
- ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
||||
- ui_out_text (uiout, "\nOld value = ");
|
||||
- value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
|
||||
- ui_out_field_stream (uiout, "old", stb);
|
||||
- ui_out_text (uiout, "\nNew value = ");
|
||||
- value_print (b->val, stb->stream, 0, Val_pretty_default);
|
||||
- ui_out_field_stream (uiout, "new", stb);
|
||||
- do_cleanups (ui_out_chain);
|
||||
- ui_out_text (uiout, "\n");
|
||||
- value_free (bs->old_val);
|
||||
- bs->old_val = NULL;
|
||||
- }
|
||||
+ annotate_watchpoint (b->number);
|
||||
+ if (ui_out_is_mi_like_p (uiout))
|
||||
+ ui_out_field_string
|
||||
+ (uiout, "reason",
|
||||
+ async_reason_lookup (EXEC_ASYNC_WATCHPOINT_TRIGGER));
|
||||
+ mention (b);
|
||||
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
||||
+ ui_out_text (uiout, "\nOld value = ");
|
||||
+ watchpoint_value_print (bs->old_val, stb->stream);
|
||||
+ ui_out_field_stream (uiout, "old", stb);
|
||||
+ ui_out_text (uiout, "\nNew value = ");
|
||||
+ watchpoint_value_print (b->val, stb->stream);
|
||||
+ ui_out_field_stream (uiout, "new", stb);
|
||||
+ do_cleanups (ui_out_chain);
|
||||
+ ui_out_text (uiout, "\n");
|
||||
/* More than one watchpoint may have been triggered. */
|
||||
return PRINT_UNKNOWN;
|
||||
break;
|
||||
@@ -2254,7 +2313,7 @@ print_it_typical (bpstat bs)
|
||||
mention (b);
|
||||
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
||||
ui_out_text (uiout, "\nValue = ");
|
||||
- value_print (b->val, stb->stream, 0, Val_pretty_default);
|
||||
+ watchpoint_value_print (b->val, stb->stream);
|
||||
ui_out_field_stream (uiout, "value", stb);
|
||||
do_cleanups (ui_out_chain);
|
||||
ui_out_text (uiout, "\n");
|
||||
@@ -2262,7 +2321,7 @@ print_it_typical (bpstat bs)
|
||||
break;
|
||||
|
||||
case bp_access_watchpoint:
|
||||
- if (bs->old_val != NULL)
|
||||
+ if (bs->old_val != NULL)
|
||||
{
|
||||
annotate_watchpoint (b->number);
|
||||
if (ui_out_is_mi_like_p (uiout))
|
||||
@@ -2272,10 +2331,8 @@ print_it_typical (bpstat bs)
|
||||
mention (b);
|
||||
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
||||
ui_out_text (uiout, "\nOld value = ");
|
||||
- value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
|
||||
+ watchpoint_value_print (bs->old_val, stb->stream);
|
||||
ui_out_field_stream (uiout, "old", stb);
|
||||
- value_free (bs->old_val);
|
||||
- bs->old_val = NULL;
|
||||
ui_out_text (uiout, "\nNew value = ");
|
||||
}
|
||||
else
|
||||
@@ -2288,7 +2345,7 @@ print_it_typical (bpstat bs)
|
||||
ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
|
||||
ui_out_text (uiout, "\nValue = ");
|
||||
}
|
||||
- value_print (b->val, stb->stream, 0,Val_pretty_default);
|
||||
+ watchpoint_value_print (b->val, stb->stream);
|
||||
ui_out_field_stream (uiout, "new", stb);
|
||||
do_cleanups (ui_out_chain);
|
||||
ui_out_text (uiout, "\n");
|
||||
@@ -2575,13 +2632,20 @@ watchpoint_check (void *p)
|
||||
we might be in the middle of evaluating a function call. */
|
||||
|
||||
struct value *mark = value_mark ();
|
||||
- struct value *new_val = evaluate_expression (b->exp);
|
||||
- if (!value_equal (b->val, new_val))
|
||||
+ struct value *new_val;
|
||||
+
|
||||
+ fetch_watchpoint_value (b->exp, &new_val, NULL, NULL);
|
||||
+ if ((b->val != NULL) != (new_val != NULL)
|
||||
+ || (b->val != NULL && !value_equal (b->val, new_val)))
|
||||
{
|
||||
- release_value (new_val);
|
||||
- value_free_to_mark (mark);
|
||||
+ if (new_val != NULL)
|
||||
+ {
|
||||
+ release_value (new_val);
|
||||
+ value_free_to_mark (mark);
|
||||
+ }
|
||||
bs->old_val = b->val;
|
||||
b->val = new_val;
|
||||
+ b->val_valid = 1;
|
||||
/* We will stop here */
|
||||
return WP_VALUE_CHANGED;
|
||||
}
|
||||
@@ -5723,10 +5787,9 @@ watch_command_1 (char *arg, int accessfl
|
||||
exp_end = arg;
|
||||
exp_valid_block = innermost_block;
|
||||
mark = value_mark ();
|
||||
- val = evaluate_expression (exp);
|
||||
- release_value (val);
|
||||
- if (value_lazy (val))
|
||||
- value_fetch_lazy (val);
|
||||
+ fetch_watchpoint_value (exp, &val, NULL, NULL);
|
||||
+ if (val != NULL)
|
||||
+ release_value (val);
|
||||
|
||||
tok = arg;
|
||||
while (*tok == ' ' || *tok == '\t')
|
||||
@@ -5815,6 +5878,7 @@ watch_command_1 (char *arg, int accessfl
|
||||
b->exp_valid_block = exp_valid_block;
|
||||
b->exp_string = savestring (exp_start, exp_end - exp_start);
|
||||
b->val = val;
|
||||
+ b->val_valid = 1;
|
||||
b->loc->cond = cond;
|
||||
if (cond_start)
|
||||
b->cond_string = savestring (cond_start, cond_end - cond_start);
|
||||
@@ -7698,11 +7762,11 @@ is valid is not currently in scope.\n"),
|
||||
if (bpt->val)
|
||||
value_free (bpt->val);
|
||||
mark = value_mark ();
|
||||
- bpt->val = evaluate_expression (bpt->exp);
|
||||
- release_value (bpt->val);
|
||||
- if (value_lazy (bpt->val))
|
||||
- value_fetch_lazy (bpt->val);
|
||||
-
|
||||
+ fetch_watchpoint_value (bpt->exp, &bpt->val, NULL, NULL);
|
||||
+ if (bpt->val)
|
||||
+ release_value (bpt->val);
|
||||
+ bpt->val_valid = 1;
|
||||
+
|
||||
if (bpt->type == bp_hardware_watchpoint ||
|
||||
bpt->type == bp_read_watchpoint ||
|
||||
bpt->type == bp_access_watchpoint)
|
||||
Index: gdb-6.8/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/breakpoint.h 2008-04-19 20:47:23.000000000 +0200
|
||||
+++ gdb-6.8/gdb/breakpoint.h 2008-04-19 20:50:24.000000000 +0200
|
||||
@@ -391,8 +391,13 @@ struct breakpoint
|
||||
/* The largest block within which it is valid, or NULL if it is
|
||||
valid anywhere (e.g. consists just of global symbols). */
|
||||
struct block *exp_valid_block;
|
||||
- /* Value of the watchpoint the last time we checked it. */
|
||||
+ /* Value of the watchpoint the last time we checked it, or NULL
|
||||
+ when we do not know the value yet or the value was not
|
||||
+ readable. VAL is never lazy. */
|
||||
struct value *val;
|
||||
+ /* Nonzero if VAL is valid. If VAL_VALID is set but VAL is NULL,
|
||||
+ then an error occurred reading the value. */
|
||||
+ int val_valid;
|
||||
|
||||
/* Holds the address of the related watchpoint_scope breakpoint
|
||||
when using watchpoints on local variables (might the concept
|
||||
Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/watchpoint.c 2008-04-19 20:47:16.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c 2008-04-19 20:50:24.000000000 +0200
|
||||
@@ -39,6 +39,8 @@ struct foo struct1, struct2, *ptr1, *ptr
|
||||
|
||||
int doread = 0;
|
||||
|
||||
+char *global_ptr;
|
||||
+
|
||||
void marker1 ()
|
||||
{
|
||||
}
|
||||
@@ -110,6 +112,14 @@ func1 ()
|
||||
return 73;
|
||||
}
|
||||
|
||||
+void
|
||||
+func4 ()
|
||||
+{
|
||||
+ buf[0] = 3;
|
||||
+ global_ptr = buf;
|
||||
+ buf[0] = 7;
|
||||
+}
|
||||
+
|
||||
int main ()
|
||||
{
|
||||
#ifdef usestubs
|
||||
@@ -185,5 +195,7 @@ int main ()
|
||||
|
||||
func3 ();
|
||||
|
||||
+ func4 ();
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/watchpoint.exp 2008-04-19 20:47:16.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp 2008-04-19 20:52:11.000000000 +0200
|
||||
@@ -645,6 +645,30 @@ proc test_watchpoint_and_breakpoint {} {
|
||||
}
|
||||
}
|
||||
|
||||
+proc test_inaccessible_watchpoint {} {
|
||||
+ global gdb_prompt
|
||||
+
|
||||
+ # This is a test for watchpoints on currently inaccessible (but later
|
||||
+ # valid) memory.
|
||||
+
|
||||
+ if [runto func4] then {
|
||||
+ gdb_test "watch *global_ptr" ".*atchpoint \[0-9\]+: \\*global_ptr"
|
||||
+ gdb_test "next" ".*global_ptr = buf.*"
|
||||
+ gdb_test_multiple "next" "next over ptr init" {
|
||||
+ -re ".*atchpoint \[0-9\]+: \\*global_ptr\r\n\r\nOld value = .*\r\nNew value = 3 .*\r\n.*$gdb_prompt $" {
|
||||
+ # We can not test for <unknown> here because NULL may be readable.
|
||||
+ # This test does rely on *NULL != 3.
|
||||
+ pass "next over ptr init"
|
||||
+ }
|
||||
+ }
|
||||
+ gdb_test_multiple "next" "next over buffer set" {
|
||||
+ -re ".*atchpoint \[0-9\]+: \\*global_ptr\r\n\r\nOld value = 3 .*\r\nNew value = 7 .*\r\n.*$gdb_prompt $" {
|
||||
+ pass "next over buffer set"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
@@ -655,6 +679,7 @@ set prev_timeout $timeout
|
||||
set timeout 600
|
||||
verbose "Timeout now 600 sec.\n"
|
||||
|
||||
+gdb_test "set debug solib 1"
|
||||
if [initialize] then {
|
||||
|
||||
test_simple_watchpoint
|
||||
@@ -797,6 +822,8 @@ if [initialize] then {
|
||||
}
|
||||
}
|
||||
|
||||
+ test_inaccessible_watchpoint
|
||||
+
|
||||
# See above.
|
||||
if [istarget "mips-idt-*"] then {
|
||||
gdb_exit
|
56
gdb-fortran-testsuite-gfortran.patch
Normal file
56
gdb-fortran-testsuite-gfortran.patch
Normal file
@ -0,0 +1,56 @@
|
||||
http://sourceware.org/ml/gdb-patches/2008-12/msg00155.html
|
||||
|
||||
2008-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.fortran/subarray.exp: Expect also the strings type output.
|
||||
* gdb.fortran/derived-type.exp: Likewise. Expect also the kind=X types.
|
||||
Update for the f-valprint.c modification from 2008-04-22.
|
||||
|
||||
--- ./gdb/testsuite/gdb.fortran/derived-type.exp 1 Jan 2008 22:53:19 -0000 1.6
|
||||
+++ ./gdb/testsuite/gdb.fortran/derived-type.exp 8 Dec 2008 18:04:34 -0000
|
||||
@@ -42,23 +42,22 @@ if ![runto MAIN__] then {
|
||||
}
|
||||
|
||||
gdb_test "ptype p" \
|
||||
- "type = Type bar.*int4.*\:\: c.*real.*\:\: d.*End Type bar" \
|
||||
+ "type = Type bar.*int.*\:\: c.*real.*\:\: d.*End Type bar" \
|
||||
"ptype p"
|
||||
gdb_test "ptype q" \
|
||||
- "type = Type foo.*real.*\:\: a.*Type bar.*int4.*\:\: c.*real.*\:\: d.*End Type bar \:\: x.*character.*\\(7\\) \:\: b.*End Type foo" \
|
||||
+ "type = Type foo.*real.*\:\: *a.*Type bar.*int.*\:\: *c.*real.*\:\: *d.*End Type bar \:\: *x.*character.*7.* \:\: *b.*End Type foo" \
|
||||
"type-printing for derived type"
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "print"]
|
||||
gdb_continue_to_breakpoint "print"
|
||||
|
||||
-gdb_test "print p" "\\$\[0-9\]+ = \\{ 1, 2.375\\}"
|
||||
+gdb_test "print p" "\\$\[0-9\]+ = \\( 1, 2.375 \\)"
|
||||
gdb_test "print p%c" "\\$\[0-9\]+ = 1"
|
||||
gdb_test "print p%d" "\\$\[0-9\]+ = 2.375"
|
||||
gdb_test "print q%a" "\\$\[0-9\]+ = 3.125"
|
||||
-gdb_test "print q%b" "\\$\[0-9\]+ = \\(.*a.*b.*c.*d.*e.*f.*g.*\\)"
|
||||
+gdb_test "print q%b" "\\$\[0-9\]+ = (\\(.*a.*b.*c.*d.*e.*f.*g.*\\)|'abcdefg')"
|
||||
gdb_test "print q%x%c" "\\$\[0-9\]+ = 1"
|
||||
gdb_test "print q%x%d" "\\$\[0-9\]+ = 2.375"
|
||||
gdb_test "print q" \
|
||||
- "\\$\[0-9\]+ = \\{ 3.125, \\{ 1, 2.375\\}, \\(.*a.*b.*c.*d.*e.*f.*g.*\\)\\}" \
|
||||
+ "\\$\[0-9\]+ = \\( 3.125, \\( 1, 2.375 \\), (\\(.*a.*b.*c.*d.*e.*f.*g.*\\)|'abcdefg') \\)" \
|
||||
"print q"
|
||||
-
|
||||
--- ./gdb/testsuite/gdb.fortran/subarray.exp 1 Jan 2008 22:53:19 -0000 1.6
|
||||
+++ ./gdb/testsuite/gdb.fortran/subarray.exp 8 Dec 2008 18:04:34 -0000
|
||||
@@ -53,10 +53,10 @@ gdb_test "continue" \
|
||||
|
||||
# Test four different kinds of subarray expression evaluation.
|
||||
|
||||
-gdb_test "print str(2:4)" ".*1 = \\(98 'b', 99 'c', 100 'd'\\).*" "print str(2:4)"
|
||||
-gdb_test "print str(:3)" ".*2 = \\(97 'a', 98 'b', 99 'c'\\).*" "print str(:3)"
|
||||
-gdb_test "print str(5:)" ".*3 = \\(101 'e', 102 'f', 103 'g'\\).*" "print str(5:)"
|
||||
-gdb_test "print str(:)" ".*4 = \\(97 'a', 98 'b', 99 'c', 100 'd', 101 'e', 102 'f', 103 'g'\\).*" "print str(:)"
|
||||
+gdb_test "print str(2:4)" ".*1 = (\\(98 'b', 99 'c', 100 'd'\\)|'bcd').*" "print str(2:4)"
|
||||
+gdb_test "print str(:3)" ".*2 = (\\(97 'a', 98 'b', 99 'c'\\)|'abc').*" "print str(:3)"
|
||||
+gdb_test "print str(5:)" ".*3 = (\\(101 'e', 102 'f', 103 'g'\\)|'efg').*" "print str(5:)"
|
||||
+gdb_test "print str(:)" ".*4 = (\\(97 'a', 98 'b', 99 'c', 100 'd', 101 'e', 102 'f', 103 'g'\\)|'abcdefg').*" "print str(:)"
|
||||
|
||||
gdb_test "print array(2:4)" ".*5 = \\(2, 3, 4\\).*" "print array(2:4)"
|
||||
gdb_test "print array(:3)" ".*6 = \\(1, 2, 3\\).*" "print array(:3)"
|
136
gdb-watchpoint-hw-without-inferior.patch
Normal file
136
gdb-watchpoint-hw-without-inferior.patch
Normal file
@ -0,0 +1,136 @@
|
||||
2008-12-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix hw watchpoints created before the inferior was started.
|
||||
* breakpoint.c (update_watchpoint): Convert the bp_watchpoint and
|
||||
bp_hardware_watchpoint types according to the current runtime state.
|
||||
(insert_breakpoints): Call update_watchpoint even for `bp_watchpoint's.
|
||||
|
||||
2008-12-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/watchpoint-hw.exp, gdb.base/watchpoint-hw.c: New.
|
||||
|
||||
--- ./gdb/breakpoint.c 7 Dec 2008 15:59:51 -0000 1.364
|
||||
+++ ./gdb/breakpoint.c 7 Dec 2008 21:20:54 -0000
|
||||
@@ -892,6 +892,28 @@ update_watchpoint (struct breakpoint *b,
|
||||
b->val_valid = 1;
|
||||
}
|
||||
|
||||
+ /* Change the type of breakpoint between hardware assisted or an
|
||||
+ ordinary watchpoint depending on the hardware support and free
|
||||
+ hardware slots. */
|
||||
+ if (b->type == bp_watchpoint || b->type == bp_hardware_watchpoint)
|
||||
+ {
|
||||
+ int i, mem_cnt, target_resources_ok, other_type_used;
|
||||
+
|
||||
+ i = hw_watchpoint_used_count (bp_hardware_watchpoint,
|
||||
+ &other_type_used);
|
||||
+ mem_cnt = can_use_hardware_watchpoint (val_chain);
|
||||
+
|
||||
+ /* Hack around 'unused var' error for some targets here. */
|
||||
+ (void) i;
|
||||
+ if (mem_cnt)
|
||||
+ target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT
|
||||
+ (bp_hardware_watchpoint, i + mem_cnt, other_type_used);
|
||||
+ if (!mem_cnt || target_resources_ok <= 0)
|
||||
+ b->type = bp_watchpoint;
|
||||
+ else
|
||||
+ b->type = bp_hardware_watchpoint;
|
||||
+ }
|
||||
+
|
||||
/* Look at each value on the value chain. */
|
||||
for (v = val_chain; v; v = next)
|
||||
{
|
||||
@@ -1204,8 +1226,9 @@ insert_breakpoints (void)
|
||||
{
|
||||
struct breakpoint *bpt;
|
||||
|
||||
+ /* Software watchpoint may get converted to hardware ones. */
|
||||
ALL_BREAKPOINTS (bpt)
|
||||
- if (is_hardware_watchpoint (bpt))
|
||||
+ if (is_hardware_watchpoint (bpt) || bpt->type == bp_watchpoint)
|
||||
update_watchpoint (bpt, 0 /* don't reparse. */);
|
||||
|
||||
update_global_location_list (1);
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.base/watchpoint-hw.c 7 Dec 2008 21:20:56 -0000
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+int watchee;
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.base/watchpoint-hw.exp 7 Dec 2008 21:20:56 -0000
|
||||
@@ -0,0 +1,50 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] && ![istarget "ia64-*-*"]
|
||||
+ && ![istarget "s390*-*-*"]} then {
|
||||
+ verbose "Skipping watchpoint-hw test."
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set testfile watchpoint-hw
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+# Create the watchpoint before the inferior gets started. Now the native CPU
|
||||
+# target is still not active and its `to_can_use_hw_breakpoint' is not
|
||||
+# installed, therefore only a software watchpoint gets created.
|
||||
+
|
||||
+gdb_test "watch watchee" "atchpoint 1: watchee"
|
||||
+
|
||||
+# `runto_main' or `runto main' would delete the watchpoint created above.
|
||||
+
|
||||
+if { [gdb_start_cmd] < 0 } {
|
||||
+ untested start
|
||||
+ return -1
|
||||
+}
|
||||
+gdb_test "" "main .* at .*" "start"
|
||||
+
|
||||
+# Check it is really a `hw'-watchpoint.
|
||||
+gdb_test "info watchpoints" "1 *hw watchpoint .* watchee"
|
90
gdb.spec
90
gdb.spec
@ -9,11 +9,11 @@ Name: gdb%{?_with_debug:-debug}
|
||||
# Set version to contents of gdb/version.in.
|
||||
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
|
||||
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
|
||||
Version: 6.8
|
||||
Version: 6.8.50.20081209
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 33%{?_with_upstream:.upstream}%{?dist}
|
||||
Release: 1%{?_with_upstream:.upstream}%{?dist}
|
||||
|
||||
License: GPLv3+
|
||||
Group: Development/Debuggers
|
||||
@ -63,10 +63,6 @@ Patch2: gdb-6.3-rh-testversion-20041202.patch
|
||||
Patch3: gdb-6.3-rh-testlibunwind-20041202.patch
|
||||
Patch4: gdb-6.3-rh-testlibunwind1fix-20041202.patch
|
||||
|
||||
# Recognize i386 signal trampolines before CFI. Ensures that signal
|
||||
# frames are identified as signal frames.
|
||||
Patch101: gdb-6.3-sigx86-20040621.patch
|
||||
|
||||
# Use convert_from_func_ptr_addr on the solib breakpoint address;
|
||||
# simplifies and makes more consistent the logic.
|
||||
Patch104: gdb-6.3-ppcdotsolib-20041022.patch
|
||||
@ -96,9 +92,6 @@ Patch117: gdb-6.3-removebp-20041130.patch
|
||||
# --readnever option.
|
||||
Patch118: gdb-6.3-gstack-20050411.patch
|
||||
|
||||
# Fix to ensure types are visible
|
||||
Patch120: gdb-6.3-type-fix-20041213.patch
|
||||
|
||||
# VSYSCALL and PIE
|
||||
Patch122: gdb-6.3-test-pie-20050107.patch
|
||||
Patch124: gdb-6.3-pie-20050110.patch
|
||||
@ -119,9 +112,6 @@ Patch136: gdb-6.3-test-movedir-20050125.patch
|
||||
# Fix to support unwinding syscalls in ia64 corefiles
|
||||
# Patch138: gdb-6.3-ia64-corefile-fix-20050127.patch
|
||||
|
||||
# Tolerate DW_AT_type referencing <0>.
|
||||
Patch139: gdb-6.3-dwattype0-20050201.patch
|
||||
|
||||
# Fix gcore for threads
|
||||
Patch140: gdb-6.3-gcore-thread-20050204.patch
|
||||
|
||||
@ -185,13 +175,6 @@ Patch176: gdb-6.3-large-core-20051206.patch
|
||||
# corrupted or missing PATH.
|
||||
Patch177: gdb-6.3-gstack-without-path-20060414.patch
|
||||
|
||||
# Do not let errors related with debug registers break thread debugging.
|
||||
Patch178: gdb-6.3-catch-debug-registers-error-20060527.patch
|
||||
|
||||
# Cope with waitpid modifying status even when returning zero, as on
|
||||
# ia32el.
|
||||
Patch179: gdb-6.3-ia32el-fix-waitpid-20060615.patch
|
||||
|
||||
# Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661).
|
||||
Patch188: gdb-6.5-bz203661-emit-relocs.patch
|
||||
|
||||
@ -249,7 +232,7 @@ Patch229: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
# Backported post gdb-6.8 release fixups.
|
||||
Patch232: gdb-6.8-upstream.patch
|
||||
###Patch232: gdb-6.8-upstream.patch
|
||||
|
||||
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||
Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
@ -294,9 +277,6 @@ Patch271: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
# New locating of the matching binaries from the pure core file (build-id).
|
||||
Patch274: gdb-6.6-buildid-locate.patch
|
||||
|
||||
# Fixed the kernel i386-on-x86_64 VDSO loading (producing `Lowest section in').
|
||||
Patch277: gdb-6.6-vdso-i386-on-amd64-warning.patch
|
||||
|
||||
# Fix hardware watchpoints after inferior forks-off some process.
|
||||
# Threaded `set follow-fork-mode child' still not fixed there, glibc fixes reqd.
|
||||
# `set detach-on-fork off' not fixed there in general - it already assert-fails.
|
||||
@ -305,9 +285,6 @@ Patch280: gdb-6.6-multifork-debugreg.patch
|
||||
# Fix displaying of numeric char arrays as strings (BZ 224128).
|
||||
Patch282: gdb-6.7-charsign-test.patch
|
||||
|
||||
# Fix rereading of the main executable on its change.
|
||||
Patch283: gdb-6.7-reread-exec_bfd.patch
|
||||
|
||||
# Test PPC hiding of call-volatile parameter register.
|
||||
Patch284: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
|
||||
@ -339,13 +316,8 @@ Patch304: gdb-6.7-kernel-headers-compat.patch
|
||||
|
||||
# Fix/implement the Fortran dynamic arrays support (BZ 377541).
|
||||
# Fix the variable-length-arrays support (BZ 468266, feature BZ 377541).
|
||||
Patch345: gdb-6.8-bz377541-vla-bound-undefined.patch
|
||||
Patch346: gdb-6.8-bz377541-vla-loc-kind.patch
|
||||
Patch305: gdb-6.8-bz377541-vla.patch
|
||||
|
||||
# Backport fix of a segfault + PIE regression since 6.7.1 on PIE executables.
|
||||
Patch306: gdb-6.8-watchpoint-inaccessible-memory.patch
|
||||
|
||||
# Test GCORE for shmid 0 shared memory mappings.
|
||||
Patch309: gdb-6.3-mapping-zero-inode-test.patch
|
||||
|
||||
@ -358,9 +330,6 @@ Patch314: gdb-6.3-watchpoint-cond-gone-test.patch
|
||||
# Test various forms of threads tracking across exec() (BZ 442765).
|
||||
Patch315: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
|
||||
# Enable program counter for processing PTID to PC (sparc/sparc64)
|
||||
Patch316: gdb-6.8-sparc-fix.patch
|
||||
|
||||
# Silence memcpy check which returns false positive (sparc64)
|
||||
Patch317: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
|
||||
@ -370,25 +339,18 @@ Patch318: gdb-6.8-gcc35998-ada-memory-trash.patch
|
||||
# Test a crash on libraries missing the .text section.
|
||||
Patch320: gdb-6.5-section-num-fixup-test.patch
|
||||
|
||||
# Protect development in the build tree by automatic Makefile dependencies.
|
||||
Patch321: gdb-6.8-auto-dependencies.patch
|
||||
|
||||
# Refuse creating watchpoints of an address value, suggested by Martin Stransky.
|
||||
Patch322: gdb-6.8-constant-watchpoints.patch
|
||||
|
||||
# Disable randomization (such as by setarch -R), suggested by Jakub Jelinek.
|
||||
Patch323: gdb-6.8-disable-randomization.patch
|
||||
|
||||
# Fix compatibility with recent glibc headers.
|
||||
Patch324: gdb-6.8-glibc-headers-compat.patch
|
||||
|
||||
# Force build failure for missing libraries for --enable-tui.
|
||||
# Create a single binary `gdb' autodetecting --tui by its argv[0].
|
||||
Patch325: gdb-6.8-forced-enable-tui.patch
|
||||
Patch326: gdb-6.8-tui-singlebinary.patch
|
||||
|
||||
# Support transparent debugging of inlined functions for an optimized code.
|
||||
Patch327: gdb-6.8-inlining.patch
|
||||
Patch350: gdb-6.8-inlining-addon.patch
|
||||
Patch328: gdb-6.8-inlining-by-name.patch
|
||||
|
||||
# Fix PRPSINFO in the core files dumped by gcore (BZ 254229).
|
||||
@ -403,30 +365,23 @@ Patch331: gdb-6.8-quit-never-aborts.patch
|
||||
# Support DW_TAG_constant for Fortran in recent Fedora/RH GCCs.
|
||||
Patch332: gdb-6.8-fortran-tag-constant.patch
|
||||
|
||||
# Fix crash on DW_TAG_module for Fortran in recent Fedora/RH GCCs.
|
||||
Patch333: gdb-6.8-fortran-module-ignore.patch
|
||||
|
||||
# bare names of constructors and destructors should be unique for GDB-6.8+.
|
||||
Patch334: gdb-6.8-ctors-dtors-unique.patch
|
||||
|
||||
# Fix attaching to stopped processes and/or pending signals.
|
||||
Patch336: gdb-6.8-attach-signalled-upstream.patch
|
||||
Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||
|
||||
# Fix occasional crash on a removed watchpoint.
|
||||
Patch338: gdb-6.8-breakpoint-gone.patch
|
||||
|
||||
# Fix occasional stepping lockup on many threads, seen on ia64.
|
||||
Patch342: gdb-6.8-ia64-breakpoint-restoration.patch
|
||||
|
||||
# Test the watchpoints conditionals works.
|
||||
Patch343: gdb-6.8-watchpoint-conditionals-test.patch
|
||||
|
||||
# Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
Patch348: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
|
||||
# Enable ia64 hardware watchpoints if created before starting inferior.
|
||||
Patch349: gdb-6.8-ia64-exec-hw-watchpoint.patch
|
||||
# Enable hardware watchpoints if created before starting inferior.
|
||||
Patch349: gdb-watchpoint-hw-without-inferior.patch
|
||||
|
||||
# Fix upstream testsuite regression + make Fortran tests gfortran compatible.
|
||||
Patch351: gdb-fortran-testsuite-gfortran.patch
|
||||
|
||||
BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
|
||||
Requires: readline
|
||||
@ -504,12 +459,12 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
|
||||
%if 0%{!?_with_upstream:1}
|
||||
|
||||
%patch232 -p1
|
||||
###patch232 -p1
|
||||
%patch305 -p1
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%patch101 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
@ -518,14 +473,12 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch116 -p1
|
||||
%patch117 -p1
|
||||
%patch118 -p1
|
||||
%patch120 -p1
|
||||
%patch122 -p1
|
||||
%patch125 -p1
|
||||
%patch128 -p1
|
||||
%patch133 -p1
|
||||
%patch134 -p1
|
||||
%patch136 -p1
|
||||
%patch139 -p1
|
||||
%patch140 -p1
|
||||
%patch141 -p1
|
||||
%patch259 -p1
|
||||
@ -548,8 +501,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch170 -p1
|
||||
%patch176 -p1
|
||||
%patch177 -p1
|
||||
%patch178 -p1
|
||||
%patch179 -p1
|
||||
%patch188 -p1
|
||||
%patch190 -p1
|
||||
%patch194 -p1
|
||||
@ -585,10 +536,8 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch266 -p1
|
||||
%patch271 -p1
|
||||
%patch274 -p1
|
||||
%patch277 -p1
|
||||
%patch280 -p1
|
||||
%patch282 -p1
|
||||
%patch283 -p1
|
||||
%patch284 -p1
|
||||
%patch287 -p1
|
||||
%patch289 -p1
|
||||
@ -599,39 +548,29 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch298 -p1
|
||||
%patch301 -p1
|
||||
%patch304 -p1
|
||||
%patch345 -p1
|
||||
%patch346 -p1
|
||||
%patch305 -p1
|
||||
%patch306 -p1
|
||||
%patch309 -p1
|
||||
%patch311 -p1
|
||||
%patch314 -p1
|
||||
%patch315 -p1
|
||||
%patch316 -p1
|
||||
%patch317 -p1
|
||||
%patch318 -p1
|
||||
%patch320 -p1
|
||||
%patch321 -p1
|
||||
%patch322 -p1
|
||||
%patch323 -p1
|
||||
%patch324 -p1
|
||||
%patch325 -p1
|
||||
%patch326 -p1
|
||||
%patch327 -p1
|
||||
%patch350 -p1
|
||||
%patch328 -p1
|
||||
%patch329 -p1
|
||||
%patch330 -p1
|
||||
%patch331 -p1
|
||||
%patch332 -p1
|
||||
%patch333 -p1
|
||||
%patch334 -p1
|
||||
%patch336 -p1
|
||||
%patch337 -p1
|
||||
%patch338 -p1
|
||||
%patch342 -p1
|
||||
%patch343 -p1
|
||||
%patch348 -p1
|
||||
%patch349 -p1
|
||||
%patch351 -p1
|
||||
%patch124 -p1
|
||||
|
||||
find -name "*.orig" | xargs rm -f
|
||||
@ -895,6 +834,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Dec 14 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20081209-1
|
||||
- Upgrade to the upstream gdb-6.8.50 snapshot.
|
||||
|
||||
* Mon Dec 1 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-33
|
||||
- Make `--with testsuite' BuildRequires properly conditional.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user