Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
63402f721a | ||
|
48a8022c0d | ||
|
25295218e8 | ||
|
e027afdda5 | ||
|
382eba1529 | ||
|
a2e704d1bb | ||
|
ac0d835ae2 | ||
|
4b781db739 | ||
|
c60c751f7f | ||
|
78a86e7f70 | ||
|
1510f6c29f | ||
|
f379920b5a | ||
|
4fa7e0bd11 | ||
|
7b10b2a0b9 | ||
|
33216b4b8c | ||
|
8f2b36edb7 | ||
|
b43585a77f | ||
|
64c98d4c7d | ||
|
d6ca472c5a | ||
|
f6bd5cf63a | ||
|
426ff34819 | ||
|
47ac9de45c | ||
|
8a0a050b97 | ||
|
9b041423bb | ||
|
799903eaa1 |
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
21
Makefile
21
Makefile
@ -1,21 +0,0 @@
|
||||
# Makefile for source rpm: gdb
|
||||
# $Id: Makefile,v 1.2 2007/05/30 14:38:39 kasal Exp $
|
||||
NAME := gdb
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attempt a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
@ -1,7 +1,9 @@
|
||||
--- /dev/null 2008-05-02 23:36:22.370004160 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/gcore-shmid0.exp 2008-05-03 22:36:56.000000000 +0200
|
||||
@@ -0,0 +1,120 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp 2009-06-29 16:24:36.000000000 +0200
|
||||
@@ -0,0 +1,96 @@
|
||||
+# Copyright 2007, 2009 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
|
||||
@ -17,43 +19,22 @@
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Please email any bugs, comments, and/or additions to this file to:
|
||||
+# bug-gdb@prep.ai.mit.edu
|
||||
+
|
||||
+# Test GDB's handling of gcore for mapping with a name but zero inode.
|
||||
+
|
||||
+set testfile "gcore-shmid0"
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested gcore.exp
|
||||
+ return -1
|
||||
+if { [prepare_for_testing gcore-shmid0.exp gcore-shmid0] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Start with a fresh gdb.
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+# Does this gdb support gcore?
|
||||
+send_gdb "help gcore\n"
|
||||
+gdb_expect {
|
||||
+set test "help gcore"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "Undefined command: .gcore.*$gdb_prompt $" {
|
||||
+ # gcore command not supported -- nothing to test here.
|
||||
+ unsupported "gdb does not support gcore on this target"
|
||||
+ return -1;
|
||||
+ }
|
||||
+ -re "Save a core file .*$gdb_prompt $" {
|
||||
+ pass "help gcore"
|
||||
+ }
|
||||
+ -re ".*$gdb_prompt $" {
|
||||
+ fail "help gcore"
|
||||
+ }
|
||||
+ timeout {
|
||||
+ fail "help gcore (timeout)"
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
@ -86,9 +67,6 @@
|
||||
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
||||
+ unsupported $test
|
||||
+ }
|
||||
+ eof {
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Be sure to remove the handle first.
|
||||
@ -121,10 +99,12 @@
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
--- /dev/null 2008-05-02 23:36:22.370004160 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/gcore-shmid0.c 2008-05-03 22:39:10.000000000 +0200
|
||||
@@ -0,0 +1,95 @@
|
||||
+/* Copyright 2007 Free Software Foundation, Inc.
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c 2009-06-29 16:22:49.000000000 +0200
|
||||
@@ -0,0 +1,123 @@
|
||||
+/* Copyright 2007, 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
@ -155,7 +135,10 @@
|
||||
+#include <unistd.h>
|
||||
+#include <assert.h>
|
||||
+
|
||||
+/* We need a backtrace through the stack. */
|
||||
+/* The same test running in a parallel testsuite may steal us the zero SID,
|
||||
+ even if we never get any EEXIST. Just try a while. */
|
||||
+
|
||||
+#define TIMEOUT_SEC 10
|
||||
+
|
||||
+static void
|
||||
+initialized (void)
|
||||
@ -172,19 +155,41 @@
|
||||
+{
|
||||
+ int sid;
|
||||
+ unsigned int *addr = (void *) -1L;
|
||||
+ int try;
|
||||
+ int attempt, round = 0;
|
||||
+ time_t ts_start, ts;
|
||||
+
|
||||
+ /* The generated SID will cycle with an increment of 32768, try until it
|
||||
+ if (time (&ts_start) == (time_t) -1)
|
||||
+ {
|
||||
+ printf ("time (): %m\n");
|
||||
+ exit (1);
|
||||
+ }
|
||||
+
|
||||
+ /* The generated SID will cycle with an increment of 32768, attempt until it
|
||||
+ * wraps to 0. */
|
||||
+
|
||||
+ for (try = 0; addr == (void *) -1L; try++)
|
||||
+ for (attempt = 0; addr == (void *) -1L; attempt++)
|
||||
+ {
|
||||
+ /* At least kernel-2.6.25-8.fc9.x86_64 just never returns the value 0 by
|
||||
+ shmget(2). */
|
||||
+ if (try > 0x10000)
|
||||
+ /* kernel-2.6.25-8.fc9.x86_64 just never returns the value 0 by
|
||||
+ shmget(2). shmget returns SID range 0..1<<31 in steps of 32768,
|
||||
+ 0x1000 should be enough but wrap the range it to be sure. */
|
||||
+
|
||||
+ if (attempt > 0x21000)
|
||||
+ {
|
||||
+ printf ("Problem no longer reproducible on this kernel (try %d)\n",
|
||||
+ try);
|
||||
+ if (time (&ts) == (time_t) -1)
|
||||
+ {
|
||||
+ printf ("time (): %m\n");
|
||||
+ exit (1);
|
||||
+ }
|
||||
+
|
||||
+ if (ts >= ts_start && ts < ts_start + TIMEOUT_SEC)
|
||||
+ {
|
||||
+ attempt = 0;
|
||||
+ round++;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ printf ("Problem is not reproducible on this kernel (attempt %d, "
|
||||
+ "round %d))\n", attempt, round);
|
||||
+ unresolved ();
|
||||
+ exit (1);
|
||||
+ }
|
||||
@ -192,6 +197,9 @@
|
||||
+ sid = shmget ((key_t) rand (), 0x1000, IPC_CREAT | IPC_EXCL | 0777);
|
||||
+ if (sid == -1)
|
||||
+ {
|
||||
+ if (errno == EEXIST)
|
||||
+ continue;
|
||||
+
|
||||
+ printf ("shmget (%d, 0x1000, IPC_CREAT): errno %d\n", 0, errno);
|
||||
+ exit (1);
|
||||
+ }
|
||||
|
@ -28,8 +28,8 @@
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/amd64-tdep.c 2009-03-07 00:30:09.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/amd64-tdep.c 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/amd64-tdep.c 2009-06-15 13:00:53.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/amd64-tdep.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "regcache.h"
|
||||
#include "regset.h"
|
||||
@ -134,8 +134,8 @@ Index: gdb-6.8.50.20090302/gdb/amd64-tdep.c
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/auxv.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/auxv.c 2009-03-07 00:30:06.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/auxv.c 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/auxv.c 2009-06-15 13:00:50.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/auxv.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -81,7 +81,7 @@ procfs_xfer_auxv (struct target_ops *ops
|
||||
Return 1 if an entry was read into *TYPEP and *VALP. */
|
||||
static int
|
||||
@ -206,7 +206,7 @@ Index: gdb-6.8.50.20090302/gdb/auxv.c
|
||||
{
|
||||
#define TAG(tag, text, kind) \
|
||||
case tag: name = #tag; description = text; flavor = kind; break
|
||||
@@ -232,7 +234,7 @@ fprint_target_auxv (struct ui_file *file
|
||||
@@ -233,7 +235,7 @@ fprint_target_auxv (struct ui_file *file
|
||||
}
|
||||
|
||||
fprintf_filtered (file, "%-4s %-20s %-30s ",
|
||||
@ -215,7 +215,7 @@ Index: gdb-6.8.50.20090302/gdb/auxv.c
|
||||
switch (flavor)
|
||||
{
|
||||
case dec:
|
||||
@@ -254,7 +256,7 @@ fprint_target_auxv (struct ui_file *file
|
||||
@@ -255,7 +257,7 @@ fprint_target_auxv (struct ui_file *file
|
||||
break;
|
||||
}
|
||||
++ents;
|
||||
@ -227,7 +227,7 @@ Index: gdb-6.8.50.20090302/gdb/auxv.c
|
||||
Index: gdb-6.8.50.20090302/gdb/auxv.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/auxv.h 2009-01-03 06:57:50.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/auxv.h 2009-03-07 00:30:12.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/auxv.h 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -36,14 +36,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,
|
||||
@ -247,8 +247,8 @@ Index: gdb-6.8.50.20090302/gdb/auxv.h
|
||||
extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
|
||||
Index: gdb-6.8.50.20090302/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/breakpoint.c 2009-03-07 00:30:10.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/breakpoint.c 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/breakpoint.c 2009-06-15 13:00:55.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/breakpoint.c 2009-06-15 13:07:58.000000000 +0200
|
||||
@@ -3920,7 +3920,8 @@ describe_other_breakpoints (CORE_ADDR pc
|
||||
printf_filtered (" (thread %d)", b->thread);
|
||||
printf_filtered ("%s%s ",
|
||||
@ -259,7 +259,7 @@ Index: gdb-6.8.50.20090302/gdb/breakpoint.c
|
||||
? " (disabled)"
|
||||
: b->enable_state == bp_permanent
|
||||
? " (permanent)"
|
||||
@@ -5008,6 +5009,61 @@ create_catchpoint (int tempflag, char *c
|
||||
@@ -5009,6 +5010,61 @@ create_catchpoint (int tempflag, char *c
|
||||
return b;
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@ Index: gdb-6.8.50.20090302/gdb/breakpoint.c
|
||||
+ if (((b->type == bp_breakpoint) ||
|
||||
+ (b->type == bp_hardware_breakpoint)) &&
|
||||
+ b->enable_state == bp_enabled &&
|
||||
+ !b->loc->duplicate)
|
||||
+ b->loc != NULL && !b->loc->duplicate)
|
||||
+ {
|
||||
+ b->enable_state = bp_startup_disabled;
|
||||
+ if (!silent)
|
||||
@ -323,8 +323,8 @@ Index: gdb-6.8.50.20090302/gdb/breakpoint.c
|
||||
struct breakpoint_ops *ops)
|
||||
Index: gdb-6.8.50.20090302/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/breakpoint.h 2009-03-07 00:30:06.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/breakpoint.h 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/breakpoint.h 2009-06-15 13:00:50.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/breakpoint.h 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -127,6 +127,7 @@ enum enable_state
|
||||
automatically enabled and reset when the call
|
||||
"lands" (either completes, or stops at another
|
||||
@ -346,9 +346,9 @@ Index: gdb-6.8.50.20090302/gdb/breakpoint.h
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c 2009-03-07 00:30:10.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2read.c 2009-03-07 00:30:12.000000000 +0100
|
||||
@@ -1413,7 +1413,7 @@ dwarf2_build_psymtabs (struct objfile *o
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c 2009-06-15 13:00:55.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2read.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -1438,7 +1438,7 @@ dwarf2_build_psymtabs (struct objfile *o
|
||||
else
|
||||
dwarf2_per_objfile->loc_buffer = NULL;
|
||||
|
||||
@ -359,8 +359,8 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
{
|
||||
Index: gdb-6.8.50.20090302/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/elfread.c 2009-03-07 00:30:06.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/elfread.c 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/elfread.c 2009-06-15 13:00:50.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/elfread.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -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
|
||||
@ -372,8 +372,8 @@ Index: gdb-6.8.50.20090302/gdb/elfread.c
|
||||
mainline = 0;
|
||||
Index: gdb-6.8.50.20090302/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/infrun.c 2009-03-07 00:30:10.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/infrun.c 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/infrun.c 2009-06-15 13:00:55.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/infrun.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -3354,6 +3354,11 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (
|
||||
#endif
|
||||
target_terminal_inferior ();
|
||||
@ -388,11 +388,11 @@ Index: gdb-6.8.50.20090302/gdb/infrun.c
|
||||
and place breakpoints in initializer routines for
|
||||
Index: gdb-6.8.50.20090302/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/objfiles.c 2009-03-07 00:30:06.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/objfiles.c 2009-03-07 00:30:12.000000000 +0100
|
||||
@@ -51,6 +51,9 @@
|
||||
#include "arch-utils.h"
|
||||
--- gdb-6.8.50.20090302.orig/gdb/objfiles.c 2009-06-15 13:00:56.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/objfiles.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -52,6 +52,9 @@
|
||||
#include "exec.h"
|
||||
#include "varobj.h"
|
||||
|
||||
+#include "auxv.h"
|
||||
+#include "elf/common.h"
|
||||
@ -400,7 +400,7 @@ Index: gdb-6.8.50.20090302/gdb/objfiles.c
|
||||
/* Prototypes for local functions */
|
||||
|
||||
static void objfile_alloc_data (struct objfile *objfile);
|
||||
@@ -271,7 +274,19 @@ init_entry_point_info (struct objfile *o
|
||||
@@ -272,7 +275,19 @@ init_entry_point_info (struct objfile *o
|
||||
CORE_ADDR
|
||||
entry_point_address (void)
|
||||
{
|
||||
@ -421,7 +421,7 @@ Index: gdb-6.8.50.20090302/gdb/objfiles.c
|
||||
}
|
||||
|
||||
/* Create the terminating entry of OBJFILE's minimal symbol table.
|
||||
@@ -443,6 +458,9 @@ free_objfile (struct objfile *objfile)
|
||||
@@ -445,6 +460,9 @@ free_objfile (struct objfile *objfile)
|
||||
if (objfile == rt_common_objfile)
|
||||
rt_common_objfile = NULL;
|
||||
|
||||
@ -433,8 +433,8 @@ Index: gdb-6.8.50.20090302/gdb/objfiles.c
|
||||
linkage unit, gdb used to do these things whenever the monolithic
|
||||
Index: gdb-6.8.50.20090302/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/solib-svr4.c 2009-03-07 00:30:09.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/solib-svr4.c 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/solib-svr4.c 2009-06-15 13:00:54.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/solib-svr4.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "exec.h"
|
||||
#include "auxv.h"
|
||||
@ -1119,7 +1119,7 @@ Index: gdb-6.8.50.20090302/gdb/solib-svr4.c
|
||||
Index: gdb-6.8.50.20090302/gdb/solib.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/solib.c 2009-02-21 17:14:49.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/solib.c 2009-03-07 00:30:12.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/solib.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -81,6 +81,8 @@ set_solib_ops (struct gdbarch *gdbarch,
|
||||
|
||||
/* external data declarations */
|
||||
@ -1309,7 +1309,7 @@ Index: gdb-6.8.50.20090302/gdb/solib.c
|
||||
Index: gdb-6.8.50.20090302/gdb/solist.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/solist.h 2009-02-04 09:42:11.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/solist.h 2009-03-07 00:30:12.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/solist.h 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -61,6 +61,8 @@ struct so_list
|
||||
bfd *abfd;
|
||||
char symbols_loaded; /* flag: symbols read in yet? */
|
||||
@ -1332,8 +1332,8 @@ Index: gdb-6.8.50.20090302/gdb/solist.h
|
||||
#endif
|
||||
Index: gdb-6.8.50.20090302/gdb/symfile-mem.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symfile-mem.c 2009-03-07 00:30:08.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/symfile-mem.c 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symfile-mem.c 2009-06-15 13:00:52.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/symfile-mem.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -116,7 +116,7 @@ symbol_file_add_from_memory (struct bfd
|
||||
}
|
||||
|
||||
@ -1345,8 +1345,8 @@ Index: gdb-6.8.50.20090302/gdb/symfile-mem.c
|
||||
reinit_frame_cache ();
|
||||
Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symfile.c 2009-03-07 00:30:09.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/symfile.c 2009-03-07 00:31:24.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symfile.c 2009-06-15 13:00:56.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/symfile.c 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "readline/readline.h"
|
||||
#include "gdb_assert.h"
|
||||
@ -1397,7 +1397,7 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
|
||||
/* We're done reading the symbol file; finish off complaints. */
|
||||
clear_complaints (&symfile_complaints, 0, verbo);
|
||||
@@ -980,7 +985,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
@@ -982,7 +987,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
/* Give user a chance to burp if we'd be
|
||||
interactively wiping out any existing symbols. */
|
||||
|
||||
@ -1406,7 +1406,7 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
&& from_tty
|
||||
&& (have_full_symbols () || have_partial_symbols ())
|
||||
&& !query (_("Load new symbol table from \"%s\"? "), name))
|
||||
@@ -1175,6 +1180,10 @@ symbol_file_clear (int from_tty)
|
||||
@@ -1178,6 +1183,10 @@ symbol_file_clear (int from_tty)
|
||||
symfile_objfile->name)
|
||||
: !query (_("Discard symbol table? "))))
|
||||
error (_("Not confirmed."));
|
||||
@ -1417,7 +1417,7 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
free_all_objfiles ();
|
||||
|
||||
/* solib descriptors may have handles to objfiles. Since their
|
||||
@@ -3275,6 +3284,8 @@ reread_symbols (void)
|
||||
@@ -3375,6 +3384,8 @@ reread_symbols (void)
|
||||
/* Discard cleanups as symbol reading was successful. */
|
||||
discard_cleanups (old_cleanups);
|
||||
|
||||
@ -1428,8 +1428,8 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
again now. */
|
||||
Index: gdb-6.8.50.20090302/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/target.h 2009-03-07 00:30:09.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/target.h 2009-03-07 00:30:12.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/target.h 2009-06-15 13:00:54.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/target.h 2009-06-15 13:00:56.000000000 +0200
|
||||
@@ -542,7 +542,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. */
|
||||
|
@ -11,10 +11,10 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-6.8.50.20090228/gdb/doc/gdb.texinfo
|
||||
Index: gdb-6.8.50.20090302/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090228.orig/gdb/doc/gdb.texinfo 2009-03-02 01:01:15.000000000 +0100
|
||||
+++ gdb-6.8.50.20090228/gdb/doc/gdb.texinfo 2009-03-02 01:01:23.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/doc/gdb.texinfo 2009-05-09 20:00:02.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/doc/gdb.texinfo 2009-05-09 20:00:06.000000000 +0200
|
||||
@@ -988,6 +988,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,10 +28,10 @@ Index: gdb-6.8.50.20090228/gdb/doc/gdb.texinfo
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-6.8.50.20090228/gdb/main.c
|
||||
Index: gdb-6.8.50.20090302/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090228.orig/gdb/main.c 2009-03-02 01:01:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20090228/gdb/main.c 2009-03-02 01:01:23.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/main.c 2009-05-09 20:00:03.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/main.c 2009-05-09 20:00:06.000000000 +0200
|
||||
@@ -427,6 +427,7 @@ captured_main (void *data)
|
||||
{"xdb", no_argument, &xdb_commands, 1},
|
||||
{"dbx", no_argument, &dbx_commands, 1},
|
||||
@ -48,10 +48,10 @@ Index: gdb-6.8.50.20090228/gdb/main.c
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||
Index: gdb-6.8.50.20090228/gdb/symfile.c
|
||||
Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090228.orig/gdb/symfile.c 2009-03-02 01:01:17.000000000 +0100
|
||||
+++ gdb-6.8.50.20090228/gdb/symfile.c 2009-03-02 01:01:23.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symfile.c 2009-05-09 20:00:03.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/symfile.c 2009-05-09 20:00:06.000000000 +0200
|
||||
@@ -77,6 +77,7 @@ static void clear_symtab_users_cleanup (
|
||||
|
||||
/* Global variables owned by this file */
|
||||
@ -60,19 +60,19 @@ Index: gdb-6.8.50.20090228/gdb/symfile.c
|
||||
|
||||
/* External variables and functions referenced. */
|
||||
|
||||
Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090228.orig/gdb/dwarf2read.c 2009-03-02 01:01:15.000000000 +0100
|
||||
+++ gdb-6.8.50.20090228/gdb/dwarf2read.c 2009-03-02 01:01:36.000000000 +0100
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "f-lang.h"
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c 2009-05-09 20:00:02.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2read.c 2009-05-09 20:00:19.000000000 +0200
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "c-lang.h"
|
||||
#include "typeprint.h"
|
||||
#include "block.h"
|
||||
+#include "top.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "gdb_string.h"
|
||||
@@ -1161,7 +1162,8 @@ dwarf2_has_info (struct objfile *objfile
|
||||
@@ -1187,7 +1188,8 @@ dwarf2_has_info (struct objfile *objfile
|
||||
dwarf_aranges_section = 0;
|
||||
|
||||
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, &update_sizes);
|
||||
@ -82,10 +82,10 @@ Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
}
|
||||
|
||||
/* When loading sections, we can either look for ".<name>", or for
|
||||
Index: gdb-6.8.50.20090228/gdb/top.h
|
||||
Index: gdb-6.8.50.20090302/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090228.orig/gdb/top.h 2009-01-03 06:57:53.000000000 +0100
|
||||
+++ gdb-6.8.50.20090228/gdb/top.h 2009-03-02 01:01:23.000000000 +0100
|
||||
--- gdb-6.8.50.20090302.orig/gdb/top.h 2009-01-03 06:57:53.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/top.h 2009-05-09 20:00:06.000000000 +0200
|
||||
@@ -59,6 +59,7 @@ extern void set_prompt (char *);
|
||||
|
||||
/* From random places. */
|
||||
|
@ -873,7 +873,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp 2008-12-09 17:24:34.000000000 +0100
|
||||
@@ -0,0 +1,973 @@
|
||||
@@ -0,0 +1,977 @@
|
||||
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
+# 2000, 2002, 2003, 2004
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -1055,6 +1055,9 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp
|
||||
+set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
|
||||
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
|
||||
+
|
||||
+# Test a pending breakpoint in PIE executable does not crash later GDB.
|
||||
+gdb_breakpoint "non_existent_function" allow-pending
|
||||
+
|
||||
+gdb_test "info break" \
|
||||
+ "Num\[ \]+Type\[ \]+Disp Enb Address\[ \]+What.*
|
||||
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
|
||||
@ -1064,7 +1067,8 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp
|
||||
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
|
||||
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location2.*
|
||||
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_if_conditional at .*$srcfile:$bp_location3.*
|
||||
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:$bp_location4" \
|
||||
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:$bp_location4.*
|
||||
+\[0-9\]+\[\t \]+breakpoint keep y.* <PENDING> *non_existent_function" \
|
||||
+ "breakpoint info"
|
||||
+
|
||||
+# FIXME: The rest of this test doesn't work with anything that can't
|
||||
@ -1490,7 +1494,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp
|
||||
+}
|
||||
+send_gdb "print marker2(99)\n"
|
||||
+gdb_expect {
|
||||
+ -re "The program being debugged stopped while in a function called from GDB.\r\nWhen the function .marker2$proto. is done executing, GDB will silently\r\nstop .instead of continuing to evaluate the expression containing\r\nthe function call...*$gdb_prompt $"\
|
||||
+ -re "The program being debugged stopped while in a function called from GDB.\r\nEvaluation of the expression containing the function\r\n.marker2$proto. will be abandoned.\r\nWhen the function is done executing, GDB will silently stop.\r\n$gdb_prompt $"\
|
||||
+ {pass "hit breakpoint on called function"}
|
||||
+ -re "$gdb_prompt $"\
|
||||
+ {fail "hit breakpoint on called function"}
|
||||
|
@ -421,7 +421,7 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
}
|
||||
|
||||
@@ -1802,14 +2154,33 @@ debug_print_missing (const char *binary,
|
||||
}
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
- /* We do not collect and flush these messages as each such message
|
||||
|
@ -13,7 +13,7 @@ Index: gdb-6.8.50.20090302/gdb/corelow.c
|
||||
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
@@ -267,6 +271,56 @@ add_to_thread_list (bfd *abfd, asection
|
||||
@@ -267,6 +271,50 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = ptid; /* Yes, make it current */
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ Index: gdb-6.8.50.20090302/gdb/corelow.c
|
||||
+ struct build_id *build_id;
|
||||
+ char *exec_filename, *debug_filename;
|
||||
+ char *build_id_filename;
|
||||
+ struct cleanup *back_to;
|
||||
+
|
||||
+ if (exec_bfd != NULL)
|
||||
+ return;
|
||||
@ -37,32 +38,25 @@ Index: gdb-6.8.50.20090302/gdb/corelow.c
|
||||
+ if (build_id == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ /* SYMFILE_OBJFILE should refer to the main executable (not only to its
|
||||
+ separate debug info file). gcc44+ keeps .eh_frame only in the main
|
||||
+ executable without its duplicate .debug_frame in the separate debug info
|
||||
+ file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer
|
||||
+ directly to the separate debug info file. */
|
||||
+
|
||||
+ exec_filename = build_id_to_filename (build_id, &build_id_filename, 0);
|
||||
+ back_to = make_cleanup (xfree, build_id_filename);
|
||||
+
|
||||
+ if (exec_filename != NULL)
|
||||
+ exec_file_attach (exec_filename, from_tty);
|
||||
+ {
|
||||
+ make_cleanup (xfree, exec_filename);
|
||||
+ exec_file_attach (exec_filename, from_tty);
|
||||
+ symbol_file_add_main (exec_filename, from_tty);
|
||||
+ }
|
||||
+ else
|
||||
+ debug_print_missing (_("the main executable file"), build_id_filename);
|
||||
+ xfree (build_id_filename);
|
||||
+
|
||||
+ /* `.note.gnu.build-id' section exists even for files without a separate
|
||||
+ debuginfo. */
|
||||
+ debug_filename = build_id_to_filename (build_id, &build_id_filename, 1);
|
||||
+ if (debug_filename != NULL)
|
||||
+ {
|
||||
+ symbol_file_add_main (debug_filename, from_tty);
|
||||
+ xfree (debug_filename);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (exec_filename != NULL)
|
||||
+ symbol_file_add_main (exec_filename, from_tty);
|
||||
+ /* For EXEC_FILENAME NULL we were already complaining above. */
|
||||
+ if (symfile_objfile == NULL && exec_filename != NULL)
|
||||
+ debug_print_missing (exec_filename, build_id_filename);
|
||||
+ }
|
||||
+ xfree (build_id_filename);
|
||||
+
|
||||
+ xfree (exec_filename);
|
||||
+ do_cleanups (back_to);
|
||||
+
|
||||
+ /* No automatic SOLIB_ADD as the libraries would get read twice. */
|
||||
+}
|
||||
@ -646,7 +640,7 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
|
||||
if (retval != NULL && !build_id_verify (retval, build_id))
|
||||
{
|
||||
@@ -1279,9 +1676,142 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1279,9 +1676,150 @@ build_id_to_debug_filename (struct build
|
||||
retval = NULL;
|
||||
}
|
||||
|
||||
@ -700,8 +694,8 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
+ const struct missing_filepair *elem2)
|
||||
+{
|
||||
+ return strcmp (elem1->binary, elem2->binary) == 0
|
||||
+ && ((elem1->debug == NULL && elem2->debug == NULL)
|
||||
+ || strcmp (elem1->debug, elem2->debug) == 0);
|
||||
+ && ((elem1->debug == NULL) == (elem2->debug == NULL))
|
||||
+ && (elem1->debug == NULL || strcmp (elem1->debug, elem2->debug) == 0);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
@ -732,6 +726,7 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
+{
|
||||
+ size_t binary_len0 = strlen (binary) + 1;
|
||||
+ size_t debug_len0 = debug ? strlen (debug) + 1 : 0;
|
||||
+ struct missing_filepair missing_filepair_find;
|
||||
+ struct missing_filepair *missing_filepair;
|
||||
+ struct missing_filepair **slot;
|
||||
+
|
||||
@ -747,6 +742,27 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
+ missing_filepair_xcalloc, NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* Use MISSING_FILEPAIR_FIND first instead of calling obstack_alloc with
|
||||
+ obstack_free in the case of a (rare) match. The problem is ALLOC_F for
|
||||
+ MISSING_FILEPAIR_HASH allocates from MISSING_FILEPAIR_OBSTACK maintenance
|
||||
+ structures for MISSING_FILEPAIR_HASH. Calling obstack_free would possibly
|
||||
+ not to free only MISSING_FILEPAIR but also some such structures (allocated
|
||||
+ during the htab_find_slot call). */
|
||||
+
|
||||
+ missing_filepair_find.binary = (char *) binary;
|
||||
+ missing_filepair_find.debug = (char *) debug;
|
||||
+ slot = (struct missing_filepair **) htab_find_slot (missing_filepair_hash,
|
||||
+ &missing_filepair_find,
|
||||
+ INSERT);
|
||||
+
|
||||
+ /* While it may be still printed duplicitely with the missing debuginfo file
|
||||
+ * it is due to once printing about the binary file build-id link and once
|
||||
+ * about the .debug file build-id link as both the build-id symlinks are
|
||||
+ * located in the debuginfo package. */
|
||||
+
|
||||
+ if (*slot != NULL)
|
||||
+ return;
|
||||
+
|
||||
+ missing_filepair = obstack_alloc (&missing_filepair_obstack,
|
||||
+ sizeof (*missing_filepair) - 1
|
||||
+ + binary_len0 + debug_len0);
|
||||
@ -760,20 +776,6 @@ Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
+ else
|
||||
+ missing_filepair->debug = NULL;
|
||||
+
|
||||
+ slot = (struct missing_filepair **) htab_find_slot (missing_filepair_hash,
|
||||
+ missing_filepair,
|
||||
+ INSERT);
|
||||
+
|
||||
+ /* While it may be still printed duplicitely with the missing debuginfo file
|
||||
+ * it is due to once printing about the binary file build-id link and once
|
||||
+ * about the .debug file build-id link as both the build-id symlinks are
|
||||
+ * located in the debuginfo package. */
|
||||
+
|
||||
+ if (*slot != NULL)
|
||||
+ {
|
||||
+ obstack_free (&missing_filepair_obstack, missing_filepair);
|
||||
+ return;
|
||||
+ }
|
||||
+ *slot = missing_filepair;
|
||||
+
|
||||
+ /* We do not collect and flush these messages as each such message
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090228.orig/gdb/dwarf2read.c 2009-03-02 01:07:36.000000000 +0100
|
||||
+++ gdb-6.8.50.20090228/gdb/dwarf2read.c 2009-03-02 01:07:50.000000000 +0100
|
||||
@@ -1996,6 +1996,7 @@ scan_partial_symbols (struct partial_die
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c 2009-05-09 20:04:27.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2read.c 2009-05-09 20:04:56.000000000 +0200
|
||||
@@ -2029,6 +2029,7 @@ scan_partial_symbols (struct partial_die
|
||||
add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu);
|
||||
break;
|
||||
case DW_TAG_variable:
|
||||
@ -10,7 +10,7 @@ Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
case DW_TAG_typedef:
|
||||
case DW_TAG_union_type:
|
||||
if (!pdi->is_declaration)
|
||||
@@ -2211,6 +2212,7 @@ add_partial_symbol (struct partial_die_i
|
||||
@@ -2244,6 +2245,7 @@ add_partial_symbol (struct partial_die_i
|
||||
}
|
||||
break;
|
||||
case DW_TAG_variable:
|
||||
@ -18,7 +18,7 @@ Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
if (pdi->is_external)
|
||||
{
|
||||
/* Global Variable.
|
||||
@@ -4213,7 +4215,8 @@ dwarf2_add_field (struct field_info *fip
|
||||
@@ -4272,7 +4274,8 @@ dwarf2_add_field (struct field_info *fip
|
||||
fip->non_public_fields = 1;
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@ Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
{
|
||||
/* C++ static member. */
|
||||
|
||||
@@ -4703,7 +4706,8 @@ read_structure_type (struct die_info *di
|
||||
@@ -4762,7 +4765,8 @@ read_structure_type (struct die_info *di
|
||||
while (child_die && child_die->tag)
|
||||
{
|
||||
if (child_die->tag == DW_TAG_member
|
||||
@ -38,7 +38,7 @@ Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
{
|
||||
/* NOTE: carlton/2002-11-05: A C++ static data member
|
||||
should be a DW_TAG_member that is a declaration, but
|
||||
@@ -4822,6 +4826,7 @@ process_structure_scope (struct die_info
|
||||
@@ -4881,6 +4885,7 @@ process_structure_scope (struct die_info
|
||||
{
|
||||
if (child_die->tag == DW_TAG_member
|
||||
|| child_die->tag == DW_TAG_variable
|
||||
@ -46,15 +46,15 @@ Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
|| child_die->tag == DW_TAG_inheritance)
|
||||
{
|
||||
/* Do nothing. */
|
||||
@@ -6455,6 +6460,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
||||
@@ -6656,6 +6661,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_module
|
||||
&& abbrev->tag != DW_TAG_member)
|
||||
{
|
||||
@@ -6562,6 +6568,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
||||
@@ -6764,6 +6770,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
||||
if (load_all
|
||||
|| abbrev->tag == DW_TAG_subprogram
|
||||
|| abbrev->tag == DW_TAG_variable
|
||||
@ -62,7 +62,7 @@ Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
|
||||
|| abbrev->tag == DW_TAG_namespace
|
||||
|| part_die->is_declaration)
|
||||
{
|
||||
@@ -8341,6 +8348,11 @@ new_symbol (struct die_info *die, struct
|
||||
@@ -8549,6 +8556,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;
|
||||
|
@ -7,8 +7,8 @@ Removed dwarf_expr_frame_base NULL check duplicity with *-vla.patch.
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/NEWS
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/NEWS 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/NEWS 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/NEWS 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/NEWS 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -1,6 +1,11 @@
|
||||
What has changed in GDB?
|
||||
(Organized release by release)
|
||||
@ -23,8 +23,8 @@ Index: gdb-6.8.50.20090302/gdb/NEWS
|
||||
* GDB now has support for multi-byte and wide character sets on the
|
||||
Index: gdb-6.8.50.20090302/gdb/block.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/block.c 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/block.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/block.c 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/block.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -47,8 +47,16 @@ contained_in (const struct block *a, con
|
||||
{
|
||||
if (!a || !b)
|
||||
@ -69,8 +69,8 @@ Index: gdb-6.8.50.20090302/gdb/block.c
|
||||
is none. PBLOCK is a pointer to the block. If PBLOCK is NULL, we
|
||||
Index: gdb-6.8.50.20090302/gdb/block.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/block.h 2009-01-03 06:57:50.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/block.h 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/block.h 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/block.h 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -65,7 +65,7 @@ struct block
|
||||
CORE_ADDR endaddr;
|
||||
|
||||
@ -80,7 +80,7 @@ Index: gdb-6.8.50.20090302/gdb/block.h
|
||||
|
||||
struct symbol *function;
|
||||
|
||||
@@ -134,6 +134,8 @@ enum { GLOBAL_BLOCK = 0, STATIC_BLOCK =
|
||||
@@ -144,6 +144,8 @@ enum { GLOBAL_BLOCK = 0, STATIC_BLOCK =
|
||||
|
||||
extern struct symbol *block_linkage_function (const struct block *);
|
||||
|
||||
@ -92,7 +92,7 @@ Index: gdb-6.8.50.20090302/gdb/block.h
|
||||
Index: gdb-6.8.50.20090302/gdb/blockframe.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/blockframe.c 2009-01-03 06:57:50.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/blockframe.c 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/blockframe.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "command.h"
|
||||
#include "gdbcmd.h"
|
||||
@ -163,8 +163,8 @@ Index: gdb-6.8.50.20090302/gdb/blockframe.c
|
||||
frame = get_prev_frame (frame);
|
||||
Index: gdb-6.8.50.20090302/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/breakpoint.c 2009-04-13 22:19:50.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/breakpoint.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/breakpoint.c 2009-05-09 21:27:15.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/breakpoint.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -2641,19 +2641,21 @@ watchpoint_check (void *p)
|
||||
within_current_scope = 1;
|
||||
else
|
||||
@ -344,8 +344,8 @@ Index: gdb-6.8.50.20090302/gdb/breakpoint.c
|
||||
}
|
||||
Index: gdb-6.8.50.20090302/gdb/buildsym.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/buildsym.c 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/buildsym.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/buildsym.c 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/buildsym.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -1155,6 +1155,12 @@ end_symtab (CORE_ADDR end_addr, struct o
|
||||
struct symbol *sym;
|
||||
struct dict_iterator iter;
|
||||
@ -361,8 +361,8 @@ Index: gdb-6.8.50.20090302/gdb/buildsym.c
|
||||
sym = dict_iterator_next (&iter))
|
||||
Index: gdb-6.8.50.20090302/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/doc/gdb.texinfo 2009-04-13 22:19:50.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/doc/gdb.texinfo 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/doc/gdb.texinfo 2009-05-09 21:27:15.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/doc/gdb.texinfo 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -137,6 +137,7 @@ software in general. We will miss him.
|
||||
* Stack:: Examining the stack
|
||||
* Source:: Examining source files
|
||||
@ -514,8 +514,8 @@ Index: gdb-6.8.50.20090302/gdb/doc/gdb.texinfo
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/dwarf2loc.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2loc.c 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2loc.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2loc.c 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2loc.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "regcache.h"
|
||||
#include "objfiles.h"
|
||||
@ -538,17 +538,9 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2loc.c
|
||||
some function associated with a frame. If we can't find the frame,
|
||||
Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c 2009-04-13 22:19:50.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2read.c 2009-04-13 22:22:41.000000000 +0200
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "c-lang.h"
|
||||
#include "typeprint.h"
|
||||
#include "top.h"
|
||||
+#include "block.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "gdb_string.h"
|
||||
@@ -2992,12 +2993,8 @@ process_die (struct die_info *die, struc
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c 2009-05-09 21:27:15.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2read.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -3024,12 +3024,8 @@ process_die (struct die_info *die, struc
|
||||
read_file_scope (die, cu);
|
||||
break;
|
||||
case DW_TAG_subprogram:
|
||||
@ -562,7 +554,7 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
break;
|
||||
case DW_TAG_lexical_block:
|
||||
case DW_TAG_try_block:
|
||||
@@ -3472,6 +3469,22 @@ read_func_scope (struct die_info *die, s
|
||||
@@ -3516,6 +3512,22 @@ read_func_scope (struct die_info *die, s
|
||||
CORE_ADDR baseaddr;
|
||||
struct block *block;
|
||||
unsigned die_children;
|
||||
@ -585,7 +577,7 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
|
||||
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
|
||||
@@ -7531,6 +7544,9 @@ die_specification (struct die_info *die,
|
||||
@@ -7725,6 +7737,9 @@ die_specification (struct die_info *die,
|
||||
*spec_cu);
|
||||
|
||||
if (spec_attr == NULL)
|
||||
@ -595,7 +587,7 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
return NULL;
|
||||
else
|
||||
return follow_die_ref (die, spec_attr, spec_cu);
|
||||
@@ -8214,6 +8230,7 @@ new_symbol (struct die_info *die, struct
|
||||
@@ -8408,6 +8423,7 @@ new_symbol (struct die_info *die, struct
|
||||
struct attribute *attr = NULL;
|
||||
struct attribute *attr2 = NULL;
|
||||
CORE_ADDR baseaddr;
|
||||
@ -603,7 +595,7 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
|
||||
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
|
||||
@@ -8264,13 +8281,17 @@ new_symbol (struct die_info *die, struct
|
||||
@@ -8464,13 +8480,17 @@ new_symbol (struct die_info *die, struct
|
||||
SYMBOL_TYPE (sym) = type;
|
||||
else
|
||||
SYMBOL_TYPE (sym) = die_type (die, cu);
|
||||
@ -623,7 +615,7 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
if (attr)
|
||||
{
|
||||
int file_index = DW_UNSND (attr);
|
||||
@@ -8317,6 +8338,14 @@ new_symbol (struct die_info *die, struct
|
||||
@@ -8517,6 +8537,14 @@ new_symbol (struct die_info *die, struct
|
||||
add_symbol_to_list (sym, cu->list_in_scope);
|
||||
}
|
||||
break;
|
||||
@ -638,7 +630,7 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
case DW_TAG_variable:
|
||||
/* Compilation with minimal debug info may result in variables
|
||||
with missing type entries. Change the misleading `void' type
|
||||
@@ -8372,7 +8401,14 @@ new_symbol (struct die_info *die, struct
|
||||
@@ -8583,7 +8611,14 @@ new_symbol (struct die_info *die, struct
|
||||
}
|
||||
break;
|
||||
case DW_TAG_formal_parameter:
|
||||
@ -657,7 +649,7 @@ Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
Index: gdb-6.8.50.20090302/gdb/frame-unwind.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/frame-unwind.c 2009-01-03 06:57:51.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/frame-unwind.c 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/frame-unwind.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "frame.h"
|
||||
#include "frame-unwind.h"
|
||||
@ -680,8 +672,8 @@ Index: gdb-6.8.50.20090302/gdb/frame-unwind.c
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/frame.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/frame.c 2009-04-13 22:19:48.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/frame.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/frame.c 2009-05-09 21:27:11.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/frame.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -41,8 +41,14 @@
|
||||
#include "objfiles.h"
|
||||
#include "exceptions.h"
|
||||
@ -1041,7 +1033,7 @@ Index: gdb-6.8.50.20090302/gdb/frame.c
|
||||
Index: gdb-6.8.50.20090302/gdb/frame.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/frame.h 2009-02-05 18:28:20.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/frame.h 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/frame.h 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -34,6 +34,9 @@
|
||||
frame_unwind_WHAT...(): Unwind THIS frame's WHAT from the NEXT
|
||||
frame.
|
||||
@ -1105,8 +1097,8 @@ Index: gdb-6.8.50.20090302/gdb/frame.h
|
||||
/* Assuming that a frame is `normal', return its base-address, or 0 if
|
||||
Index: gdb-6.8.50.20090302/gdb/gdbthread.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/gdbthread.h 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/gdbthread.h 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/gdbthread.h 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/gdbthread.h 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -83,6 +83,13 @@ struct thread_info
|
||||
This is how we know when we step into a subroutine call, and how
|
||||
to set the frame for the breakpoint used to step out. */
|
||||
@ -1123,8 +1115,8 @@ Index: gdb-6.8.50.20090302/gdb/gdbthread.h
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/infcall.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/infcall.c 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/infcall.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/infcall.c 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/infcall.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -898,15 +898,8 @@ The program being debugged exited while
|
||||
|
||||
if (unwind_on_signal_p)
|
||||
@ -1145,8 +1137,8 @@ Index: gdb-6.8.50.20090302/gdb/infcall.c
|
||||
long if it's a C++ name with arguments and stuff. */
|
||||
Index: gdb-6.8.50.20090302/gdb/infcmd.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/infcmd.c 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/infcmd.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/infcmd.c 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/infcmd.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "cli/cli-decode.h"
|
||||
#include "gdbthread.h"
|
||||
@ -1250,8 +1242,8 @@ Index: gdb-6.8.50.20090302/gdb/infcmd.c
|
||||
function = find_pc_function (get_frame_pc (get_selected_frame (NULL)));
|
||||
Index: gdb-6.8.50.20090302/gdb/inferior.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/inferior.h 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/inferior.h 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/inferior.h 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/inferior.h 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -259,6 +259,9 @@ extern void error_is_running (void);
|
||||
/* Calls error_is_running if the current thread is running. */
|
||||
extern void ensure_not_running (void);
|
||||
@ -1264,8 +1256,8 @@ Index: gdb-6.8.50.20090302/gdb/inferior.h
|
||||
extern void tty_command (char *, int);
|
||||
Index: gdb-6.8.50.20090302/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/infrun.c 2009-04-13 22:19:49.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/infrun.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/infrun.c 2009-05-09 21:27:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/infrun.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "gdb_assert.h"
|
||||
#include "mi/mi-common.h"
|
||||
@ -1541,7 +1533,7 @@ Index: gdb-6.8.50.20090302/gdb/infrun.c
|
||||
Index: gdb-6.8.50.20090302/gdb/inline-frame.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/inline-frame.c 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/inline-frame.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,382 @@
|
||||
+/* Inline frame unwinder for GDB.
|
||||
+
|
||||
@ -1928,7 +1920,7 @@ Index: gdb-6.8.50.20090302/gdb/inline-frame.c
|
||||
Index: gdb-6.8.50.20090302/gdb/inline-frame.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/inline-frame.h 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/inline-frame.h 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,62 @@
|
||||
+/* Definitions for inline frame support.
|
||||
+
|
||||
@ -1994,8 +1986,8 @@ Index: gdb-6.8.50.20090302/gdb/inline-frame.h
|
||||
+#endif /* !defined (INLINE_FRAME_H) */
|
||||
Index: gdb-6.8.50.20090302/gdb/minsyms.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/minsyms.c 2009-04-13 22:19:49.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/minsyms.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/minsyms.c 2009-05-09 21:27:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/minsyms.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -795,7 +795,7 @@ prim_record_minimal_symbol_and_info (con
|
||||
|
||||
if (msym_bunch_index == BUNCH_SIZE)
|
||||
@ -2008,7 +2000,7 @@ Index: gdb-6.8.50.20090302/gdb/minsyms.c
|
||||
Index: gdb-6.8.50.20090302/gdb/s390-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/s390-tdep.c 2009-02-22 02:02:19.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/s390-tdep.c 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/s390-tdep.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -1182,6 +1182,7 @@ s390_prologue_frame_unwind_cache (struct
|
||||
CORE_ADDR prev_sp;
|
||||
int frame_pointer;
|
||||
@ -2044,8 +2036,8 @@ Index: gdb-6.8.50.20090302/gdb/s390-tdep.c
|
||||
/* See the comment in s390_in_function_epilogue_p on why this is
|
||||
Index: gdb-6.8.50.20090302/gdb/stack.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/stack.c 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/stack.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/stack.c 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/stack.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "valprint.h"
|
||||
#include "gdbthread.h"
|
||||
@ -2194,9 +2186,9 @@ Index: gdb-6.8.50.20090302/gdb/stack.c
|
||||
RETURN_VALUE to NULL, and QUERY_PREFIX to an informational
|
||||
Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symtab.c 2009-04-13 22:19:49.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/symtab.c 2009-04-13 22:22:01.000000000 +0200
|
||||
@@ -1417,11 +1417,14 @@ lookup_symbol_aux_local (const char *nam
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symtab.c 2009-05-09 21:27:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/symtab.c 2009-05-09 21:28:06.000000000 +0200
|
||||
@@ -1420,11 +1420,14 @@ lookup_symbol_aux_local (const char *nam
|
||||
sym = lookup_symbol_aux_block (name, linkage_name, block_iterator, domain);
|
||||
if (sym != NULL)
|
||||
return sym;
|
||||
@ -2212,7 +2204,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -2678,6 +2681,7 @@ find_function_start_sal (struct symbol *
|
||||
@@ -2681,6 +2684,7 @@ find_function_start_sal (struct symbol *
|
||||
|
||||
CORE_ADDR pc;
|
||||
struct symtab_and_line sal;
|
||||
@ -2220,7 +2212,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
|
||||
pc = BLOCK_START (block);
|
||||
fixup_symbol_section (sym, objfile);
|
||||
@@ -2716,6 +2720,25 @@ find_function_start_sal (struct symbol *
|
||||
@@ -2719,6 +2723,25 @@ find_function_start_sal (struct symbol *
|
||||
|
||||
sal.pc = pc;
|
||||
|
||||
@ -2246,7 +2238,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
return sal;
|
||||
}
|
||||
|
||||
@@ -3738,6 +3761,24 @@ add_macro_name (const char *name, const
|
||||
@@ -3741,6 +3764,24 @@ add_macro_name (const char *name, const
|
||||
datum->text, datum->word);
|
||||
}
|
||||
|
||||
@ -2271,7 +2263,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
char **
|
||||
default_make_symbol_completion_list (char *text, char *word)
|
||||
{
|
||||
@@ -3750,9 +3791,9 @@ default_make_symbol_completion_list (cha
|
||||
@@ -3753,9 +3794,9 @@ default_make_symbol_completion_list (cha
|
||||
struct partial_symtab *ps;
|
||||
struct minimal_symbol *msymbol;
|
||||
struct objfile *objfile;
|
||||
@ -2283,7 +2275,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
struct partial_symbol **psym;
|
||||
/* The symbol we are completing on. Points in same buffer as text. */
|
||||
char *sym_text;
|
||||
@@ -3862,41 +3903,43 @@ default_make_symbol_completion_list (cha
|
||||
@@ -3865,41 +3906,43 @@ default_make_symbol_completion_list (cha
|
||||
}
|
||||
|
||||
/* Search upwards from currently selected frame (so that we can
|
||||
@ -2358,7 +2350,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
|
||||
/* Go through the symtabs and check the externs and statics for
|
||||
symbols which match. */
|
||||
@@ -3915,9 +3958,6 @@ default_make_symbol_completion_list (cha
|
||||
@@ -3918,9 +3961,6 @@ default_make_symbol_completion_list (cha
|
||||
{
|
||||
QUIT;
|
||||
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
|
||||
@ -2368,7 +2360,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
ALL_BLOCK_SYMBOLS (b, iter, sym)
|
||||
{
|
||||
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
|
||||
@@ -4384,6 +4424,25 @@ skip_prologue_using_sal (CORE_ADDR func_
|
||||
@@ -4387,6 +4427,25 @@ skip_prologue_using_sal (CORE_ADDR func_
|
||||
line mark the prologue -> body transition. */
|
||||
if (sal.line >= prologue_sal.line)
|
||||
break;
|
||||
@ -2396,9 +2388,9 @@ Index: gdb-6.8.50.20090302/gdb/symtab.c
|
||||
the function looking for address ranges whose
|
||||
Index: gdb-6.8.50.20090302/gdb/symtab.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symtab.h 2009-04-13 22:19:47.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/symtab.h 2009-04-13 22:22:01.000000000 +0200
|
||||
@@ -562,9 +562,18 @@ struct symbol
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symtab.h 2009-05-09 21:27:09.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/symtab.h 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -565,9 +565,18 @@ struct symbol
|
||||
|
||||
unsigned is_argument : 1;
|
||||
|
||||
@ -2420,7 +2412,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.h
|
||||
|
||||
unsigned short line;
|
||||
|
||||
@@ -595,6 +604,7 @@ struct symbol
|
||||
@@ -598,6 +607,7 @@ struct symbol
|
||||
#define SYMBOL_DOMAIN(symbol) (symbol)->domain
|
||||
#define SYMBOL_CLASS(symbol) (symbol)->aclass
|
||||
#define SYMBOL_IS_ARGUMENT(symbol) (symbol)->is_argument
|
||||
@ -2431,7 +2423,7 @@ Index: gdb-6.8.50.20090302/gdb/symtab.h
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/break.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.base/break.exp 2009-01-19 20:05:01.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/break.exp 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/break.exp 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -880,6 +880,13 @@ gdb_expect {
|
||||
# marker4() is defined at line 46 when compiled with -DPROTOTYPES
|
||||
pass "run until breakpoint set at small function, optimized file (line bp_location14)"
|
||||
@ -2449,7 +2441,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/break.exp
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.cp/annota2.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.cp/annota2.exp 2009-01-03 06:58:04.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.cp/annota2.exp 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.cp/annota2.exp 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -119,10 +119,11 @@ gdb_expect {
|
||||
# continue until exit
|
||||
# this will test:
|
||||
@ -2466,7 +2458,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.cp/annota2.exp
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.c 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,47 @@
|
||||
+/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2518,7 +2510,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.c
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.exp 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.exp 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,63 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2586,7 +2578,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.exp
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.c 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,85 @@
|
||||
+/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2676,7 +2668,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.c
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,279 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2960,7 +2952,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.c 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,52 @@
|
||||
+/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -3017,7 +3009,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.c
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.exp 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.exp 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,118 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -3140,7 +3132,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.exp
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-markers.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-markers.c 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-markers.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -0,0 +1,36 @@
|
||||
+/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -3180,8 +3172,8 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-markers.c
|
||||
+}
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/testsuite/lib/gdb.exp 2009-04-13 22:19:50.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/lib/gdb.exp 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/testsuite/lib/gdb.exp 2009-05-09 21:27:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/lib/gdb.exp 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -1474,6 +1474,37 @@ proc skip_hp_tests {} {
|
||||
return $skip_hp
|
||||
}
|
||||
@ -3222,8 +3214,8 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/lib/gdb.exp
|
||||
set hp_cc_compiler 0
|
||||
Index: gdb-6.8.50.20090302/gdb/valops.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/valops.c 2009-04-13 22:19:48.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/valops.c 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/valops.c 2009-05-09 21:27:10.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/valops.c 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -1072,7 +1072,7 @@ value_of_variable (struct symbol *var, s
|
||||
frame = block_innermost_frame (b);
|
||||
if (!frame)
|
||||
@ -3235,8 +3227,8 @@ Index: gdb-6.8.50.20090302/gdb/valops.c
|
||||
SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)));
|
||||
Index: gdb-6.8.50.20090302/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/Makefile.in 2009-04-13 22:19:49.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/Makefile.in 2009-04-13 22:22:01.000000000 +0200
|
||||
--- gdb-6.8.50.20090302.orig/gdb/Makefile.in 2009-05-09 21:27:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/Makefile.in 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -667,6 +667,7 @@ SFILES = ada-exp.y ada-lang.c ada-typepr
|
||||
inf-loop.c \
|
||||
infcall.c \
|
||||
@ -3256,7 +3248,7 @@ Index: gdb-6.8.50.20090302/gdb/Makefile.in
|
||||
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.opt/Makefile.in 2008-04-18 01:06:54.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/Makefile.in 2009-04-13 22:22:01.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/Makefile.in 2009-05-09 21:27:23.000000000 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
747
gdb-6.8.50.20090302-upstream.patch
Executable file
747
gdb-6.8.50.20090302-upstream.patch
Executable file
@ -0,0 +1,747 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2009-06/msg00076.html
|
||||
|
||||
gdb/
|
||||
2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
|
||||
|
||||
* infcall.c (show_unwind_on_terminating_exception_p): New
|
||||
function.
|
||||
(call_function_by_hand): Create breakpoint and clean-up call for
|
||||
std::terminate.breakpoint. Add unwind_on_terminating_exception_p
|
||||
gate. Pop frame on breakpoint hit.
|
||||
(_initialize_infcall): Add add_setshow_boolean_cmd for
|
||||
unwind-on-terminating-exception.
|
||||
|
||||
gdb/doc/
|
||||
2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
|
||||
|
||||
* doc/gdb.texinfo (Calling): Document
|
||||
set-unwind-on-terminating-exception usage.
|
||||
|
||||
gdb/testsuite/
|
||||
2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
|
||||
|
||||
* gdb.cp/gdb2495.cc: New file.
|
||||
* gdb.cp/gdb2495.exp: New file.
|
||||
|
||||
--- src/gdb/infcall.c 2009/05/28 00:53:51 1.114
|
||||
+++ src/gdb/infcall.c 2009/06/15 12:11:36 1.115
|
||||
@@ -98,6 +98,30 @@
|
||||
value);
|
||||
}
|
||||
|
||||
+/* This boolean tells what gdb should do if a std::terminate call is
|
||||
+ made while in a function called from gdb (call dummy).
|
||||
+ As the confines of a single dummy stack prohibit out-of-frame
|
||||
+ handlers from handling a raised exception, and as out-of-frame
|
||||
+ handlers are common in C++, this can lead to no handler being found
|
||||
+ by the unwinder, and a std::terminate call. This is a false positive.
|
||||
+ If set, gdb unwinds the stack and restores the context to what it
|
||||
+ was before the call.
|
||||
+
|
||||
+ The default is to unwind the frame if a std::terminate call is
|
||||
+ made. */
|
||||
+
|
||||
+static int unwind_on_terminating_exception_p = 1;
|
||||
+
|
||||
+static void
|
||||
+show_unwind_on_terminating_exception_p (struct ui_file *file, int from_tty,
|
||||
+ struct cmd_list_element *c,
|
||||
+ const char *value)
|
||||
+
|
||||
+{
|
||||
+ fprintf_filtered (file, _("\
|
||||
+Unwind stack if a C++ exception is unhandled while in a call dummy is %s.\n"),
|
||||
+ value);
|
||||
+}
|
||||
|
||||
/* Perform the standard coercions that are specified
|
||||
for arguments to be passed to C or Ada functions.
|
||||
@@ -416,6 +440,8 @@
|
||||
struct cleanup *args_cleanup;
|
||||
struct frame_info *frame;
|
||||
struct gdbarch *gdbarch;
|
||||
+ struct breakpoint *terminate_bp = NULL;
|
||||
+ struct minimal_symbol *tm;
|
||||
ptid_t call_thread_ptid;
|
||||
struct gdb_exception e;
|
||||
const char *name;
|
||||
@@ -716,6 +742,27 @@
|
||||
bpt->disposition = disp_del;
|
||||
}
|
||||
|
||||
+ /* Create a breakpoint in std::terminate.
|
||||
+ If a C++ exception is raised in the dummy-frame, and the
|
||||
+ exception handler is (normally, and expected to be) out-of-frame,
|
||||
+ the default C++ handler will (wrongly) be called in an inferior
|
||||
+ function call. This is wrong, as an exception can be normally
|
||||
+ and legally handled out-of-frame. The confines of the dummy frame
|
||||
+ prevent the unwinder from finding the correct handler (or any
|
||||
+ handler, unless it is in-frame). The default handler calls
|
||||
+ std::terminate. This will kill the inferior. Assert that
|
||||
+ terminate should never be called in an inferior function
|
||||
+ call. Place a momentary breakpoint in the std::terminate function
|
||||
+ and if triggered in the call, rewind. */
|
||||
+ if (unwind_on_terminating_exception_p)
|
||||
+ {
|
||||
+ struct minimal_symbol *tm = lookup_minimal_symbol ("std::terminate()",
|
||||
+ NULL, NULL);
|
||||
+ if (tm != NULL)
|
||||
+ terminate_bp = set_momentary_breakpoint_at_pc
|
||||
+ (SYMBOL_VALUE_ADDRESS (tm), bp_breakpoint);
|
||||
+ }
|
||||
+
|
||||
/* Everything's ready, push all the info needed to restore the
|
||||
caller (and identify the dummy-frame) onto the dummy-frame
|
||||
stack. */
|
||||
@@ -726,6 +773,10 @@
|
||||
or discard it. */
|
||||
discard_cleanups (inf_status_cleanup);
|
||||
|
||||
+ /* Register a clean-up for unwind_on_terminating_exception_breakpoint. */
|
||||
+ if (terminate_bp)
|
||||
+ make_cleanup_delete_breakpoint (terminate_bp);
|
||||
+
|
||||
/* - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP -
|
||||
If you're looking to implement asynchronous dummy-frames, then
|
||||
just below is the place to chop this function in two.. */
|
||||
@@ -881,6 +932,38 @@
|
||||
|
||||
if (!stop_stack_dummy)
|
||||
{
|
||||
+
|
||||
+ /* Check if unwind on terminating exception behaviour is on. */
|
||||
+ if (unwind_on_terminating_exception_p)
|
||||
+ {
|
||||
+ /* Check that the breakpoint is our special std::terminate
|
||||
+ breakpoint. If it is, we do not want to kill the inferior
|
||||
+ in an inferior function call. Rewind, and warn the
|
||||
+ user. */
|
||||
+
|
||||
+ if (terminate_bp != NULL
|
||||
+ && (inferior_thread()->stop_bpstat->breakpoint_at->address
|
||||
+ == terminate_bp->loc->address))
|
||||
+ {
|
||||
+ /* We must get back to the frame we were before the
|
||||
+ dummy call. */
|
||||
+ dummy_frame_pop (dummy_id);
|
||||
+
|
||||
+ /* We also need to restore inferior status to that before the
|
||||
+ dummy call. */
|
||||
+ restore_inferior_status (inf_status);
|
||||
+
|
||||
+ error (_("\
|
||||
+The program being debugged entered a std::terminate call, most likely\n\
|
||||
+caused by an unhandled C++ exception. GDB blocked this call in order\n\
|
||||
+to prevent the program from being terminated, and has restored the\n\
|
||||
+context to its original state before the call.\n\
|
||||
+To change this behaviour use \"set unwind-on-terminating-exception off\".\n\
|
||||
+Evaluation of the expression containing the function (%s)\n\
|
||||
+will be abandoned."),
|
||||
+ name);
|
||||
+ }
|
||||
+ }
|
||||
/* We hit a breakpoint inside the FUNCTION.
|
||||
Keep the dummy frame, the user may want to examine its state.
|
||||
Discard inferior status, we're not at the same point
|
||||
@@ -989,4 +1072,19 @@
|
||||
NULL,
|
||||
show_unwind_on_signal_p,
|
||||
&setlist, &showlist);
|
||||
+
|
||||
+ add_setshow_boolean_cmd ("unwind-on-terminating-exception", no_class,
|
||||
+ &unwind_on_terminating_exception_p, _("\
|
||||
+Set unwinding of stack if std::terminate is called while in call dummy."), _("\
|
||||
+Show unwinding of stack if std::terminate() is called while in a call dummy."), _("\
|
||||
+The unwind on terminating exception flag lets the user determine\n\
|
||||
+what gdb should do if a std::terminate() call is made from the\n\
|
||||
+default exception handler. If set, gdb unwinds the stack and restores\n\
|
||||
+the context to what it was before the call. If unset, gdb allows the\n\
|
||||
+std::terminate call to proceed.\n\
|
||||
+The default is to unwind the frame."),
|
||||
+ NULL,
|
||||
+ show_unwind_on_terminating_exception_p,
|
||||
+ &setlist, &showlist);
|
||||
+
|
||||
}
|
||||
--- src/gdb/doc/gdb.texinfo 2009/06/11 11:57:46 1.599
|
||||
+++ src/gdb/doc/gdb.texinfo 2009/06/15 12:11:36 1.600
|
||||
@@ -12895,6 +12895,16 @@
|
||||
the function, or if you passed it incorrect arguments). What happens
|
||||
in that case is controlled by the @code{set unwindonsignal} command.
|
||||
|
||||
+Similarly, with a C@t{++} program it is possible for the function you
|
||||
+call via the @code{print} or @code{call} command to generate an
|
||||
+exception that is not handled due to the constraints of the dummy
|
||||
+frame. In this case, any exception that is raised in the frame, but has
|
||||
+an out-of-frame exception handler will not be found. GDB builds a
|
||||
+dummy-frame for the inferior function call, and the unwinder cannot
|
||||
+seek for exception handlers outside of this dummy-frame. What happens
|
||||
+in that case is controlled by the
|
||||
+@code{set unwind-on-terminating-exception} command.
|
||||
+
|
||||
@table @code
|
||||
@item set unwindonsignal
|
||||
@kindex set unwindonsignal
|
||||
@@ -12911,6 +12921,23 @@
|
||||
@kindex show unwindonsignal
|
||||
Show the current setting of stack unwinding in the functions called by
|
||||
@value{GDBN}.
|
||||
+
|
||||
+@item set unwind-on-terminating-exception
|
||||
+@kindex set unwind-on-terminating-exception
|
||||
+@cindex unwind stack in called functions with unhandled exceptions
|
||||
+@cindex call dummy stack unwinding on unhandled exception.
|
||||
+Set unwinding of the stack if a C@t{++} exception is raised, but left
|
||||
+unhandled while in a function that @value{GDBN} called in the program being
|
||||
+debugged. If set to on (the default), @value{GDBN} unwinds the stack
|
||||
+it created for the call and restores the context to what it was before
|
||||
+the call. If set to off, @value{GDBN} the exception is delivered to
|
||||
+the default C@t{++} exception handler and the inferior terminated.
|
||||
+
|
||||
+@item show unwind-on-terminating-exception
|
||||
+@kindex show unwind-on-terminating-exception
|
||||
+Show the current setting of stack unwinding in the functions called by
|
||||
+@value{GDBN}.
|
||||
+
|
||||
@end table
|
||||
|
||||
@cindex weak alias functions
|
||||
--- src/gdb/testsuite/gdb.cp/gdb2495.cc
|
||||
+++ src/gdb/testsuite/gdb.cp/gdb2495.cc 2009-06-16 12:49:45.874202000 +0000
|
||||
@@ -0,0 +1,89 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2009 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/>.
|
||||
+ */
|
||||
+
|
||||
+#include <iostream>
|
||||
+#include <signal.h>
|
||||
+
|
||||
+using namespace std;
|
||||
+
|
||||
+class SimpleException
|
||||
+{
|
||||
+
|
||||
+public:
|
||||
+
|
||||
+ void raise_signal (int dummy)
|
||||
+ {
|
||||
+ if (dummy > 0)
|
||||
+ raise(SIGABRT);
|
||||
+ }
|
||||
+
|
||||
+ int no_throw_function ()
|
||||
+ {
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ void throw_function ()
|
||||
+ {
|
||||
+ throw 1;
|
||||
+ }
|
||||
+
|
||||
+ int throw_function_with_handler ()
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ throw 1;
|
||||
+ }
|
||||
+ catch (...)
|
||||
+ {
|
||||
+ cout << "Handled" << endl;
|
||||
+ }
|
||||
+
|
||||
+ return 2;
|
||||
+ }
|
||||
+
|
||||
+ void call_throw_function_no_handler ()
|
||||
+ {
|
||||
+ throw_function ();
|
||||
+ }
|
||||
+
|
||||
+ void call_throw_function_handler ()
|
||||
+ {
|
||||
+ throw_function_with_handler ();
|
||||
+ }
|
||||
+};
|
||||
+SimpleException exceptions;
|
||||
+
|
||||
+int
|
||||
+main()
|
||||
+{
|
||||
+ /* Have to call these functions so GCC does not optimize them
|
||||
+ away. */
|
||||
+ exceptions.raise_signal (-1);
|
||||
+ exceptions.no_throw_function ();
|
||||
+ exceptions.throw_function_with_handler ();
|
||||
+ exceptions.call_throw_function_handler ();
|
||||
+ try
|
||||
+ {
|
||||
+ exceptions.throw_function ();
|
||||
+ exceptions.call_throw_function_no_handler ();
|
||||
+ }
|
||||
+ catch (...)
|
||||
+ {
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
--- src/gdb/testsuite/gdb.cp/gdb2495.exp
|
||||
+++ src/gdb/testsuite/gdb.cp/gdb2495.exp 2009-06-16 12:49:46.889492000 +0000
|
||||
@@ -0,0 +1,157 @@
|
||||
+# Copyright 2009 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/>.
|
||||
+
|
||||
+
|
||||
+# In gdb inferior function calls, if a C++ exception is raised in the
|
||||
+# dummy-frame, and the exception handler is (normally, and expected to
|
||||
+# be) out-of-frame, the default C++ handler will (wrongly) be called
|
||||
+# in an inferior function call.
|
||||
+# This is incorrect as an exception can normally and legally be handled
|
||||
+# out-of-frame. The confines of the dummy frame prevent the unwinder
|
||||
+# from finding the correct handler (or any handler, unless it is
|
||||
+# in-frame). The default handler calls std::terminate. This will kill
|
||||
+# the inferior. Assert that terminate should never be called in an
|
||||
+# inferior function call. These tests test the functionality around
|
||||
+# unwinding that sequence and also tests the flag behaviour gating this
|
||||
+# functionality.
|
||||
+
|
||||
+# This test is largely based of gdb.base/callfuncs.exp.
|
||||
+
|
||||
+if $tracelevel then {
|
||||
+ strace $tracelevel
|
||||
+}
|
||||
+
|
||||
+if { [skip_cplus_tests] } { continue }
|
||||
+
|
||||
+set prms_id 2495
|
||||
+set bug_id 0
|
||||
+
|
||||
+set testfile "gdb2495"
|
||||
+set srcfile ${testfile}.cc
|
||||
+set binfile $objdir/$subdir/$testfile
|
||||
+
|
||||
+# Create and source the file that provides information about the compiler
|
||||
+# used to compile the test case.
|
||||
+if [get_compiler_info ${binfile} "c++"] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
|
||||
+ untested gdb2495.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Some targets can't do function calls, so don't even bother with this
|
||||
+# test.
|
||||
+if [target_info exists gdb,cannot_call_functions] {
|
||||
+ setup_xfail "*-*-*" 2416
|
||||
+ fail "This target can not call functions"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+if ![runto_main] then {
|
||||
+ perror "couldn't run to main"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+# See http://sourceware.org/gdb/bugs/2495
|
||||
+
|
||||
+# Test normal baseline behaviour. Call a function that
|
||||
+# does not raise an exception.
|
||||
+gdb_test "p exceptions.no_throw_function()" " = 1"
|
||||
+# And one that does but handles it in-frame.
|
||||
+gdb_test "p exceptions.throw_function_with_handler()" " = 2"
|
||||
+# Both should return normally.
|
||||
+
|
||||
+# Test basic unwind. Call a function that raises an exception but
|
||||
+# does not handle it. It should be rewound.
|
||||
+gdb_test "p exceptions.throw_function()" \
|
||||
+ "The program being debugged entered a std::terminate call, .*" \
|
||||
+ "Call a function that raises an exception without a handler."
|
||||
+
|
||||
+# Make sure that after rewinding we are back at the call parent.
|
||||
+gdb_test "bt" \
|
||||
+ "#0 main.*" \
|
||||
+ "bt after returning from a popped frame"
|
||||
+
|
||||
+# Make sure the only breakpoint is the one set via the runto_main
|
||||
+# call and that the std::terminate breakpoint has evaporated and
|
||||
+# cleaned-up.
|
||||
+gdb_test "info breakpoints" \
|
||||
+ "gdb.cp/gdb2495\.cc.*"
|
||||
+
|
||||
+# Turn off this new behaviour.
|
||||
+gdb_test_multiple "set unwind-on-terminating-exception off" \
|
||||
+ "Turn unwind-on-terminating-exception off" {
|
||||
+ -re "$gdb_prompt $" {pass "set unwinn-on-terminating-exception off"}
|
||||
+ timeout {fail "(timeout) set unwind-on-terminating-exception off"}
|
||||
+}
|
||||
+
|
||||
+# Check that it is turned off.
|
||||
+gdb_test "show unwind-on-terminating-exception" \
|
||||
+ "exception is unhandled while in a call dummy is off.*" \
|
||||
+ "Turn off unwind on terminating exception flag"
|
||||
+
|
||||
+# Check that the old behaviour is restored.
|
||||
+gdb_test "p exceptions.throw_function()" \
|
||||
+ "The program being debugged was signaled while in a function called .*" \
|
||||
+ "Call a function that raises an exception with unwinding off.."
|
||||
+
|
||||
+# Restart the inferior back at main.
|
||||
+if ![runto_main] then {
|
||||
+ perror "couldn't run to main"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+
|
||||
+# Check to see if the new behaviour alters the unwind signal
|
||||
+# behaviour; it should not. Test both on and off states.
|
||||
+
|
||||
+# Turn on unwind on signal behaviour.
|
||||
+gdb_test_multiple "set unwindonsignal on" "Turn unwindonsignal on" {
|
||||
+ -re "$gdb_prompt $" {pass "set unwindonsignal on"}
|
||||
+ timeout {fail "(timeout) set unwindonsignal on"}
|
||||
+}
|
||||
+
|
||||
+# Check that it is turned on.
|
||||
+gdb_test "show unwindonsignal" \
|
||||
+ "signal is received while in a call dummy is on.*" \
|
||||
+ "Turn on unwind on signal"
|
||||
+
|
||||
+# Check to see if new behaviour interferes with
|
||||
+# normal signal handling in inferior function calls.
|
||||
+gdb_test "p exceptions.raise_signal(1)" \
|
||||
+ "To change this behavior use \"set unwindonsignal off\".*"
|
||||
+
|
||||
+# And reverse - turn off again.
|
||||
+gdb_test_multiple "set unwindonsignal off" "Turn unwindonsignal off" {
|
||||
+ -re "$gdb_prompt $" {pass "set unwindonsignal off"}
|
||||
+ timeout {fail "(timeout) set unwindonsignal off"}
|
||||
+}
|
||||
+
|
||||
+# Check that it is actually turned off.
|
||||
+gdb_test "show unwindonsignal" \
|
||||
+ "signal is received while in a call dummy is off.*" \
|
||||
+ "Turn off unwind on signal"
|
||||
+
|
||||
+# Check to see if new behaviour interferes with
|
||||
+# normal signal handling in inferior function calls.
|
||||
+gdb_test "p exceptions.raise_signal(1)" \
|
||||
+ "To change this behavior use \"set unwindonsignal on\".*"
|
||||
--- src/gdb/testsuite/gdb.cp/Makefile.in 2009/02/03 01:09:01 1.5
|
||||
+++ src/gdb/testsuite/gdb.cp/Makefile.in 2009/06/15 12:11:37 1.6
|
||||
@@ -4,7 +4,7 @@
|
||||
EXECUTABLES = ambiguous annota2 anon-union cplusfuncs cttiadd \
|
||||
derivation inherit local member-ptr method misc \
|
||||
overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace \
|
||||
- ref-types ref-params method2 pr9594
|
||||
+ ref-types ref-params method2 pr9594 gdb2495
|
||||
|
||||
all info install-info dvi install uninstall installcheck check:
|
||||
@echo "Nothing to be done for $@..."
|
||||
|
||||
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=471819
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2009-06/msg00837.html
|
||||
http://sourceware.org/ml/gdb-cvs/2009-06/msg00194.html
|
||||
|
||||
gdb/
|
||||
2009-06-29 Pedro Alves <pedro@codesourcery.com>
|
||||
|
||||
* infrun.c (handle_inferior_event): Context switch to the new
|
||||
thread when resuming for a new_thread_event.
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2009-06/msg00841.html
|
||||
http://sourceware.org/ml/gdb-cvs/2009-06/msg00195.html
|
||||
|
||||
gdb/testsuite/
|
||||
2009-06-29 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/current-lwp-dead.exp, gdb.threads/current-lwp-dead.c: New.
|
||||
|
||||
--- src/gdb/infrun.c 2009/06/28 00:20:22 1.396
|
||||
+++ src/gdb/infrun.c 2009/06/29 18:27:23 1.397
|
||||
@@ -2746,6 +2746,8 @@
|
||||
in either the OS or the native code). Therefore we need to
|
||||
continue all threads in order to make progress. */
|
||||
|
||||
+ if (!ptid_equal (ecs->ptid, inferior_ptid))
|
||||
+ context_switch (ecs->ptid);
|
||||
target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
|
||||
prepare_to_wait (ecs);
|
||||
return;
|
||||
--- src/gdb/testsuite/gdb.threads/current-lwp-dead.c
|
||||
+++ src/gdb/testsuite/gdb.threads/current-lwp-dead.c 2009-06-29 18:59:59.860807000 +0000
|
||||
@@ -0,0 +1,75 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2009 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/>.
|
||||
+
|
||||
+ Do not use threads as we need to exploit a bug in LWP code masked by the
|
||||
+ threads code otherwise.
|
||||
+
|
||||
+ INFERIOR_PTID must point to exited LWP. Here we use the initial LWP as it
|
||||
+ is automatically INFERIOR_PTID for GDB.
|
||||
+
|
||||
+ Finally we need to call target_resume (RESUME_ALL, ...) which we invoke by
|
||||
+ NEW_THREAD_EVENT (called from the new LWP as initial LWP is exited now). */
|
||||
+
|
||||
+#define _GNU_SOURCE
|
||||
+#include <sched.h>
|
||||
+#include <assert.h>
|
||||
+#include <unistd.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+#define STACK_SIZE 0x1000
|
||||
+
|
||||
+static int
|
||||
+fn_return (void *unused)
|
||||
+{
|
||||
+ return 0; /* at-fn_return */
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+fn (void *unused)
|
||||
+{
|
||||
+ int i;
|
||||
+ unsigned char *stack;
|
||||
+ int new_pid;
|
||||
+
|
||||
+ i = sleep (1);
|
||||
+ assert (i == 0);
|
||||
+
|
||||
+ stack = malloc (STACK_SIZE);
|
||||
+ assert (stack != NULL);
|
||||
+
|
||||
+ new_pid = clone (fn_return, stack + STACK_SIZE, CLONE_FILES | CLONE_VM, NULL,
|
||||
+ NULL, NULL, NULL);
|
||||
+ assert (new_pid > 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ unsigned char *stack;
|
||||
+ int new_pid;
|
||||
+
|
||||
+ stack = malloc (STACK_SIZE);
|
||||
+ assert (stack != NULL);
|
||||
+
|
||||
+ new_pid = clone (fn, stack + STACK_SIZE, CLONE_FILES | CLONE_VM, NULL, NULL,
|
||||
+ NULL, NULL);
|
||||
+ assert (new_pid > 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--- src/gdb/testsuite/gdb.threads/current-lwp-dead.exp
|
||||
+++ src/gdb/testsuite/gdb.threads/current-lwp-dead.exp 2009-06-29 19:00:01.014652000 +0000
|
||||
@@ -0,0 +1,31 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2009 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@gnu.org
|
||||
+
|
||||
+if { [prepare_for_testing current-lwp-dead.exp current-lwp-dead] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if {[runto_main] <= 0} {
|
||||
+ untested current-lwp-dead.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint "fn_return"
|
||||
+gdb_continue_to_breakpoint "fn_return" ".*at-fn_return.*"
|
||||
|
||||
|
||||
|
||||
[patch] testsuite: Fix multiple runs in parallel on a single host
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2009-07/msg00008.html
|
||||
http://sourceware.org/ml/gdb-cvs/2009-07/msg00051.html
|
||||
|
||||
2009-07-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* lib/gdbserver-support.exp (gdbserver_start): Loop spawning
|
||||
gdbserver increasing $portnum if "Can't bind address" has been seen.
|
||||
|
||||
--- src/gdb/testsuite/lib/gdbserver-support.exp 2009/01/03 05:58:08 1.14
|
||||
+++ src/gdb/testsuite/lib/gdbserver-support.exp 2009/07/06 18:51:10 1.15
|
||||
@@ -209,26 +209,39 @@
|
||||
|
||||
set gdbserver [find_gdbserver]
|
||||
|
||||
- # Export the host:port pair.
|
||||
- set gdbport $debughost$portnum
|
||||
-
|
||||
- # Fire off the debug agent.
|
||||
- set gdbserver_command "$gdbserver"
|
||||
- if { $options != "" } {
|
||||
- append gdbserver_command " $options"
|
||||
- }
|
||||
- append gdbserver_command " :$portnum"
|
||||
- if { $arguments != "" } {
|
||||
- append gdbserver_command " $arguments"
|
||||
- }
|
||||
+ # Loop till we find a free port.
|
||||
+ while 1 {
|
||||
+ # Export the host:port pair.
|
||||
+ set gdbport $debughost$portnum
|
||||
+
|
||||
+ # Fire off the debug agent.
|
||||
+ set gdbserver_command "$gdbserver"
|
||||
+ if { $options != "" } {
|
||||
+ append gdbserver_command " $options"
|
||||
+ }
|
||||
+ append gdbserver_command " :$portnum"
|
||||
+ if { $arguments != "" } {
|
||||
+ append gdbserver_command " $arguments"
|
||||
+ }
|
||||
|
||||
- set server_spawn_id [remote_spawn target $gdbserver_command]
|
||||
+ set server_spawn_id [remote_spawn target $gdbserver_command]
|
||||
|
||||
- # Wait for the server to open its TCP socket, so that GDB can connect.
|
||||
- expect {
|
||||
- -i $server_spawn_id
|
||||
- -notransfer
|
||||
- -re "Listening on" { }
|
||||
+ # Wait for the server to open its TCP socket, so that GDB can connect.
|
||||
+ expect {
|
||||
+ -i $server_spawn_id
|
||||
+ -notransfer
|
||||
+ -re "Listening on" { }
|
||||
+ -re "Can't bind address: Address already in use\\.\r\n" {
|
||||
+ verbose -log "Port $portnum is already in use."
|
||||
+ if ![target_info exists gdb,socketport] {
|
||||
+ # Bump the port number to avoid the conflict.
|
||||
+ wait -i $expect_out(spawn_id)
|
||||
+ incr portnum
|
||||
+ continue
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ break
|
||||
}
|
||||
|
||||
# We can't just call close, because if gdbserver is local then that means
|
||||
|
||||
|
||||
|
||||
http://sourceware.org/ml/gdb-cvs/2009-06/msg00203.html
|
||||
|
||||
2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Remove racy FAILs relying just on the timeouts.
|
||||
* gdb.base/setshow.exp (set annotate 2, show annotate (2))
|
||||
(annotation_level 2): Remove racy FAILs.
|
||||
|
||||
--- src/gdb/testsuite/gdb.base/setshow.exp 2009/01/03 05:58:03 1.10
|
||||
+++ src/gdb/testsuite/gdb.base/setshow.exp 2009/06/30 18:28:12 1.11
|
||||
@@ -60,7 +60,6 @@
|
||||
gdb_expect {
|
||||
-re ".*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \
|
||||
{ pass "set annotate 2" }
|
||||
- -re ".*$gdb_prompt $" { fail "set annotate 2" }
|
||||
timeout { fail "(timeout) set annotate 2" }
|
||||
}
|
||||
|
||||
@@ -68,7 +67,6 @@
|
||||
gdb_expect {
|
||||
-re ".*\032\032post-prompt.*Annotation_level is 2..*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \
|
||||
{ pass "show annotate (2)" }
|
||||
- -re ".*$gdb_prompt $" { fail "show annotate (2)" }
|
||||
timeout { fail "(timeout) show annotate (2)" }
|
||||
}
|
||||
|
||||
@@ -77,7 +75,6 @@
|
||||
gdb_expect {
|
||||
-re ".*\032\032post-prompt.*Line 1 of .* is at address .* but contains no code.*:1:0:beg:0x.*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \
|
||||
{ pass "annotation_level 2" }
|
||||
- -re ".*$gdb_prompt $" { fail "annotation_level 2" }
|
||||
timeout { fail "(timeout) annotation_level 2" }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
http://sourceware.org/ml/gdb-cvs/2009-06/msg00204.html
|
||||
|
||||
2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* lib/mi-support.exp (mi_check_thread_states): Permit any output before
|
||||
the expected result record.
|
||||
|
||||
--- src/gdb/testsuite/lib/mi-support.exp 2009/05/28 01:09:20 1.84
|
||||
+++ src/gdb/testsuite/lib/mi-support.exp 2009/06/30 20:23:05 1.85
|
||||
@@ -1808,7 +1808,7 @@
|
||||
proc mi_check_thread_states { xstates test } {
|
||||
global expect_out
|
||||
set states [mi_reverse_list $xstates]
|
||||
- set pattern "\\^done,threads=\\\["
|
||||
+ set pattern ".*\\^done,threads=\\\["
|
||||
foreach s $states {
|
||||
set pattern "${pattern}(.*)state=\"$s\""
|
||||
}
|
1949
gdb-archer.patch
1949
gdb-archer.patch
File diff suppressed because it is too large
Load Diff
76
gdb-bz507267-block-sort-fast.patch
Normal file
76
gdb-bz507267-block-sort-fast.patch
Normal file
@ -0,0 +1,76 @@
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=507267
|
||||
|
||||
--- gdb-6.8.50.20090302/gdb/buildsym.c-orig 2009-06-22 15:20:39.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/buildsym.c 2009-06-22 17:50:54.000000000 +0200
|
||||
@@ -900,6 +900,19 @@ watch_main_source_file_lossage (void)
|
||||
}
|
||||
}
|
||||
|
||||
+/* Helper function for qsort. Parametes are `struct block *' pointers,
|
||||
+ function sorts them in descending order by their BLOCK_START. */
|
||||
+
|
||||
+static int
|
||||
+block_compar (const void *ap, const void *bp)
|
||||
+{
|
||||
+ const struct block *a = *(const struct block **) ap;
|
||||
+ const struct block *b = *(const struct block **) bp;
|
||||
+
|
||||
+ return (BLOCK_START (b) > BLOCK_START (a))
|
||||
+ - (BLOCK_START (b) < BLOCK_START (a));
|
||||
+}
|
||||
+
|
||||
/* Finish the symbol definitions for one main source file, close off
|
||||
all the lexical contexts for that file (creating struct block's for
|
||||
them), then make the struct symtab for that file and put it in the
|
||||
@@ -953,32 +966,28 @@ end_symtab (CORE_ADDR end_addr, struct o
|
||||
OBJF_REORDERED is true, then sort the pending blocks. */
|
||||
if ((objfile->flags & OBJF_REORDERED) && pending_blocks)
|
||||
{
|
||||
- /* FIXME! Remove this horrid bubble sort and use merge sort!!! */
|
||||
- int swapped;
|
||||
- do
|
||||
- {
|
||||
- struct pending_block *pb, *pbnext;
|
||||
+ unsigned count = 0;
|
||||
+ struct pending_block *pb;
|
||||
+ struct block **barray, **bp;
|
||||
+ struct cleanup *back_to;
|
||||
|
||||
- pb = pending_blocks;
|
||||
- pbnext = pb->next;
|
||||
- swapped = 0;
|
||||
+ for (pb = pending_blocks; pb != NULL; pb = pb->next)
|
||||
+ count++;
|
||||
|
||||
- while (pbnext)
|
||||
- {
|
||||
- /* swap blocks if unordered! */
|
||||
+ barray = xmalloc (sizeof (*barray) * count);
|
||||
+ back_to = make_cleanup (xfree, barray);
|
||||
|
||||
- if (BLOCK_START (pb->block) < BLOCK_START (pbnext->block))
|
||||
- {
|
||||
- struct block *tmp = pb->block;
|
||||
- pb->block = pbnext->block;
|
||||
- pbnext->block = tmp;
|
||||
- swapped = 1;
|
||||
- }
|
||||
- pb = pbnext;
|
||||
- pbnext = pbnext->next;
|
||||
- }
|
||||
- }
|
||||
- while (swapped);
|
||||
+ bp = barray;
|
||||
+ for (pb = pending_blocks; pb != NULL; pb = pb->next)
|
||||
+ *bp++ = pb->block;
|
||||
+
|
||||
+ qsort (barray, count, sizeof (*barray), block_compar);
|
||||
+
|
||||
+ bp = barray;
|
||||
+ for (pb = pending_blocks; pb != NULL; pb = pb->next)
|
||||
+ pb->block = *bp++;
|
||||
+
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
|
||||
/* Cleanup any undefined types that have been left hanging around
|
18
gdb-bz508406-vla-type-objfile.patch
Normal file
18
gdb-bz508406-vla-type-objfile.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- ./gdb/gdbtypes.c 2009-08-27 10:33:50.000000000 +0200
|
||||
+++ ./gdb/gdbtypes.c 2009-08-27 10:32:56.000000000 +0200
|
||||
@@ -3127,12 +3127,14 @@ copy_type_recursive_1 (struct objfile *o
|
||||
struct type *new_type;
|
||||
|
||||
if (TYPE_OBJFILE (type) == OBJFILE_INTERNAL
|
||||
- || (objfile == OBJFILE_MALLOC && !TYPE_DYNAMIC (type)))
|
||||
+ || (TYPE_OBJFILE (type) == OBJFILE_MALLOC && !TYPE_DYNAMIC (type)))
|
||||
return type;
|
||||
|
||||
+#if 0 /* Backward compatibility only. */
|
||||
/* This type shouldn't be pointing to any types in other objfiles;
|
||||
if it did, the type might disappear unexpectedly. */
|
||||
gdb_assert (TYPE_OBJFILE (type) == objfile);
|
||||
+#endif
|
||||
|
||||
pair.old = type;
|
||||
slot = htab_find_slot (copied_types, &pair, INSERT);
|
36
gdb-bz533525-catch-crash.patch
Normal file
36
gdb-bz533525-catch-crash.patch
Normal file
@ -0,0 +1,36 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2009-04/msg00204.html
|
||||
http://sourceware.org/ml/gdb-cvs/2009-04/msg00204.html
|
||||
d0194c6e1be20c223824e1b1648b4ff0543b1335
|
||||
|
||||
### src/gdb/ChangeLog 2009/04/29 07:51:32 1.10423
|
||||
### src/gdb/ChangeLog 2009/04/29 19:31:55 1.10424
|
||||
## -1,3 +1,9 @@
|
||||
+2009-04-29 Pedro Alves <pedro@codesourcery.com>
|
||||
+
|
||||
+ * breakpoint.c (print_exception_catchpoint): Access `b' directly
|
||||
+ instead of `b->loc->owner'.
|
||||
+ (print_mention_exception_catchpoint): Ditto.
|
||||
+
|
||||
2009-04-29 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
|
||||
--- src/gdb/breakpoint.c 2009/04/23 22:38:24 1.391
|
||||
+++ src/gdb/breakpoint.c 2009/04/29 19:31:58 1.392
|
||||
@@ -6631,7 +6631,7 @@
|
||||
breakpoint_adjustment_warning (b->loc->requested_address,
|
||||
b->loc->address,
|
||||
b->number, 1);
|
||||
- bp_temp = b->loc->owner->disposition == disp_del;
|
||||
+ bp_temp = b->disposition == disp_del;
|
||||
ui_out_text (uiout,
|
||||
bp_temp ? "Temporary catchpoint "
|
||||
: "Catchpoint ");
|
||||
@@ -6678,7 +6678,7 @@
|
||||
int bp_temp;
|
||||
int bp_throw;
|
||||
|
||||
- bp_temp = b->loc->owner->disposition == disp_del;
|
||||
+ bp_temp = b->disposition == disp_del;
|
||||
bp_throw = strstr (b->addr_string, "throw") != NULL;
|
||||
ui_out_text (uiout, bp_temp ? _("Temporary catchpoint ")
|
||||
: _("Catchpoint "));
|
107
gdb-bz559291-fortran-module-toplevel.patch
Normal file
107
gdb-bz559291-fortran-module-toplevel.patch
Normal file
@ -0,0 +1,107 @@
|
||||
http://sourceware.org/ml/archer/2010-q1/msg00047.html
|
||||
Subject: [fortran-module] [commit] Fix a regression on setting breakpoint at
|
||||
|
||||
[ Backport for F-11. ]
|
||||
|
||||
f5c7672a52316155bc3367cbc2f0e7db22523634
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=559291
|
||||
|
||||
gdb/
|
||||
2010-02-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
David Moore <david.moore@intel.com>
|
||||
* f-lang.c (f_lookup_symbol_nonlocal): Always fallback on
|
||||
basic_lookup_symbol_nonlocal.
|
||||
|
||||
gdb/testsuite/
|
||||
2010-02-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
* gdb.fortran/module.exp (show language, setting breakpoint at module):
|
||||
New.
|
||||
* gdb.fortran/module.f90: New statement program module.
|
||||
|
||||
--- ./gdb/f-lang.c 2010-02-03 01:39:24.000000000 +0100
|
||||
+++ ./gdb/f-lang.c 2010-02-03 01:38:44.000000000 +0100
|
||||
@@ -309,31 +309,32 @@ f_lookup_symbol_nonlocal (const char *na
|
||||
const struct block *block,
|
||||
const domain_enum domain)
|
||||
{
|
||||
- struct fortran_using *use;
|
||||
-
|
||||
- if (!block)
|
||||
- return NULL;
|
||||
-
|
||||
- for (use = BLOCK_FORTRAN_USE (block); use; use = use->next)
|
||||
+ if (block)
|
||||
{
|
||||
- struct symbol *sym;
|
||||
- struct type *type;
|
||||
- struct symbol *retval;
|
||||
-
|
||||
- sym = lookup_symbol_global (use->module_name, NULL, block, MODULE_DOMAIN);
|
||||
-
|
||||
- /* Module name lookup should not fail with correct debug info. */
|
||||
- if (sym == NULL)
|
||||
- continue;
|
||||
-
|
||||
- type = SYMBOL_TYPE (sym);
|
||||
- gdb_assert (TYPE_CODE (type) == TYPE_CODE_MODULE);
|
||||
- gdb_assert (TYPE_MODULE_BLOCK (type) != NULL);
|
||||
-
|
||||
- retval = lookup_block_symbol (TYPE_MODULE_BLOCK (type), name,
|
||||
- linkage_name, domain);
|
||||
- if (retval)
|
||||
- return retval;
|
||||
+ struct fortran_using *use;
|
||||
+
|
||||
+ for (use = BLOCK_FORTRAN_USE (block); use; use = use->next)
|
||||
+ {
|
||||
+ struct symbol *sym;
|
||||
+ struct type *type;
|
||||
+ struct symbol *retval;
|
||||
+
|
||||
+ sym = lookup_symbol_global (use->module_name, NULL, block,
|
||||
+ MODULE_DOMAIN);
|
||||
+
|
||||
+ /* Module name lookup should not fail with correct debug info. */
|
||||
+ if (sym == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ type = SYMBOL_TYPE (sym);
|
||||
+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_MODULE);
|
||||
+ gdb_assert (TYPE_MODULE_BLOCK (type) != NULL);
|
||||
+
|
||||
+ retval = lookup_block_symbol (TYPE_MODULE_BLOCK (type), name,
|
||||
+ linkage_name, domain);
|
||||
+ if (retval)
|
||||
+ return retval;
|
||||
+ }
|
||||
}
|
||||
|
||||
return basic_lookup_symbol_nonlocal (name, linkage_name, block, domain);
|
||||
--- ./gdb/testsuite/gdb.fortran/module.exp 2010-02-03 01:39:25.000000000 +0100
|
||||
+++ ./gdb/testsuite/gdb.fortran/module.exp 2010-02-03 01:34:47.000000000 +0100
|
||||
@@ -43,3 +43,13 @@ gdb_test "print var_b" " = 11"
|
||||
gdb_test "print var_c" "No symbol \"var_c\" in current context\\."
|
||||
gdb_test "print var_d" " = 12"
|
||||
gdb_test "print var_i" " = 14" "print var_i value 14"
|
||||
+
|
||||
+# Breakpoint would work in language "c".
|
||||
+gdb_test "show language" {The current source language is "(auto; currently )?fortran".}
|
||||
+
|
||||
+# gcc-4.4.2: The main program is always MAIN__ in .symtab so "runto" above
|
||||
+# works. But DWARF DW_TAG_subprogram contains the name specified by
|
||||
+# the "program" Fortran statement.
|
||||
+if [gdb_breakpoint "module"] {
|
||||
+ pass "setting breakpoint at module"
|
||||
+}
|
||||
--- ./gdb/testsuite/gdb.fortran/module.f90 2010-02-03 01:39:25.000000000 +0100
|
||||
+++ ./gdb/testsuite/gdb.fortran/module.f90 2010-02-03 01:34:47.000000000 +0100
|
||||
@@ -37,6 +37,8 @@ end module modmany
|
||||
var_i = var_i ! i-is-2
|
||||
end
|
||||
|
||||
+ program module
|
||||
+
|
||||
use modmany, only: var_b, var_d => var_c, var_i
|
||||
|
||||
call sub1
|
44
gdb-charset-crash.patch
Normal file
44
gdb-charset-crash.patch
Normal file
@ -0,0 +1,44 @@
|
||||
http://sourceware.org/ml/gdb-patches/2009-04/msg00356.html
|
||||
http://sourceware.org/ml/gdb-cvs/2009-04/msg00081.html
|
||||
|
||||
gdb/
|
||||
2009-04-15 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
|
||||
|
||||
gdb/testsuite/
|
||||
2009-04-15 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.base/charset.exp: Add regression test.
|
||||
|
||||
--- src/gdb/c-lang.c 2009/04/14 21:54:33 1.64
|
||||
+++ src/gdb/c-lang.c 2009/04/15 21:55:04 1.65
|
||||
@@ -941,7 +941,15 @@
|
||||
*pos += 2;
|
||||
|
||||
if (noside == EVAL_SKIP)
|
||||
- return NULL;
|
||||
+ {
|
||||
+ /* Return a dummy value of the appropriate type. */
|
||||
+ if ((dest_type & C_CHAR) != 0)
|
||||
+ result = allocate_value (type);
|
||||
+ else
|
||||
+ result = value_typed_string ("", 0, type);
|
||||
+ do_cleanups (cleanup);
|
||||
+ return result;
|
||||
+ }
|
||||
|
||||
if ((dest_type & C_CHAR) != 0)
|
||||
{
|
||||
--- src/gdb/testsuite/gdb.base/charset.exp 2009/03/25 19:25:49 1.13
|
||||
+++ src/gdb/testsuite/gdb.base/charset.exp 2009/04/15 21:55:04 1.14
|
||||
@@ -604,4 +604,9 @@
|
||||
test_combination u UCS-2 U UCS-4
|
||||
}
|
||||
|
||||
+# Regression test for a cleanup bug in the charset code.
|
||||
+gdb_test "print 'a' == 'a' || 'b' == 'b'" \
|
||||
+ ".* = 1" \
|
||||
+ "EVAL_SKIP cleanup handling regression test"
|
||||
+
|
||||
gdb_exit
|
255
gdb-delayed-symfile-aranges.patch
Normal file
255
gdb-delayed-symfile-aranges.patch
Normal file
@ -0,0 +1,255 @@
|
||||
archer-tromey-delayed-symfile d0fe3272b8b3b64a9a72912d334a9adca8c66a99
|
||||
archer-tromey-delayed-symfile 77fa7778a37b0d28a7e4e5235f074a10ecf1815d
|
||||
archer-tromey-delayed-symfile <1 check-in after 77fa7778a37b0d28a7e4e5235f074a10ecf1815d>
|
||||
|
||||
[ Backported for F-11. ]
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -1421,9 +1421,28 @@ dwarf2_create_quick_addrmap (struct objfile *objfile)
|
||||
unsigned int bytes_read, segment_size, delta;
|
||||
LONGEST info_offset;
|
||||
struct dwarf2_cu cu;
|
||||
+ char *end_ptr;
|
||||
|
||||
cu_header.initial_length_size = 0;
|
||||
+ end_ptr = aranges_ptr;
|
||||
aranges_ptr = read_comp_unit_head (&cu_header, aranges_ptr, abfd);
|
||||
+ end_ptr += cu_header.initial_length_size + cu_header.length;
|
||||
+
|
||||
+ /* Sanity check. */
|
||||
+ if (end_ptr - aranges_ptr >= dwarf2_per_objfile->aranges_size)
|
||||
+ {
|
||||
+ do_cleanups (old);
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("aranges entry runs off end of `.debug_aranges' section, ignored"));
|
||||
+ return;
|
||||
+ }
|
||||
+ if (cu_header.addr_size == 0)
|
||||
+ {
|
||||
+ do_cleanups (old);
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("aranges entry has zero addr_size, ignored"));
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
segment_size = read_1_byte (abfd, aranges_ptr);
|
||||
aranges_ptr += 1;
|
||||
@@ -1450,9 +1469,30 @@ dwarf2_create_quick_addrmap (struct objfile *objfile)
|
||||
if (address == 0 && length == 0)
|
||||
break;
|
||||
|
||||
+ if (length == 0)
|
||||
+ {
|
||||
+ do_cleanups (old);
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("aranges entry has zero length, ignored"));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
address += baseaddr;
|
||||
|
||||
- addrmap_set_empty (mutable_map, address, address + length, objfile);
|
||||
+ addrmap_set_empty (mutable_map, address, address + length - 1,
|
||||
+ objfile);
|
||||
+ }
|
||||
+
|
||||
+ /* Some older versions of GCC incorrectly started the arange
|
||||
+ with a (0,0) pair. If we encounter any oddity while reading
|
||||
+ the section, just abandon the attempt; falling back to the
|
||||
+ slower code is always safe. */
|
||||
+ if (aranges_ptr != end_ptr)
|
||||
+ {
|
||||
+ do_cleanups (old);
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("aranges entry ends early, ignored"));
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-aranges.S
|
||||
@@ -0,0 +1,140 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2004, 2007, 2008, 2009 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/>. */
|
||||
+
|
||||
+/* Test .debug_aranges containing zero address_size. */
|
||||
+
|
||||
+/* Dummy function to provide debug information for. */
|
||||
+
|
||||
+ .text
|
||||
+.Lbegin_text1:
|
||||
+ .globl main
|
||||
+ .type main, %function
|
||||
+main:
|
||||
+.Lbegin_main:
|
||||
+ .int 0
|
||||
+.Lend_main:
|
||||
+ .size main, .-main
|
||||
+.Lend_text1:
|
||||
+
|
||||
+/* Debug information */
|
||||
+
|
||||
+ .section .debug_info
|
||||
+.Lcu1_begin:
|
||||
+ /* CU header */
|
||||
+ .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
|
||||
+.Lcu1_start:
|
||||
+ .2byte 2 /* DWARF Version */
|
||||
+ .4byte .Labbrev1_begin /* Offset into abbrev section */
|
||||
+ .byte 4 /* Pointer size */
|
||||
+
|
||||
+ /* CU die */
|
||||
+ .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
|
||||
+ .4byte .Lend_text1 /* DW_AT_high_pc */
|
||||
+ .4byte .Lbegin_text1 /* DW_AT_low_pc */
|
||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
||||
+ .byte 1 /* DW_AT_language (C) */
|
||||
+
|
||||
+ /* main */
|
||||
+ .uleb128 2 /* Abbrev: DW_TAG_subprogram */
|
||||
+ .byte 1 /* DW_AT_external */
|
||||
+ .byte 1 /* DW_AT_decl_file */
|
||||
+ .byte 2 /* DW_AT_decl_line */
|
||||
+ .ascii "main\0" /* DW_AT_name */
|
||||
+ .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */
|
||||
+ .4byte .Lbegin_main /* DW_AT_low_pc */
|
||||
+ .4byte .Lend_main /* DW_AT_high_pc */
|
||||
+ .byte 1 /* DW_AT_frame_base: length */
|
||||
+ .byte 0x55 /* DW_AT_frame_base: DW_OP_reg5 */
|
||||
+
|
||||
+.Ltype_int:
|
||||
+ .uleb128 3 /* Abbrev: DW_TAG_base_type */
|
||||
+ .ascii "int\0" /* DW_AT_name */
|
||||
+ .byte 4 /* DW_AT_byte_size */
|
||||
+ .byte 5 /* DW_AT_encoding */
|
||||
+
|
||||
+ .byte 0 /* End of children of CU */
|
||||
+
|
||||
+.Lcu1_end:
|
||||
+
|
||||
+/* Abbrev table */
|
||||
+ .section .debug_abbrev
|
||||
+.Labbrev1_begin:
|
||||
+ .uleb128 1 /* Abbrev code */
|
||||
+ .uleb128 0x11 /* DW_TAG_compile_unit */
|
||||
+ .byte 1 /* has_children */
|
||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x25 /* DW_AT_producer */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x13 /* DW_AT_language */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 2 /* Abbrev code */
|
||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
||||
+ .byte 0 /* has_children */
|
||||
+ .uleb128 0x3f /* DW_AT_external */
|
||||
+ .uleb128 0xc /* DW_FORM_flag */
|
||||
+ .uleb128 0x3a /* DW_AT_decl_file */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3b /* DW_AT_decl_line */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x49 /* DW_AT_type */
|
||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x40 /* DW_AT_frame_base */
|
||||
+ .uleb128 0xa /* DW_FORM_block1 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 3 /* Abbrev code */
|
||||
+ .uleb128 0x24 /* DW_TAG_base_type */
|
||||
+ .byte 0 /* has_children */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0xb /* DW_AT_byte_size */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3e /* DW_AT_encoding */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+/* aranges table */
|
||||
+ .section .debug_aranges
|
||||
+ .long .Laranges_end - 1f
|
||||
+1:
|
||||
+ .2byte 2 /* aranges Version */
|
||||
+ .4byte .Lcu1_begin - .debug_info /* Offset into .debug_info section */
|
||||
+ /* The GDB crasher is this zero value. */
|
||||
+ .byte 0 /* aranges address_size */
|
||||
+ .byte 0 /* aranges segment_size */
|
||||
+
|
||||
+.Laranges_end:
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2004, 2005, 2007, 2008, 2009 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/>.
|
||||
+
|
||||
+# Test .debug_aranges containing zero address_size.
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+# For now pick a sampling of likely targets.
|
||||
+if {![istarget *-*-linux*]
|
||||
+ && ![istarget *-*-gnu*]
|
||||
+ && ![istarget *-*-elf*]
|
||||
+ && ![istarget *-*-openbsd*]
|
||||
+ && ![istarget arm-*-eabi*]
|
||||
+ && ![istarget powerpc-*-eabi*]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "dw2-aranges"
|
||||
+set srcfile ${testfile}.S
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {nodebug}] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+clean_restart $testfile
|
||||
+
|
||||
+# Failed gdb_load would abort the testcase execution earlier.
|
||||
+pass "file loaded"
|
@ -90,6 +90,7 @@ static int spawn (char **argv)
|
||||
termios.c_oflag = 0;
|
||||
termios.c_cflag = CS8 | CREAD | CLOCAL | HUPCL | B9600;
|
||||
termios.c_lflag = IEXTEN | NOFLSH;
|
||||
termios.c_line = 0;
|
||||
memset (termios.c_cc, _POSIX_VDISABLE, sizeof (termios.c_cc));
|
||||
termios.c_cc[VTIME] = 0;
|
||||
termios.c_cc[VMIN ] = 1;
|
||||
|
41
gdb-python-gdbserver-tp-crash.patch
Normal file
41
gdb-python-gdbserver-tp-crash.patch
Normal file
@ -0,0 +1,41 @@
|
||||
commit f19ba6e3238e359f2c147d080f7364fd667d202d
|
||||
Author: Jan Kratochvil <jkratoch@host1.dyn.jankratochvil.net>
|
||||
Date: Sat Aug 1 14:52:19 2009 +0200
|
||||
|
||||
Fix crash with archer-tromey-python vs. FSF GDB HEAD.
|
||||
|
||||
Crashing at least on gdb.server/server-run.exp .
|
||||
|
||||
+ /* FIXME: Workaround archer-tromey-python crash in
|
||||
+ add_inferior_object->get_current_arch on FSF GDB update:
|
||||
+ is_thread_state would assertion check here as
|
||||
+ remote_start_remote->add_inferior_silent->observer_notify_new_inferior is
|
||||
+ before remote_start_remote->add_thread_silent. */
|
||||
|
||||
* frame.c (has_stack_frames): Safely return 0 if INFERIOR_PTID
|
||||
currently has no associated thread.
|
||||
|
||||
Running ../../../gdb/testsuite/gdb.mi/mi-file-transfer.exp ...
|
||||
Executing on host: gcc ../../../gdb/testsuite/gdb.mi/basics.c -g -lm -m32 -o /home/jkratoch/hammock/20090802Build-fedora11/fedora-11-x86_64/build/gdb-6.8.50.20090302/build-x86_64-redhat-linux-gnu/gdb/testsuite.unix.-m32/gdb.mi/basics (timeout = 300)
|
||||
|
||||
~"../../gdb/thread.c:78: internal-error: inferior_thread: Assertion `tp' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? "
|
||||
|
||||
[ Backport for gdb-6.8.50.20090302. ]
|
||||
|
||||
--- gdb-6.8.50.20090302/gdb/frame.c.orig 2009-08-02 05:15:28.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/frame.c 2009-08-02 05:16:59.000000000 +0200
|
||||
@@ -1086,6 +1086,14 @@ has_stack_frames (void)
|
||||
if (!target_has_registers || !target_has_stack || !target_has_memory)
|
||||
return 0;
|
||||
|
||||
+ /* FIXME: Workaround archer-tromey-python crash in
|
||||
+ add_inferior_object->get_current_arch on FSF GDB update:
|
||||
+ is_thread_state would assertion check here as
|
||||
+ remote_start_remote->add_inferior_silent->observer_notify_new_inferior is
|
||||
+ before remote_start_remote->add_thread_silent. */
|
||||
+ if (find_thread_pid (inferior_ptid) == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
/* If the current thread is executing, don't try to read from
|
||||
it. */
|
||||
if (is_executing (inferior_ptid))
|
328
gdb-varobj-revalidate-core.patch
Normal file
328
gdb-varobj-revalidate-core.patch
Normal file
@ -0,0 +1,328 @@
|
||||
Re: [patch] [4/5] Types reference counting [varobj-validation]
|
||||
http://sourceware.org/ml/gdb-patches/2009-04/msg00610.html
|
||||
|
||||
gdb/
|
||||
2009-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Split varobj_invalidate into a two-phased operation.
|
||||
* objfiles.c: Include varobj.h
|
||||
(free_objfile): Call varobj_invalidate.
|
||||
* parser-defs.h (exp_uses_objfile): New prototype.
|
||||
* printcmd.c (display_uses_objfile): Move the EXP checking part to ...
|
||||
* parse.c (exp_uses_objfile): ... a new function here.
|
||||
* symfile.c (new_symfile_objfile): Call varobj_revalidate.
|
||||
(reread_symbols): Call varobj_invalidate and varobj_revalidate.
|
||||
(clear_symtab_users): No longer call varobj_invalidate.
|
||||
* varobj.c: New includes objfiles.h and parser-defs.h.
|
||||
(varobj_invalidate): New parameter `objfile', comment it.
|
||||
New variable `var'. Invalidate any varobj related to `objfile'.
|
||||
Remove unconditional invalidation of local varobjs. Move global
|
||||
varobjs revalidation to ...
|
||||
(varobj_revalidate): ... a new function.
|
||||
* varobj.h (varobj_invalidate): Update the prototype.
|
||||
(varobj_revalidate): New prototype.
|
||||
|
||||
[ Cut the printcmd.c simplification/change. ]
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/objfiles.c 2009-05-10 21:36:30.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/objfiles.c 2009-05-10 21:36:42.000000000 +0200
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "addrmap.h"
|
||||
#include "arch-utils.h"
|
||||
#include "exec.h"
|
||||
+#include "varobj.h"
|
||||
|
||||
/* Prototypes for local functions */
|
||||
|
||||
@@ -409,6 +410,7 @@ free_objfile (struct objfile *objfile)
|
||||
/* Remove any references to this objfile in the global value
|
||||
lists. */
|
||||
preserve_values (objfile);
|
||||
+ varobj_invalidate (objfile);
|
||||
|
||||
/* First do any symbol file specific actions required when we are
|
||||
finished with a particular symbol file. Note that if the objfile
|
||||
Index: gdb-6.8.50.20090302/gdb/parse.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/parse.c 2009-05-10 21:36:29.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/parse.c 2009-05-10 21:36:42.000000000 +0200
|
||||
@@ -1373,6 +1373,45 @@ parser_fprintf (FILE *x, const char *y,
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
+/* Return 1 if EXP uses OBJFILE (and will become dangling when OBJFILE
|
||||
+ is unloaded), otherwise return 0. */
|
||||
+
|
||||
+int
|
||||
+exp_uses_objfile (struct expression *exp, struct objfile *objfile)
|
||||
+{
|
||||
+ int endpos;
|
||||
+ const union exp_element *const elts = exp->elts;
|
||||
+
|
||||
+ for (endpos = exp->nelts; endpos > 0; )
|
||||
+ {
|
||||
+ int i, args, oplen = 0;
|
||||
+
|
||||
+ exp->language_defn->la_exp_desc->operator_length (exp, endpos,
|
||||
+ &oplen, &args);
|
||||
+ gdb_assert (oplen > 0);
|
||||
+
|
||||
+ i = endpos - oplen;
|
||||
+ if (elts[i].opcode == OP_VAR_VALUE)
|
||||
+ {
|
||||
+ const struct block *const block = elts[i + 1].block;
|
||||
+ const struct symbol *const symbol = elts[i + 2].symbol;
|
||||
+ const struct obj_section *const section =
|
||||
+ SYMBOL_OBJ_SECTION (symbol);
|
||||
+
|
||||
+ /* Check objfile where is placed the code touching the variable. */
|
||||
+ if (matching_objfiles (block_objfile (block), objfile))
|
||||
+ return 1;
|
||||
+
|
||||
+ /* Check objfile where the variable itself is placed. */
|
||||
+ if (section && section->objfile == objfile)
|
||||
+ return 1;
|
||||
+ }
|
||||
+ endpos -= oplen;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
void
|
||||
_initialize_parse (void)
|
||||
{
|
||||
Index: gdb-6.8.50.20090302/gdb/parser-defs.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/parser-defs.h 2009-05-10 21:36:27.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/parser-defs.h 2009-05-10 21:36:42.000000000 +0200
|
||||
@@ -299,4 +299,6 @@ extern void print_subexp_standard (struc
|
||||
|
||||
extern void parser_fprintf (FILE *, const char *, ...) ATTR_FORMAT (printf, 2 ,3);
|
||||
|
||||
+extern int exp_uses_objfile (struct expression *exp, struct objfile *objfile);
|
||||
+
|
||||
#endif /* PARSER_DEFS_H */
|
||||
Index: gdb-6.8.50.20090302/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/symfile.c 2009-05-10 21:36:29.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/symfile.c 2009-05-10 21:37:51.000000000 +0200
|
||||
@@ -931,6 +931,8 @@ new_symfile_objfile (struct objfile *obj
|
||||
|
||||
/* We're done reading the symbol file; finish off complaints. */
|
||||
clear_complaints (&symfile_complaints, 0, verbo);
|
||||
+
|
||||
+ varobj_revalidate ();
|
||||
}
|
||||
|
||||
/* A helper function which returns true if OBJFILE has any debug
|
||||
@@ -3261,6 +3263,7 @@ reread_symbols (void)
|
||||
/* Remove any references to this objfile in the global
|
||||
value lists. */
|
||||
preserve_values (objfile);
|
||||
+ varobj_invalidate (objfile);
|
||||
|
||||
/* Nuke all the state that we will re-read. Much of the following
|
||||
code which sets things to NULL really is necessary to tell
|
||||
@@ -3359,6 +3362,7 @@ reread_symbols (void)
|
||||
frameless. */
|
||||
|
||||
reinit_frame_cache ();
|
||||
+ varobj_revalidate ();
|
||||
|
||||
/* Discard cleanups as symbol reading was successful. */
|
||||
discard_cleanups (old_cleanups);
|
||||
@@ -3739,10 +3743,6 @@ clear_symtab_users (void)
|
||||
between expressions and which ought to be reset each time. */
|
||||
expression_context_block = NULL;
|
||||
innermost_block = NULL;
|
||||
-
|
||||
- /* Varobj may refer to old symbols, perform a cleanup. */
|
||||
- varobj_invalidate ();
|
||||
-
|
||||
}
|
||||
|
||||
static void
|
||||
Index: gdb-6.8.50.20090302/gdb/varobj.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/varobj.c 2009-05-10 21:36:27.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/varobj.c 2009-05-10 21:40:55.000000000 +0200
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "gdbcmd.h"
|
||||
#include "block.h"
|
||||
#include "valprint.h"
|
||||
+#include "objfiles.h"
|
||||
+#include "parser-defs.h"
|
||||
|
||||
#include "gdb_assert.h"
|
||||
#include "gdb_string.h"
|
||||
@@ -3272,48 +3274,117 @@ When non-zero, varobj debugging is enabl
|
||||
&setlist, &showlist);
|
||||
}
|
||||
|
||||
-/* Invalidate the varobjs that are tied to locals and re-create the ones that
|
||||
- are defined on globals.
|
||||
+/* Invalidate the varobjs that are tied to the specified OBJFILE. Call this
|
||||
+ function before you start removing OBJFILE.
|
||||
+
|
||||
+ Call varobj_revalidate after the OBJFILEs updates get finished.
|
||||
+
|
||||
Invalidated varobjs will be always printed in_scope="invalid". */
|
||||
+
|
||||
void
|
||||
-varobj_invalidate (void)
|
||||
+varobj_invalidate (struct objfile *objfile)
|
||||
{
|
||||
struct varobj **all_rootvarobj;
|
||||
struct varobj **varp;
|
||||
|
||||
if (varobj_list (&all_rootvarobj) > 0)
|
||||
- {
|
||||
- varp = all_rootvarobj;
|
||||
- while (*varp != NULL)
|
||||
- {
|
||||
- /* Floating varobjs are reparsed on each stop, so we don't care if
|
||||
- the presently parsed expression refers to something that's gone. */
|
||||
- if ((*varp)->root->floating)
|
||||
- continue;
|
||||
-
|
||||
- /* global var must be re-evaluated. */
|
||||
- if ((*varp)->root->valid_block == NULL)
|
||||
- {
|
||||
- struct varobj *tmp_var;
|
||||
-
|
||||
- /* Try to create a varobj with same expression. If we succeed replace
|
||||
- the old varobj, otherwise invalidate it. */
|
||||
- tmp_var = varobj_create (NULL, (*varp)->name, (CORE_ADDR) 0, USE_CURRENT_FRAME);
|
||||
- if (tmp_var != NULL)
|
||||
- {
|
||||
- tmp_var->obj_name = xstrdup ((*varp)->obj_name);
|
||||
- varobj_delete (*varp, NULL, 0);
|
||||
- install_variable (tmp_var);
|
||||
- }
|
||||
- else
|
||||
- (*varp)->root->is_valid = 0;
|
||||
- }
|
||||
- else /* locals must be invalidated. */
|
||||
- (*varp)->root->is_valid = 0;
|
||||
+ {
|
||||
+ varp = all_rootvarobj;
|
||||
+ while (*varp != NULL)
|
||||
+ {
|
||||
+ struct varobj *var = *varp;
|
||||
|
||||
- varp++;
|
||||
- }
|
||||
- }
|
||||
+ /* Floating varobjs are reparsed on each stop, so we don't care if
|
||||
+ the presently parsed expression refers to something that's gone.
|
||||
+ */
|
||||
+ if (var->root->floating)
|
||||
+ continue;
|
||||
+
|
||||
+ if (var->root->is_valid
|
||||
+ && matching_objfiles (block_objfile (var->root->valid_block),
|
||||
+ objfile))
|
||||
+ var->root->is_valid = 0;
|
||||
+
|
||||
+ if (var->root->is_valid
|
||||
+ && exp_uses_objfile (var->root->exp, objfile))
|
||||
+ {
|
||||
+ var->root->is_valid = 0;
|
||||
+
|
||||
+ /* No one touches EXP for !IS_VALID varobj. */
|
||||
+ xfree (var->root->exp);
|
||||
+ var->root->exp = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (var->type && TYPE_OBJFILE (var->type) == objfile)
|
||||
+ {
|
||||
+ if (!var->root->valid_block)
|
||||
+ var->root->is_valid = 0;
|
||||
+ else
|
||||
+ gdb_assert (!var->root->is_valid);
|
||||
+
|
||||
+ var->type = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (var->value
|
||||
+ && TYPE_OBJFILE (value_type (var->value)) == objfile)
|
||||
+ {
|
||||
+ if (!var->root->valid_block)
|
||||
+ var->root->is_valid = 0;
|
||||
+ else
|
||||
+ gdb_assert (!var->root->is_valid);
|
||||
+
|
||||
+ value_free (var->value);
|
||||
+ var->value = NULL;
|
||||
+ }
|
||||
+
|
||||
+ varp++;
|
||||
+ }
|
||||
+ }
|
||||
+ xfree (all_rootvarobj);
|
||||
+}
|
||||
+
|
||||
+/* Recreate any global varobjs possibly previously invalidated. If the
|
||||
+ expressions are no longer evaluatable set/keep the varobj invalid. */
|
||||
+
|
||||
+void
|
||||
+varobj_revalidate (void)
|
||||
+{
|
||||
+ struct varobj **all_rootvarobj;
|
||||
+ struct varobj **varp;
|
||||
+
|
||||
+ if (varobj_list (&all_rootvarobj) > 0)
|
||||
+ {
|
||||
+ varp = all_rootvarobj;
|
||||
+ while (*varp != NULL)
|
||||
+ {
|
||||
+ struct varobj *var = *varp;
|
||||
+
|
||||
+ /* Floating varobjs are reparsed on each stop, so we don't care if
|
||||
+ the presently parsed expression refers to something that's gone.
|
||||
+ */
|
||||
+ if (var->root->floating)
|
||||
+ continue;
|
||||
+
|
||||
+ /* global var must be re-evaluated. */
|
||||
+ if (var->root->valid_block == NULL)
|
||||
+ {
|
||||
+ struct varobj *tmp_var;
|
||||
+
|
||||
+ /* Try to create a varobj with same expression. If we succeed
|
||||
+ replace the old varobj, otherwise invalidate it. */
|
||||
+ tmp_var = varobj_create (NULL, var->name, 0, USE_CURRENT_FRAME);
|
||||
+ if (tmp_var != NULL)
|
||||
+ {
|
||||
+ tmp_var->obj_name = xstrdup (var->obj_name);
|
||||
+ varobj_delete (var, NULL, 0);
|
||||
+ install_variable (tmp_var);
|
||||
+ }
|
||||
+ else
|
||||
+ var->root->is_valid = 0;
|
||||
+ }
|
||||
+
|
||||
+ varp++;
|
||||
+ }
|
||||
+ }
|
||||
xfree (all_rootvarobj);
|
||||
- return;
|
||||
}
|
||||
Index: gdb-6.8.50.20090302/gdb/varobj.h
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/varobj.h 2009-05-10 21:36:27.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/varobj.h 2009-05-10 21:36:42.000000000 +0200
|
||||
@@ -148,7 +148,9 @@ extern int varobj_list (struct varobj **
|
||||
extern VEC(varobj_update_result) *varobj_update (struct varobj **varp,
|
||||
int explicit);
|
||||
|
||||
-extern void varobj_invalidate (void);
|
||||
+extern void varobj_invalidate (struct objfile *objfile);
|
||||
+
|
||||
+extern void varobj_revalidate (void);
|
||||
|
||||
extern int varobj_editable_p (struct varobj *var);
|
||||
|
86
gdb-varobj-revalidate-prep.patch
Executable file
86
gdb-varobj-revalidate-prep.patch
Executable file
@ -0,0 +1,86 @@
|
||||
Re: [patch] Make a function for block->objfile lookups
|
||||
http://sourceware.org/ml/gdb-patches/2009-04/msg00609.html
|
||||
|
||||
gdb/
|
||||
2009-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* block.c (block_objfile): New function.
|
||||
* block.h (block_objfile): New prototype.
|
||||
* objfiles.c (matching_objfiles): New function.
|
||||
* objfiles.h (matching_objfiles): New prototype.
|
||||
* printcmd.c: Remove include solib.h.
|
||||
(display_uses_solib_p): Rename to ...
|
||||
(display_uses_objfile): ... a new function name. Change the SOLIB
|
||||
parameter to OBJFILE parameter. Use now a matching_objfiles call.
|
||||
(clear_dangling_display_expressions): Update the caller.
|
||||
|
||||
[ Cut the printcmd.c simplification/change. ]
|
||||
|
||||
--- ./gdb/block.c 3 Jan 2009 05:57:50 -0000 1.18
|
||||
+++ ./gdb/block.c 22 Apr 2009 19:51:40 -0000
|
||||
@@ -309,3 +309,21 @@ allocate_block (struct obstack *obstack)
|
||||
|
||||
return bl;
|
||||
}
|
||||
+
|
||||
+/* Return OBJFILE in which BLOCK is located or NULL if we cannot find it for
|
||||
+ whatever reason. */
|
||||
+
|
||||
+struct objfile *
|
||||
+block_objfile (const struct block *block)
|
||||
+{
|
||||
+ struct symbol *func;
|
||||
+
|
||||
+ if (block == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ func = block_linkage_function (block);
|
||||
+ if (func == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ return SYMBOL_SYMTAB (func)->objfile;
|
||||
+}
|
||||
--- ./gdb/block.h 3 Jan 2009 05:57:50 -0000 1.19
|
||||
+++ ./gdb/block.h 22 Apr 2009 19:51:40 -0000
|
||||
@@ -164,4 +164,6 @@ extern const struct block *block_global_
|
||||
|
||||
extern struct block *allocate_block (struct obstack *obstack);
|
||||
|
||||
+extern struct objfile *block_objfile (const struct block *block);
|
||||
+
|
||||
#endif /* BLOCK_H */
|
||||
--- ./gdb/objfiles.c 11 Mar 2009 20:26:02 -0000 1.82
|
||||
+++ ./gdb/objfiles.c 22 Apr 2009 19:51:40 -0000
|
||||
@@ -891,3 +891,21 @@ objfile_data (struct objfile *objfile, c
|
||||
gdb_assert (data->index < objfile->num_data);
|
||||
return objfile->data[data->index];
|
||||
}
|
||||
+
|
||||
+/* Return non-zero if A and B point to the same OBJFILE, ignoring any binary
|
||||
+ vs. debuginfo variants of the pointers. If either A or B is NULL return
|
||||
+ zero as not a match. */
|
||||
+
|
||||
+int
|
||||
+matching_objfiles (struct objfile *a, struct objfile *b)
|
||||
+{
|
||||
+ if (a == NULL || b == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (a->separate_debug_objfile_backlink)
|
||||
+ a = a->separate_debug_objfile_backlink;
|
||||
+ if (b->separate_debug_objfile_backlink)
|
||||
+ b = b->separate_debug_objfile_backlink;
|
||||
+
|
||||
+ return a == b;
|
||||
+}
|
||||
--- ./gdb/objfiles.h 15 Jan 2009 16:35:22 -0000 1.59
|
||||
+++ ./gdb/objfiles.h 22 Apr 2009 19:51:40 -0000
|
||||
@@ -497,6 +497,8 @@ extern struct obj_section *find_pc_secti
|
||||
|
||||
extern int in_plt_section (CORE_ADDR, char *);
|
||||
|
||||
+extern int matching_objfiles (struct objfile *a, struct objfile *b);
|
||||
+
|
||||
/* Keep a registry of per-objfile data-pointers required by other GDB
|
||||
modules. */
|
||||
|
140
gdb.spec
140
gdb.spec
@ -13,7 +13,7 @@ Version: 6.8.50.20090302
|
||||
|
||||
# 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: 19%{?_with_upstream:.upstream}%{?dist}
|
||||
Release: 40%{?_with_upstream:.upstream}%{?dist}
|
||||
|
||||
License: GPLv3+
|
||||
Group: Development/Debuggers
|
||||
@ -228,8 +228,8 @@ Patch229: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
# Testcase for exec() from threaded program (BZ 202689).
|
||||
Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
# Backported post gdb-6.8 release fixups.
|
||||
###Patch232: gdb-6.8-upstream.patch
|
||||
# Backported post gdb-6.8.50.20090302 snapshot fixups.
|
||||
Patch232: gdb-6.8.50.20090302-upstream.patch
|
||||
|
||||
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||
Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
@ -378,6 +378,31 @@ Patch352: gdb-6.8-bz457187-largefile.patch
|
||||
# Fix crash on pretty-printer reading uninitialized std::string (BZ 495781).
|
||||
Patch357: gdb-c_get_string-xfree.patch
|
||||
|
||||
# Fix crash in the charset support.
|
||||
Patch359: gdb-charset-crash.patch
|
||||
|
||||
# Fix crashes due to (missing) varobj revalidation, for VLA (for BZ 377541).
|
||||
Patch369: gdb-varobj-revalidate-prep.patch
|
||||
Patch370: gdb-varobj-revalidate-core.patch
|
||||
|
||||
# Accelerate sorting blocks on reading a file (found on WebKit) (BZ 507267).
|
||||
Patch374: gdb-bz507267-block-sort-fast.patch
|
||||
|
||||
# Fix crash running gdbserver (incompatibility with python).
|
||||
Patch376: gdb-python-gdbserver-tp-crash.patch
|
||||
|
||||
# Fix GDB crash/hang on corrupted .debug_aranges (from old GCCs).
|
||||
Patch377: gdb-delayed-symfile-aranges.patch
|
||||
|
||||
# Remove wrong assertion on types objfile (BZ 508406).
|
||||
Patch379: gdb-bz508406-vla-type-objfile.patch
|
||||
|
||||
# Fix crash on some catch commands (BZ 533525).
|
||||
Patch386: gdb-bz533525-catch-crash.patch
|
||||
|
||||
# Fortran: Fix regression on setting breakpoint at toplevel symbols (BZ 559291).
|
||||
Patch416: gdb-bz559291-fortran-module-toplevel.patch
|
||||
|
||||
BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
|
||||
Requires: readline
|
||||
BuildRequires: readline-devel
|
||||
@ -462,7 +487,7 @@ 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
|
||||
%patch349 -p1
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
@ -573,6 +598,15 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch348 -p1
|
||||
%patch352 -p1
|
||||
%patch357 -p1
|
||||
%patch359 -p1
|
||||
%patch369 -p1
|
||||
%patch370 -p1
|
||||
%patch374 -p1
|
||||
%patch376 -p1
|
||||
%patch377 -p1
|
||||
%patch379 -p1
|
||||
%patch386 -p1
|
||||
%patch416 -p1
|
||||
%patch124 -p1
|
||||
|
||||
find -name "*.orig" | xargs rm -f
|
||||
@ -642,7 +676,7 @@ CFLAGS="$CFLAGS -O0 -ggdb2"
|
||||
--with-expat \
|
||||
--enable-tui \
|
||||
--with-python \
|
||||
--with-rpm=librpm.so \
|
||||
--with-rpm=librpm.so.0 \
|
||||
%ifarch ia64
|
||||
--with-libunwind \
|
||||
%else
|
||||
@ -730,10 +764,8 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil
|
||||
CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')"
|
||||
%endif # 0%{!?_with_upstream:1}
|
||||
|
||||
for CURRENT in $CHECK
|
||||
do
|
||||
./orphanripper make -k $CURRENT || :
|
||||
done
|
||||
# FIXME: Temporary F11 disable: ./orphanripper
|
||||
make %{?_smp_mflags} -k $CHECK || :
|
||||
)
|
||||
for t in sum log
|
||||
do
|
||||
@ -855,6 +887,96 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Feb 3 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-40
|
||||
- Fortran: Fix regression on setting breakpoint at toplevel symbols (BZ 559291).
|
||||
|
||||
* Tue Nov 10 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-39
|
||||
- Fix crash on some catch commands (BZ 533525).
|
||||
|
||||
* Thu Aug 27 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-38
|
||||
- Remove wrong assertion on types objfile (BZ 508406).
|
||||
|
||||
* Sat Aug 15 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-37
|
||||
- Fix GDB crash/hang on corrupted .debug_aranges (from old GCCs).
|
||||
- Temporarily disabled orphanripper on Fedora 11.
|
||||
|
||||
* Sun Aug 2 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-36
|
||||
- Fix compilation error typo in the previous commit 6.8.50.20090302-35.
|
||||
|
||||
* Sun Aug 2 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-35
|
||||
- Fix crash running gdbserver (incompatibility with python).
|
||||
|
||||
* Mon Jul 6 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-34
|
||||
- testsuite: Fix multiple runs in parallel on a single host.
|
||||
- testsuite: Remove the rpmbuild option: --with parallel
|
||||
- testsuite: Run the testsuite with default rpm _smp_mflags.
|
||||
|
||||
* Mon Jul 6 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-33
|
||||
- Archer update to the snapshot: 17bfc0488f54aeeb7a9e20ef3caa7e31e8e985fb
|
||||
- Archer backport: de9c5190034b84b0a5fb4b98b05b304cda187700
|
||||
- [vla] Fix a crash regression on constant DW_AT_data_member_location.
|
||||
|
||||
* Mon Jun 29 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-32
|
||||
- Replace the fix of cloned-TIDs with no pthread from upstream (BZ 471819).
|
||||
- Fix a parallel testsuite runs incompatibility in gdb.base/gcore-shmid0.exp.
|
||||
|
||||
* Mon Jun 29 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-31
|
||||
- Fix GDB crash on cloned-TIDs with no associated pthread (BZ 471819).
|
||||
- Workaround rpm.org#76 rpm-devel requirement for debuginfo names (BZ 508193).
|
||||
|
||||
* Mon Jun 22 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-30
|
||||
- Accelerate sorting blocks on reading a file (found on WebKit) (BZ 507267).
|
||||
|
||||
* Mon Jun 22 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-29
|
||||
- Fix backtraces from core files with the executable found+loaded via build-id.
|
||||
- Due to F-11 GCC no longer needlessly duplicating .eh_frame as .debug_frame.
|
||||
|
||||
* Tue Jun 16 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-28
|
||||
- Archer update to the snapshot: 05c402a02716177c4ddd272a6e312cbd2908ed68
|
||||
- Archer backport: 05c402a02716177c4ddd272a6e312cbd2908ed68
|
||||
- Remove the [archer-pmuldoon-exception-rewind-master] branch.
|
||||
- Include this functionality as a FSF GDB accepted patchset.
|
||||
|
||||
* Mon Jun 15 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-27
|
||||
- Fix crash on pending breakpoints with PIE (position-indep.-exec.) (BZ 505943).
|
||||
|
||||
* Fri Jun 12 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-26
|
||||
- Fix an occasional crash during printing of missing debuginfo rpms (BZ 505401).
|
||||
|
||||
* Thu Jun 11 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-25
|
||||
- Archer update to the snapshot: 30c13da4efe18f43ee34aa4b29bc86e1a53de548
|
||||
- Archer backport: 30c13da4efe18f43ee34aa4b29bc86e1a53de548
|
||||
- Fix dereferencing unbound C arrays (BZ 505163).
|
||||
|
||||
* Tue Jun 9 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-24
|
||||
- Archer update to the snapshot: 000db8b7bfef8581ef099ccca8689cfddfea1be8
|
||||
- Archer backport: b8d3bea36b137effc929e02c4dadf73716cb330b
|
||||
- Ignore explicit die representing global scope '::' (gcc 4.1 bug).
|
||||
- Archer backport: c2d5c4a39b10994d86d8f2f90dfed769e8f216f3
|
||||
- Fix parsing DW_AT_const_value using DW_FORM_string
|
||||
- Archer backport: 8d9ab68fc0955c9de6320bec2821a21e3244600d
|
||||
+ db41e11ae0a3aec7120ad6ce86450d838af74dd6
|
||||
- Fix Fortran modules/namespaces parsing (but no change was visible in F11).
|
||||
- Archer backport: 000db8b7bfef8581ef099ccca8689cfddfea1be8
|
||||
- Fix "some Python error when displaying some C++ objects" (BZ 504356).
|
||||
- testsuite: Support new rpmbuild option: --with parallel
|
||||
- testsuite: gdb-orphanripper.c: Fix uninitialized `termios.c_line'.
|
||||
|
||||
* Mon May 11 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-23
|
||||
- Fix crashes due to (missing) varobj revalidation, for VLA (for BZ 377541).
|
||||
|
||||
* Sun May 10 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-22
|
||||
- Archer update to the snapshot: e2812eadef2c15baeccd003e11fdf3fbc0b90dc2
|
||||
- Archer backport: 58dcda94ac5d6398f47382505e9d3d9d866d79bf
|
||||
+ f3de7bbd655337fe6705aeaafcc970deff3dd5d5
|
||||
- Implement Fortran modules namespaces (BZ 466118).
|
||||
|
||||
* Thu Apr 16 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-21
|
||||
- Bump revision due to CVS tags mistake.
|
||||
|
||||
* Thu Apr 16 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-20
|
||||
- Fix crash in the charset support.
|
||||
|
||||
* Wed Apr 15 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-19
|
||||
- Fix crash on pretty-printer reading uninitialized std::string (BZ 495781).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user