- Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release).
This commit is contained in:
parent
1bcf9b6604
commit
e00e5eae57
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
gdb-7.2.tar.bz2
|
gdb-7.2.50.20101117.tar.bz2
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
|
||||||
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/symmisc.c
|
Index: gdb-7.2.50.20101116/gdb/symmisc.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-6.8.orig/gdb/symmisc.c 2008-03-17 16:06:24.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/symmisc.c 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-6.8/gdb/symmisc.c 2008-07-14 10:27:50.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/symmisc.c 2010-11-16 08:03:08.000000000 +0100
|
||||||
@@ -230,8 +230,8 @@ print_objfile_statistics (void)
|
@@ -186,8 +186,8 @@ print_objfile_statistics (void)
|
||||||
if (OBJSTAT (objfile, sz_strtab) > 0)
|
if (OBJSTAT (objfile, sz_strtab) > 0)
|
||||||
printf_filtered (_(" Space used by a.out string tables: %d\n"),
|
printf_filtered (_(" Space used by a.out string tables: %d\n"),
|
||||||
OBJSTAT (objfile, sz_strtab));
|
OBJSTAT (objfile, sz_strtab));
|
||||||
@ -14,12 +14,12 @@ Index: gdb-6.8/gdb/symmisc.c
|
|||||||
+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"),
|
+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"),
|
||||||
+ (long) obstack_memory_used (&objfile->objfile_obstack));
|
+ (long) obstack_memory_used (&objfile->objfile_obstack));
|
||||||
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
|
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
|
||||||
bcache_memory_used (objfile->psymbol_cache));
|
bcache_memory_used (psymbol_bcache_get_bcache
|
||||||
printf_filtered (_(" Total memory used for macro cache: %d\n"),
|
(objfile->psymbol_cache)));
|
||||||
Index: gdb-6.8/include/obstack.h
|
Index: gdb-7.2.50.20101116/include/obstack.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-6.8.orig/include/obstack.h 2005-05-10 12:21:08.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/include/obstack.h 2008-10-21 01:03:31.000000000 +0200
|
||||||
+++ gdb-6.8/include/obstack.h 2008-07-14 10:27:50.000000000 +0200
|
+++ gdb-7.2.50.20101116/include/obstack.h 2010-11-16 08:02:37.000000000 +0100
|
||||||
@@ -188,31 +188,31 @@ struct obstack /* control current objec
|
@@ -188,31 +188,31 @@ struct obstack /* control current objec
|
||||||
|
|
||||||
/* Declare the external functions we use; they are in obstack.c. */
|
/* Declare the external functions we use; they are in obstack.c. */
|
||||||
@ -134,10 +134,10 @@ Index: gdb-6.8/include/obstack.h
|
|||||||
= (h)->temp + (char *) (h)->chunk) \
|
= (h)->temp + (char *) (h)->chunk) \
|
||||||
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
|
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
|
||||||
|
|
||||||
Index: gdb-6.8/libiberty/obstack.c
|
Index: gdb-7.2.50.20101116/libiberty/obstack.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-6.8.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
|
||||||
+++ gdb-6.8/libiberty/obstack.c 2008-07-14 10:27:50.000000000 +0200
|
+++ gdb-7.2.50.20101116/libiberty/obstack.c 2010-11-16 08:02:37.000000000 +0100
|
||||||
@@ -44,9 +44,11 @@
|
@@ -44,9 +44,11 @@
|
||||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||||
#include <gnu-versions.h>
|
#include <gnu-versions.h>
|
||||||
|
@ -4,20 +4,20 @@
|
|||||||
to install and uninstall.
|
to install and uninstall.
|
||||||
* gstack.sh, gstack.1: New files.
|
* gstack.sh, gstack.1: New files.
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/Makefile.in
|
Index: gdb-7.2.50.20101116/gdb/Makefile.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/Makefile.in 2010-09-03 09:37:55.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/Makefile.in 2010-11-05 15:31:25.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/Makefile.in 2010-09-03 09:38:45.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/Makefile.in 2010-11-16 07:56:10.000000000 +0100
|
||||||
@@ -1010,7 +1010,7 @@ install: all install-only
|
@@ -972,7 +972,7 @@ gdb.z:gdb.1
|
||||||
|
install: all
|
||||||
|
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
||||||
|
|
||||||
# The "install-only" target also installs the syscalls' XML files in
|
-install-only: $(CONFIG_INSTALL)
|
||||||
# the system.
|
+install-only: install-gstack $(CONFIG_INSTALL)
|
||||||
-install-only: $(CONFIG_INSTALL) xml-syscall-install
|
|
||||||
+install-only: install-gstack $(CONFIG_INSTALL) xml-syscall-install
|
|
||||||
transformed_name=`t='$(program_transform_name)'; \
|
transformed_name=`t='$(program_transform_name)'; \
|
||||||
echo gdb | sed -e "$$t"` ; \
|
echo gdb | sed -e "$$t"` ; \
|
||||||
if test "x$$transformed_name" = x; then \
|
if test "x$$transformed_name" = x; then \
|
||||||
@@ -1046,7 +1046,25 @@ install-tui:
|
@@ -1008,7 +1008,25 @@ install-tui:
|
||||||
install-python:
|
install-python:
|
||||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ Index: gdb-7.2/gdb/Makefile.in
|
|||||||
transformed_name=`t='$(program_transform_name)'; \
|
transformed_name=`t='$(program_transform_name)'; \
|
||||||
echo gdb | sed -e $$t` ; \
|
echo gdb | sed -e $$t` ; \
|
||||||
if test "x$$transformed_name" = x; then \
|
if test "x$$transformed_name" = x; then \
|
||||||
@@ -1068,6 +1086,17 @@ uninstall-tui:
|
@@ -1030,6 +1048,17 @@ uninstall-tui:
|
||||||
fi ; \
|
fi ; \
|
||||||
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
|
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
|
||||||
$(DESTDIR)$(man1dir)/$$transformed_name.1
|
$(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||||
@ -62,10 +62,10 @@ Index: gdb-7.2/gdb/Makefile.in
|
|||||||
|
|
||||||
# The C++ name parser can be built standalone for testing.
|
# The C++ name parser can be built standalone for testing.
|
||||||
test-cp-name-parser.o: cp-name-parser.c
|
test-cp-name-parser.o: cp-name-parser.c
|
||||||
Index: gdb-7.2/gdb/gstack.sh
|
Index: gdb-7.2.50.20101116/gdb/gstack.sh
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.2/gdb/gstack.sh 2010-09-03 09:38:12.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/gstack.sh 2010-11-16 07:55:47.000000000 +0100
|
||||||
@@ -0,0 +1,48 @@
|
@@ -0,0 +1,48 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
@ -115,10 +115,10 @@ Index: gdb-7.2/gdb/gstack.sh
|
|||||||
+ -e 's/^\((gdb) \)*//' \
|
+ -e 's/^\((gdb) \)*//' \
|
||||||
+ -e '/^#/p' \
|
+ -e '/^#/p' \
|
||||||
+ -e '/^Thread/p'
|
+ -e '/^Thread/p'
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.base/gstack.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.base/gstack.exp 2010-09-03 09:38:12.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.exp 2010-11-16 07:55:47.000000000 +0100
|
||||||
@@ -0,0 +1,71 @@
|
@@ -0,0 +1,71 @@
|
||||||
+# Copyright (C) 2010 Free Software Foundation, Inc.
|
+# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
@ -191,10 +191,10 @@ Index: gdb-7.2/gdb/testsuite/gdb.base/gstack.exp
|
|||||||
+gdb_exit
|
+gdb_exit
|
||||||
+
|
+
|
||||||
+remote_exec host "kill -9 $pid"
|
+remote_exec host "kill -9 $pid"
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.base/gstack.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.base/gstack.c 2010-09-03 09:38:12.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.c 2010-11-16 07:55:47.000000000 +0100
|
||||||
@@ -0,0 +1,43 @@
|
@@ -0,0 +1,43 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
Port to GDB-6.7.
|
Port to GDB-6.7.
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/symfile-mem.c
|
Index: gdb-7.2.50.20101116/gdb/symfile-mem.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/symfile-mem.c 2010-01-01 08:31:42.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/symfile-mem.c 2010-01-01 08:31:42.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/symfile-mem.c 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/symfile-mem.c 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -57,6 +57,14 @@
|
@@ -57,6 +57,14 @@
|
||||||
#include "elf/common.h"
|
#include "elf/common.h"
|
||||||
|
|
||||||
@ -53,10 +53,10 @@ Index: gdb-7.1.90.20100711/gdb/symfile-mem.c
|
|||||||
if (nbfd == NULL)
|
if (nbfd == NULL)
|
||||||
error (_("Failed to read a valid object file image from memory."));
|
error (_("Failed to read a valid object file image from memory."));
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/target.c
|
Index: gdb-7.2.50.20101116/gdb/target.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/target.c 2010-07-12 10:00:56.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/target.c 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/target.c 2010-07-12 10:47:04.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/target.c 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -58,7 +58,7 @@ static int nosymbol (char *, CORE_ADDR *
|
@@ -58,7 +58,7 @@ static int nosymbol (char *, CORE_ADDR *
|
||||||
|
|
||||||
static void tcomplain (void) ATTRIBUTE_NORETURN;
|
static void tcomplain (void) ATTRIBUTE_NORETURN;
|
||||||
@ -84,7 +84,7 @@ Index: gdb-7.1.90.20100711/gdb/target.c
|
|||||||
nomemory);
|
nomemory);
|
||||||
de_fault (to_files_info,
|
de_fault (to_files_info,
|
||||||
(void (*) (struct target_ops *))
|
(void (*) (struct target_ops *))
|
||||||
@@ -1526,7 +1526,7 @@ target_xfer_partial (struct target_ops *
|
@@ -1550,7 +1550,7 @@ target_xfer_partial (struct target_ops *
|
||||||
it makes no progress, and then return how much was transferred). */
|
it makes no progress, and then return how much was transferred). */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -93,7 +93,7 @@ Index: gdb-7.1.90.20100711/gdb/target.c
|
|||||||
{
|
{
|
||||||
/* Dispatch to the topmost target, not the flattened current_target.
|
/* Dispatch to the topmost target, not the flattened current_target.
|
||||||
Memory accesses check target->to_has_(all_)memory, and the
|
Memory accesses check target->to_has_(all_)memory, and the
|
||||||
@@ -1542,7 +1542,7 @@ target_read_memory (CORE_ADDR memaddr, g
|
@@ -1566,7 +1566,7 @@ target_read_memory (CORE_ADDR memaddr, g
|
||||||
the target's stack. This may trigger different cache behavior. */
|
the target's stack. This may trigger different cache behavior. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -102,7 +102,7 @@ Index: gdb-7.1.90.20100711/gdb/target.c
|
|||||||
{
|
{
|
||||||
/* Dispatch to the topmost target, not the flattened current_target.
|
/* Dispatch to the topmost target, not the flattened current_target.
|
||||||
Memory accesses check target->to_has_(all_)memory, and the
|
Memory accesses check target->to_has_(all_)memory, and the
|
||||||
@@ -1561,7 +1561,7 @@ target_read_stack (CORE_ADDR memaddr, gd
|
@@ -1585,7 +1585,7 @@ target_read_stack (CORE_ADDR memaddr, gd
|
||||||
Callers that can deal with partial writes should call target_write. */
|
Callers that can deal with partial writes should call target_write. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -111,7 +111,7 @@ Index: gdb-7.1.90.20100711/gdb/target.c
|
|||||||
{
|
{
|
||||||
/* Dispatch to the topmost target, not the flattened current_target.
|
/* Dispatch to the topmost target, not the flattened current_target.
|
||||||
Memory accesses check target->to_has_(all_)memory, and the
|
Memory accesses check target->to_has_(all_)memory, and the
|
||||||
@@ -3218,8 +3218,8 @@ debug_to_prepare_to_store (struct regcac
|
@@ -3348,8 +3348,8 @@ debug_to_prepare_to_store (struct regcac
|
||||||
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
|
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ Index: gdb-7.1.90.20100711/gdb/target.c
|
|||||||
int write, struct mem_attrib *attrib,
|
int write, struct mem_attrib *attrib,
|
||||||
struct target_ops *target)
|
struct target_ops *target)
|
||||||
{
|
{
|
||||||
@@ -3229,8 +3229,8 @@ deprecated_debug_xfer_memory (CORE_ADDR
|
@@ -3359,8 +3359,8 @@ deprecated_debug_xfer_memory (CORE_ADDR
|
||||||
attrib, target);
|
attrib, target);
|
||||||
|
|
||||||
fprintf_unfiltered (gdb_stdlog,
|
fprintf_unfiltered (gdb_stdlog,
|
||||||
@ -133,11 +133,11 @@ Index: gdb-7.1.90.20100711/gdb/target.c
|
|||||||
write ? "write" : "read", retval);
|
write ? "write" : "read", retval);
|
||||||
|
|
||||||
if (retval > 0)
|
if (retval > 0)
|
||||||
Index: gdb-7.1.90.20100711/gdb/target.h
|
Index: gdb-7.2.50.20101116/gdb/target.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/target.h 2010-07-12 10:00:56.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/target.h 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/target.h 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/target.h 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -417,10 +417,10 @@ struct target_ops
|
@@ -429,10 +429,10 @@ struct target_ops
|
||||||
NOTE: cagney/2004-10-01: This has been entirely superseeded by
|
NOTE: cagney/2004-10-01: This has been entirely superseeded by
|
||||||
to_xfer_partial and inferior inheritance. */
|
to_xfer_partial and inferior inheritance. */
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ Index: gdb-7.1.90.20100711/gdb/target.h
|
|||||||
|
|
||||||
void (*to_files_info) (struct target_ops *);
|
void (*to_files_info) (struct target_ops *);
|
||||||
int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *);
|
int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *);
|
||||||
@@ -838,12 +838,12 @@ extern void target_dcache_invalidate (vo
|
@@ -846,12 +846,12 @@ extern void target_dcache_invalidate (vo
|
||||||
|
|
||||||
extern int target_read_string (CORE_ADDR, char **, int, int *);
|
extern int target_read_string (CORE_ADDR, char **, int, int *);
|
||||||
|
|
||||||
@ -168,10 +168,10 @@ Index: gdb-7.1.90.20100711/gdb/target.h
|
|||||||
|
|
||||||
/* Fetches the target's memory map. If one is found it is sorted
|
/* Fetches the target's memory map. If one is found it is sorted
|
||||||
and returned, after some consistency checking. Otherwise, NULL
|
and returned, after some consistency checking. Otherwise, NULL
|
||||||
Index: gdb-7.1.90.20100711/gdb/dcache.c
|
Index: gdb-7.2.50.20101116/gdb/dcache.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/dcache.c 2010-05-14 19:53:15.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/dcache.c 2010-05-14 19:53:15.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/dcache.c 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/dcache.c 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -465,10 +465,10 @@ dcache_free (DCACHE *dcache)
|
@@ -465,10 +465,10 @@ dcache_free (DCACHE *dcache)
|
||||||
NOTE: This is different than the to_xfer_partial interface, in which
|
NOTE: This is different than the to_xfer_partial interface, in which
|
||||||
positive values less than LEN mean further transfers may be possible. */
|
positive values less than LEN mean further transfers may be possible. */
|
||||||
@ -185,10 +185,10 @@ Index: gdb-7.1.90.20100711/gdb/dcache.c
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int res;
|
int res;
|
||||||
Index: gdb-7.1.90.20100711/gdb/dcache.h
|
Index: gdb-7.2.50.20101116/gdb/dcache.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/dcache.h 2010-01-01 08:31:30.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/dcache.h 2010-01-01 08:31:30.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/dcache.h 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/dcache.h 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -35,8 +35,8 @@ void dcache_free (DCACHE *);
|
@@ -35,8 +35,8 @@ void dcache_free (DCACHE *);
|
||||||
|
|
||||||
/* Simple to call from <remote>_xfer_memory */
|
/* Simple to call from <remote>_xfer_memory */
|
||||||
@ -200,10 +200,10 @@ Index: gdb-7.1.90.20100711/gdb/dcache.h
|
|||||||
|
|
||||||
void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
|
void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
|
||||||
int len);
|
int len);
|
||||||
Index: gdb-7.1.90.20100711/gdb/exec.c
|
Index: gdb-7.2.50.20101116/gdb/exec.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/exec.c 2010-05-14 20:35:11.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/exec.c 2010-08-31 20:08:43.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/exec.c 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/exec.c 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -571,7 +571,7 @@ map_vmap (bfd *abfd, bfd *arch)
|
@@ -571,7 +571,7 @@ map_vmap (bfd *abfd, bfd *arch)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,11 +213,11 @@ Index: gdb-7.1.90.20100711/gdb/exec.c
|
|||||||
section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
|
section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
|
||||||
ULONGEST offset, LONGEST len,
|
ULONGEST offset, LONGEST len,
|
||||||
struct target_section *sections,
|
struct target_section *sections,
|
||||||
Index: gdb-7.1.90.20100711/gdb/linux-nat.c
|
Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/linux-nat.c 2010-07-12 10:44:36.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 08:00:26.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/linux-nat.c 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -5197,7 +5197,7 @@ linux_xfer_partial (struct target_ops *o
|
@@ -5251,7 +5251,7 @@ linux_xfer_partial (struct target_ops *o
|
||||||
#endif
|
#endif
|
||||||
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
|
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
|
||||||
{ /* This region contains ia64 rse registers, we have to re-read. */
|
{ /* This region contains ia64 rse registers, we have to re-read. */
|
||||||
@ -226,10 +226,10 @@ Index: gdb-7.1.90.20100711/gdb/linux-nat.c
|
|||||||
|
|
||||||
/* Re-read register stack area. */
|
/* Re-read register stack area. */
|
||||||
xxfer = super_xfer_partial (ops, object, annex,
|
xxfer = super_xfer_partial (ops, object, annex,
|
||||||
Index: gdb-7.1.90.20100711/gdb/remote.c
|
Index: gdb-7.2.50.20101116/gdb/remote.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/remote.c 2010-07-07 18:15:16.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/remote.c 2010-11-04 05:48:21.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/remote.c 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/remote.c 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -25,6 +25,7 @@
|
@@ -25,6 +25,7 @@
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -269,11 +269,11 @@ Index: gdb-7.1.90.20100711/gdb/remote.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Sends a packet with content determined by the printf format string
|
/* Sends a packet with content determined by the printf format string
|
||||||
Index: gdb-7.1.90.20100711/gdb/remote-sim.c
|
Index: gdb-7.2.50.20101116/gdb/remote-sim.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/remote-sim.c 2010-05-16 23:11:14.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/remote-sim.c 2010-08-10 06:39:26.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/remote-sim.c 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/remote-sim.c 2010-11-16 08:01:16.000000000 +0100
|
||||||
@@ -759,11 +759,14 @@ gdbsim_prepare_to_store (struct regcache
|
@@ -1055,11 +1055,13 @@ gdbsim_prepare_to_store (struct regcache
|
||||||
|
|
||||||
Returns the number of bytes transferred. */
|
Returns the number of bytes transferred. */
|
||||||
|
|
||||||
@ -286,14 +286,13 @@ Index: gdb-7.1.90.20100711/gdb/remote-sim.c
|
|||||||
{
|
{
|
||||||
+ /* Convert to len type that sim_read and sim_write can handle. */
|
+ /* Convert to len type that sim_read and sim_write can handle. */
|
||||||
+ int xfer_len = (int)len;
|
+ int xfer_len = (int)len;
|
||||||
+
|
struct sim_inferior_data *sim_data
|
||||||
/* If no program is running yet, then ignore the simulator for
|
= get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED);
|
||||||
memory. Pass the request down to the next target, hopefully
|
|
||||||
an exec file. */
|
Index: gdb-7.2.50.20101116/gdb/exec.h
|
||||||
Index: gdb-7.1.90.20100711/gdb/exec.h
|
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/exec.h 2010-01-01 08:31:31.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/exec.h 2010-01-01 08:31:31.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/exec.h 2010-07-12 10:46:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/exec.h 2010-11-16 08:00:37.000000000 +0100
|
||||||
@@ -60,7 +60,7 @@ extern int resize_section_table (struct
|
@@ -60,7 +60,7 @@ extern int resize_section_table (struct
|
||||||
|
|
||||||
One, and only one, of readbuf or writebuf must be non-NULL. */
|
One, and only one, of readbuf or writebuf must be non-NULL. */
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
|
|
||||||
* gdb.texinfo (File Options): Document --readnever.
|
* gdb.texinfo (File Options): Document --readnever.
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100721/gdb/doc/gdb.texinfo
|
Index: gdb-7.2.50.20101116/gdb/doc/gdb.texinfo
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100721.orig/gdb/doc/gdb.texinfo 2010-07-23 20:58:52.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/doc/gdb.texinfo 2010-11-12 21:49:41.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100721/gdb/doc/gdb.texinfo 2010-07-23 20:59:15.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/doc/gdb.texinfo 2010-11-16 07:59:31.000000000 +0100
|
||||||
@@ -998,6 +998,12 @@ Read each symbol file's entire symbol ta
|
@@ -1001,6 +1001,12 @@ Read each symbol file's entire symbol ta
|
||||||
the default, which is to read it incrementally as it is needed.
|
the default, which is to read it incrementally as it is needed.
|
||||||
This makes startup slower, but makes future operations faster.
|
This makes startup slower, but makes future operations faster.
|
||||||
|
|
||||||
@ -28,11 +28,11 @@ Index: gdb-7.1.90.20100721/gdb/doc/gdb.texinfo
|
|||||||
@end table
|
@end table
|
||||||
|
|
||||||
@node Mode Options
|
@node Mode Options
|
||||||
Index: gdb-7.1.90.20100721/gdb/main.c
|
Index: gdb-7.2.50.20101116/gdb/main.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100721.orig/gdb/main.c 2010-07-23 20:58:55.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/main.c 2010-11-16 07:59:20.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100721/gdb/main.c 2010-07-23 20:59:15.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/main.c 2010-11-16 07:59:59.000000000 +0100
|
||||||
@@ -391,6 +391,7 @@ captured_main (void *data)
|
@@ -390,6 +390,7 @@ captured_main (void *data)
|
||||||
{"xdb", no_argument, &xdb_commands, 1},
|
{"xdb", no_argument, &xdb_commands, 1},
|
||||||
{"dbx", no_argument, &dbx_commands, 1},
|
{"dbx", no_argument, &dbx_commands, 1},
|
||||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||||
@ -40,18 +40,18 @@ Index: gdb-7.1.90.20100721/gdb/main.c
|
|||||||
{"r", no_argument, &readnow_symbol_files, 1},
|
{"r", no_argument, &readnow_symbol_files, 1},
|
||||||
{"quiet", no_argument, &quiet, 1},
|
{"quiet", no_argument, &quiet, 1},
|
||||||
{"q", no_argument, &quiet, 1},
|
{"q", no_argument, &quiet, 1},
|
||||||
@@ -1038,6 +1039,7 @@ Options:\n\n\
|
@@ -982,6 +983,7 @@ Options:\n\n\
|
||||||
fputs_unfiltered (_("\
|
fputs_unfiltered (_(" file.\n\
|
||||||
--quiet Do not print version number on startup.\n\
|
--quiet Do not print version number on startup.\n\
|
||||||
--readnow Fully read symbol files on first access.\n\
|
--readnow Fully read symbol files on first access.\n\
|
||||||
+ --readnever Do not read symbol files.\n\
|
+ --readnever Do not read symbol files.\n\
|
||||||
"), stream);
|
"), stream);
|
||||||
fputs_unfiltered (_("\
|
fputs_unfiltered (_("\
|
||||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||||
Index: gdb-7.1.90.20100721/gdb/symfile.c
|
Index: gdb-7.2.50.20101116/gdb/symfile.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100721.orig/gdb/symfile.c 2010-07-23 20:58:52.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/symfile.c 2010-10-17 20:49:46.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100721/gdb/symfile.c 2010-07-23 20:59:15.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/symfile.c 2010-11-16 07:59:31.000000000 +0100
|
||||||
@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup (
|
@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup (
|
||||||
|
|
||||||
/* Global variables owned by this file */
|
/* Global variables owned by this file */
|
||||||
@ -60,19 +60,19 @@ Index: gdb-7.1.90.20100721/gdb/symfile.c
|
|||||||
|
|
||||||
/* External variables and functions referenced. */
|
/* External variables and functions referenced. */
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100721/gdb/dwarf2read.c
|
Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100721.orig/gdb/dwarf2read.c 2010-07-23 20:58:53.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/dwarf2read.c 2010-11-16 07:54:02.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100721/gdb/dwarf2read.c 2010-07-23 20:59:26.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/dwarf2read.c 2010-11-16 08:00:18.000000000 +0100
|
||||||
@@ -54,6 +54,7 @@
|
@@ -57,6 +57,7 @@
|
||||||
#include "exceptions.h"
|
#include "vec.h"
|
||||||
#include "gdb_stat.h"
|
#include "c-lang.h"
|
||||||
#include "completer.h"
|
#include "valprint.h"
|
||||||
+#include "top.h"
|
+#include "top.h"
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
@@ -1283,8 +1284,9 @@ dwarf2_has_info (struct objfile *objfile
|
@@ -1356,8 +1357,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||||
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
|
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
|
||||||
dwarf2_per_objfile->objfile = objfile;
|
dwarf2_per_objfile->objfile = objfile;
|
||||||
}
|
}
|
||||||
@ -84,10 +84,10 @@ Index: gdb-7.1.90.20100721/gdb/dwarf2read.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* When loading sections, we can either look for ".<name>", or for
|
/* When loading sections, we can either look for ".<name>", or for
|
||||||
Index: gdb-7.1.90.20100721/gdb/top.h
|
Index: gdb-7.2.50.20101116/gdb/top.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100721.orig/gdb/top.h 2010-04-07 18:54:39.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/top.h 2010-04-07 18:54:39.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100721/gdb/top.h 2010-07-23 20:59:15.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/top.h 2010-11-16 07:59:31.000000000 +0100
|
||||||
@@ -61,6 +61,7 @@ extern void set_prompt (char *);
|
@@ -61,6 +61,7 @@ extern void set_prompt (char *);
|
||||||
|
|
||||||
/* From random places. */
|
/* From random places. */
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/configure.ac
|
Index: gdb-7.2.50.20101116/gdb/testsuite/configure.ac
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.0.90.20100306.orig/gdb/testsuite/configure.ac 2010-02-19 20:16:36.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/configure.ac 2010-11-05 15:31:29.000000000 +0100
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/configure.ac 2010-03-06 23:19:56.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/configure.ac 2010-11-16 07:56:53.000000000 +0100
|
||||||
@@ -144,6 +144,6 @@ AC_OUTPUT([Makefile \
|
@@ -144,6 +144,6 @@ AC_OUTPUT([Makefile \
|
||||||
gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
|
gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
|
||||||
gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile \
|
gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile \
|
||||||
gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
|
gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
|
||||||
- gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
|
- gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
|
||||||
+ gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
|
+ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
|
||||||
gdb.python/Makefile gdb.reverse/Makefile \
|
gdb.python/Makefile gdb.reverse/Makefile \
|
||||||
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
|
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/configure
|
Index: gdb-7.2.50.20101116/gdb/testsuite/configure
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.0.90.20100306.orig/gdb/testsuite/configure 2010-02-19 20:16:36.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/configure 2010-11-05 15:31:29.000000000 +0100
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/configure 2010-03-06 23:20:12.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/configure 2010-11-16 07:57:59.000000000 +0100
|
||||||
@@ -3515,7 +3515,7 @@ done
|
@@ -3515,7 +3515,7 @@ done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile gdb.opencl/Makefile"
|
||||||
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile gdb.opencl/Makefile"
|
||||||
|
|
||||||
cat >confcache <<\_ACEOF
|
cat >confcache <<\_ACEOF
|
||||||
# This file is a shell script that caches the results of configure
|
# This file is a shell script that caches the results of configure
|
||||||
@ -31,10 +31,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/configure
|
|||||||
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
|
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
|
||||||
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
|
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
|
||||||
"gdb.threads/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
|
"gdb.threads/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach.c 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.c 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,20 @@
|
@@ -0,0 +1,20 @@
|
||||||
+/* This program is intended to be started outside of gdb, and then
|
+/* This program is intended to be started outside of gdb, and then
|
||||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||||
@ -56,10 +56,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach.c
|
|||||||
+ }
|
+ }
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach2.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach2.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach2.c 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach2.c 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,24 @@
|
@@ -0,0 +1,24 @@
|
||||||
+/* This program is intended to be started outside of gdb, and then
|
+/* This program is intended to be started outside of gdb, and then
|
||||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||||
@ -85,10 +85,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach2.c
|
|||||||
+ }
|
+ }
|
||||||
+ return (0);
|
+ return (0);
|
||||||
+}
|
+}
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break.c 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.c 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,146 @@
|
@@ -0,0 +1,146 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
@ -236,10 +236,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break.c
|
|||||||
+ }
|
+ }
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break1.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break1.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break1.c 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break1.c 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,44 @@
|
@@ -0,0 +1,44 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
@ -285,10 +285,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break1.c
|
|||||||
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
||||||
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
||||||
+#endif
|
+#endif
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/coremaker.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/coremaker.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/coremaker.c 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/coremaker.c 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,142 @@
|
@@ -0,0 +1,142 @@
|
||||||
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
||||||
+ Free Software Foundation, Inc.
|
+ Free Software Foundation, Inc.
|
||||||
@ -432,10 +432,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/coremaker.c
|
|||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach.exp 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.exp 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,423 @@
|
@@ -0,0 +1,423 @@
|
||||||
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
@ -860,10 +860,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/attach.exp
|
|||||||
+do_call_attach_tests
|
+do_call_attach_tests
|
||||||
+
|
+
|
||||||
+return 0
|
+return 0
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break.exp 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.exp 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,966 @@
|
@@ -0,0 +1,966 @@
|
||||||
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
+# 2000, 2002, 2003, 2004
|
+# 2000, 2002, 2003, 2004
|
||||||
@ -1831,10 +1831,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/break.exp
|
|||||||
+ send_gdb "set args main\n"
|
+ send_gdb "set args main\n"
|
||||||
+ gdb_expect -re ".*$gdb_prompt $" {}
|
+ gdb_expect -re ".*$gdb_prompt $" {}
|
||||||
+}
|
+}
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/corefile.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/corefile.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/corefile.exp 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/corefile.exp 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,233 @@
|
@@ -0,0 +1,233 @@
|
||||||
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||||
+# Free Software Foundation, Inc.
|
+# Free Software Foundation, Inc.
|
||||||
@ -2069,10 +2069,10 @@ Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/corefile.exp
|
|||||||
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
|
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
|
||||||
+
|
+
|
||||||
+gdb_test "core" "No core file now."
|
+gdb_test "core" "No core file now."
|
||||||
Index: gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/Makefile.in
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/Makefile.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.90.20100306/gdb/testsuite/gdb.pie/Makefile.in 2010-03-06 23:19:31.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/Makefile.in 2010-11-16 07:56:34.000000000 +0100
|
||||||
@@ -0,0 +1,19 @@
|
@@ -0,0 +1,19 @@
|
||||||
+VPATH = @srcdir@
|
+VPATH = @srcdir@
|
||||||
+srcdir = @srcdir@
|
+srcdir = @srcdir@
|
||||||
|
@ -30,11 +30,11 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
|
|||||||
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
||||||
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
||||||
|
|
||||||
Index: gdb-7.0.50.20100128/gdb/gdbtypes.c
|
Index: gdb-7.2.50.20101116/gdb/gdbtypes.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.0.50.20100128.orig/gdb/gdbtypes.c 2010-01-28 12:52:17.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/gdbtypes.c 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-7.0.50.20100128/gdb/gdbtypes.c 2010-01-28 12:52:48.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/gdbtypes.c 2010-11-16 08:01:33.000000000 +0100
|
||||||
@@ -3978,6 +3978,9 @@ gdbtypes_post_init (struct gdbarch *gdba
|
@@ -4262,6 +4262,9 @@ gdbtypes_post_init (struct gdbarch *gdba
|
||||||
= arch_type (gdbarch, TYPE_CODE_INTERNAL_FUNCTION, 0,
|
= arch_type (gdbarch, TYPE_CODE_INTERNAL_FUNCTION, 0,
|
||||||
"<internal function>");
|
"<internal function>");
|
||||||
|
|
||||||
@ -44,11 +44,11 @@ Index: gdb-7.0.50.20100128/gdb/gdbtypes.c
|
|||||||
return builtin_type;
|
return builtin_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: gdb-7.0.50.20100128/gdb/gdbtypes.h
|
Index: gdb-7.2.50.20101116/gdb/gdbtypes.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.0.50.20100128.orig/gdb/gdbtypes.h 2010-01-28 12:52:17.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/gdbtypes.h 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-7.0.50.20100128/gdb/gdbtypes.h 2010-01-28 12:52:48.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/gdbtypes.h 2010-11-16 08:01:33.000000000 +0100
|
||||||
@@ -1245,6 +1245,8 @@ struct builtin_type
|
@@ -1294,6 +1294,8 @@ struct builtin_type
|
||||||
|
|
||||||
/* This type is used to represent a GDB internal function. */
|
/* This type is used to represent a GDB internal function. */
|
||||||
struct type *internal_fn;
|
struct type *internal_fn;
|
||||||
@ -57,11 +57,11 @@ Index: gdb-7.0.50.20100128/gdb/gdbtypes.h
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Return the type table for the specified architecture. */
|
/* Return the type table for the specified architecture. */
|
||||||
Index: gdb-7.0.50.20100128/gdb/parse.c
|
Index: gdb-7.2.50.20101116/gdb/parse.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.0.50.20100128.orig/gdb/parse.c 2010-01-28 12:52:19.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/parse.c 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-7.0.50.20100128/gdb/parse.c 2010-01-28 12:53:20.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/parse.c 2010-11-16 08:01:33.000000000 +0100
|
||||||
@@ -509,7 +509,11 @@ write_exp_msymbol (struct minimal_symbol
|
@@ -530,7 +530,11 @@ write_exp_msymbol (struct minimal_symbol
|
||||||
case mst_text:
|
case mst_text:
|
||||||
case mst_file_text:
|
case mst_file_text:
|
||||||
case mst_solib_trampoline:
|
case mst_solib_trampoline:
|
||||||
@ -74,12 +74,12 @@ Index: gdb-7.0.50.20100128/gdb/parse.c
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case mst_text_gnu_ifunc:
|
case mst_text_gnu_ifunc:
|
||||||
Index: gdb-7.0.50.20100128/gdb/target.c
|
Index: gdb-7.2.50.20101116/gdb/target.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.0.50.20100128.orig/gdb/target.c 2010-01-28 12:52:29.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/target.c 2010-11-16 08:00:37.000000000 +0100
|
||||||
+++ gdb-7.0.50.20100128/gdb/target.c 2010-01-28 12:52:48.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/target.c 2010-11-16 08:01:52.000000000 +0100
|
||||||
@@ -1000,6 +1000,25 @@ pop_all_targets (int quitting)
|
@@ -1067,6 +1067,25 @@ target_is_pushed (struct target_ops *t)
|
||||||
pop_all_targets_above (dummy_stratum, quitting);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
+static int
|
+static int
|
||||||
@ -104,7 +104,7 @@ Index: gdb-7.0.50.20100128/gdb/target.c
|
|||||||
/* Using the objfile specified in OBJFILE, find the address for the
|
/* Using the objfile specified in OBJFILE, find the address for the
|
||||||
current thread's thread-local storage with offset OFFSET. */
|
current thread's thread-local storage with offset OFFSET. */
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
@@ -1090,7 +1109,28 @@ target_translate_tls_address (struct obj
|
@@ -1157,7 +1176,28 @@ target_translate_tls_address (struct obj
|
||||||
/* It wouldn't be wrong here to try a gdbarch method, too; finding
|
/* It wouldn't be wrong here to try a gdbarch method, too; finding
|
||||||
TLS is an ABI-specific thing. But we don't do that yet. */
|
TLS is an ABI-specific thing. But we don't do that yet. */
|
||||||
else
|
else
|
||||||
@ -134,10 +134,10 @@ Index: gdb-7.0.50.20100128/gdb/target.c
|
|||||||
|
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2010-01-28 12:52:48.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2010-11-16 08:01:33.000000000 +0100
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
@ -167,10 +167,10 @@ Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
|||||||
+
|
+
|
||||||
+ return 0; /* breakpoint */
|
+ return 0; /* breakpoint */
|
||||||
+}
|
+}
|
||||||
Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2010-01-28 12:52:48.000000000 +0100
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2010-11-16 08:01:33.000000000 +0100
|
||||||
@@ -0,0 +1,60 @@
|
@@ -0,0 +1,60 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: gdb-7.2/gdb/event-top.c
|
Index: gdb-7.2.50.20101116/gdb/event-top.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/event-top.c 2010-06-26 08:44:47.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/event-top.c 2010-09-11 18:00:25.000000000 +0200
|
||||||
+++ gdb-7.2/gdb/event-top.c 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/event-top.c 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -33,6 +33,7 @@
|
@@ -33,6 +33,7 @@
|
||||||
#include "cli/cli-script.h" /* for reset_command_nest_depth */
|
#include "cli/cli-script.h" /* for reset_command_nest_depth */
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
@ -28,10 +28,10 @@ Index: gdb-7.2/gdb/event-top.c
|
|||||||
/* Each interpreter has its own rules on displaying the command
|
/* Each interpreter has its own rules on displaying the command
|
||||||
prompt. */
|
prompt. */
|
||||||
if (!current_interp_display_prompt_p ())
|
if (!current_interp_display_prompt_p ())
|
||||||
Index: gdb-7.2/gdb/elfread.c
|
Index: gdb-7.2.50.20101116/gdb/elfread.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/elfread.c 2010-10-06 22:39:32.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/elfread.c 2010-11-16 08:04:18.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/elfread.c 2010-10-06 22:39:52.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/elfread.c 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -42,6 +42,7 @@
|
@@ -42,6 +42,7 @@
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
@ -464,11 +464,11 @@ Index: gdb-7.2/gdb/elfread.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
Index: gdb-7.2/gdb/symfile.h
|
Index: gdb-7.2.50.20101116/gdb/symfile.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/symfile.h 2010-10-06 22:39:32.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/symfile.h 2010-11-16 08:04:18.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/symfile.h 2010-10-06 22:39:52.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/symfile.h 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -577,6 +577,8 @@ extern struct build_id *build_id_addr_ge
|
@@ -552,6 +552,8 @@ extern struct build_id *build_id_addr_ge
|
||||||
extern char *build_id_to_filename (struct build_id *build_id,
|
extern char *build_id_to_filename (struct build_id *build_id,
|
||||||
char **link_return, int add_debug_suffix);
|
char **link_return, int add_debug_suffix);
|
||||||
extern void debug_print_missing (const char *binary, const char *debug);
|
extern void debug_print_missing (const char *binary, const char *debug);
|
||||||
@ -477,11 +477,11 @@ Index: gdb-7.2/gdb/symfile.h
|
|||||||
|
|
||||||
/* From dwarf2read.c */
|
/* From dwarf2read.c */
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/testsuite/lib/gdb.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/lib/gdb.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/testsuite/lib/gdb.exp 2010-10-06 22:39:32.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/lib/gdb.exp 2010-11-16 08:04:18.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/testsuite/lib/gdb.exp 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/lib/gdb.exp 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -1359,7 +1359,7 @@ proc default_gdb_start { } {
|
@@ -1358,7 +1358,7 @@ proc default_gdb_start { } {
|
||||||
warning "Couldn't set the width to 0."
|
warning "Couldn't set the width to 0."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -490,10 +490,10 @@ Index: gdb-7.2/gdb/testsuite/lib/gdb.exp
|
|||||||
send_gdb "set build-id-verbose 0\n"
|
send_gdb "set build-id-verbose 0\n"
|
||||||
gdb_expect 10 {
|
gdb_expect 10 {
|
||||||
-re "$gdb_prompt $" {
|
-re "$gdb_prompt $" {
|
||||||
Index: gdb-7.2/gdb/testsuite/lib/mi-support.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/lib/mi-support.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/testsuite/lib/mi-support.exp 2010-10-06 22:39:32.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/lib/mi-support.exp 2010-11-16 08:04:18.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/testsuite/lib/mi-support.exp 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/lib/mi-support.exp 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } {
|
@@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -503,10 +503,10 @@ Index: gdb-7.2/gdb/testsuite/lib/mi-support.exp
|
|||||||
send_gdb "190-gdb-set build-id-verbose 0\n"
|
send_gdb "190-gdb-set build-id-verbose 0\n"
|
||||||
gdb_expect 10 {
|
gdb_expect 10 {
|
||||||
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
|
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
|
||||||
Index: gdb-7.2/gdb/tui/tui-interp.c
|
Index: gdb-7.2.50.20101116/gdb/tui/tui-interp.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/tui/tui-interp.c 2010-05-18 00:21:43.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/tui/tui-interp.c 2010-05-18 00:21:43.000000000 +0200
|
||||||
+++ gdb-7.2/gdb/tui/tui-interp.c 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/tui/tui-interp.c 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -30,6 +30,7 @@
|
@@ -30,6 +30,7 @@
|
||||||
#include "tui/tui.h"
|
#include "tui/tui.h"
|
||||||
#include "tui/tui-io.h"
|
#include "tui/tui-io.h"
|
||||||
@ -524,10 +524,10 @@ Index: gdb-7.2/gdb/tui/tui-interp.c
|
|||||||
/* Tell readline what the prompt to display is and what function
|
/* Tell readline what the prompt to display is and what function
|
||||||
it will need to call after a whole line is read. This also
|
it will need to call after a whole line is read. This also
|
||||||
displays the first prompt. */
|
displays the first prompt. */
|
||||||
Index: gdb-7.2/gdb/aclocal.m4
|
Index: gdb-7.2.50.20101116/gdb/aclocal.m4
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/aclocal.m4 2010-05-23 02:56:59.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/aclocal.m4 2010-05-23 02:56:59.000000000 +0200
|
||||||
+++ gdb-7.2/gdb/aclocal.m4 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/aclocal.m4 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -19,6 +19,162 @@ You have another version of autoconf. I
|
@@ -19,6 +19,162 @@ You have another version of autoconf. I
|
||||||
If you have problems, you may need to regenerate the build system entirely.
|
If you have problems, you may need to regenerate the build system entirely.
|
||||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||||
@ -691,10 +691,10 @@ Index: gdb-7.2/gdb/aclocal.m4
|
|||||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
Index: gdb-7.2/gdb/config.in
|
Index: gdb-7.2.50.20101116/gdb/config.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/config.in 2010-10-06 22:39:31.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/config.in 2010-09-02 19:12:35.000000000 +0200
|
||||||
+++ gdb-7.2/gdb/config.in 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/config.in 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -46,6 +46,9 @@
|
@@ -46,6 +46,9 @@
|
||||||
/* Define to BFD's default target vector. */
|
/* Define to BFD's default target vector. */
|
||||||
#undef DEFAULT_BFD_VEC
|
#undef DEFAULT_BFD_VEC
|
||||||
@ -705,7 +705,7 @@ Index: gdb-7.2/gdb/config.in
|
|||||||
/* Define to 1 if translation of program messages to the user's native
|
/* Define to 1 if translation of program messages to the user's native
|
||||||
language is requested. */
|
language is requested. */
|
||||||
#undef ENABLE_NLS
|
#undef ENABLE_NLS
|
||||||
@@ -231,6 +234,9 @@
|
@@ -232,6 +235,9 @@
|
||||||
/* Define if Python 2.7 is being used. */
|
/* Define if Python 2.7 is being used. */
|
||||||
#undef HAVE_LIBPYTHON2_7
|
#undef HAVE_LIBPYTHON2_7
|
||||||
|
|
||||||
@ -715,10 +715,10 @@ Index: gdb-7.2/gdb/config.in
|
|||||||
/* Define if libunwind library is being used. */
|
/* Define if libunwind library is being used. */
|
||||||
#undef HAVE_LIBUNWIND
|
#undef HAVE_LIBUNWIND
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/configure
|
Index: gdb-7.2.50.20101116/gdb/configure
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/configure 2010-10-06 22:39:31.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/configure 2010-11-05 02:50:17.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/configure 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/configure 2010-11-16 08:15:33.000000000 +0100
|
||||||
@@ -679,6 +679,9 @@ REPORT_BUGS_TO
|
@@ -679,6 +679,9 @@ REPORT_BUGS_TO
|
||||||
PKGVERSION
|
PKGVERSION
|
||||||
TARGET_OBS
|
TARGET_OBS
|
||||||
@ -726,18 +726,18 @@ Index: gdb-7.2/gdb/configure
|
|||||||
+RPM_LIBS
|
+RPM_LIBS
|
||||||
+RPM_CFLAGS
|
+RPM_CFLAGS
|
||||||
+PKG_CONFIG
|
+PKG_CONFIG
|
||||||
pythondir
|
|
||||||
GDB_DATADIR_PATH
|
|
||||||
GDB_DATADIR
|
GDB_DATADIR
|
||||||
@@ -948,6 +951,7 @@ with_separate_debug_dir
|
DEBUGDIR
|
||||||
|
am__fastdepCC_FALSE
|
||||||
|
@@ -945,6 +948,7 @@ enable_dependency_tracking
|
||||||
|
with_separate_debug_dir
|
||||||
with_gdb_datadir
|
with_gdb_datadir
|
||||||
with_relocated_sources
|
with_relocated_sources
|
||||||
with_pythondir
|
|
||||||
+with_rpm
|
+with_rpm
|
||||||
enable_targets
|
enable_targets
|
||||||
enable_64_bit_bfd
|
enable_64_bit_bfd
|
||||||
enable_gdbcli
|
enable_gdbcli
|
||||||
@@ -988,6 +992,9 @@ LDFLAGS
|
@@ -986,6 +990,9 @@ LDFLAGS
|
||||||
LIBS
|
LIBS
|
||||||
CPPFLAGS
|
CPPFLAGS
|
||||||
CPP
|
CPP
|
||||||
@ -747,16 +747,16 @@ Index: gdb-7.2/gdb/configure
|
|||||||
YACC
|
YACC
|
||||||
YFLAGS
|
YFLAGS
|
||||||
XMKMF'
|
XMKMF'
|
||||||
@@ -1653,6 +1660,8 @@ Optional Packages:
|
@@ -1649,6 +1656,8 @@ Optional Packages:
|
||||||
[DATADIR/gdb]
|
[DATADIR/gdb]
|
||||||
--with-pythondir install Python data files in this path
|
--with-relocated-sources=PATH
|
||||||
[DATADIR/gdb/python]
|
automatically relocate this path for source files
|
||||||
+ --with-rpm query rpm database for missing debuginfos (yes/no,
|
+ --with-rpm query rpm database for missing debuginfos (yes/no,
|
||||||
+ def. auto=librpm.so)
|
+ def. auto=librpm.so)
|
||||||
--with-libunwind use libunwind frame unwinding support
|
--with-libunwind use libunwind frame unwinding support
|
||||||
--with-curses use the curses library instead of the termcap
|
--with-curses use the curses library instead of the termcap
|
||||||
library
|
library
|
||||||
@@ -1688,6 +1697,9 @@ Some influential environment variables:
|
@@ -1684,6 +1693,9 @@ Some influential environment variables:
|
||||||
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
|
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
|
||||||
you have headers in a nonstandard directory <include dir>
|
you have headers in a nonstandard directory <include dir>
|
||||||
CPP C preprocessor
|
CPP C preprocessor
|
||||||
@ -766,7 +766,7 @@ Index: gdb-7.2/gdb/configure
|
|||||||
YACC The `Yet Another C Compiler' implementation to use. Defaults to
|
YACC The `Yet Another C Compiler' implementation to use. Defaults to
|
||||||
the first program found out of: `bison -y', `byacc', `yacc'.
|
the first program found out of: `bison -y', `byacc', `yacc'.
|
||||||
YFLAGS The list of arguments that will be passed by default to $YACC.
|
YFLAGS The list of arguments that will be passed by default to $YACC.
|
||||||
@@ -7951,6 +7963,485 @@ _ACEOF
|
@@ -7881,6 +7893,486 @@ _ACEOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -1249,16 +1249,17 @@ Index: gdb-7.2/gdb/configure
|
|||||||
+ fi
|
+ fi
|
||||||
+ fi
|
+ fi
|
||||||
+fi
|
+fi
|
||||||
|
+
|
||||||
|
|
||||||
|
|
||||||
|
subdirs="$subdirs doc testsuite"
|
||||||
Index: gdb-7.2/gdb/configure.ac
|
Index: gdb-7.2.50.20101116/gdb/configure.ac
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/configure.ac 2010-10-06 22:39:31.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/configure.ac 2010-11-05 02:50:18.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/configure.ac 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/configure.ac 2010-11-16 08:15:10.000000000 +0100
|
||||||
@@ -152,6 +152,198 @@ else
|
@@ -108,6 +108,199 @@ AS_HELP_STRING([--with-relocated-sources
|
||||||
fi
|
[Relocated directory for source files. ])
|
||||||
AC_SUBST(pythondir)
|
])
|
||||||
|
|
||||||
+# Integration with rpm library to support missing debuginfo suggestions.
|
+# Integration with rpm library to support missing debuginfo suggestions.
|
||||||
+# --without-rpm: Disable any rpm support.
|
+# --without-rpm: Disable any rpm support.
|
||||||
@ -1452,13 +1453,14 @@ Index: gdb-7.2/gdb/configure.ac
|
|||||||
+ fi
|
+ fi
|
||||||
+ fi
|
+ fi
|
||||||
+fi
|
+fi
|
||||||
|
+
|
||||||
AC_CONFIG_SUBDIRS(doc testsuite)
|
AC_CONFIG_SUBDIRS(doc testsuite)
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/acinclude.m4
|
# Check whether to support alternative target configurations
|
||||||
|
Index: gdb-7.2.50.20101116/gdb/acinclude.m4
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||||
+++ gdb-7.2/gdb/acinclude.m4 2010-10-06 22:39:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/acinclude.m4 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -1,3 +1,5 @@
|
@@ -1,3 +1,5 @@
|
||||||
+# serial 1
|
+# serial 1
|
||||||
+
|
+
|
||||||
@ -1474,11 +1476,11 @@ Index: gdb-7.2/gdb/acinclude.m4
|
|||||||
# @defmac AC_PROG_CC_STDC
|
# @defmac AC_PROG_CC_STDC
|
||||||
# @maindex PROG_CC_STDC
|
# @maindex PROG_CC_STDC
|
||||||
# @ovindex CC
|
# @ovindex CC
|
||||||
Index: gdb-7.2/gdb/corelow.c
|
Index: gdb-7.2.50.20101116/gdb/corelow.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/corelow.c 2010-10-06 22:39:39.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/corelow.c 2010-11-16 08:04:18.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/corelow.c 2010-10-06 22:39:52.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/corelow.c 2010-11-16 08:14:26.000000000 +0100
|
||||||
@@ -331,7 +331,7 @@ build_id_locate_exec (int from_tty)
|
@@ -317,7 +317,7 @@ build_id_locate_exec (int from_tty)
|
||||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1,184 +0,0 @@
|
|||||||
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb_gcore.sh: Redirect GDB from `</dev/null'.
|
|
||||||
|
|
||||||
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
|
|
||||||
|
|
||||||
|
|
||||||
--- gdb-6.6-orig/gdb/gdb_gcore.sh 2005-12-17 17:33:59.000000000 -0500
|
|
||||||
+++ gdb-6.6/gdb/gdb_gcore.sh 2007-04-22 05:42:50.000000000 -0400
|
|
||||||
@@ -71,7 +71,9 @@
|
|
||||||
quit
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- gdb -x $tmpfile -batch
|
|
||||||
+ # `</dev/null' to avoid touching interactive terminal if it is
|
|
||||||
+ # available but not accessible (SIGTTIN risk)
|
|
||||||
+ gdb -x $tmpfile -batch </dev/null
|
|
||||||
|
|
||||||
if [ -r $name.$pid ] ; then
|
|
||||||
rc=0
|
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.base/gcorebg.c 25 Feb 2007 12:21:20 -0000
|
|
||||||
@@ -0,0 +1,43 @@
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+#include <signal.h>
|
|
||||||
+
|
|
||||||
+int main (int argc, char **argv)
|
|
||||||
+{
|
|
||||||
+ pid_t pid = 0;
|
|
||||||
+ pid_t ppid;
|
|
||||||
+ char buf[256];
|
|
||||||
+
|
|
||||||
+ if (argc != 4)
|
|
||||||
+ {
|
|
||||||
+ fprintf (stderr, "Syntax: %s {standard|detached} <gcore command> <core output file>\n",
|
|
||||||
+ argv[0]);
|
|
||||||
+ exit (1);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ pid = fork ();
|
|
||||||
+
|
|
||||||
+ switch (pid)
|
|
||||||
+ {
|
|
||||||
+ case 0:
|
|
||||||
+ if (strcmp (argv[1], "detached") == 0)
|
|
||||||
+ setpgrp ();
|
|
||||||
+ ppid = getppid ();
|
|
||||||
+ sprintf (buf, "sh %s -o %s %d", argv[2], argv[3], (int) ppid);
|
|
||||||
+ system (buf);
|
|
||||||
+ kill (ppid, SIGTERM);
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ case -1:
|
|
||||||
+ perror ("fork err\n");
|
|
||||||
+ exit (1);
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ default:
|
|
||||||
+ sleep (60);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.base/gcorebg.exp 25 Feb 2007 12:21:20 -0000
|
|
||||||
@@ -0,0 +1,113 @@
|
|
||||||
+# Copyright 2007 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 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+# bug-gdb@prep.ai.mit.edu
|
|
||||||
+
|
|
||||||
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
|
||||||
+# This is a test for `gdb_gcore.sh' functionality.
|
|
||||||
+# It also tests a regression with `gdb_gcore.sh' being run without its
|
|
||||||
+# accessible terminal.
|
|
||||||
+
|
|
||||||
+if ![info exists GCORE] {
|
|
||||||
+ set GCORE "${srcdir}/../gdb_gcore.sh"
|
|
||||||
+}
|
|
||||||
+verbose "using GCORE = $GCORE" 2
|
|
||||||
+
|
|
||||||
+set testfile "gcorebg"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+set corefile ${objdir}/${subdir}/${testfile}.test
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
+ untested gcorebg.exp
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Cleanup.
|
|
||||||
+
|
|
||||||
+proc core_clean {} {
|
|
||||||
+ global corefile
|
|
||||||
+
|
|
||||||
+ foreach file [glob -nocomplain [join [list $corefile *] ""]] {
|
|
||||||
+ verbose "Delete file $file" 1
|
|
||||||
+ remote_file target delete $file
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+core_clean
|
|
||||||
+remote_file target delete "./gdb"
|
|
||||||
+
|
|
||||||
+# Generate the core file.
|
|
||||||
+
|
|
||||||
+# Provide `./gdb' for `gdb_gcore.sh' running it as a bare `gdb' command.
|
|
||||||
+# Setup also `$PATH' appropriately.
|
|
||||||
+# If GDB was not found let `gdb_gcore.sh' to find the system GDB by `$PATH'.
|
|
||||||
+if {$GDB != "gdb"} {
|
|
||||||
+ file link ./gdb $GDB
|
|
||||||
+}
|
|
||||||
+global env
|
|
||||||
+set oldpath $env(PATH)
|
|
||||||
+set env(PATH) [join [list . $env(PATH)] ":"]
|
|
||||||
+verbose "PATH = $env(PATH)" 2
|
|
||||||
+
|
|
||||||
+# Test file body.
|
|
||||||
+# $detached == "standard" || $detached == "detached"
|
|
||||||
+
|
|
||||||
+proc test_body { detached } {
|
|
||||||
+ global binfile
|
|
||||||
+ global GCORE
|
|
||||||
+ global corefile
|
|
||||||
+
|
|
||||||
+ set res [remote_spawn target "$binfile $detached $GCORE $corefile"]
|
|
||||||
+ if { $res < 0 || $res == "" } {
|
|
||||||
+ fail "Spawning $detached gcore"
|
|
||||||
+ return 1
|
|
||||||
+ }
|
|
||||||
+ pass "Spawning $detached gcore"
|
|
||||||
+ remote_expect target 20 {
|
|
||||||
+ timeout {
|
|
||||||
+ fail "Spawned $detached gcore finished"
|
|
||||||
+ remote_exec target "kill -9 -[exp_pid -i $res]"
|
|
||||||
+ return 1
|
|
||||||
+ }
|
|
||||||
+ eof {
|
|
||||||
+ pass "Spawned $detached gcore finished"
|
|
||||||
+ remote_wait target 20
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if {1 == [llength [glob -nocomplain [join [list $corefile *] ""]]]} {
|
|
||||||
+ pass "Core file generated by $detached gcore"
|
|
||||||
+ } else {
|
|
||||||
+ fail "Core file generated by $detached gcore"
|
|
||||||
+ }
|
|
||||||
+ core_clean
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# First a general `gdb_gcore.sh' spawn with its controlling terminal available.
|
|
||||||
+
|
|
||||||
+test_body standard
|
|
||||||
+
|
|
||||||
+# And now `gdb_gcore.sh' spawn without its controlling terminal available.
|
|
||||||
+# It is spawned through `gcorebg.c' using setpgrp ().
|
|
||||||
+
|
|
||||||
+test_body detached
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+# Cleanup.
|
|
||||||
+
|
|
||||||
+set env(PATH) $oldpath
|
|
||||||
+remote_file target delete "./gdb"
|
|
@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
Port to GDB-6.8pre.
|
Port to GDB-6.8pre.
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/inferior.h
|
Index: gdb-7.2.50.20101116/gdb/inferior.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/inferior.h 2010-07-12 10:00:56.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/inferior.h 2010-06-24 17:17:30.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/inferior.h 2010-07-12 10:04:25.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/inferior.h 2010-11-16 07:54:36.000000000 +0100
|
||||||
@@ -198,7 +198,15 @@ extern void reopen_exec_file (void);
|
@@ -198,7 +198,15 @@ extern void reopen_exec_file (void);
|
||||||
/* The `resume' routine should only be called in special circumstances.
|
/* The `resume' routine should only be called in special circumstances.
|
||||||
Normally, use `proceed', which handles a lot of bookkeeping. */
|
Normally, use `proceed', which handles a lot of bookkeeping. */
|
||||||
@ -42,11 +42,11 @@ Index: gdb-7.1.90.20100711/gdb/inferior.h
|
|||||||
|
|
||||||
/* From misc files */
|
/* From misc files */
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/infrun.c
|
Index: gdb-7.2.50.20101116/gdb/infrun.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/infrun.c 2010-07-12 10:00:56.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/infrun.c 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/infrun.c 2010-07-12 10:05:26.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/infrun.c 2010-11-16 07:55:23.000000000 +0100
|
||||||
@@ -76,7 +76,7 @@ static int follow_fork (void);
|
@@ -74,7 +74,7 @@ static int follow_fork (void);
|
||||||
static void set_schedlock_func (char *args, int from_tty,
|
static void set_schedlock_func (char *args, int from_tty,
|
||||||
struct cmd_list_element *c);
|
struct cmd_list_element *c);
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
|
|
||||||
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
|
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
|
||||||
void *data);
|
void *data);
|
||||||
@@ -1549,7 +1549,7 @@ maybe_software_singlestep (struct gdbarc
|
@@ -1557,7 +1557,7 @@ maybe_software_singlestep (struct gdbarc
|
||||||
STEP nonzero if we should step (zero to continue instead).
|
STEP nonzero if we should step (zero to continue instead).
|
||||||
SIG is the signal to give the inferior (zero for none). */
|
SIG is the signal to give the inferior (zero for none). */
|
||||||
void
|
void
|
||||||
@ -64,8 +64,8 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
{
|
{
|
||||||
int should_resume = 1;
|
int should_resume = 1;
|
||||||
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
|
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
|
||||||
@@ -1562,10 +1562,12 @@ resume (int step, enum target_signal sig
|
@@ -1589,10 +1589,12 @@ resume (int step, enum target_signal sig
|
||||||
QUIT;
|
}
|
||||||
|
|
||||||
if (debug_infrun)
|
if (debug_infrun)
|
||||||
- fprintf_unfiltered (gdb_stdlog,
|
- fprintf_unfiltered (gdb_stdlog,
|
||||||
@ -81,7 +81,7 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
|
|
||||||
/* Normally, by the time we reach `resume', the breakpoints are either
|
/* Normally, by the time we reach `resume', the breakpoints are either
|
||||||
removed or inserted, as appropriate. The exception is if we're sitting
|
removed or inserted, as appropriate. The exception is if we're sitting
|
||||||
@@ -1678,9 +1680,10 @@ a command like `return' or `jump' to con
|
@@ -1710,9 +1712,10 @@ a command like `return' or `jump' to con
|
||||||
individually. */
|
individually. */
|
||||||
resume_ptid = inferior_ptid;
|
resume_ptid = inferior_ptid;
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
{
|
{
|
||||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||||
resume_ptid = inferior_ptid;
|
resume_ptid = inferior_ptid;
|
||||||
@@ -1889,7 +1892,7 @@ proceed (CORE_ADDR addr, enum target_sig
|
@@ -1921,7 +1924,7 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||||
struct thread_info *tp;
|
struct thread_info *tp;
|
||||||
CORE_ADDR pc;
|
CORE_ADDR pc;
|
||||||
struct address_space *aspace;
|
struct address_space *aspace;
|
||||||
@ -103,7 +103,7 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
|
|
||||||
/* If we're stopped at a fork/vfork, follow the branch set by the
|
/* If we're stopped at a fork/vfork, follow the branch set by the
|
||||||
"set follow-fork-mode" command; otherwise, we'll just proceed
|
"set follow-fork-mode" command; otherwise, we'll just proceed
|
||||||
@@ -1924,13 +1927,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
@@ -1956,13 +1959,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||||
actually be executing the breakpoint insn anyway.
|
actually be executing the breakpoint insn anyway.
|
||||||
We'll be (un-)executing the previous instruction. */
|
We'll be (un-)executing the previous instruction. */
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1971,13 +1974,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
@@ -2003,13 +2006,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||||
is required it returns TRUE and sets the current thread to
|
is required it returns TRUE and sets the current thread to
|
||||||
the old thread. */
|
the old thread. */
|
||||||
if (prepare_to_proceed (step))
|
if (prepare_to_proceed (step))
|
||||||
@ -135,7 +135,7 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
{
|
{
|
||||||
tp->trap_expected = 1;
|
tp->trap_expected = 1;
|
||||||
/* If displaced stepping is enabled, we can step over the
|
/* If displaced stepping is enabled, we can step over the
|
||||||
@@ -2064,8 +2067,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
@@ -2096,8 +2099,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||||
/* Reset to normal state. */
|
/* Reset to normal state. */
|
||||||
init_infwait_state ();
|
init_infwait_state ();
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
|
|
||||||
/* Wait for it to stop (if not standalone)
|
/* Wait for it to stop (if not standalone)
|
||||||
and in any case decode why it stopped, and act accordingly. */
|
and in any case decode why it stopped, and act accordingly. */
|
||||||
@@ -4903,13 +4911,18 @@ infrun: not switching back to stepped th
|
@@ -4859,13 +4867,18 @@ infrun: not switching back to stepped th
|
||||||
|
|
||||||
/* Is thread TP in the middle of single-stepping? */
|
/* Is thread TP in the middle of single-stepping? */
|
||||||
|
|
||||||
@ -174,11 +174,11 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Returns true if any thread *but* the one passed in "data" is in the
|
/* Returns true if any thread *but* the one passed in "data" is in the
|
||||||
Index: gdb-7.1.90.20100711/gdb/linux-nat.c
|
Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/linux-nat.c 2010-07-12 10:00:56.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/linux-nat.c 2010-07-12 10:04:25.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 07:54:36.000000000 +0100
|
||||||
@@ -2827,7 +2827,10 @@ count_events_callback (struct lwp_info *
|
@@ -2883,7 +2883,10 @@ count_events_callback (struct lwp_info *
|
||||||
static int
|
static int
|
||||||
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
|
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
|
||||||
{
|
{
|
||||||
@ -190,10 +190,10 @@ Index: gdb-7.1.90.20100711/gdb/linux-nat.c
|
|||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
Index: gdb-7.1.90.20100711/gdb/linux-nat.h
|
Index: gdb-7.2.50.20101116/gdb/linux-nat.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/linux-nat.h 2010-06-11 14:10:12.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.h 2010-07-27 22:51:37.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/linux-nat.h 2010-07-12 10:04:25.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/linux-nat.h 2010-11-16 07:54:36.000000000 +0100
|
||||||
@@ -55,8 +55,8 @@ struct lwp_info
|
@@ -55,8 +55,8 @@ struct lwp_info
|
||||||
/* If non-zero, a pending wait status. */
|
/* If non-zero, a pending wait status. */
|
||||||
int status;
|
int status;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: gdb-6.8.50.20090811/gdb/linux-nat.c
|
Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-6.8.50.20090811.orig/gdb/linux-nat.c 2009-08-12 07:21:20.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 07:58:15.000000000 +0100
|
||||||
+++ gdb-6.8.50.20090811/gdb/linux-nat.c 2009-08-12 08:11:25.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 07:59:06.000000000 +0100
|
||||||
@@ -1656,16 +1656,18 @@ resume_set_callback (struct lwp_info *lp
|
@@ -1863,16 +1863,18 @@ resume_set_callback (struct lwp_info *lp
|
||||||
|
|
||||||
static void
|
static void
|
||||||
linux_nat_resume (struct target_ops *ops,
|
linux_nat_resume (struct target_ops *ops,
|
||||||
@ -21,9 +21,9 @@ Index: gdb-6.8.50.20090811/gdb/linux-nat.c
|
|||||||
+ (step == RESUME_STEP_NEEDED
|
+ (step == RESUME_STEP_NEEDED
|
||||||
+ ? "needed" : (step ? "step" : "resume")),
|
+ ? "needed" : (step ? "step" : "resume")),
|
||||||
target_pid_to_str (ptid),
|
target_pid_to_str (ptid),
|
||||||
signo ? strsignal (signo) : "0",
|
(signo != TARGET_SIGNAL_0
|
||||||
target_pid_to_str (inferior_ptid));
|
? strsignal (target_signal_to_host (signo)) : "0"),
|
||||||
@@ -2625,10 +2627,34 @@ linux_nat_filter_event (int lwpid, int s
|
@@ -3171,10 +3173,34 @@ linux_nat_filter_event (int lwpid, int s
|
||||||
|
|
||||||
if (num_lwps (GET_PID (lp->ptid)) > 1)
|
if (num_lwps (GET_PID (lp->ptid)) > 1)
|
||||||
{
|
{
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
Original patch was:
|
|
||||||
http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2007-12/msg00123.html
|
|
||||||
|
|
||||||
extended for the RHEL safety:
|
|
||||||
|
|
||||||
2007-12-28 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* dwarf2read.c (fixup_partial_die): Provide full
|
|
||||||
`DW_TAG_class_type'-type backing for `DW_TAG_interface_type', even for
|
|
||||||
namespaces which should not apply for Java `DW_TAG_interface_type'.
|
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
|
|
||||||
Index: ./gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
|
|
||||||
retrieving revision 1.245
|
|
||||||
diff -u -p -r1.245 dwarf2read.c
|
|
||||||
--- ./gdb/dwarf2read.c 26 Dec 2007 12:36:18 -0000 1.245
|
|
||||||
+++ ./gdb/dwarf2read.c 27 Dec 2007 23:25:49 -0000
|
|
||||||
@@ -5887,7 +5887,8 @@ fixup_partial_die (struct partial_die_in
|
|
||||||
|
|
||||||
/* Set default names for some unnamed DIEs. */
|
|
||||||
if (part_die->name == NULL && (part_die->tag == DW_TAG_structure_type
|
|
||||||
- || part_die->tag == DW_TAG_class_type))
|
|
||||||
+ || part_die->tag == DW_TAG_class_type
|
|
||||||
+ || part_die->tag == DW_TAG_interface_type))
|
|
||||||
part_die->name = "(anonymous class)";
|
|
||||||
|
|
||||||
if (part_die->name == NULL && part_die->tag == DW_TAG_namespace)
|
|
||||||
@@ -5895,6 +5896,7 @@ fixup_partial_die (struct partial_die_in
|
|
||||||
|
|
||||||
if (part_die->tag == DW_TAG_structure_type
|
|
||||||
|| part_die->tag == DW_TAG_class_type
|
|
||||||
+ || part_die->tag == DW_TAG_interface_type
|
|
||||||
|| part_die->tag == DW_TAG_union_type)
|
|
||||||
guess_structure_name (part_die, cu);
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/dwarf2read.c 2010-07-12 23:07:35.000000000 +0200
|
|
||||||
+++ gdb-7.1.90.20100711/gdb/dwarf2read.c 2010-07-13 00:13:02.000000000 +0200
|
|
||||||
@@ -2251,6 +2251,7 @@ scan_partial_symbols (struct partial_die
|
|
||||||
add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu);
|
|
||||||
break;
|
|
||||||
case DW_TAG_variable:
|
|
||||||
+ case DW_TAG_constant:
|
|
||||||
case DW_TAG_typedef:
|
|
||||||
case DW_TAG_union_type:
|
|
||||||
if (!pdi->is_declaration)
|
|
||||||
@@ -2452,6 +2453,7 @@ add_partial_symbol (struct partial_die_i
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case DW_TAG_variable:
|
|
||||||
+ case DW_TAG_constant:
|
|
||||||
if (pdi->is_external)
|
|
||||||
{
|
|
||||||
/* Global Variable.
|
|
||||||
@@ -3289,6 +3291,7 @@ die_needs_namespace (struct die_info *di
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
case DW_TAG_variable:
|
|
||||||
+ case DW_TAG_constant:
|
|
||||||
/* We only need to prefix "globally" visible variables. These include
|
|
||||||
any variable marked with DW_AT_external or any variable that
|
|
||||||
lives in a namespace. [Variables in anonymous namespaces
|
|
||||||
@@ -4638,7 +4641,8 @@ dwarf2_add_field (struct field_info *fip
|
|
||||||
fip->non_public_fields = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable)
|
|
||||||
+ else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable
|
|
||||||
+ || die->tag == DW_TAG_constant)
|
|
||||||
{
|
|
||||||
/* C++ static member. */
|
|
||||||
|
|
||||||
@@ -5250,7 +5254,8 @@ read_structure_type (struct die_info *di
|
|
||||||
while (child_die && child_die->tag)
|
|
||||||
{
|
|
||||||
if (child_die->tag == DW_TAG_member
|
|
||||||
- || child_die->tag == DW_TAG_variable)
|
|
||||||
+ || child_die->tag == DW_TAG_variable
|
|
||||||
+ || child_die->tag == DW_TAG_constant)
|
|
||||||
{
|
|
||||||
/* NOTE: carlton/2002-11-05: A C++ static data member
|
|
||||||
should be a DW_TAG_member that is a declaration, but
|
|
||||||
@@ -5396,6 +5401,7 @@ process_structure_scope (struct die_info
|
|
||||||
{
|
|
||||||
if (child_die->tag == DW_TAG_member
|
|
||||||
|| child_die->tag == DW_TAG_variable
|
|
||||||
+ || child_die->tag == DW_TAG_constant
|
|
||||||
|| child_die->tag == DW_TAG_inheritance)
|
|
||||||
{
|
|
||||||
/* Do nothing. */
|
|
||||||
@@ -7109,6 +7115,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)
|
|
||||||
@@ -7217,6 +7224,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
|
||||||
if (load_all
|
|
||||||
|| abbrev->tag == DW_TAG_subprogram
|
|
||||||
|| abbrev->tag == DW_TAG_variable
|
|
||||||
+ || abbrev->tag == DW_TAG_constant
|
|
||||||
|| abbrev->tag == DW_TAG_namespace
|
|
||||||
|| part_die->is_declaration)
|
|
||||||
{
|
|
||||||
@@ -9059,6 +9067,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;
|
|
||||||
+ case DW_TAG_constant:
|
|
||||||
+ SYMBOL_TYPE (sym) = make_cv_type (1,
|
|
||||||
+ TYPE_VOLATILE (SYMBOL_TYPE (sym)),
|
|
||||||
+ SYMBOL_TYPE (sym), NULL);
|
|
||||||
+ /* PASSTHRU */
|
|
||||||
case DW_TAG_variable:
|
|
||||||
case DW_TAG_member:
|
|
||||||
/* Compilation with minimal debug info may result in variables
|
|
@ -1,8 +1,8 @@
|
|||||||
Index: gdb-7.1.90.20100711/gdb/breakpoint.c
|
Index: gdb-7.2.50.20101116/gdb/breakpoint.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/breakpoint.c 2010-07-12 23:07:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/breakpoint.c 2010-11-16 07:53:58.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/breakpoint.c 2010-07-13 00:38:04.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/breakpoint.c 2010-11-16 08:28:53.000000000 +0100
|
||||||
@@ -10159,6 +10159,50 @@ update_breakpoint_locations (struct brea
|
@@ -10249,6 +10249,50 @@ update_breakpoint_locations (struct brea
|
||||||
update_global_location_list (1);
|
update_global_location_list (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,23 +53,23 @@ Index: gdb-7.1.90.20100711/gdb/breakpoint.c
|
|||||||
/* Reset a breakpoint given it's struct breakpoint * BINT.
|
/* Reset a breakpoint given it's struct breakpoint * BINT.
|
||||||
The value we return ends up being the return value from catch_errors.
|
The value we return ends up being the return value from catch_errors.
|
||||||
Unused in this case. */
|
Unused in this case. */
|
||||||
Index: gdb-7.1.90.20100711/gdb/breakpoint.h
|
Index: gdb-7.2.50.20101116/gdb/breakpoint.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/breakpoint.h 2010-07-12 23:07:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/breakpoint.h 2010-11-16 07:53:58.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/breakpoint.h 2010-07-13 00:37:34.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/breakpoint.h 2010-11-16 08:29:06.000000000 +0100
|
||||||
@@ -1088,4 +1088,7 @@ extern void check_tracepoint_command (ch
|
@@ -1128,4 +1128,7 @@ extern void end_rbreak_breakpoints (void
|
||||||
extern void start_rbreak_breakpoints (void);
|
extern struct breakpoint *iterate_over_breakpoints (int (*) (struct breakpoint *,
|
||||||
extern void end_rbreak_breakpoints (void);
|
void *), void *);
|
||||||
|
|
||||||
+extern void breakpoints_relocate (struct objfile *objfile,
|
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||||
+ struct section_offsets *delta);
|
+ struct section_offsets *delta);
|
||||||
+
|
+
|
||||||
#endif /* !defined (BREAKPOINT_H) */
|
#endif /* !defined (BREAKPOINT_H) */
|
||||||
Index: gdb-7.1.90.20100711/gdb/objfiles.c
|
Index: gdb-7.2.50.20101116/gdb/objfiles.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/objfiles.c 2010-05-16 02:46:46.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/objfiles.c 2010-10-17 19:45:16.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/objfiles.c 2010-07-13 00:37:19.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/objfiles.c 2010-11-16 08:28:53.000000000 +0100
|
||||||
@@ -834,6 +834,11 @@ objfile_relocate1 (struct objfile *objfi
|
@@ -844,6 +844,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||||
obj_section_addr (s));
|
obj_section_addr (s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/dwarf2read.c 2010-07-13 00:26:25.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/dwarf2read.c 2010-11-16 08:25:21.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/dwarf2read.c 2010-07-13 00:34:00.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/dwarf2read.c 2010-11-16 08:26:35.000000000 +0100
|
||||||
@@ -5737,7 +5737,12 @@ read_common_block (struct die_info *die,
|
@@ -7325,7 +7325,12 @@ read_common_block (struct die_info *die,
|
||||||
{
|
{
|
||||||
struct attribute *attr;
|
struct attribute *attr;
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
@ -16,7 +16,7 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
|
|
||||||
attr = dwarf2_attr (die, DW_AT_location, cu);
|
attr = dwarf2_attr (die, DW_AT_location, cu);
|
||||||
if (attr)
|
if (attr)
|
||||||
@@ -5746,6 +5751,7 @@ read_common_block (struct die_info *die,
|
@@ -7334,6 +7339,7 @@ read_common_block (struct die_info *die,
|
||||||
if (attr_form_is_block (attr))
|
if (attr_form_is_block (attr))
|
||||||
{
|
{
|
||||||
base = decode_locdesc (DW_BLOCK (attr), cu);
|
base = decode_locdesc (DW_BLOCK (attr), cu);
|
||||||
@ -24,7 +24,7 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
}
|
}
|
||||||
else if (attr_form_is_section_offset (attr))
|
else if (attr_form_is_section_offset (attr))
|
||||||
{
|
{
|
||||||
@@ -5807,12 +5813,15 @@ read_common_block (struct die_info *die,
|
@@ -7395,12 +7401,15 @@ read_common_block (struct die_info *die,
|
||||||
else
|
else
|
||||||
dwarf2_complex_location_expr_complaint ();
|
dwarf2_complex_location_expr_complaint ();
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
else
|
else
|
||||||
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
|
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
|
||||||
FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
|
FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
|
||||||
@@ -5826,7 +5835,7 @@ read_common_block (struct die_info *die,
|
@@ -7414,7 +7423,7 @@ read_common_block (struct die_info *die,
|
||||||
|
|
||||||
sym = new_symbol (die, type, cu);
|
sym = new_symbol (die, type, cu);
|
||||||
/* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
|
/* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
|
||||||
@ -51,10 +51,10 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
|
|
||||||
set_die_type (die, type, cu);
|
set_die_type (die, type, cu);
|
||||||
}
|
}
|
||||||
Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
|
Index: gdb-7.2.50.20101116/gdb/gdbtypes.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/gdbtypes.h 2010-07-12 23:07:34.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/gdbtypes.h 2010-11-16 08:01:33.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/gdbtypes.h 2010-07-13 00:34:00.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/gdbtypes.h 2010-11-16 08:26:35.000000000 +0100
|
||||||
@@ -395,6 +395,7 @@ enum type_instance_flag_value
|
@@ -395,6 +395,7 @@ enum type_instance_flag_value
|
||||||
enum field_loc_kind
|
enum field_loc_kind
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
|
|||||||
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
|
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
|
||||||
FIELD_LOC_KIND_PHYSNAME /* physname */
|
FIELD_LOC_KIND_PHYSNAME /* physname */
|
||||||
};
|
};
|
||||||
@@ -577,6 +578,7 @@ struct main_type
|
@@ -576,6 +577,7 @@ struct main_type
|
||||||
is the location (in the target) of the static field.
|
is the location (in the target) of the static field.
|
||||||
Otherwise, physname is the mangled label of the static field. */
|
Otherwise, physname is the mangled label of the static field. */
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
|
|||||||
CORE_ADDR physaddr;
|
CORE_ADDR physaddr;
|
||||||
char *physname;
|
char *physname;
|
||||||
}
|
}
|
||||||
@@ -1073,6 +1075,7 @@ extern void allocate_gnat_aux_type (stru
|
@@ -1101,6 +1103,7 @@ extern void allocate_gnat_aux_type (stru
|
||||||
#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
|
#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
|
||||||
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
|
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
|
||||||
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||||
@ -79,7 +79,7 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
|
|||||||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
|
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
|
||||||
@@ -1080,6 +1083,7 @@ extern void allocate_gnat_aux_type (stru
|
@@ -1108,6 +1111,7 @@ extern void allocate_gnat_aux_type (stru
|
||||||
#define SET_FIELD_PHYSNAME(thisfld, name) \
|
#define SET_FIELD_PHYSNAME(thisfld, name) \
|
||||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
||||||
FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
||||||
@ -87,7 +87,7 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
|
|||||||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||||
@@ -1092,6 +1096,7 @@ extern void allocate_gnat_aux_type (stru
|
@@ -1120,6 +1124,7 @@ extern void allocate_gnat_aux_type (stru
|
||||||
#define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
|
#define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
|
||||||
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
||||||
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
||||||
@ -95,10 +95,10 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
|
|||||||
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
||||||
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
||||||
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
|
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
|
||||||
Index: gdb-7.1.90.20100711/gdb/jv-lang.c
|
Index: gdb-7.2.50.20101116/gdb/jv-lang.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/jv-lang.c 2010-05-17 19:18:39.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/jv-lang.c 2010-08-09 21:42:47.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/jv-lang.c 2010-07-13 00:34:00.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/jv-lang.c 2010-11-16 08:26:35.000000000 +0100
|
||||||
@@ -409,7 +409,8 @@ java_link_class_type (struct gdbarch *gd
|
@@ -409,7 +409,8 @@ java_link_class_type (struct gdbarch *gd
|
||||||
|
|
||||||
fields = NULL;
|
fields = NULL;
|
||||||
@ -119,11 +119,11 @@ Index: gdb-7.1.90.20100711/gdb/jv-lang.c
|
|||||||
else
|
else
|
||||||
TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
|
TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
|
||||||
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
||||||
Index: gdb-7.1.90.20100711/gdb/value.c
|
Index: gdb-7.2.50.20101116/gdb/value.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/value.c 2010-07-12 23:07:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/value.c 2010-11-16 07:54:00.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/value.c 2010-07-13 00:35:21.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/value.c 2010-11-16 08:26:35.000000000 +0100
|
||||||
@@ -1943,7 +1943,8 @@ value_static_field (struct type *type, i
|
@@ -1965,7 +1965,8 @@ value_static_field (struct type *type, i
|
||||||
{
|
{
|
||||||
case FIELD_LOC_KIND_PHYSADDR:
|
case FIELD_LOC_KIND_PHYSADDR:
|
||||||
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
||||||
@ -133,13 +133,3 @@ Index: gdb-7.1.90.20100711/gdb/value.c
|
|||||||
break;
|
break;
|
||||||
case FIELD_LOC_KIND_PHYSNAME:
|
case FIELD_LOC_KIND_PHYSNAME:
|
||||||
{
|
{
|
||||||
@@ -1977,7 +1978,8 @@ value_static_field (struct type *type, i
|
|
||||||
}
|
|
||||||
if (retval && VALUE_LVAL (retval) == lval_memory)
|
|
||||||
SET_FIELD_PHYSADDR (TYPE_FIELD (type, fieldno),
|
|
||||||
- value_address (retval));
|
|
||||||
+ value_address (retval)
|
|
||||||
+ - (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
|
7163
gdb-archer.patch
7163
gdb-archer.patch
File diff suppressed because it is too large
Load Diff
@ -1,12 +0,0 @@
|
|||||||
--- a/gdb/gdb_gcore.sh
|
|
||||||
+++ b/gdb/gdb_gcore.sh
|
|
||||||
@@ -64,6 +64,9 @@ for pid in $*
|
|
||||||
do
|
|
||||||
# Write gdb script for pid $pid.
|
|
||||||
cat >>$tmpfile <<EOF
|
|
||||||
+set pagination off
|
|
||||||
+set width 0
|
|
||||||
+set height 0
|
|
||||||
attach $pid
|
|
||||||
gcore $name.$pid
|
|
||||||
detach
|
|
@ -12,10 +12,10 @@
|
|||||||
* gdb.python/pr10659.exp. New file.
|
* gdb.python/pr10659.exp. New file.
|
||||||
* gdb.python/pr10659.py: New file.
|
* gdb.python/pr10659.py: New file.
|
||||||
|
|
||||||
Index: gdb-7.1/gdb/valprint.h
|
Index: gdb-7.2.50.20101116/gdb/valprint.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.orig/gdb/valprint.h 2010-06-30 14:02:16.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/valprint.h 2010-11-03 15:21:57.000000000 +0100
|
||||||
+++ gdb-7.1/gdb/valprint.h 2010-06-30 14:35:24.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/valprint.h 2010-11-16 08:31:56.000000000 +0100
|
||||||
@@ -90,6 +90,9 @@ struct value_print_options
|
@@ -90,6 +90,9 @@ struct value_print_options
|
||||||
|
|
||||||
/* If nonzero, print the value in "summary" form. */
|
/* If nonzero, print the value in "summary" form. */
|
||||||
@ -26,11 +26,11 @@ Index: gdb-7.1/gdb/valprint.h
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The global print options set by the user. In general this should
|
/* The global print options set by the user. In general this should
|
||||||
Index: gdb-7.1/gdb/python/py-prettyprint.c
|
Index: gdb-7.2.50.20101116/gdb/python/py-prettyprint.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.orig/gdb/python/py-prettyprint.c 2010-06-30 14:01:40.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/python/py-prettyprint.c 2010-11-12 21:49:42.000000000 +0100
|
||||||
+++ gdb-7.1/gdb/python/py-prettyprint.c 2010-06-30 14:34:49.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/python/py-prettyprint.c 2010-11-16 08:36:32.000000000 +0100
|
||||||
@@ -385,7 +385,8 @@ print_children (PyObject *printer, const
|
@@ -499,7 +499,8 @@ print_children (PyObject *printer, const
|
||||||
|
|
||||||
/* Use the prettyprint_arrays option if we are printing an array,
|
/* Use the prettyprint_arrays option if we are printing an array,
|
||||||
and the pretty option otherwise. */
|
and the pretty option otherwise. */
|
||||||
@ -40,7 +40,7 @@ Index: gdb-7.1/gdb/python/py-prettyprint.c
|
|||||||
|
|
||||||
/* Manufacture a dummy Python frame to work around Python 2.4 bug,
|
/* Manufacture a dummy Python frame to work around Python 2.4 bug,
|
||||||
where it insists on having a non-NULL tstate->frame when
|
where it insists on having a non-NULL tstate->frame when
|
||||||
@@ -397,6 +398,9 @@ print_children (PyObject *printer, const
|
@@ -511,6 +512,9 @@ print_children (PyObject *printer, const
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
make_cleanup_py_decref (frame);
|
make_cleanup_py_decref (frame);
|
||||||
@ -50,7 +50,7 @@ Index: gdb-7.1/gdb/python/py-prettyprint.c
|
|||||||
|
|
||||||
done_flag = 0;
|
done_flag = 0;
|
||||||
for (i = 0; i < options->print_max; ++i)
|
for (i = 0; i < options->print_max; ++i)
|
||||||
@@ -431,12 +435,23 @@ print_children (PyObject *printer, const
|
@@ -545,12 +549,23 @@ print_children (PyObject *printer, const
|
||||||
3. Other. Always print a ",". */
|
3. Other. Always print a ",". */
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ Index: gdb-7.1/gdb/python/py-prettyprint.c
|
|||||||
else if (! is_map || i % 2 == 0)
|
else if (! is_map || i % 2 == 0)
|
||||||
fputs_filtered (pretty ? "," : ", ", stream);
|
fputs_filtered (pretty ? "," : ", ", stream);
|
||||||
|
|
||||||
@@ -465,6 +480,10 @@ print_children (PyObject *printer, const
|
@@ -579,6 +594,10 @@ print_children (PyObject *printer, const
|
||||||
|
|
||||||
if (is_map && i % 2 == 0)
|
if (is_map && i % 2 == 0)
|
||||||
fputs_filtered ("[", stream);
|
fputs_filtered ("[", stream);
|
||||||
@ -90,7 +90,7 @@ Index: gdb-7.1/gdb/python/py-prettyprint.c
|
|||||||
else if (is_array)
|
else if (is_array)
|
||||||
{
|
{
|
||||||
/* We print the index, not whatever the child method
|
/* We print the index, not whatever the child method
|
||||||
@@ -539,7 +558,12 @@ print_children (PyObject *printer, const
|
@@ -655,7 +674,12 @@ print_children (PyObject *printer, const
|
||||||
fputs_filtered ("\n", stream);
|
fputs_filtered ("\n", stream);
|
||||||
print_spaces_filtered (2 * recurse, stream);
|
print_spaces_filtered (2 * recurse, stream);
|
||||||
}
|
}
|
||||||
@ -104,15 +104,15 @@ Index: gdb-7.1/gdb/python/py-prettyprint.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@@ -561,6 +585,7 @@ apply_val_pretty_printer (struct type *t
|
@@ -678,6 +702,7 @@ apply_val_pretty_printer (struct type *t
|
||||||
struct cleanup *cleanups;
|
struct cleanup *cleanups;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int is_py_none = 0;
|
enum string_repr_result print_result;
|
||||||
+ struct value_print_options *options_copy;
|
+ struct value_print_options *options_copy;
|
||||||
cleanups = ensure_python_env (gdbarch, language);
|
cleanups = ensure_python_env (gdbarch, language);
|
||||||
|
|
||||||
/* Instantiate the printer. */
|
/* Instantiate the printer. */
|
||||||
@@ -582,12 +607,23 @@ apply_val_pretty_printer (struct type *t
|
@@ -709,9 +734,21 @@ apply_val_pretty_printer (struct type *t
|
||||||
|
|
||||||
/* If we are printing a map, we want some special formatting. */
|
/* If we are printing a map, we want some special formatting. */
|
||||||
hint = gdbpy_get_display_hint (printer);
|
hint = gdbpy_get_display_hint (printer);
|
||||||
@ -128,21 +128,16 @@ Index: gdb-7.1/gdb/python/py-prettyprint.c
|
|||||||
make_cleanup (free_current_contents, &hint);
|
make_cleanup (free_current_contents, &hint);
|
||||||
|
|
||||||
/* Print the section */
|
/* Print the section */
|
||||||
- is_py_none = print_string_repr (printer, hint, stream, recurse,
|
+ if (options_copy->prettyprint_matrix)
|
||||||
- options, language, gdbarch);
|
+ print_result = string_repr_none;
|
||||||
- print_children (printer, hint, stream, recurse, options, language,
|
+else /* Red Hat 2D matrix patch */
|
||||||
+ is_py_none = options_copy->prettyprint_matrix ?
|
print_result = print_string_repr (printer, hint, stream, recurse,
|
||||||
+ 1 : print_string_repr (printer, hint, stream,
|
options, language, gdbarch);
|
||||||
+ recurse, options_copy,
|
if (print_result != string_repr_error)
|
||||||
+ language, gdbarch);
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.python/pr10659.cc
|
||||||
+ print_children (printer, hint, stream, recurse, options_copy, language,
|
|
||||||
is_py_none);
|
|
||||||
|
|
||||||
result = 1;
|
|
||||||
Index: gdb-7.1/gdb/testsuite/gdb.python/pr10659.cc
|
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.1/gdb/testsuite/gdb.python/pr10659.cc 2010-06-30 14:34:49.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.python/pr10659.cc 2010-11-16 08:31:56.000000000 +0100
|
||||||
@@ -0,0 +1,43 @@
|
@@ -0,0 +1,43 @@
|
||||||
+#include <list>
|
+#include <list>
|
||||||
+#include <vector> // /usr/include/c++/4.4.1/bits/vector.tcc
|
+#include <vector> // /usr/include/c++/4.4.1/bits/vector.tcc
|
||||||
@ -187,10 +182,10 @@ Index: gdb-7.1/gdb/testsuite/gdb.python/pr10659.cc
|
|||||||
+
|
+
|
||||||
+ return 0; // break
|
+ return 0; // break
|
||||||
+}
|
+}
|
||||||
Index: gdb-7.1/gdb/testsuite/gdb.python/pr10659.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.python/pr10659.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.1/gdb/testsuite/gdb.python/pr10659.exp 2010-06-30 14:34:49.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.python/pr10659.exp 2010-11-16 08:31:56.000000000 +0100
|
||||||
@@ -0,0 +1,82 @@
|
@@ -0,0 +1,82 @@
|
||||||
+#Copyright 2010 Free Software Foundation, Inc.
|
+#Copyright 2010 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
@ -274,10 +269,10 @@ Index: gdb-7.1/gdb/testsuite/gdb.python/pr10659.exp
|
|||||||
+#
|
+#
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
Index: gdb-7.1/gdb/testsuite/gdb.python/pr10659.py
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.python/pr10659.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.1/gdb/testsuite/gdb.python/pr10659.py 2010-06-30 14:34:49.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.python/pr10659.py 2010-11-16 08:31:56.000000000 +0100
|
||||||
@@ -0,0 +1,109 @@
|
@@ -0,0 +1,109 @@
|
||||||
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
|
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
@ -388,11 +383,11 @@ Index: gdb-7.1/gdb/testsuite/gdb.python/pr10659.py
|
|||||||
+fake_pretty_printers_dict = {}
|
+fake_pretty_printers_dict = {}
|
||||||
+
|
+
|
||||||
+build_libfakecxx_dictionary ()
|
+build_libfakecxx_dictionary ()
|
||||||
Index: gdb-7.1/gdb/valprint.c
|
Index: gdb-7.2.50.20101116/gdb/valprint.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.orig/gdb/valprint.c 2010-06-30 13:51:26.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/valprint.c 2010-11-16 07:54:00.000000000 +0100
|
||||||
+++ gdb-7.1/gdb/valprint.c 2010-06-30 14:35:41.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/valprint.c 2010-11-16 08:31:56.000000000 +0100
|
||||||
@@ -83,7 +83,8 @@ struct value_print_options user_print_op
|
@@ -85,7 +85,8 @@ struct value_print_options user_print_op
|
||||||
1, /* static_field_print */
|
1, /* static_field_print */
|
||||||
1, /* pascal_static_field_print */
|
1, /* pascal_static_field_print */
|
||||||
0, /* raw */
|
0, /* raw */
|
||||||
|
@ -1,630 +0,0 @@
|
|||||||
Made more safe (but less effective) by using a linked list.
|
|
||||||
|
|
||||||
Based on:
|
|
||||||
Re: [RFA] Delayed physname computation
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-05/msg00248.html
|
|
||||||
|
|
||||||
Neither its obstack-leak.patch nor
|
|
||||||
[patch] Fix duplicate types for single DIE
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-05/msg00271.html
|
|
||||||
is needed as the linked list is used instead.
|
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100721/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.1.90.20100721.orig/gdb/dwarf2read.c 2010-07-22 11:59:19.000000000 +0200
|
|
||||||
+++ gdb-7.1.90.20100721/gdb/dwarf2read.c 2010-07-22 12:00:08.000000000 +0200
|
|
||||||
@@ -253,6 +253,28 @@ struct comp_unit_head
|
|
||||||
unsigned int first_die_offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
+/* Type used for delaying computation of method physnames.
|
|
||||||
+ See comments for compute_delayed_physnames. */
|
|
||||||
+struct delayed_method_info
|
|
||||||
+{
|
|
||||||
+ struct delayed_method_info *next;
|
|
||||||
+
|
|
||||||
+ /* The type to which the method is attached, i.e., its parent class. */
|
|
||||||
+ struct type *type;
|
|
||||||
+
|
|
||||||
+ /* The index of the method in the type's function fieldlists. */
|
|
||||||
+ int fnfield_index;
|
|
||||||
+
|
|
||||||
+ /* The index of the method in the fieldlist. */
|
|
||||||
+ int index;
|
|
||||||
+
|
|
||||||
+ /* The name of the DIE. */
|
|
||||||
+ const char *name;
|
|
||||||
+
|
|
||||||
+ /* The DIE associated with this method. */
|
|
||||||
+ struct die_info *die;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
/* Internal state when decoding a particular compilation unit. */
|
|
||||||
struct dwarf2_cu
|
|
||||||
{
|
|
||||||
@@ -331,6 +353,10 @@ struct dwarf2_cu
|
|
||||||
/* Header data from the line table, during full symbol processing. */
|
|
||||||
struct line_header *line_header;
|
|
||||||
|
|
||||||
+ /* A list of methods which need to have physnames computed
|
|
||||||
+ after all type information has been read. */
|
|
||||||
+ struct delayed_method_info *method_list;
|
|
||||||
+
|
|
||||||
/* Mark used when releasing cached dies. */
|
|
||||||
unsigned int mark : 1;
|
|
||||||
|
|
||||||
@@ -1239,6 +1265,9 @@ static gdb_byte *partial_read_comp_unit_
|
|
||||||
static void init_cu_die_reader (struct die_reader_specs *reader,
|
|
||||||
struct dwarf2_cu *cu);
|
|
||||||
|
|
||||||
+static const char *dwarf2_physname (char *name, struct die_info *die,
|
|
||||||
+ struct dwarf2_cu *cu);
|
|
||||||
+
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
|
|
||||||
/* Convert VALUE between big- and little-endian. */
|
|
||||||
@@ -4103,6 +4132,58 @@ load_full_comp_unit (struct dwarf2_per_c
|
|
||||||
discard_cleanups (free_cu_cleanup);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Add a DIE to the delayed physname list. */
|
|
||||||
+static void
|
|
||||||
+add_to_method_list (struct type *type, int fnfield_index, int index,
|
|
||||||
+ const char *name, struct die_info *die,
|
|
||||||
+ struct dwarf2_cu *cu)
|
|
||||||
+{
|
|
||||||
+ struct delayed_method_info *mi;
|
|
||||||
+
|
|
||||||
+ mi = xmalloc (sizeof (*mi));
|
|
||||||
+ mi->next = cu->method_list;
|
|
||||||
+ cu->method_list = mi;
|
|
||||||
+ mi->type = type;
|
|
||||||
+ mi->fnfield_index = fnfield_index;
|
|
||||||
+ mi->index = index;
|
|
||||||
+ mi->name = name;
|
|
||||||
+ mi->die = die;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* Compute the physnames of any methods on the CU's method list.
|
|
||||||
+
|
|
||||||
+ The computation of method physnames is delayed in order to avoid the
|
|
||||||
+ (bad) condition that one of the method's formal parameters is of an as yet
|
|
||||||
+ incomplete type. */
|
|
||||||
+static void
|
|
||||||
+compute_delayed_physnames (struct dwarf2_cu *cu)
|
|
||||||
+{
|
|
||||||
+ struct delayed_method_info *mi;
|
|
||||||
+
|
|
||||||
+ for (mi = cu->method_list; mi; mi = mi->next)
|
|
||||||
+ {
|
|
||||||
+ char *physname;
|
|
||||||
+ struct fn_fieldlist *fn_flp
|
|
||||||
+ = &TYPE_FN_FIELDLIST (mi->type, mi->fnfield_index);
|
|
||||||
+ physname = (char *) dwarf2_physname ((char *) mi->name, mi->die, cu);
|
|
||||||
+ fn_flp->fn_fields[mi->index].physname = physname ? physname : "";
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+method_list_cleanup (void *arg)
|
|
||||||
+{
|
|
||||||
+ struct delayed_method_info **method_list_pointer = arg;
|
|
||||||
+
|
|
||||||
+ while (*method_list_pointer)
|
|
||||||
+ {
|
|
||||||
+ struct delayed_method_info *mi = *method_list_pointer;
|
|
||||||
+
|
|
||||||
+ *method_list_pointer = mi->next;
|
|
||||||
+ xfree (mi);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Generate full symbol information for PST and CU, whose DIEs have
|
|
||||||
already been loaded into memory. */
|
|
||||||
|
|
||||||
@@ -4113,7 +4194,7 @@ process_full_comp_unit (struct dwarf2_pe
|
|
||||||
struct objfile *objfile = per_cu->objfile;
|
|
||||||
CORE_ADDR lowpc, highpc;
|
|
||||||
struct symtab *symtab;
|
|
||||||
- struct cleanup *back_to;
|
|
||||||
+ struct cleanup *back_to, *delayed_list_cleanup;
|
|
||||||
CORE_ADDR baseaddr;
|
|
||||||
|
|
||||||
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
|
||||||
@@ -4123,11 +4204,22 @@ process_full_comp_unit (struct dwarf2_pe
|
|
||||||
|
|
||||||
cu->list_in_scope = &file_symbols;
|
|
||||||
|
|
||||||
+ /* If methods were found in the partial symbol table, we allocate one
|
|
||||||
+ big buffer to hold the entire delayed list for the CU. */
|
|
||||||
+ delayed_list_cleanup = make_cleanup (method_list_cleanup,
|
|
||||||
+ &cu->method_list);
|
|
||||||
+
|
|
||||||
dwarf2_find_base_address (cu->dies, cu);
|
|
||||||
|
|
||||||
/* Do line number decoding in read_file_scope () */
|
|
||||||
process_die (cu->dies, cu);
|
|
||||||
|
|
||||||
+ /* Now that we have processed all the DIEs in the CU, all the types
|
|
||||||
+ should be complete, and it should now be safe to compute all of the
|
|
||||||
+ physnames. */
|
|
||||||
+ compute_delayed_physnames (cu);
|
|
||||||
+ do_cleanups (delayed_list_cleanup);
|
|
||||||
+
|
|
||||||
/* Some compilers don't define a DW_AT_high_pc attribute for the
|
|
||||||
compilation unit. If the DW_AT_high_pc is missing, synthesize
|
|
||||||
it, by scanning the DIE's below the compilation unit. */
|
|
||||||
@@ -5838,7 +5930,6 @@ dwarf2_add_member_fn (struct field_info
|
|
||||||
int i;
|
|
||||||
struct fn_field *fnp;
|
|
||||||
char *fieldname;
|
|
||||||
- char *physname;
|
|
||||||
struct nextfnfield *new_fnfield;
|
|
||||||
struct type *this_type;
|
|
||||||
|
|
||||||
@@ -5850,9 +5941,6 @@ dwarf2_add_member_fn (struct field_info
|
|
||||||
if (fieldname == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- /* Get the mangled name. */
|
|
||||||
- physname = (char *) dwarf2_physname (fieldname, die, cu);
|
|
||||||
-
|
|
||||||
/* Look up member function name in fieldlist. */
|
|
||||||
for (i = 0; i < fip->nfnfields; i++)
|
|
||||||
{
|
|
||||||
@@ -5878,7 +5966,7 @@ dwarf2_add_member_fn (struct field_info
|
|
||||||
flp->name = fieldname;
|
|
||||||
flp->length = 0;
|
|
||||||
flp->head = NULL;
|
|
||||||
- fip->nfnfields++;
|
|
||||||
+ i = fip->nfnfields++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Create a new member function field and chain it to the field list
|
|
||||||
@@ -5892,9 +5980,19 @@ dwarf2_add_member_fn (struct field_info
|
|
||||||
|
|
||||||
/* Fill in the member function field info. */
|
|
||||||
fnp = &new_fnfield->fnfield;
|
|
||||||
- /* The name is already allocated along with this objfile, so we don't
|
|
||||||
- need to duplicate it for the type. */
|
|
||||||
- fnp->physname = physname ? physname : "";
|
|
||||||
+
|
|
||||||
+ /* Delay processing of the physname until later. */
|
|
||||||
+ if (cu->language == language_cplus || cu->language == language_java)
|
|
||||||
+ {
|
|
||||||
+ add_to_method_list (type, i, flp->length - 1, fieldname,
|
|
||||||
+ die, cu);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ char *physname = (char *) dwarf2_physname (fieldname, die, cu);
|
|
||||||
+ fnp->physname = physname ? physname : "";
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
fnp->type = alloc_type (objfile);
|
|
||||||
this_type = read_type_die (die, cu);
|
|
||||||
if (this_type && TYPE_CODE (this_type) == TYPE_CODE_FUNC)
|
|
||||||
@@ -5920,7 +6018,7 @@ dwarf2_add_member_fn (struct field_info
|
|
||||||
}
|
|
||||||
else
|
|
||||||
complaint (&symfile_complaints, _("member function type missing for '%s'"),
|
|
||||||
- physname);
|
|
||||||
+ dwarf2_full_name (fieldname, die, cu));
|
|
||||||
|
|
||||||
/* Get fcontext from DW_AT_containing_type if present. */
|
|
||||||
if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL)
|
|
||||||
@@ -8299,7 +8397,9 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
|
||||||
|| last_die->tag == DW_TAG_interface_type
|
|
||||||
|| last_die->tag == DW_TAG_structure_type
|
|
||||||
|| last_die->tag == DW_TAG_union_type))
|
|
||||||
- || (cu->language == language_ada
|
|
||||||
+ || ((cu->language == language_ada
|
|
||||||
+ || cu->language == language_cplus
|
|
||||||
+ || cu->language == language_java)
|
|
||||||
&& (last_die->tag == DW_TAG_subprogram
|
|
||||||
|| last_die->tag == DW_TAG_lexical_block))))
|
|
||||||
{
|
|
||||||
Index: gdb-7.1.90.20100721/gdb/testsuite/gdb.dwarf2/pr11465.S
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.1.90.20100721/gdb/testsuite/gdb.dwarf2/pr11465.S 2010-07-22 11:59:29.000000000 +0200
|
|
||||||
@@ -0,0 +1,355 @@
|
|
||||||
+/* Copyright 2010 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/>. */
|
|
||||||
+
|
|
||||||
+/* Compiled from:
|
|
||||||
+
|
|
||||||
+ namespace N
|
|
||||||
+ {
|
|
||||||
+ class C
|
|
||||||
+ {
|
|
||||||
+ public:
|
|
||||||
+ typedef void (*t) (C);
|
|
||||||
+ C (t) {}
|
|
||||||
+ };
|
|
||||||
+ typedef C::t u;
|
|
||||||
+ u f;
|
|
||||||
+ C c (f);
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ int
|
|
||||||
+ main ()
|
|
||||||
+ {
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+*/
|
|
||||||
+
|
|
||||||
+ .text
|
|
||||||
+_ZN1N1cE:
|
|
||||||
+ .section .debug_info
|
|
||||||
+d:
|
|
||||||
+ .long .Ldebug_info_end - 1f /* Length of CU info */
|
|
||||||
+1:
|
|
||||||
+ .2byte 0x2 /* DWARF version number */
|
|
||||||
+ .long .Ldebug_abbrev0 /* Abbrev offset */
|
|
||||||
+ .byte 0x4 /* Pointer size */
|
|
||||||
+dieb: .uleb128 0x1 /* DW_TAG_compile_unit */
|
|
||||||
+ .long .LASF4 /* DW_AT_producer */
|
|
||||||
+ .byte 0x4 /* DW_AT_language */
|
|
||||||
+ .long .LASF5 /* DW_AT_name */
|
|
||||||
+ .long .LASF6 /* DW_AT_comp_dir */
|
|
||||||
+ .long 0x0 /* DW_AT_low_pc */
|
|
||||||
+ .long 0x0 /* DW_AT_high_pc */
|
|
||||||
+ .long 0x0 /* DW_AT_entry_pc */
|
|
||||||
+die29: .uleb128 0x2 /* DW_TAG_namespace */
|
|
||||||
+ .string "N" /* DW_AT_name */
|
|
||||||
+die32: .uleb128 0x3 /* DW_TAG_class_type */
|
|
||||||
+ .string "C" /* DW_AT_name */
|
|
||||||
+ .byte 0x1 /* DW_AT_declaration */
|
|
||||||
+die36: .uleb128 0x4 /* DW_TAG_typedef */
|
|
||||||
+ .string "u" /* DW_AT_name */
|
|
||||||
+ .long die7e-d /* DW_AT_type */
|
|
||||||
+die3f: .uleb128 0x5 /* DW_TAG_variable */
|
|
||||||
+ .string "f" /* DW_AT_name */
|
|
||||||
+ .long .LASF0 /* DW_AT_MIPS_linkage_name */
|
|
||||||
+ .long die36-d /* DW_AT_type */
|
|
||||||
+ .byte 0x1 /* DW_AT_external */
|
|
||||||
+ .byte 0x1 /* DW_AT_declaration */
|
|
||||||
+die4e: .uleb128 0x5 /* DW_TAG_variable */
|
|
||||||
+ .string "c" /* DW_AT_name */
|
|
||||||
+ .long .LASF1 /* DW_AT_MIPS_linkage_name */
|
|
||||||
+ .long die5e-d /* DW_AT_type */
|
|
||||||
+ .byte 0x1 /* DW_AT_external */
|
|
||||||
+ .byte 0x1 /* DW_AT_declaration */
|
|
||||||
+ .byte 0x0
|
|
||||||
+die5e: .uleb128 0x6 /* DW_TAG_class_type */
|
|
||||||
+ .long die32-d /* DW_AT_specification */
|
|
||||||
+ .byte 0x1 /* DW_AT_byte_size */
|
|
||||||
+die6a: .uleb128 0x7 /* DW_TAG_subprogram */
|
|
||||||
+ .byte 0x1 /* DW_AT_external */
|
|
||||||
+ .string "C" /* DW_AT_name */
|
|
||||||
+ .byte 0x1 /* DW_AT_declaration */
|
|
||||||
+die71: .uleb128 0x8 /* DW_TAG_formal_parameter */
|
|
||||||
+ .long die8f-d /* DW_AT_type */
|
|
||||||
+ .byte 0x1 /* DW_AT_artificial */
|
|
||||||
+die77: .uleb128 0x9 /* DW_TAG_formal_parameter */
|
|
||||||
+ .long die7e-d /* DW_AT_type */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+die7e: .uleb128 0xa /* DW_TAG_pointer_type */
|
|
||||||
+ .byte 0x4 /* DW_AT_byte_size */
|
|
||||||
+ .long die84-d /* DW_AT_type */
|
|
||||||
+die84: .uleb128 0xb /* DW_TAG_subroutine_type */
|
|
||||||
+die89: .uleb128 0x9 /* DW_TAG_formal_parameter */
|
|
||||||
+ .long die5e-d /* DW_AT_type */
|
|
||||||
+ .byte 0x0
|
|
||||||
+die8f: .uleb128 0xa /* DW_TAG_pointer_type */
|
|
||||||
+ .byte 0x4 /* DW_AT_byte_size */
|
|
||||||
+ .long die5e-d /* DW_AT_type */
|
|
||||||
+die95: .uleb128 0xc /* DW_TAG_subprogram */
|
|
||||||
+ .long die6a-d /* DW_AT_specification */
|
|
||||||
+ .byte 0x2 /* DW_AT_inline */
|
|
||||||
+die9f: .uleb128 0xd /* DW_TAG_formal_parameter */
|
|
||||||
+ .long .LASF7 /* DW_AT_name */
|
|
||||||
+ .long dieaf-d /* DW_AT_type */
|
|
||||||
+ .byte 0x1 /* DW_AT_artificial */
|
|
||||||
+diea9: .uleb128 0x9 /* DW_TAG_formal_parameter */
|
|
||||||
+ .long die7e-d /* DW_AT_type */
|
|
||||||
+ .byte 0x0
|
|
||||||
+dieaf: .uleb128 0xe /* DW_TAG_const_type */
|
|
||||||
+ .long die8f-d /* DW_AT_type */
|
|
||||||
+dieb4: .uleb128 0xf /* DW_TAG_subprogram */
|
|
||||||
+ .long die95-d /* DW_AT_abstract_origin */
|
|
||||||
+ .long _ZN1N1cE /* DW_AT_low_pc */
|
|
||||||
+ .long _ZN1N1cE /* DW_AT_high_pc */
|
|
||||||
+diec9: .uleb128 0x10 /* DW_TAG_subprogram */
|
|
||||||
+ .long die9f-d /* DW_AT_abstract_origin */
|
|
||||||
+ .byte 2f-1f /* DW_AT_location */
|
|
||||||
+1:
|
|
||||||
+ .byte 0x50 /* DW_OP_reg0 */
|
|
||||||
+2:
|
|
||||||
+died1: .uleb128 0x10 /* DW_TAG_formal_parameter */
|
|
||||||
+ .long diea9-d /* DW_AT_abstract_origin */
|
|
||||||
+ .byte 2f-1f /* DW_AT_location */
|
|
||||||
+1:
|
|
||||||
+ .byte 0x51 /* DW_OP_reg1 */
|
|
||||||
+2:
|
|
||||||
+ .byte 0x0
|
|
||||||
+dieda: .uleb128 0x11 /* DW_TAG_subprogram */
|
|
||||||
+ .byte 0x1 /* DW_AT_external */
|
|
||||||
+ .long .LASF8 /* DW_AT_name */
|
|
||||||
+ .long dief2-d /* DW_AT_type */
|
|
||||||
+ .long _ZN1N1cE /* DW_AT_low_pc */
|
|
||||||
+ .long _ZN1N1cE /* DW_AT_high_pc */
|
|
||||||
+dief2: .uleb128 0x12 /* DW_TAG_base_type */
|
|
||||||
+ .byte 0x4 /* DW_AT_byte_size */
|
|
||||||
+ .byte 0x5 /* DW_AT_encoding */
|
|
||||||
+ .string "int" /* DW_AT_name */
|
|
||||||
+die149: .uleb128 0x16 /* DW_TAG_variable */
|
|
||||||
+ .long die4e-d /* DW_AT_specification */
|
|
||||||
+ .byte 0x5 /* DW_AT_location */
|
|
||||||
+ .byte 0x3
|
|
||||||
+ .long _ZN1N1cE
|
|
||||||
+ .byte 0x0
|
|
||||||
+.Ldebug_info_end:
|
|
||||||
+ .section .debug_abbrev
|
|
||||||
+.Ldebug_abbrev0:
|
|
||||||
+ .uleb128 0x1 /* abbrev code*/
|
|
||||||
+ .uleb128 0x11 /* DW_TAG_compile_unit */
|
|
||||||
+ .byte 0x1 /* DW_children_yes */
|
|
||||||
+ .uleb128 0x25 /* DW_AT_producer*/
|
|
||||||
+ .uleb128 0xe /* DW_FORM_strp */
|
|
||||||
+ .uleb128 0x13 /* DW_AT_language */
|
|
||||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0xe /* DW_FORM_strp */
|
|
||||||
+ .uleb128 0x1b /* DW_AT_comp_dir */
|
|
||||||
+ .uleb128 0xe /* DW_FORM_strp */
|
|
||||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .uleb128 0x52 /* DW_AT_entry_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x2 /* abbrev code */
|
|
||||||
+ .uleb128 0x39 /* DW_TAG_namespace */
|
|
||||||
+ .byte 0x1 /* DW_children_yes */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x3 /* abbrev code */
|
|
||||||
+ .uleb128 0x2 /* DW_TAG_class_type */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .uleb128 0x3c /* DW_AT_declaration */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x4 /* abbrev code */
|
|
||||||
+ .uleb128 0x16 /* DW_TAG_typedef */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_type */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x5 /* abbrev code */
|
|
||||||
+ .uleb128 0x34 /* DW_TAG_variable */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .uleb128 0x2007 /* DW_AT_MIPS_linkage_name */
|
|
||||||
+ .uleb128 0xe /* DW_FORM_strp */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_TYPE */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0x3f /* DW_AT_external */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .uleb128 0x3c /* DW_AT_declaration */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x6 /* abbrev code */
|
|
||||||
+ .uleb128 0x2 /* DW_TAG_class_type */
|
|
||||||
+ .byte 0x1 /* DW_has_children_yes */
|
|
||||||
+ .uleb128 0x47 /* DW_AT_specification */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0xb /* DW_AT_byte_size */
|
|
||||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x7 /* abbrev code */
|
|
||||||
+ .uleb128 0x2e /* DW_TAG_subprogra */
|
|
||||||
+ .byte 0x1 /* DW_has_children_yes */
|
|
||||||
+ .uleb128 0x3f /* DW_AT_external */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .uleb128 0x3c /* DW_AT_declaration */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x8 /* abbrev code */
|
|
||||||
+ .uleb128 0x5 /* DW_TAG_formal_parameter */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_type */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0x34 /* DW_AT_artificial */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x9 /* abbrev code */
|
|
||||||
+ .uleb128 0x5 /* DW_TAG_formal_parameter */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_type */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0xa /* abbrev code */
|
|
||||||
+ .uleb128 0xf /* DW_TAG_pointer_type */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0xb /* DW_AT_byte_size */
|
|
||||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_type */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0xb /* abbrev code */
|
|
||||||
+ .uleb128 0x15 /* DW_TAG_subroutine_type */
|
|
||||||
+ .byte 0x1 /* DW_has_children_yes */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0xc /* abbrev code */
|
|
||||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
|
||||||
+ .byte 0x1 /* DW_has_children_yes */
|
|
||||||
+ .uleb128 0x47 /* DW_AT_specification */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0x20 /* DW_AT_inline */
|
|
||||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0xd /* abbrev code */
|
|
||||||
+ .uleb128 0x5 /* DW_TAG_formal_parameter */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0xe /* DW_FORM_strp */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_type */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0x34 /* DW_AT_artificial */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0xe /* abbrev code */
|
|
||||||
+ .uleb128 0x26 /* DW_TAG_const_type */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_type */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0xf /* abbrev code */
|
|
||||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
|
||||||
+ .byte 0x1 /* DW_has_children_yes */
|
|
||||||
+ .uleb128 0x31 /* DW_AT_abstract_origin */
|
|
||||||
+ .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 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x10 /* abbrev code */
|
|
||||||
+ .uleb128 0x5 /* DW_TAG_formal_parameter */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x31 /* DW_AT_abstract_origin */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0x2 /* DW_AT_location */
|
|
||||||
+ .uleb128 0xa /* DW_FORM_block1 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x11 /* abbrev code */
|
|
||||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x3f /* DW_AT_external */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0xe /* DW_FORM_strp */
|
|
||||||
+ .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 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x12 /* abbrev code */
|
|
||||||
+ .uleb128 0x24 /* DW_TAG_base_type */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0xb /* DW_AT_byte_size */
|
|
||||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
|
||||||
+ .uleb128 0x3e /* DW_AT_encoding */
|
|
||||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .uleb128 0x16 /* abbrev code */
|
|
||||||
+ .uleb128 0x34 /* DW_TAG_variable */
|
|
||||||
+ .byte 0x0 /* DW_has_children_no */
|
|
||||||
+ .uleb128 0x47 /* DW_AT_specification */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0x2 /* DW_AT_location */
|
|
||||||
+ .uleb128 0xa /* DW_FORM_block1 */
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .byte 0x0
|
|
||||||
+ .section .debug_str
|
|
||||||
+.LASF0:
|
|
||||||
+ .string "_ZN1N1fE"
|
|
||||||
+.LASF7:
|
|
||||||
+ .string "this"
|
|
||||||
+.LASF6:
|
|
||||||
+ .string ""
|
|
||||||
+.LASF8:
|
|
||||||
+ .string "main"
|
|
||||||
+.LASF1:
|
|
||||||
+ .string "_ZN1N1cE"
|
|
||||||
+.LASF5:
|
|
||||||
+ .string "pr11465.cc"
|
|
||||||
+.LASF4:
|
|
||||||
+ .string "GNU C++ 4.4.2"
|
|
||||||
+ .ident "GCC: (GNU) 4.4.2"
|
|
||||||
Index: gdb-7.1.90.20100721/gdb/testsuite/gdb.dwarf2/pr11465.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.1.90.20100721/gdb/testsuite/gdb.dwarf2/pr11465.exp 2010-07-22 11:59:29.000000000 +0200
|
|
||||||
@@ -0,0 +1,39 @@
|
|
||||||
+# Copyright 2010 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/>.
|
|
||||||
+
|
|
||||||
+# 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 "pr11465"
|
|
||||||
+set srcfile ${testfile}.S
|
|
||||||
+set executable ${testfile}.x
|
|
||||||
+set binfile ${objdir}/${subdir}/${executable}
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+clean_restart $executable
|
|
||||||
+
|
|
||||||
+# Test delayed physname computations
|
|
||||||
+gdb_test "p N::c.C" { = {void \(N::C \*, void \(\*\)\(N::C\)\)}.*}
|
|
@ -1,87 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-08/msg00559.html
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-08/msg00199.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/08/31 18:08:42 1.12129
|
|
||||||
### src/gdb/ChangeLog 2010/08/31 18:11:48 1.12130
|
|
||||||
## -1,5 +1,14 @@
|
|
||||||
2010-08-31 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
+ Make linux_get_siginfo_type `type *' unique.
|
|
||||||
+ * linux-tdep.c (linux_gdbarch_data_handle, struct linux_gdbarch_data)
|
|
||||||
+ (init_linux_gdbarch_data, get_linux_gdbarch_data): New.
|
|
||||||
+ (linux_get_siginfo_type): New variable linux_gdbarch_data. Initialize
|
|
||||||
+ it. Use linux_gdbarch_data->siginfo_type as a persistent storage.
|
|
||||||
+ (_initialize_linux_tdep): New.
|
|
||||||
+
|
|
||||||
+2010-08-31 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+
|
|
||||||
Code cleanup.
|
|
||||||
* defs.h (find_memory_region_ftype): New typedef.
|
|
||||||
(exec_set_find_memory_regions): Use it.
|
|
||||||
Index: gdb-7.2/gdb/linux-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/linux-tdep.c 2010-09-25 15:30:50.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/linux-tdep.c 2010-09-25 15:31:54.000000000 +0200
|
|
||||||
@@ -26,18 +26,42 @@
|
|
||||||
#include "value.h"
|
|
||||||
#include "infcall.h"
|
|
||||||
|
|
||||||
+static struct gdbarch_data *linux_gdbarch_data_handle;
|
|
||||||
+
|
|
||||||
+struct linux_gdbarch_data
|
|
||||||
+ {
|
|
||||||
+ struct type *siginfo_type;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+static void *
|
|
||||||
+init_linux_gdbarch_data (struct gdbarch *gdbarch)
|
|
||||||
+{
|
|
||||||
+ return GDBARCH_OBSTACK_ZALLOC (gdbarch, struct linux_gdbarch_data);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static struct linux_gdbarch_data *
|
|
||||||
+get_linux_gdbarch_data (struct gdbarch *gdbarch)
|
|
||||||
+{
|
|
||||||
+ return gdbarch_data (gdbarch, linux_gdbarch_data_handle);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* This function is suitable for architectures that don't
|
|
||||||
extend/override the standard siginfo structure. */
|
|
||||||
|
|
||||||
struct type *
|
|
||||||
linux_get_siginfo_type (struct gdbarch *gdbarch)
|
|
||||||
{
|
|
||||||
+ struct linux_gdbarch_data *linux_gdbarch_data;
|
|
||||||
struct type *int_type, *uint_type, *long_type, *void_ptr_type;
|
|
||||||
struct type *uid_type, *pid_type;
|
|
||||||
struct type *sigval_type, *clock_type;
|
|
||||||
struct type *siginfo_type, *sifields_type;
|
|
||||||
struct type *type;
|
|
||||||
|
|
||||||
+ linux_gdbarch_data = get_linux_gdbarch_data (gdbarch);
|
|
||||||
+ if (linux_gdbarch_data->siginfo_type != NULL)
|
|
||||||
+ return linux_gdbarch_data->siginfo_type;
|
|
||||||
+
|
|
||||||
int_type = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
|
|
||||||
0, "int");
|
|
||||||
uint_type = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
|
|
||||||
@@ -137,6 +161,8 @@ linux_get_siginfo_type (struct gdbarch *
|
|
||||||
"_sifields", sifields_type,
|
|
||||||
TYPE_LENGTH (long_type));
|
|
||||||
|
|
||||||
+ linux_gdbarch_data->siginfo_type = siginfo_type;
|
|
||||||
+
|
|
||||||
return siginfo_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -154,3 +180,10 @@ linux_has_shared_address_space (void)
|
|
||||||
|
|
||||||
return target_is_uclinux;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+_initialize_linux_tdep (void)
|
|
||||||
+{
|
|
||||||
+ linux_gdbarch_data_handle =
|
|
||||||
+ gdbarch_data_register_post_init (init_linux_gdbarch_data);
|
|
||||||
+}
|
|
@ -1,139 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00430.html
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-09/msg00152.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/09/24 11:15:51 1.12199
|
|
||||||
### src/gdb/ChangeLog 2010/09/24 13:41:42 1.12200
|
|
||||||
## -1,5 +1,12 @@
|
|
||||||
2010-09-24 Pedro Alves <pedro@codesourcery.com>
|
|
||||||
|
|
||||||
+ * amd64-linux-nat.c (compat_siginfo_from_siginfo)
|
|
||||||
+ (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
|
|
||||||
+ si_code is < 0. Check for si_code == SI_TIMER before checking for
|
|
||||||
+ si_code < 0.
|
|
||||||
+
|
|
||||||
+2010-09-24 Pedro Alves <pedro@codesourcery.com>
|
|
||||||
+
|
|
||||||
* objfiles.h (ALL_OBJSECTIONS): Handle breaks in the inner loop.
|
|
||||||
|
|
||||||
2010-09-22 Joel Brobecker <brobecker@adacore.com>
|
|
||||||
--- src/gdb/amd64-linux-nat.c 2010/04/22 20:02:55 1.32
|
|
||||||
+++ src/gdb/amd64-linux-nat.c 2010/09/24 13:41:43 1.33
|
|
||||||
@@ -574,8 +574,10 @@
|
|
||||||
to->si_errno = from->si_errno;
|
|
||||||
to->si_code = from->si_code;
|
|
||||||
|
|
||||||
- if (to->si_code < 0)
|
|
||||||
+ if (to->si_code == SI_TIMER)
|
|
||||||
{
|
|
||||||
+ to->cpt_si_timerid = from->si_timerid;
|
|
||||||
+ to->cpt_si_overrun = from->si_overrun;
|
|
||||||
to->cpt_si_ptr = (intptr_t) from->si_ptr;
|
|
||||||
}
|
|
||||||
else if (to->si_code == SI_USER)
|
|
||||||
@@ -583,10 +585,10 @@
|
|
||||||
to->cpt_si_pid = from->si_pid;
|
|
||||||
to->cpt_si_uid = from->si_uid;
|
|
||||||
}
|
|
||||||
- else if (to->si_code == SI_TIMER)
|
|
||||||
+ else if (to->si_code < 0)
|
|
||||||
{
|
|
||||||
- to->cpt_si_timerid = from->si_timerid;
|
|
||||||
- to->cpt_si_overrun = from->si_overrun;
|
|
||||||
+ to->cpt_si_pid = from->si_pid;
|
|
||||||
+ to->cpt_si_uid = from->si_uid;
|
|
||||||
to->cpt_si_ptr = (intptr_t) from->si_ptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
@@ -628,8 +630,10 @@
|
|
||||||
to->si_errno = from->si_errno;
|
|
||||||
to->si_code = from->si_code;
|
|
||||||
|
|
||||||
- if (to->si_code < 0)
|
|
||||||
+ if (to->si_code == SI_TIMER)
|
|
||||||
{
|
|
||||||
+ to->si_timerid = from->cpt_si_timerid;
|
|
||||||
+ to->si_overrun = from->cpt_si_overrun;
|
|
||||||
to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
|
|
||||||
}
|
|
||||||
else if (to->si_code == SI_USER)
|
|
||||||
@@ -637,10 +641,10 @@
|
|
||||||
to->si_pid = from->cpt_si_pid;
|
|
||||||
to->si_uid = from->cpt_si_uid;
|
|
||||||
}
|
|
||||||
- else if (to->si_code == SI_TIMER)
|
|
||||||
+ if (to->si_code < 0)
|
|
||||||
{
|
|
||||||
- to->si_timerid = from->cpt_si_timerid;
|
|
||||||
- to->si_overrun = from->cpt_si_overrun;
|
|
||||||
+ to->si_pid = from->cpt_si_pid;
|
|
||||||
+ to->si_uid = from->cpt_si_uid;
|
|
||||||
to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
### src/gdb/gdbserver/ChangeLog 2010/09/13 19:11:03 1.431
|
|
||||||
### src/gdb/gdbserver/ChangeLog 2010/09/24 13:41:43 1.432
|
|
||||||
## -1,3 +1,10 @@
|
|
||||||
+2010-09-24 Pedro Alves <pedro@codesourcery.com>
|
|
||||||
+
|
|
||||||
+ * linux-x86-low.c (compat_siginfo_from_siginfo)
|
|
||||||
+ (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
|
|
||||||
+ si_code is < 0. Check for si_code == SI_TIMER before checking for
|
|
||||||
+ si_code < 0.
|
|
||||||
+
|
|
||||||
2010-09-13 Joel Brobecker <brobecker@adacore.com>
|
|
||||||
|
|
||||||
* lynx-i386-low.c: New file.
|
|
||||||
--- src/gdb/gdbserver/linux-x86-low.c 2010/08/27 00:16:48 1.23
|
|
||||||
+++ src/gdb/gdbserver/linux-x86-low.c 2010/09/24 13:41:43 1.24
|
|
||||||
@@ -792,8 +792,10 @@
|
|
||||||
to->si_errno = from->si_errno;
|
|
||||||
to->si_code = from->si_code;
|
|
||||||
|
|
||||||
- if (to->si_code < 0)
|
|
||||||
+ if (to->si_code == SI_TIMER)
|
|
||||||
{
|
|
||||||
+ to->cpt_si_timerid = from->si_timerid;
|
|
||||||
+ to->cpt_si_overrun = from->si_overrun;
|
|
||||||
to->cpt_si_ptr = (intptr_t) from->si_ptr;
|
|
||||||
}
|
|
||||||
else if (to->si_code == SI_USER)
|
|
||||||
@@ -801,10 +803,10 @@
|
|
||||||
to->cpt_si_pid = from->si_pid;
|
|
||||||
to->cpt_si_uid = from->si_uid;
|
|
||||||
}
|
|
||||||
- else if (to->si_code == SI_TIMER)
|
|
||||||
+ else if (to->si_code < 0)
|
|
||||||
{
|
|
||||||
- to->cpt_si_timerid = from->si_timerid;
|
|
||||||
- to->cpt_si_overrun = from->si_overrun;
|
|
||||||
+ to->cpt_si_pid = from->si_pid;
|
|
||||||
+ to->cpt_si_uid = from->si_uid;
|
|
||||||
to->cpt_si_ptr = (intptr_t) from->si_ptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
@@ -846,8 +848,10 @@
|
|
||||||
to->si_errno = from->si_errno;
|
|
||||||
to->si_code = from->si_code;
|
|
||||||
|
|
||||||
- if (to->si_code < 0)
|
|
||||||
+ if (to->si_code == SI_TIMER)
|
|
||||||
{
|
|
||||||
+ to->si_timerid = from->cpt_si_timerid;
|
|
||||||
+ to->si_overrun = from->cpt_si_overrun;
|
|
||||||
to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
|
|
||||||
}
|
|
||||||
else if (to->si_code == SI_USER)
|
|
||||||
@@ -855,10 +859,10 @@
|
|
||||||
to->si_pid = from->cpt_si_pid;
|
|
||||||
to->si_uid = from->cpt_si_uid;
|
|
||||||
}
|
|
||||||
- else if (to->si_code == SI_TIMER)
|
|
||||||
+ else if (to->si_code < 0)
|
|
||||||
{
|
|
||||||
- to->si_timerid = from->cpt_si_timerid;
|
|
||||||
- to->si_overrun = from->cpt_si_overrun;
|
|
||||||
+ to->si_pid = from->cpt_si_pid;
|
|
||||||
+ to->si_uid = from->cpt_si_uid;
|
|
||||||
to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr;
|
|
||||||
}
|
|
||||||
else
|
|
@ -1,259 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00438.html
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-09/msg00156.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/09/24 16:11:44 1.12203
|
|
||||||
### src/gdb/ChangeLog 2010/09/24 18:35:20 1.12204
|
|
||||||
## -1,3 +1,16 @@
|
|
||||||
+2010-09-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+
|
|
||||||
+ Fix lost siginfo_t for inferior calls.
|
|
||||||
+ * infrun.c
|
|
||||||
+ (struct inferior_thread_state) <siginfo_gdbarch, siginfo_data>: New.
|
|
||||||
+ (save_inferior_thread_state): New variables regcache, gdbarch and
|
|
||||||
+ siginfo_data. Initialize SIGINFO_DATA if gdbarch_get_siginfo_type_p.
|
|
||||||
+ Move INF_STATE allocation later, pre-clear it. Initialize REGISTERS
|
|
||||||
+ using REGCACHE.
|
|
||||||
+ (restore_inferior_thread_state): New variables regcache and gdbarch.
|
|
||||||
+ Restore SIGINFO_DATA for matching GDBARCH. Restore REGISTERS using
|
|
||||||
+ REGCACHE. Free also SIGINFO_DATA.
|
|
||||||
+
|
|
||||||
2010-09-24 Tom Tromey <tromey@redhat.com>
|
|
||||||
|
|
||||||
* dwarf2read.c (dw2_expand_symtabs_matching): Add missing
|
|
||||||
--- src/gdb/infrun.c 2010/09/06 14:22:07 1.450
|
|
||||||
+++ src/gdb/infrun.c 2010/09/24 18:35:27 1.451
|
|
||||||
@@ -6037,18 +6037,57 @@
|
|
||||||
enum target_signal stop_signal;
|
|
||||||
CORE_ADDR stop_pc;
|
|
||||||
struct regcache *registers;
|
|
||||||
+
|
|
||||||
+ /* Format of SIGINFO or NULL if it is not present. */
|
|
||||||
+ struct gdbarch *siginfo_gdbarch;
|
|
||||||
+
|
|
||||||
+ /* The inferior format depends on SIGINFO_GDBARCH and it has a length of
|
|
||||||
+ TYPE_LENGTH (gdbarch_get_siginfo_type ()). For different gdbarch the
|
|
||||||
+ content would be invalid. */
|
|
||||||
+ gdb_byte *siginfo_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct inferior_thread_state *
|
|
||||||
save_inferior_thread_state (void)
|
|
||||||
{
|
|
||||||
- struct inferior_thread_state *inf_state = XMALLOC (struct inferior_thread_state);
|
|
||||||
+ struct inferior_thread_state *inf_state;
|
|
||||||
struct thread_info *tp = inferior_thread ();
|
|
||||||
+ struct regcache *regcache = get_current_regcache ();
|
|
||||||
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
|
||||||
+ gdb_byte *siginfo_data = NULL;
|
|
||||||
+
|
|
||||||
+ if (gdbarch_get_siginfo_type_p (gdbarch))
|
|
||||||
+ {
|
|
||||||
+ struct type *type = gdbarch_get_siginfo_type (gdbarch);
|
|
||||||
+ size_t len = TYPE_LENGTH (type);
|
|
||||||
+ struct cleanup *back_to;
|
|
||||||
+
|
|
||||||
+ siginfo_data = xmalloc (len);
|
|
||||||
+ back_to = make_cleanup (xfree, siginfo_data);
|
|
||||||
+
|
|
||||||
+ if (target_read (¤t_target, TARGET_OBJECT_SIGNAL_INFO, NULL,
|
|
||||||
+ siginfo_data, 0, len) == len)
|
|
||||||
+ discard_cleanups (back_to);
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ /* Errors ignored. */
|
|
||||||
+ do_cleanups (back_to);
|
|
||||||
+ siginfo_data = NULL;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ inf_state = XZALLOC (struct inferior_thread_state);
|
|
||||||
+
|
|
||||||
+ if (siginfo_data)
|
|
||||||
+ {
|
|
||||||
+ inf_state->siginfo_gdbarch = gdbarch;
|
|
||||||
+ inf_state->siginfo_data = siginfo_data;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
inf_state->stop_signal = tp->stop_signal;
|
|
||||||
inf_state->stop_pc = stop_pc;
|
|
||||||
|
|
||||||
- inf_state->registers = regcache_dup (get_current_regcache ());
|
|
||||||
+ inf_state->registers = regcache_dup (regcache);
|
|
||||||
|
|
||||||
return inf_state;
|
|
||||||
}
|
|
||||||
@@ -6059,16 +6098,29 @@
|
|
||||||
restore_inferior_thread_state (struct inferior_thread_state *inf_state)
|
|
||||||
{
|
|
||||||
struct thread_info *tp = inferior_thread ();
|
|
||||||
+ struct regcache *regcache = get_current_regcache ();
|
|
||||||
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
|
||||||
|
|
||||||
tp->stop_signal = inf_state->stop_signal;
|
|
||||||
stop_pc = inf_state->stop_pc;
|
|
||||||
|
|
||||||
+ if (inf_state->siginfo_gdbarch == gdbarch)
|
|
||||||
+ {
|
|
||||||
+ struct type *type = gdbarch_get_siginfo_type (gdbarch);
|
|
||||||
+ size_t len = TYPE_LENGTH (type);
|
|
||||||
+
|
|
||||||
+ /* Errors ignored. */
|
|
||||||
+ target_write (¤t_target, TARGET_OBJECT_SIGNAL_INFO, NULL,
|
|
||||||
+ inf_state->siginfo_data, 0, len);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* The inferior can be gone if the user types "print exit(0)"
|
|
||||||
(and perhaps other times). */
|
|
||||||
if (target_has_execution)
|
|
||||||
/* NB: The register write goes through to the target. */
|
|
||||||
- regcache_cpy (get_current_regcache (), inf_state->registers);
|
|
||||||
+ regcache_cpy (regcache, inf_state->registers);
|
|
||||||
regcache_xfree (inf_state->registers);
|
|
||||||
+ xfree (inf_state->siginfo_data);
|
|
||||||
xfree (inf_state);
|
|
||||||
}
|
|
||||||
|
|
||||||
### src/gdb/testsuite/ChangeLog 2010/09/22 20:08:04 1.2456
|
|
||||||
### src/gdb/testsuite/ChangeLog 2010/09/24 18:35:28 1.2457
|
|
||||||
## -1,3 +1,9 @@
|
|
||||||
+2010-09-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+
|
|
||||||
+ Fix lost siginfo_t for inferior calls.
|
|
||||||
+ * gdb.base/siginfo-infcall.exp: New file.
|
|
||||||
+ * gdb.base/siginfo-infcall.c: New file.
|
|
||||||
+
|
|
||||||
2010-09-22 Joel Brobecker <brobecker@adacore.com>
|
|
||||||
|
|
||||||
* gdb.dwarf2/dw2-const.S: Minor (space) reformatting.
|
|
||||||
--- src/gdb/testsuite/gdb.base/siginfo-infcall.c
|
|
||||||
+++ src/gdb/testsuite/gdb.base/siginfo-infcall.c 2010-09-25 13:25:25.007169000 +0000
|
|
||||||
@@ -0,0 +1,79 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2010 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 <signal.h>
|
|
||||||
+#include <assert.h>
|
|
||||||
+#include <string.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+
|
|
||||||
+#ifndef SA_SIGINFO
|
|
||||||
+# error "SA_SIGINFO is required for this test"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+callme (void)
|
|
||||||
+{
|
|
||||||
+ return 42;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+pass (void)
|
|
||||||
+{
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+fail (void)
|
|
||||||
+{
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+handler (int sig, siginfo_t *siginfo, void *context)
|
|
||||||
+{
|
|
||||||
+ assert (sig == SIGUSR1);
|
|
||||||
+ assert (siginfo->si_signo == SIGUSR1);
|
|
||||||
+ if (siginfo->si_pid == getpid ())
|
|
||||||
+ pass ();
|
|
||||||
+ else
|
|
||||||
+ fail ();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (void)
|
|
||||||
+{
|
|
||||||
+ struct sigaction sa;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ callme ();
|
|
||||||
+
|
|
||||||
+ memset (&sa, 0, sizeof (sa));
|
|
||||||
+ sa.sa_sigaction = handler;
|
|
||||||
+ sa.sa_flags = SA_SIGINFO;
|
|
||||||
+
|
|
||||||
+ i = sigemptyset (&sa.sa_mask);
|
|
||||||
+ assert (i == 0);
|
|
||||||
+
|
|
||||||
+ i = sigaction (SIGUSR1, &sa, NULL);
|
|
||||||
+ assert (i == 0);
|
|
||||||
+
|
|
||||||
+ i = raise (SIGUSR1);
|
|
||||||
+ assert (i == 0);
|
|
||||||
+
|
|
||||||
+ sleep (600);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
--- src/gdb/testsuite/gdb.base/siginfo-infcall.exp
|
|
||||||
+++ src/gdb/testsuite/gdb.base/siginfo-infcall.exp 2010-09-25 13:25:25.357724000 +0000
|
|
||||||
@@ -0,0 +1,47 @@
|
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+
|
|
||||||
+if [target_info exists gdb,nosignals] {
|
|
||||||
+ verbose "Skipping siginfo-infcall.exp because of nosignals."
|
|
||||||
+ continue
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile siginfo-infcall
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set executable ${testfile}
|
|
||||||
+if { [prepare_for_testing ${testfile}.exp $executable] } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if ![runto_main] {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_breakpoint "pass"
|
|
||||||
+gdb_breakpoint "fail"
|
|
||||||
+
|
|
||||||
+gdb_test "continue" "Program received signal SIGUSR1, .*" "continue to SIGUSR1"
|
|
||||||
+
|
|
||||||
+gdb_test "p callme ()" " = 42"
|
|
||||||
+
|
|
||||||
+set test "continue to the handler"
|
|
||||||
+gdb_test_multiple "continue" $test {
|
|
||||||
+ -re "Breakpoint \[0-9\]+,\[^\r\n\]* pass .*\r\n$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "Breakpoint \[0-9\]+,\[^\r\n\]* fail .*\r\n$gdb_prompt $" {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
@ -78,11 +78,11 @@ gdb/testsuite/
|
|||||||
* gdb.threads/sigstep-threads.exp: New file.
|
* gdb.threads/sigstep-threads.exp: New file.
|
||||||
* gdb.threads/sigstep-threads.c: New file.
|
* gdb.threads/sigstep-threads.c: New file.
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/linux-nat.c
|
Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/linux-nat.c 2010-09-25 15:30:54.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 08:21:46.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/linux-nat.c 2010-09-25 15:37:23.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 09:12:26.000000000 +0100
|
||||||
@@ -2702,6 +2702,8 @@ stop_wait_callback (struct lwp_info *lp,
|
@@ -2759,6 +2759,8 @@ stop_wait_callback (struct lwp_info *lp,
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
@ -91,11 +91,11 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
status = wait_lwp (lp);
|
status = wait_lwp (lp);
|
||||||
if (status == 0)
|
if (status == 0)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -2726,110 +2728,61 @@ stop_wait_callback (struct lwp_info *lp,
|
@@ -2783,110 +2785,61 @@ stop_wait_callback (struct lwp_info *lp,
|
||||||
|
|
||||||
if (WSTOPSIG (status) != SIGSTOP)
|
if (WSTOPSIG (status) != SIGSTOP)
|
||||||
{
|
{
|
||||||
- if (WSTOPSIG (status) == SIGTRAP)
|
- if (linux_nat_status_is_event (status))
|
||||||
- {
|
- {
|
||||||
- /* If a LWP other than the LWP that we're reporting an
|
- /* If a LWP other than the LWP that we're reporting an
|
||||||
- event for has hit a GDB breakpoint (as opposed to
|
- event for has hit a GDB breakpoint (as opposed to
|
||||||
@ -248,7 +248,7 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
lp->signalled = 0;
|
lp->signalled = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3416,52 +3369,6 @@ retry:
|
@@ -3469,52 +3422,6 @@ retry:
|
||||||
lp = NULL;
|
lp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,10 +301,10 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
if (!target_can_async_p ())
|
if (!target_can_async_p ())
|
||||||
{
|
{
|
||||||
/* Causes SIGINT to be passed on to the attached process. */
|
/* Causes SIGINT to be passed on to the attached process. */
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.threads/siginfo-threads.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.threads/siginfo-threads.c 2010-09-25 15:32:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.c 2010-11-16 09:08:44.000000000 +0100
|
||||||
@@ -0,0 +1,447 @@
|
@@ -0,0 +1,447 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
@ -753,10 +753,10 @@ Index: gdb-7.2/gdb/testsuite/gdb.threads/siginfo-threads.c
|
|||||||
+
|
+
|
||||||
+ return EXIT_SUCCESS;
|
+ return EXIT_SUCCESS;
|
||||||
+}
|
+}
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.threads/siginfo-threads.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.threads/siginfo-threads.exp 2010-09-25 15:32:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.exp 2010-11-16 09:08:44.000000000 +0100
|
||||||
@@ -0,0 +1,94 @@
|
@@ -0,0 +1,94 @@
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
+# Copyright 2010 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
@ -852,10 +852,10 @@ Index: gdb-7.2/gdb/testsuite/gdb.threads/siginfo-threads.exp
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+gdb_continue_to_breakpoint break-at-exit ".*break-at-exit.*"
|
+gdb_continue_to_breakpoint break-at-exit ".*break-at-exit.*"
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.threads/sigstep-threads.c
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.threads/sigstep-threads.c 2010-09-25 15:32:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.c 2010-11-16 09:08:44.000000000 +0100
|
||||||
@@ -0,0 +1,54 @@
|
@@ -0,0 +1,54 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
@ -911,10 +911,10 @@ Index: gdb-7.2/gdb/testsuite/gdb.threads/sigstep-threads.c
|
|||||||
+ start (NULL); /* main-start */
|
+ start (NULL); /* main-start */
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.threads/sigstep-threads.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.threads/sigstep-threads.exp 2010-09-25 15:32:32.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.exp 2010-11-16 09:08:44.000000000 +0100
|
||||||
@@ -0,0 +1,74 @@
|
@@ -0,0 +1,74 @@
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
+# Copyright 2010 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -26,11 +26,11 @@ gdb/
|
|||||||
(linux_nat_set_siginfo_fixup): Use PTRACE_GETSIGINFO.
|
(linux_nat_set_siginfo_fixup): Use PTRACE_GETSIGINFO.
|
||||||
* linux-nat.h (struct lwp_info) <siginfo>: Remove.
|
* linux-nat.h (struct lwp_info) <siginfo>: Remove.
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/linux-nat.c
|
Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/linux-nat.c 2010-09-25 15:37:23.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 09:12:26.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/linux-nat.c 2010-09-25 15:38:18.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 09:13:21.000000000 +0100
|
||||||
@@ -1851,7 +1851,6 @@ resume_callback (struct lwp_info *lp, vo
|
@@ -1850,7 +1850,6 @@ resume_callback (struct lwp_info *lp, vo
|
||||||
target_pid_to_str (lp->ptid));
|
target_pid_to_str (lp->ptid));
|
||||||
lp->stopped = 0;
|
lp->stopped = 0;
|
||||||
lp->step = 0;
|
lp->step = 0;
|
||||||
@ -46,7 +46,7 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
lp->stopped_by_watchpoint = 0;
|
lp->stopped_by_watchpoint = 0;
|
||||||
|
|
||||||
if (debug_linux_nat)
|
if (debug_linux_nat)
|
||||||
@@ -2483,22 +2481,6 @@ wait_lwp (struct lwp_info *lp)
|
@@ -2503,22 +2501,6 @@ wait_lwp (struct lwp_info *lp)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
/* Send a SIGSTOP to LP. */
|
/* Send a SIGSTOP to LP. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -2730,9 +2712,6 @@ stop_wait_callback (struct lwp_info *lp,
|
@@ -2787,9 +2769,6 @@ stop_wait_callback (struct lwp_info *lp,
|
||||||
{
|
{
|
||||||
/* The thread was stopped with a signal other than SIGSTOP. */
|
/* The thread was stopped with a signal other than SIGSTOP. */
|
||||||
|
|
||||||
@ -79,10 +79,10 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
save_sigtrap (lp);
|
save_sigtrap (lp);
|
||||||
|
|
||||||
if (debug_linux_nat)
|
if (debug_linux_nat)
|
||||||
@@ -3102,12 +3081,7 @@ linux_nat_filter_event (int lwpid, int s
|
@@ -3155,12 +3134,7 @@ linux_nat_filter_event (int lwpid, int s
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP)
|
if (linux_nat_status_is_event (status))
|
||||||
- {
|
- {
|
||||||
- /* Save the trap's siginfo in case we need it later. */
|
- /* Save the trap's siginfo in case we need it later. */
|
||||||
- save_siginfo (lp);
|
- save_siginfo (lp);
|
||||||
@ -93,7 +93,7 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
|
|
||||||
/* Check if the thread has exited. */
|
/* Check if the thread has exited. */
|
||||||
if ((WIFEXITED (status) || WIFSIGNALED (status))
|
if ((WIFEXITED (status) || WIFSIGNALED (status))
|
||||||
@@ -3706,7 +3680,6 @@ resume_stopped_resumed_lwps (struct lwp_
|
@@ -3763,7 +3737,6 @@ resume_stopped_resumed_lwps (struct lwp_
|
||||||
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
|
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
|
||||||
lp->step, TARGET_SIGNAL_0);
|
lp->step, TARGET_SIGNAL_0);
|
||||||
lp->stopped = 0;
|
lp->stopped = 0;
|
||||||
@ -101,7 +101,7 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
lp->stopped_by_watchpoint = 0;
|
lp->stopped_by_watchpoint = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5878,11 +5851,19 @@ linux_nat_set_siginfo_fixup (struct targ
|
@@ -5932,11 +5905,19 @@ linux_nat_set_siginfo_fixup (struct targ
|
||||||
struct siginfo *
|
struct siginfo *
|
||||||
linux_nat_get_siginfo (ptid_t ptid)
|
linux_nat_get_siginfo (ptid_t ptid)
|
||||||
{
|
{
|
||||||
@ -124,10 +124,10 @@ Index: gdb-7.2/gdb/linux-nat.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Provide a prototype to silence -Wmissing-prototypes. */
|
/* Provide a prototype to silence -Wmissing-prototypes. */
|
||||||
Index: gdb-7.2/gdb/linux-nat.h
|
Index: gdb-7.2.50.20101116/gdb/linux-nat.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.2.orig/gdb/linux-nat.h 2010-09-25 15:30:50.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.h 2010-11-16 07:54:36.000000000 +0100
|
||||||
+++ gdb-7.2/gdb/linux-nat.h 2010-09-25 15:37:57.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/linux-nat.h 2010-11-16 09:12:44.000000000 +0100
|
||||||
@@ -58,10 +58,6 @@ struct lwp_info
|
@@ -58,10 +58,6 @@ struct lwp_info
|
||||||
/* The kind of stepping of this LWP. */
|
/* The kind of stepping of this LWP. */
|
||||||
enum resume_step step;
|
enum resume_step step;
|
||||||
|
@ -1,164 +0,0 @@
|
|||||||
--- ./gdb/doc/gdb.texinfo 2010-05-24 19:37:01.000000000 +0200
|
|
||||||
+++ ./gdb/doc/gdb.texinfo 2010-05-24 19:38:56.000000000 +0200
|
|
||||||
@@ -14768,33 +14768,21 @@ and @code{show architecture}.
|
|
||||||
@cindex active targets
|
|
||||||
@cindex multiple targets
|
|
||||||
|
|
||||||
-There are three classes of targets: processes, core files, and
|
|
||||||
-executable files. @value{GDBN} can work concurrently on up to three
|
|
||||||
-active targets, one in each class. This allows you to (for example)
|
|
||||||
-start a process and inspect its activity without abandoning your work on
|
|
||||||
-a core file.
|
|
||||||
-
|
|
||||||
-For example, if you execute @samp{gdb a.out}, then the executable file
|
|
||||||
-@code{a.out} is the only active target. If you designate a core file as
|
|
||||||
-well---presumably from a prior run that crashed and coredumped---then
|
|
||||||
-@value{GDBN} has two active targets and uses them in tandem, looking
|
|
||||||
-first in the corefile target, then in the executable file, to satisfy
|
|
||||||
-requests for memory addresses. (Typically, these two classes of target
|
|
||||||
-are complementary, since core files contain only a program's
|
|
||||||
-read-write memory---variables and so on---plus machine status, while
|
|
||||||
-executable files contain only the program text and initialized data.)
|
|
||||||
-
|
|
||||||
-When you type @code{run}, your executable file becomes an active process
|
|
||||||
-target as well. When a process target is active, all @value{GDBN}
|
|
||||||
-commands requesting memory addresses refer to that target; addresses in
|
|
||||||
-an active core file or executable file target are obscured while the
|
|
||||||
-process target is active.
|
|
||||||
-
|
|
||||||
-Use the @code{core-file} and @code{exec-file} commands to select a new
|
|
||||||
-core file or executable target (@pxref{Files, ,Commands to Specify
|
|
||||||
-Files}). To specify as a target a process that is already running, use
|
|
||||||
-the @code{attach} command (@pxref{Attach, ,Debugging an Already-running
|
|
||||||
-Process}).
|
|
||||||
+There are multiple classes of targets such as: processes, executable files or
|
|
||||||
+recording sessions. Core files belong to the process class, there can be
|
|
||||||
+active only one of a core or a running process. Otherwise @value{GDBN} can
|
|
||||||
+work concurrently on multiple active targets, one in each class. This allows
|
|
||||||
+you to (for example) start a process and inspect its activity while still
|
|
||||||
+having access to the executable file after the process finishes. Or if you
|
|
||||||
+start process recording (@pxref{Reverse Execution}) and @code{reverse-step}
|
|
||||||
+there you are presented a virtual layer of the recording target while the
|
|
||||||
+process target remains stopped at the chronologically last point of the process
|
|
||||||
+execution.
|
|
||||||
+
|
|
||||||
+Use the @code{core-file} and @code{exec-file} commands to select a new core
|
|
||||||
+file or executable target (@pxref{Files, ,Commands to Specify Files}). To
|
|
||||||
+specify as a target a process that is already running, use the @code{attach}
|
|
||||||
+command (@pxref{Attach, ,Debugging an Already-running Process}).
|
|
||||||
|
|
||||||
@node Target Commands
|
|
||||||
@section Commands for Managing Targets
|
|
||||||
--- ./gdb/infcmd.c 2010-05-24 19:37:01.000000000 +0200
|
|
||||||
+++ ./gdb/infcmd.c 2010-05-24 19:41:21.000000000 +0200
|
|
||||||
@@ -483,6 +483,13 @@ run_command_1 (char *args, int from_tty,
|
|
||||||
|
|
||||||
dont_repeat ();
|
|
||||||
|
|
||||||
+ if (core_bfd)
|
|
||||||
+ {
|
|
||||||
+ core_file_command (NULL, from_tty);
|
|
||||||
+ if (core_bfd)
|
|
||||||
+ warning (_("Core file not unloaded."));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
kill_if_already_running (from_tty);
|
|
||||||
|
|
||||||
init_wait_for_inferior ();
|
|
||||||
@@ -2373,6 +2380,13 @@ attach_command (char *args, int from_tty
|
|
||||||
error (_("Not killed."));
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (core_bfd)
|
|
||||||
+ {
|
|
||||||
+ core_file_command (NULL, from_tty);
|
|
||||||
+ if (core_bfd)
|
|
||||||
+ warning (_("Core file not unloaded."));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* Clean up any leftovers from other runs. Some other things from
|
|
||||||
this function should probably be moved into target_pre_inferior. */
|
|
||||||
target_pre_inferior (from_tty);
|
|
||||||
--- ./gdb/testsuite/gdb.base/corefile.exp 2010-01-09 01:14:11.000000000 +0100
|
|
||||||
+++ ./gdb/testsuite/gdb.base/corefile.exp 2010-05-24 19:38:56.000000000 +0200
|
|
||||||
@@ -182,3 +182,62 @@ gdb_load ${binfile}
|
|
||||||
gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
|
|
||||||
|
|
||||||
gdb_test "core" "No core file now."
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+# Test a run (start) command will clear any loaded core file.
|
|
||||||
+
|
|
||||||
+gdb_test "core-file $corefile" "Core was generated by .*" "run: load core again"
|
|
||||||
+gdb_test "info files" "\r\nLocal core dump file:\r\n.*" "run: sanity check we see the core file"
|
|
||||||
+
|
|
||||||
+set test "run: with core"
|
|
||||||
+if [runto_main] {
|
|
||||||
+ pass $test
|
|
||||||
+} else {
|
|
||||||
+ fail $test
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set test "run: core file is cleared"
|
|
||||||
+gdb_test_multiple "info files" $test {
|
|
||||||
+ "\r\nLocal core dump file:\r\n.*\r\n$gdb_prompt $" {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+ "\r\n$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+# Test an attach command will clear any loaded core file.
|
|
||||||
+
|
|
||||||
+if ![is_remote target] {
|
|
||||||
+ set test "attach: spawn sleep"
|
|
||||||
+ set res [remote_spawn host "$binfile sleep"];
|
|
||||||
+ if { $res < 0 || $res == "" } {
|
|
||||||
+ perror "$test failed."
|
|
||||||
+ fail $test
|
|
||||||
+ return
|
|
||||||
+ }
|
|
||||||
+ set pid [exp_pid -i $res]
|
|
||||||
+ # We do not care of the startup phase where it will be caught.
|
|
||||||
+
|
|
||||||
+ gdb_start
|
|
||||||
+
|
|
||||||
+ gdb_test "core-file $corefile" "Core was generated by .*" "attach: load core again"
|
|
||||||
+ gdb_test "info files" "\r\nLocal core dump file:\r\n.*" "attach: sanity check we see the core file"
|
|
||||||
+
|
|
||||||
+ gdb_test "attach $pid" "Attaching to process $pid\r\n.*" "attach: with core"
|
|
||||||
+
|
|
||||||
+ set test "attach: core file is cleared"
|
|
||||||
+ gdb_test_multiple "info files" $test {
|
|
||||||
+ "\r\nLocal core dump file:\r\n.*\r\n$gdb_prompt $" {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+ "\r\n$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ gdb_exit
|
|
||||||
+}
|
|
||||||
--- ./gdb/testsuite/gdb.base/coremaker.c 2010-01-01 08:32:00.000000000 +0100
|
|
||||||
+++ ./gdb/testsuite/gdb.base/coremaker.c 2010-05-24 19:38:56.000000000 +0200
|
|
||||||
@@ -133,8 +133,14 @@ func1 ()
|
|
||||||
func2 ();
|
|
||||||
}
|
|
||||||
|
|
||||||
-int main ()
|
|
||||||
+int
|
|
||||||
+main (int argc, char **argv)
|
|
||||||
{
|
|
||||||
+ if (argc == 2 && strcmp (argv[1], "sleep") == 0)
|
|
||||||
+ {
|
|
||||||
+ sleep (60);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
mmapdata ();
|
|
||||||
func1 ();
|
|
||||||
return 0;
|
|
@ -1,217 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-07/msg00237.html
|
|
||||||
Subject: [patch] Fix regression on prelinked executables
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
there is a regression since gdb-7.0 for a combination of:
|
|
||||||
* prelinked
|
|
||||||
* main executable
|
|
||||||
* using separate debug info
|
|
||||||
* using copy relocations
|
|
||||||
|
|
||||||
It is since a patch for both PIE and (AFAIK) OSX support:
|
|
||||||
[commit] syms_from_objfile: Relativize also MAINLINE
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-01/msg00080.html
|
|
||||||
|
|
||||||
which started to use problematic addr_info_make_relative even for main
|
|
||||||
executables. prelink<->gdb discussion at:
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=614659
|
|
||||||
|
|
||||||
Currently in the unfortunately executables GDB has invalid displcement for
|
|
||||||
symbols in .bss:
|
|
||||||
int bssvar, *bssvarp = &bssvar;
|
|
||||||
(gdb) p &bssvar
|
|
||||||
$1 = (int *) 0x600b54
|
|
||||||
(gdb) p bssvarp
|
|
||||||
$2 = (int *) 0x600b50
|
|
||||||
|
|
||||||
<abstract-higher-point-of-view>
|
|
||||||
addr_info_make_relative could just simply subtract entry point address and
|
|
||||||
provide single CORE_ADDR objfile->offset (instead of the current
|
|
||||||
section_offsets array with offsets specific for each section). Linux systems
|
|
||||||
use always single offset for the whole objfile. AFAIK these per-section
|
|
||||||
offsets are there for some embedded targets. Curiously GDB already uses at
|
|
||||||
many places
|
|
||||||
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
|
||||||
instead of using offset for the appropriate section at that place and nobody
|
|
||||||
complains.
|
|
||||||
</abstract-higher-point-of-view>
|
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.
|
|
||||||
|
|
||||||
Proposing for the gdb-7.2 branch. I had problems fixing up my crashing X.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* symfile.c (addr_section_name): New function.
|
|
||||||
(addrs_section_compar): Use it.
|
|
||||||
(addr_info_make_relative): Use it. Move variable sect_name into a more
|
|
||||||
inner block. Make ".dynbss" and ".sdynbss" checks more strict.
|
|
||||||
|
|
||||||
gdb/testsuite/
|
|
||||||
2010-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.base/prelink-lib.c (copyreloc): New initialized variable.
|
|
||||||
* gdb.base/prelink.c (copyreloc, bssvar, bssvarp): New variables.
|
|
||||||
(main): Use copyreloc.
|
|
||||||
* gdb.base/prelink.exp (split debug of executable)
|
|
||||||
(.dynbss vs. .bss address shift): New tests.
|
|
||||||
|
|
||||||
--- a/gdb/symfile.c
|
|
||||||
+++ b/gdb/symfile.c
|
|
||||||
@@ -547,6 +547,23 @@ relative_addr_info_to_section_offsets (struct section_offsets *section_offsets,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Transform section name S for a name comparison. prelink can split section
|
|
||||||
+ `.bss' into two sections `.dynbss' and `.bss' (in this order). Similarly
|
|
||||||
+ prelink can split `.sbss' into `.sdynbss' and `.sbss'. Use virtual address
|
|
||||||
+ of the new `.dynbss' (`.sdynbss') section as the adjacent new `.bss'
|
|
||||||
+ (`.sbss') section has invalid (increased) virtual address. */
|
|
||||||
+
|
|
||||||
+static const char *
|
|
||||||
+addr_section_name (const char *s)
|
|
||||||
+{
|
|
||||||
+ if (strcmp (s, ".dynbss") == 0)
|
|
||||||
+ return ".bss";
|
|
||||||
+ if (strcmp (s, ".sdynbss") == 0)
|
|
||||||
+ return ".sbss";
|
|
||||||
+
|
|
||||||
+ return s;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* qsort comparator for addrs_section_sort. Sort entries in ascending order by
|
|
||||||
their (name, sectindex) pair. sectindex makes the sort by name stable. */
|
|
||||||
|
|
||||||
@@ -557,7 +574,7 @@ addrs_section_compar (const void *ap, const void *bp)
|
|
||||||
const struct other_sections *b = *((struct other_sections **) bp);
|
|
||||||
int retval, a_idx, b_idx;
|
|
||||||
|
|
||||||
- retval = strcmp (a->name, b->name);
|
|
||||||
+ retval = strcmp (addr_section_name (a->name), addr_section_name (b->name));
|
|
||||||
if (retval)
|
|
||||||
return retval;
|
|
||||||
|
|
||||||
@@ -641,14 +658,16 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
|
|
||||||
|
|
||||||
while (*addrs_sorted)
|
|
||||||
{
|
|
||||||
- const char *sect_name = (*addrs_sorted)->name;
|
|
||||||
+ const char *sect_name = addr_section_name ((*addrs_sorted)->name);
|
|
||||||
|
|
||||||
while (*abfd_addrs_sorted
|
|
||||||
- && strcmp ((*abfd_addrs_sorted)->name, sect_name) < 0)
|
|
||||||
+ && strcmp (addr_section_name ((*abfd_addrs_sorted)->name),
|
|
||||||
+ sect_name) < 0)
|
|
||||||
abfd_addrs_sorted++;
|
|
||||||
|
|
||||||
if (*abfd_addrs_sorted
|
|
||||||
- && strcmp ((*abfd_addrs_sorted)->name, sect_name) == 0)
|
|
||||||
+ && strcmp (addr_section_name ((*abfd_addrs_sorted)->name),
|
|
||||||
+ sect_name) == 0)
|
|
||||||
{
|
|
||||||
int index_in_addrs;
|
|
||||||
|
|
||||||
@@ -676,7 +695,6 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
|
|
||||||
|
|
||||||
for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
|
|
||||||
{
|
|
||||||
- const char *sect_name = addrs->other[i].name;
|
|
||||||
struct other_sections *sect = addrs_to_abfd_addrs[i];
|
|
||||||
|
|
||||||
if (sect)
|
|
||||||
@@ -694,6 +712,9 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
+ /* addr_section_name transformation is not used for SECT_NAME. */
|
|
||||||
+ const char *sect_name = addrs->other[i].name;
|
|
||||||
+
|
|
||||||
/* This section does not exist in ABFD, which is normally
|
|
||||||
unexpected and we want to issue a warning.
|
|
||||||
|
|
||||||
@@ -704,12 +725,20 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
|
|
||||||
a warning. Shared libraries contain just the section
|
|
||||||
".gnu.liblist" but it is not marked as loadable there. There is
|
|
||||||
no other way to identify them than by their name as the sections
|
|
||||||
- created by prelink have no special flags. */
|
|
||||||
+ created by prelink have no special flags.
|
|
||||||
+
|
|
||||||
+ For the sections `.bss' and `.sbss' see addr_section_name. */
|
|
||||||
|
|
||||||
if (!(strcmp (sect_name, ".gnu.liblist") == 0
|
|
||||||
|| strcmp (sect_name, ".gnu.conflict") == 0
|
|
||||||
- || strcmp (sect_name, ".dynbss") == 0
|
|
||||||
- || strcmp (sect_name, ".sdynbss") == 0))
|
|
||||||
+ || (strcmp (sect_name, ".bss") == 0
|
|
||||||
+ && i > 0
|
|
||||||
+ && strcmp (addrs->other[i - 1].name, ".dynbss") == 0
|
|
||||||
+ && addrs_to_abfd_addrs[i - 1] != NULL)
|
|
||||||
+ || (strcmp (sect_name, ".sbss") == 0
|
|
||||||
+ && i > 0
|
|
||||||
+ && strcmp (addrs->other[i - 1].name, ".sdynbss") == 0
|
|
||||||
+ && addrs_to_abfd_addrs[i - 1] != NULL)))
|
|
||||||
warning (_("section %s not found in %s"), sect_name,
|
|
||||||
bfd_get_filename (abfd));
|
|
||||||
|
|
||||||
--- a/gdb/testsuite/gdb.base/prelink-lib.c
|
|
||||||
+++ b/gdb/testsuite/gdb.base/prelink-lib.c
|
|
||||||
@@ -16,6 +16,8 @@
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
+int copyreloc = 1;
|
|
||||||
+
|
|
||||||
int
|
|
||||||
g (void (*p)(void))
|
|
||||||
{
|
|
||||||
--- a/gdb/testsuite/gdb.base/prelink.c
|
|
||||||
+++ b/gdb/testsuite/gdb.base/prelink.c
|
|
||||||
@@ -18,6 +18,11 @@
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
+extern int copyreloc;
|
|
||||||
+
|
|
||||||
+/* Test GDB itself finds `&bssvar' right. */
|
|
||||||
+static int bssvar, *bssvarp = &bssvar;
|
|
||||||
+
|
|
||||||
extern void (*h (void)) (void (*)(void));
|
|
||||||
|
|
||||||
int
|
|
||||||
@@ -25,5 +30,6 @@ main (void)
|
|
||||||
{
|
|
||||||
void (*f) (void (*)(void)) = h ();
|
|
||||||
printf ("%p\n", f);
|
|
||||||
+ printf ("%d\n", copyreloc);
|
|
||||||
f (0);
|
|
||||||
}
|
|
||||||
--- a/gdb/testsuite/gdb.base/prelink.exp
|
|
||||||
+++ b/gdb/testsuite/gdb.base/prelink.exp
|
|
||||||
@@ -57,6 +57,13 @@ if {$prelink_args == ""} {
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
|
|
||||||
+set test "split debug of executable"
|
|
||||||
+if [gdb_gnu_strip_debug $binfile] {
|
|
||||||
+ fail $test
|
|
||||||
+} else {
|
|
||||||
+ pass $test
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
if ![prelink_yes $prelink_args] {
|
|
||||||
# Maybe we don't have prelink.
|
|
||||||
return -1
|
|
||||||
@@ -105,3 +112,5 @@ clean_restart $executable
|
|
||||||
gdb_test_no_output "set verbose on"
|
|
||||||
|
|
||||||
gdb_test "core-file $objdir/$subdir/prelink.core" "Using PIC \\(Position Independent Code\\) prelink displacement 0x\[^0\]\[0-9a-f\]* for \[^\r\n\]*[file tail ${libfile}].*" "seen displacement message"
|
|
||||||
+
|
|
||||||
+gdb_test "p &bssvar == bssvarp" " = 1" ".dynbss vs. .bss address shift"
|
|
||||||
|
|
@ -1,280 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00440.html
|
|
||||||
Subject: [patch] Fix infinite loop crash on self-referencing class
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
class C { static C s; }; is a problem for GDB as it references itself and it
|
|
||||||
can crash. Downstream Bug:
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=627432
|
|
||||||
|
|
||||||
#3 0x00000000005b2cc5 in gnuv3_pass_by_reference (type=0x1044d3c8) at ../../gdb/gnu-v3-abi.c:840
|
|
||||||
#4 0x00000000005b2cc5 in gnuv3_pass_by_reference (type=0x1044d3c8) at ../../gdb/gnu-v3-abi.c:840
|
|
||||||
[...]
|
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.
|
|
||||||
|
|
||||||
FYI the .cc file is not reproducible on - and only on - Fedora 14 GCC, filed:
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=637315
|
|
||||||
|
|
||||||
I would even check it in in some time.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-09-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Fix GDB crash on inferior calls with self-referencing classes.
|
|
||||||
* gnu-v3-abi.c (gnuv3_pass_by_reference): Do not call itself on static
|
|
||||||
member fields.
|
|
||||||
|
|
||||||
gdb/testsuite/
|
|
||||||
2010-09-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Fix GDB crash on inferior calls with self-referencing classes.
|
|
||||||
* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: New file.
|
|
||||||
* gdb.dwarf2/dw2-cp-infcall-ref-static-main.c: New file.
|
|
||||||
* gdb.dwarf2/dw2-cp-infcall-ref-static.S: New file.
|
|
||||||
|
|
||||||
--- a/gdb/gnu-v3-abi.c
|
|
||||||
+++ b/gdb/gnu-v3-abi.c
|
|
||||||
@@ -835,9 +835,10 @@ gnuv3_pass_by_reference (struct type *type)
|
|
||||||
by reference, so does this class. Similarly for members, which
|
|
||||||
are constructed whenever this class is. We do not need to worry
|
|
||||||
about recursive loops here, since we are only looking at members
|
|
||||||
- of complete class type. */
|
|
||||||
+ of complete class type. Also ignore any static members. */
|
|
||||||
for (fieldnum = 0; fieldnum < TYPE_NFIELDS (type); fieldnum++)
|
|
||||||
- if (gnuv3_pass_by_reference (TYPE_FIELD_TYPE (type, fieldnum)))
|
|
||||||
+ if (TYPE_FIELD_LOC_KIND (type, fieldnum) == FIELD_LOC_KIND_BITPOS
|
|
||||||
+ && gnuv3_pass_by_reference (TYPE_FIELD_TYPE (type, fieldnum)))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static-main.c
|
|
||||||
@@ -0,0 +1,51 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2010 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/>. */
|
|
||||||
+
|
|
||||||
+/* class C
|
|
||||||
+ {
|
|
||||||
+ public:
|
|
||||||
+ static C s;
|
|
||||||
+ };
|
|
||||||
+ C C::s;
|
|
||||||
+ C f()
|
|
||||||
+ {
|
|
||||||
+ return C::s;
|
|
||||||
+ } */
|
|
||||||
+
|
|
||||||
+asm (".globl cu_text_start");
|
|
||||||
+asm ("cu_text_start:");
|
|
||||||
+
|
|
||||||
+asm (".globl f_start");
|
|
||||||
+asm ("f_start:");
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+f (void)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+asm (".globl f_end");
|
|
||||||
+asm ("f_end:");
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (void)
|
|
||||||
+{
|
|
||||||
+ f ();
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+asm (".globl cu_text_end");
|
|
||||||
+asm ("cu_text_end:");
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.S
|
|
||||||
@@ -0,0 +1,115 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2010 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/>. */
|
|
||||||
+
|
|
||||||
+/* 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 cu_text_start /* DW_AT_low_pc */
|
|
||||||
+ .4byte cu_text_end /* DW_AT_high_pc */
|
|
||||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
|
||||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
|
||||||
+ .byte 4 /* DW_AT_language (DW_LANG_C_plus_plus) */
|
|
||||||
+
|
|
||||||
+.Ltype_class:
|
|
||||||
+ .uleb128 3 /* Abbrev: DW_TAG_class_type */
|
|
||||||
+ .ascii "C\0" /* DW_AT_name */
|
|
||||||
+
|
|
||||||
+ .uleb128 4 /* Abbrev: DW_TAG_member */
|
|
||||||
+ .ascii "s\0" /* DW_AT_name */
|
|
||||||
+ .4byte .Ltype_class-.Lcu1_begin /* DW_AT_type */
|
|
||||||
+ .byte 1 /* DW_AT_declaration */
|
|
||||||
+ .byte 1 /* DW_AT_external */
|
|
||||||
+
|
|
||||||
+ .byte 0 /* End of children of DW_TAG_class_type */
|
|
||||||
+
|
|
||||||
+ .uleb128 5 /* Abbrev: DW_TAG_subprogram */
|
|
||||||
+ .ascii "f\0" /* DW_AT_name */
|
|
||||||
+ .4byte .Ltype_class-.Lcu1_begin /* DW_AT_type */
|
|
||||||
+ .4byte f_start /* DW_AT_low_pc */
|
|
||||||
+ .4byte f_end /* DW_AT_high_pc */
|
|
||||||
+
|
|
||||||
+ .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 0x11 /* DW_AT_low_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .uleb128 0x12 /* DW_AT_high_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 3 /* Abbrev code */
|
|
||||||
+ .uleb128 0x2 /* DW_TAG_class_type */
|
|
||||||
+ .byte 1 /* has_children */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .uleb128 4 /* Abbrev code */
|
|
||||||
+ .uleb128 0xd /* DW_TAG_member */
|
|
||||||
+ .byte 0 /* has_children */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_type */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0x3c /* DW_AT_declaration */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .uleb128 0x3f /* DW_AT_external */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .uleb128 5 /* Abbrev code */
|
|
||||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
|
||||||
+ .byte 0 /* has_children */
|
|
||||||
+ .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 */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
|
|
||||||
@@ -0,0 +1,49 @@
|
|
||||||
+# Copyright 2010 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/>.
|
|
||||||
+
|
|
||||||
+# Check that GDB can call C++ functions whose parameters or return values have
|
|
||||||
+# type containing a static member of the same type.
|
|
||||||
+
|
|
||||||
+# Still no C++ compiler is used.
|
|
||||||
+if { [skip_cplus_tests] } { continue }
|
|
||||||
+
|
|
||||||
+# 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-cp-infcall-ref-static"
|
|
||||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}-main.c ${testfile}.S] {}] } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if ![runto_main] then {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# main is not provided by DWARF.
|
|
||||||
+gdb_test_no_output "set language c++"
|
|
||||||
+
|
|
||||||
+# There are no mangled names in DWARF to suggest the v3 ABI.
|
|
||||||
+gdb_test_no_output "set cp-abi gnu-v3"
|
|
||||||
+
|
|
||||||
+# GDB could crash. There is no DW_AT_location so it is <optimized out>.
|
|
||||||
+gdb_test "p f()" { = {static s = <optimized out>}}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
https://bugzilla.redhat.com/show_bug.cgi?id=631158
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00229.html
|
|
||||||
Subject: [patch] PR 11992 "Regression: C++ this scope sometimes does not work"
|
|
||||||
|
|
||||||
--- gdb-7.2/gdb/c-exp.y.orig 2010-08-19 17:50:00.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/c-exp.y 2010-09-11 20:30:15.000000000 +0200
|
|
||||||
@@ -2422,6 +2422,7 @@ classify_name (struct block *block)
|
|
||||||
|
|
||||||
if (sym == NULL
|
|
||||||
&& parse_language->la_language == language_cplus
|
|
||||||
+ && !is_a_field_of_this
|
|
||||||
&& !lookup_minimal_symbol (copy, NULL, NULL))
|
|
||||||
return UNKNOWN_CPP_NAME;
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00183.html
|
|
||||||
Subject: [patch] .gdb_index: Do not crash on NOBITS
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
elfutils-0.148 still do not contain patch of its GIT
|
|
||||||
804e9ca4d644e64a6125307cbf0a0b89477d7611 where the .gdb_index section has been
|
|
||||||
also split into the separate debug info file.
|
|
||||||
|
|
||||||
Due to it binaries split using elfutils-0.148 contain
|
|
||||||
[38] .gdb_index NOBITS 0000000000000000 0000338c
|
|
||||||
instead of expected
|
|
||||||
[28] .gdb_index PROGBITS 0000000000000000 0000211c
|
|
||||||
|
|
||||||
and due to it GDB while reading the file can error() by:
|
|
||||||
Reading symbols from x.debug...Dwarf Error: Can't read DWARF data from 'x.debug'
|
|
||||||
|
|
||||||
which should not be fatal but due to some other bugs therein it can crash GDB.
|
|
||||||
|
|
||||||
The wrong separate debug info file is for example:
|
|
||||||
http://kojipkgs.fedoraproject.org/packages/glibc/2.12.90/10/x86_64/glibc-debuginfo-2.12.90-10.x86_64.rpm
|
|
||||||
/usr/lib/debug/lib64/libutil-2.12.90.so.debug
|
|
||||||
|
|
||||||
OK to check-in?
|
|
||||||
|
|
||||||
It does not attempt to use .gdb_index from the main binary, it will just
|
|
||||||
disable .gdb_index usage on these binaries.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-09/msg00062.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/09/08 19:09:42 1.12162
|
|
||||||
### src/gdb/ChangeLog 2010/09/08 19:49:28 1.12163
|
|
||||||
## -1,3 +1,7 @@
|
|
||||||
+2010-09-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+
|
|
||||||
+ * dwarf2read.c (dwarf2_read_index): Return on no SEC_HAS_CONTENTS.
|
|
||||||
+
|
|
||||||
2010-09-08 Daniel Jacobowitz <dan@codesourcery.com>
|
|
||||||
|
|
||||||
* dwarf2read.c (read_structure_type): Move processing of
|
|
||||||
--- src/gdb/dwarf2read.c 2010/09/08 19:09:42 1.452
|
|
||||||
+++ src/gdb/dwarf2read.c 2010/09/08 19:49:28 1.453
|
|
||||||
@@ -1904,6 +1904,13 @@
|
|
||||||
if (dwarf2_per_objfile->gdb_index.asection == NULL
|
|
||||||
|| dwarf2_per_objfile->gdb_index.size == 0)
|
|
||||||
return 0;
|
|
||||||
+
|
|
||||||
+ /* Older elfutils strip versions could keep the section in the main
|
|
||||||
+ executable while splitting it for the separate debug info file. */
|
|
||||||
+ if ((bfd_get_file_flags (dwarf2_per_objfile->gdb_index.asection)
|
|
||||||
+ & SEC_HAS_CONTENTS) == 0)
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
dwarf2_read_section (objfile, &dwarf2_per_objfile->gdb_index);
|
|
||||||
|
|
||||||
addr = dwarf2_per_objfile->gdb_index.buffer;
|
|
@ -1,61 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00365.html
|
|
||||||
Subject: [patch] python: load *-gdb.py for shlibs during attach
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
currently if you attach to or load a core file for executable, its -gdb.py
|
|
||||||
script is loaded. But none -gdb.py for the shared libraries.
|
|
||||||
|
|
||||||
Spawned or with the fix (libstdc++-gdb.py):
|
|
||||||
#1 0x00000000004007b5 in f (s="a") at 1.C:4
|
|
||||||
^ is std::string
|
|
||||||
|
|
||||||
Attached/core without the fix:
|
|
||||||
#1 0x00000000004007b5 in f (s=...) at 1.C:4
|
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.
|
|
||||||
|
|
||||||
Mostly obvious, I will check it in later.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-09-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* main.c: Include objfiles.h.
|
|
||||||
(captured_main): New variable objfile. Call
|
|
||||||
load_auto_scripts_for_objfile for ALL_OBJFILES.
|
|
||||||
|
|
||||||
--- ./gdb/main.c 2010-09-22 10:51:32.000000000 +0200
|
|
||||||
+++ ./gdb/main.c 2010-09-22 10:50:44.000000000 +0200
|
|
||||||
@@ -43,6 +43,7 @@
|
|
||||||
#include "source.h"
|
|
||||||
#include "cli/cli-cmds.h"
|
|
||||||
#include "python/python.h"
|
|
||||||
+#include "objfiles.h"
|
|
||||||
|
|
||||||
/* The selected interpreter. This will be used as a set command
|
|
||||||
variable, so it should always be malloc'ed - since
|
|
||||||
@@ -323,6 +324,7 @@ captured_main (void *data)
|
|
||||||
|
|
||||||
int i;
|
|
||||||
int save_auto_load;
|
|
||||||
+ struct objfile *objfile;
|
|
||||||
|
|
||||||
struct cleanup *pre_stat_chain = make_command_stats_cleanup (0);
|
|
||||||
|
|
||||||
@@ -957,8 +959,8 @@ Can't attach to process and specify a co
|
|
||||||
We wait until now because it is common to add to the source search
|
|
||||||
path in local_gdbinit. */
|
|
||||||
gdbpy_global_auto_load = save_auto_load;
|
|
||||||
- if (symfile_objfile != NULL)
|
|
||||||
- load_auto_scripts_for_objfile (symfile_objfile);
|
|
||||||
+ ALL_OBJFILES (objfile)
|
|
||||||
+ load_auto_scripts_for_objfile (objfile);
|
|
||||||
|
|
||||||
for (i = 0; i < ncmd; i++)
|
|
||||||
{
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
|||||||
commit 30fedadf224a8c119575fcc8a6ced51f0d4aee9f
|
|
||||||
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
Date: Wed Sep 29 01:25:39 2010 +0200
|
|
||||||
|
|
||||||
Fix the crash.
|
|
||||||
|
|
||||||
commit d101ce597f2d6143e9f023a4444352bceffb2679
|
|
||||||
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
Date: Wed Sep 29 00:42:37 2010 +0200
|
|
||||||
|
|
||||||
New testcase for: https://bugzilla.redhat.com/show_bug.cgi?id=637770
|
|
||||||
|
|
||||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
|
||||||
index de51231..18b7868 100644
|
|
||||||
--- a/gdb/breakpoint.c
|
|
||||||
+++ b/gdb/breakpoint.c
|
|
||||||
@@ -10560,6 +10560,11 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *,
|
|
||||||
/* FUNCTION can be also delete_breakpoint. */
|
|
||||||
next_related_b = related_breakpoint->related_breakpoint;
|
|
||||||
function (related_breakpoint, data);
|
|
||||||
+
|
|
||||||
+ /* For delete_breakpoint of the last entry of the ring we
|
|
||||||
+ were traversing we would never get back to B. */
|
|
||||||
+ if (next_related_b == related_breakpoint)
|
|
||||||
+ break;
|
|
||||||
related_breakpoint = next_related_b;
|
|
||||||
}
|
|
||||||
while (related_breakpoint != b);
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-delete.c b/gdb/testsuite/gdb.base/watchpoint-delete.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..031ef92
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/watchpoint-delete.c
|
|
||||||
@@ -0,0 +1,33 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2010 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/>. */
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+func (void)
|
|
||||||
+{
|
|
||||||
+ volatile int x = 0;
|
|
||||||
+
|
|
||||||
+ x++; /* break-here */
|
|
||||||
+ x++;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (void)
|
|
||||||
+{
|
|
||||||
+ func ();
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-delete.exp b/gdb/testsuite/gdb.base/watchpoint-delete.exp
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..45bc650
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/watchpoint-delete.exp
|
|
||||||
@@ -0,0 +1,38 @@
|
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+
|
|
||||||
+set testfile "watchpoint-delete"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+
|
|
||||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
|
||||||
+ untested ${testfile}.exp
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# It is more compatible this way.
|
|
||||||
+gdb_test_no_output "set can-use-hw-watchpoints 0"
|
|
||||||
+
|
|
||||||
+if ![runto_main] {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Ensure there is a parent frame to create related bp_watchpoint_scope.
|
|
||||||
+gdb_breakpoint [gdb_get_line_number "break-here"]
|
|
||||||
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
|
|
||||||
+
|
|
||||||
+gdb_test "watch x" {Watchpoint [0-9]+: x}
|
|
||||||
+
|
|
||||||
+gdb_test_no_output {delete $bpnum}
|
|
@ -1,313 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-11/msg00084.html
|
|
||||||
Subject: [new testcase] Regression 7.1->7.2 for iFort [Re: [RFA-v2] dwarf debug format: Support DW_AT_variable_parameter attribute]
|
|
||||||
|
|
||||||
On Fri, 21 May 2010 22:45:35 +0200, Pierre Muller wrote:
|
|
||||||
> Thanks, I committed the patch.
|
|
||||||
|
|
||||||
commit 570d5d01de35effada277a69552c0903a4928241
|
|
||||||
Author: Pierre Muller <muller@ics.u-strasbg.fr>
|
|
||||||
Date: Fri May 21 20:45:18 2010 +0000
|
|
||||||
|
|
||||||
* dwarf2read.c (new_symbol): Handle DW_AT_variable_parameter
|
|
||||||
attribute.
|
|
||||||
|
|
||||||
|
|
||||||
Please revert this patch.
|
|
||||||
|
|
||||||
>From the DWARF-4 description of DW_AT_variable_parameter I do not think it
|
|
||||||
changes the data structures meaning in any way. It just states which data can
|
|
||||||
be modified by whom. I do not think this is useful for GDB in any way.
|
|
||||||
|
|
||||||
|
|
||||||
> > I think it would be improved by a test case, but that is up to you.
|
|
||||||
>
|
|
||||||
> This test would be pascal specific anyhow,
|
|
||||||
|
|
||||||
I believe the Pascal compiler should generate different debug info. For the
|
|
||||||
`var' keyword you can either (a) use DW_TAG_reference_type and point
|
|
||||||
DW_AT_location at the pointer or (b) use DW_OP_deref (as iFort does) on the
|
|
||||||
passed pointer and point DW_AT_location at the value itself.
|
|
||||||
DW_AT_variable_parameter would be true only for the (a) choice.
|
|
||||||
|
|
||||||
1 subroutine f (i)
|
|
||||||
2 integer i
|
|
||||||
3 i = 2
|
|
||||||
4 end
|
|
||||||
5 program varparam
|
|
||||||
6 integer m
|
|
||||||
7 m = 1
|
|
||||||
8 call f (m)
|
|
||||||
9 write(*,*) m
|
|
||||||
10 end
|
|
||||||
|
|
||||||
for iFort 11.1 20100806 it regressed this code, GDB-7.1 displayed:
|
|
||||||
|
|
||||||
Breakpoint 1, f (i=1) at varparam.f90:3
|
|
||||||
3 i = 2
|
|
||||||
(gdb) p i
|
|
||||||
$1 = 1
|
|
||||||
|
|
||||||
while GDB-7.2 displays:
|
|
||||||
|
|
||||||
Breakpoint 2, f (i=@0x1) at varparam.f90:3
|
|
||||||
3 i = 2
|
|
||||||
(gdb) p i
|
|
||||||
$1 = (REF TO -> ( INTEGER(4) )) @0x1: <error reading variable>
|
|
||||||
|
|
||||||
(note that `0x1' GDB considers as an address here)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
A new testcase for the iFort usage case is attached.
|
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu.
|
|
||||||
|
|
||||||
I will then check-in the testcase or you can or so.
|
|
||||||
|
|
||||||
|
|
||||||
Regards,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-11-04 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Revert:
|
|
||||||
2010-05-21 Pierre Muller <muller@ics.u-strasbg.fr>
|
|
||||||
* dwarf2read.c (new_symbol): Handle DW_AT_variable_parameter
|
|
||||||
attribute.
|
|
||||||
|
|
||||||
gdb/testsuite/
|
|
||||||
2010-11-04 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* dw2-ifort-parameter-debug.S: New file.
|
|
||||||
* dw2-ifort-parameter.c: New file.
|
|
||||||
* dw2-ifort-parameter.exp: New file.
|
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/dwarf2read.c 2010-11-07 05:24:01.000000000 +0100
|
|
||||||
+++ gdb-7.2/gdb/dwarf2read.c 2010-11-07 05:36:34.000000000 +0100
|
|
||||||
@@ -10474,14 +10474,6 @@ new_symbol (struct die_info *die, struct
|
|
||||||
{
|
|
||||||
dwarf2_const_value (attr, sym, cu);
|
|
||||||
}
|
|
||||||
- attr = dwarf2_attr (die, DW_AT_variable_parameter, cu);
|
|
||||||
- if (attr && DW_UNSND (attr))
|
|
||||||
- {
|
|
||||||
- struct type *ref_type;
|
|
||||||
-
|
|
||||||
- ref_type = lookup_reference_type (SYMBOL_TYPE (sym));
|
|
||||||
- SYMBOL_TYPE (sym) = ref_type;
|
|
||||||
- }
|
|
||||||
|
|
||||||
add_symbol_to_list (sym, cu->list_in_scope);
|
|
||||||
break;
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter-debug.S
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter-debug.S 2010-11-07 05:36:18.000000000 +0100
|
|
||||||
@@ -0,0 +1,122 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2010 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/>. */
|
|
||||||
+
|
|
||||||
+ .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 */
|
|
||||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
|
||||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
|
||||||
+ .byte 1 /* DW_AT_language (C) */
|
|
||||||
+ .4byte func /* DW_AT_low_pc */
|
|
||||||
+ .4byte main /* DW_AT_high_pc */
|
|
||||||
+
|
|
||||||
+ .uleb128 2 /* Abbrev: DW_TAG_subprogram */
|
|
||||||
+ .byte 1 /* DW_AT_external */
|
|
||||||
+ .ascii "func\0" /* DW_AT_name */
|
|
||||||
+ .4byte func /* DW_AT_low_pc */
|
|
||||||
+ .4byte main /* DW_AT_high_pc */
|
|
||||||
+
|
|
||||||
+ .uleb128 3 /* Abbrev: DW_TAG_formal_parameter */
|
|
||||||
+ .ascii "param\0" /* DW_AT_name */
|
|
||||||
+ .byte 1 /* DW_AT_variable_parameter */
|
|
||||||
+ .4byte .Ltype_int - .Lcu1_begin /* DW_AT_type */
|
|
||||||
+ .byte 2f - 1f /* DW_AT_location */
|
|
||||||
+1: .byte 3 /* DW_OP_addr */
|
|
||||||
+ .4byte ptr /* <addr> */
|
|
||||||
+ .byte 0x6 /* DW_OP_deref */
|
|
||||||
+2:
|
|
||||||
+
|
|
||||||
+ .byte 0 /* End of children of func */
|
|
||||||
+
|
|
||||||
+.Ltype_int:
|
|
||||||
+ .uleb128 4 /* 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 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 */
|
|
||||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .uleb128 2 /* Abbrev code */
|
|
||||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
|
||||||
+ .byte 1 /* has_children */
|
|
||||||
+ .uleb128 0x3f /* DW_AT_external */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .uleb128 3 /* Abbrev code */
|
|
||||||
+ .uleb128 0x05 /* DW_TAG_formal_parameter */
|
|
||||||
+ .byte 0 /* has_children */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .uleb128 0x4b /* DW_AT_variable_parameter */
|
|
||||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
|
||||||
+ .uleb128 0x49 /* DW_AT_type */
|
|
||||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
|
||||||
+ .uleb128 0x2 /* DW_AT_location */
|
|
||||||
+ .uleb128 0xa /* DW_FORM_block1 */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .uleb128 4 /* 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 */
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c 2010-11-07 05:36:18.000000000 +0100
|
|
||||||
@@ -0,0 +1,31 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2010 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
+
|
|
||||||
+int value = 0xdeadf00d;
|
|
||||||
+int *ptr = &value;
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+func (void)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (void)
|
|
||||||
+{
|
|
||||||
+ func ();
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp 2010-11-07 05:36:18.000000000 +0100
|
|
||||||
@@ -0,0 +1,40 @@
|
|
||||||
+# Copyright 2010 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/>.
|
|
||||||
+
|
|
||||||
+# Verify DW_AT_variable_parameter does not modify the data structures meaning
|
|
||||||
+# for GDB, as being used by iFort.
|
|
||||||
+
|
|
||||||
+# 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-ifort-parameter"
|
|
||||||
+
|
|
||||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if ![runto func] {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_test "p/x param" " = 0xdeadf00d"
|
|
@ -1,204 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-11/msg00107.html
|
|
||||||
Subject: [patch 1/2] Code cleanup: New init_one_comp_unit
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
unify some code into a function, to be extended in the next patch.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-11-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Code cleanup.
|
|
||||||
* dwarf2read.c (alloc_one_comp_unit): Rename prototype to ...
|
|
||||||
(init_one_comp_unit): ... this one.
|
|
||||||
(prepare_one_comp_unit): New prototype.
|
|
||||||
(dw2_require_line_header, process_psymtab_comp_unit): Use
|
|
||||||
init_one_comp_unit.
|
|
||||||
(process_psymtab_comp_unit): Use prepare_one_comp_unit.
|
|
||||||
(load_partial_comp_unit): Remove variable attr. Use
|
|
||||||
init_one_comp_unit with xmalloc. Use prepare_one_comp_unit.
|
|
||||||
(load_full_comp_unit): Use init_one_comp_unit with xmalloc. Use
|
|
||||||
prepare_one_comp_unit.
|
|
||||||
(read_signatured_type): Remove variable attr. Use init_one_comp_unit.
|
|
||||||
Use prepare_one_comp_unit.
|
|
||||||
(alloc_one_comp_unit): Rename to ...
|
|
||||||
(init_one_comp_unit): ... here and remove there calloc, new parameter
|
|
||||||
cu.
|
|
||||||
(prepare_one_comp_unit): New function.
|
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/dwarf2read.c 2010-11-07 05:36:34.000000000 +0100
|
|
||||||
+++ gdb-7.2/gdb/dwarf2read.c 2010-11-07 05:38:21.000000000 +0100
|
|
||||||
@@ -1214,7 +1214,11 @@ static struct dwarf2_per_cu_data *dwarf2
|
|
||||||
static struct dwarf2_per_cu_data *dwarf2_find_comp_unit
|
|
||||||
(unsigned int offset, struct objfile *objfile);
|
|
||||||
|
|
||||||
-static struct dwarf2_cu *alloc_one_comp_unit (struct objfile *objfile);
|
|
||||||
+static void init_one_comp_unit (struct dwarf2_cu *cu,
|
|
||||||
+ struct objfile *objfile);
|
|
||||||
+
|
|
||||||
+static void prepare_one_comp_unit (struct dwarf2_cu *cu,
|
|
||||||
+ struct die_info *comp_unit_die);
|
|
||||||
|
|
||||||
static void free_one_comp_unit (void *);
|
|
||||||
|
|
||||||
@@ -1980,10 +1984,7 @@ dw2_require_line_header (struct objfile
|
|
||||||
return;
|
|
||||||
this_cu->v.quick->read_lines = 1;
|
|
||||||
|
|
||||||
- memset (&cu, 0, sizeof (cu));
|
|
||||||
- cu.objfile = objfile;
|
|
||||||
- obstack_init (&cu.comp_unit_obstack);
|
|
||||||
-
|
|
||||||
+ init_one_comp_unit (&cu, objfile);
|
|
||||||
cleanups = make_cleanup (free_stack_comp_unit, &cu);
|
|
||||||
|
|
||||||
dwarf2_read_section (objfile, &dwarf2_per_objfile->info);
|
|
||||||
@@ -2978,10 +2979,7 @@ process_psymtab_comp_unit (struct objfil
|
|
||||||
CORE_ADDR best_lowpc = 0, best_highpc = 0;
|
|
||||||
struct die_reader_specs reader_specs;
|
|
||||||
|
|
||||||
- memset (&cu, 0, sizeof (cu));
|
|
||||||
- cu.objfile = objfile;
|
|
||||||
- obstack_init (&cu.comp_unit_obstack);
|
|
||||||
-
|
|
||||||
+ init_one_comp_unit (&cu, objfile);
|
|
||||||
back_to_inner = make_cleanup (free_stack_comp_unit, &cu);
|
|
||||||
|
|
||||||
info_ptr = partial_read_comp_unit_head (&cu.header, info_ptr,
|
|
||||||
@@ -3035,12 +3033,7 @@ process_psymtab_comp_unit (struct objfil
|
|
||||||
return info_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* Set the language we're debugging. */
|
|
||||||
- attr = dwarf2_attr (comp_unit_die, DW_AT_language, &cu);
|
|
||||||
- if (attr)
|
|
||||||
- set_cu_language (DW_UNSND (attr), &cu);
|
|
||||||
- else
|
|
||||||
- set_cu_language (language_minimal, &cu);
|
|
||||||
+ prepare_one_comp_unit (&cu, comp_unit_die);
|
|
||||||
|
|
||||||
/* Allocate a new partial symbol table structure. */
|
|
||||||
attr = dwarf2_attr (comp_unit_die, DW_AT_name, &cu);
|
|
||||||
@@ -3263,7 +3256,8 @@ load_partial_comp_unit (struct dwarf2_pe
|
|
||||||
info_ptr = dwarf2_per_objfile->info.buffer + this_cu->offset;
|
|
||||||
beg_of_comp_unit = info_ptr;
|
|
||||||
|
|
||||||
- cu = alloc_one_comp_unit (objfile);
|
|
||||||
+ cu = xmalloc (sizeof (*cu));
|
|
||||||
+ init_one_comp_unit (cu, objfile);
|
|
||||||
|
|
||||||
/* ??? Missing cleanup for CU? */
|
|
||||||
|
|
||||||
@@ -3290,12 +3284,7 @@ load_partial_comp_unit (struct dwarf2_pe
|
|
||||||
info_ptr = read_full_die (&reader_specs, &comp_unit_die, info_ptr,
|
|
||||||
&has_children);
|
|
||||||
|
|
||||||
- /* Set the language we're debugging. */
|
|
||||||
- attr = dwarf2_attr (comp_unit_die, DW_AT_language, cu);
|
|
||||||
- if (attr)
|
|
||||||
- set_cu_language (DW_UNSND (attr), cu);
|
|
||||||
- else
|
|
||||||
- set_cu_language (language_minimal, cu);
|
|
||||||
+ prepare_one_comp_unit (cu, comp_unit_die);
|
|
||||||
|
|
||||||
/* Check if comp unit has_children.
|
|
||||||
If so, read the rest of the partial symbols from this comp unit.
|
|
||||||
@@ -4227,7 +4216,8 @@ load_full_comp_unit (struct dwarf2_per_c
|
|
||||||
info_ptr = dwarf2_per_objfile->info.buffer + offset;
|
|
||||||
beg_of_comp_unit = info_ptr;
|
|
||||||
|
|
||||||
- cu = alloc_one_comp_unit (objfile);
|
|
||||||
+ cu = xmalloc (sizeof (*cu));
|
|
||||||
+ init_one_comp_unit (cu, objfile);
|
|
||||||
|
|
||||||
/* If an error occurs while loading, release our storage. */
|
|
||||||
free_cu_cleanup = make_cleanup (free_one_comp_unit, cu);
|
|
||||||
@@ -4254,11 +4244,7 @@ load_full_comp_unit (struct dwarf2_per_c
|
|
||||||
all objfiles needed for references have been loaded yet, and symbol
|
|
||||||
table processing isn't initialized. But we have to set the CU language,
|
|
||||||
or we won't be able to build types correctly. */
|
|
||||||
- attr = dwarf2_attr (cu->dies, DW_AT_language, cu);
|
|
||||||
- if (attr)
|
|
||||||
- set_cu_language (DW_UNSND (attr), cu);
|
|
||||||
- else
|
|
||||||
- set_cu_language (language_minimal, cu);
|
|
||||||
+ prepare_one_comp_unit (cu, cu->dies);
|
|
||||||
|
|
||||||
/* Similarly, if we do not read the producer, we can not apply
|
|
||||||
producer-specific interpretation. */
|
|
||||||
@@ -12617,17 +12603,15 @@ read_signatured_type (struct objfile *ob
|
|
||||||
struct dwarf2_cu *cu;
|
|
||||||
ULONGEST signature;
|
|
||||||
struct cleanup *back_to, *free_cu_cleanup;
|
|
||||||
- struct attribute *attr;
|
|
||||||
|
|
||||||
dwarf2_read_section (objfile, &dwarf2_per_objfile->types);
|
|
||||||
types_ptr = dwarf2_per_objfile->types.buffer + type_sig->offset;
|
|
||||||
|
|
||||||
gdb_assert (type_sig->per_cu.cu == NULL);
|
|
||||||
|
|
||||||
- cu = xmalloc (sizeof (struct dwarf2_cu));
|
|
||||||
- memset (cu, 0, sizeof (struct dwarf2_cu));
|
|
||||||
- obstack_init (&cu->comp_unit_obstack);
|
|
||||||
- cu->objfile = objfile;
|
|
||||||
+ cu = xmalloc (sizeof (*cu));
|
|
||||||
+ init_one_comp_unit (cu, objfile);
|
|
||||||
+
|
|
||||||
type_sig->per_cu.cu = cu;
|
|
||||||
cu->per_cu = &type_sig->per_cu;
|
|
||||||
|
|
||||||
@@ -12659,11 +12643,7 @@ read_signatured_type (struct objfile *ob
|
|
||||||
all objfiles needed for references have been loaded yet, and symbol
|
|
||||||
table processing isn't initialized. But we have to set the CU language,
|
|
||||||
or we won't be able to build types correctly. */
|
|
||||||
- attr = dwarf2_attr (cu->dies, DW_AT_language, cu);
|
|
||||||
- if (attr)
|
|
||||||
- set_cu_language (DW_UNSND (attr), cu);
|
|
||||||
- else
|
|
||||||
- set_cu_language (language_minimal, cu);
|
|
||||||
+ prepare_one_comp_unit (cu, cu->dies);
|
|
||||||
|
|
||||||
do_cleanups (back_to);
|
|
||||||
|
|
||||||
@@ -13755,15 +13735,29 @@ dwarf2_find_comp_unit (unsigned int offs
|
|
||||||
return this_cu;
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Malloc space for a dwarf2_cu for OBJFILE and initialize it. */
|
|
||||||
+/* Initialize dwarf2_cu CU for OBJFILE in a pre-allocated space. */
|
|
||||||
|
|
||||||
-static struct dwarf2_cu *
|
|
||||||
-alloc_one_comp_unit (struct objfile *objfile)
|
|
||||||
+static void
|
|
||||||
+init_one_comp_unit (struct dwarf2_cu *cu, struct objfile *objfile)
|
|
||||||
{
|
|
||||||
- struct dwarf2_cu *cu = xcalloc (1, sizeof (struct dwarf2_cu));
|
|
||||||
+ memset (cu, 0, sizeof (*cu));
|
|
||||||
cu->objfile = objfile;
|
|
||||||
obstack_init (&cu->comp_unit_obstack);
|
|
||||||
- return cu;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* Initiailize basic fields of dwarf_cu CU according to DIE COMP_UNIT_DIE. */
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+prepare_one_comp_unit (struct dwarf2_cu *cu, struct die_info *comp_unit_die)
|
|
||||||
+{
|
|
||||||
+ struct attribute *attr;
|
|
||||||
+
|
|
||||||
+ /* Set the language we're debugging. */
|
|
||||||
+ attr = dwarf2_attr (comp_unit_die, DW_AT_language, cu);
|
|
||||||
+ if (attr)
|
|
||||||
+ set_cu_language (DW_UNSND (attr), cu);
|
|
||||||
+ else
|
|
||||||
+ set_cu_language (language_minimal, cu);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Release one cached compilation unit, CU. We unlink it from the tree
|
|
@ -1,448 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-11/msg00108.html
|
|
||||||
Subject: [patch 2/2] iFort compat.: case insensitive symbols (PR 11313)
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
iFort (Intel Fortran compiler) produces DIEs like:
|
|
||||||
|
|
||||||
<1><1dc>: Abbrev Number: 6 (DW_TAG_module)
|
|
||||||
<1e0> DW_AT_name : MOD1
|
|
||||||
|
|
||||||
But Fortran is case insensitive, therefore GDB lowercases any user input
|
|
||||||
first. Symbols cannot match. gfortran always produces lowercased DIE names.
|
|
||||||
|
|
||||||
I was told by Jakub Jelinek GCC frontend will never be properly case
|
|
||||||
preserving - to output "Mod1" if user stated it in such case in the sources.
|
|
||||||
|
|
||||||
Therefore GDB will now lowercase any case insensitive symbol names on their
|
|
||||||
read-in from DWARF.
|
|
||||||
|
|
||||||
ELF symbol tables are currently not touched - their matching to their CU (and
|
|
||||||
thus to their DW_AT_identifier_case / DW_AT_language) is expensive and it does
|
|
||||||
not seem to me to be needed for iFort as only the module names are uppercased
|
|
||||||
there.
|
|
||||||
|
|
||||||
For the iFort compatibility there is also needed:
|
|
||||||
[new testcase] Regression 7.1->7.2 for iFort [Re: [RFA-v2] dwarf debug format: Support DW_AT_variable_parameter attribute]
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-11/msg00084.html
|
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
PR 11313 - case insensitive identifiers in DWARF not in lowercase.
|
|
||||||
* dwarf2read.c: Include ctype.h.
|
|
||||||
(struct dwarf2_cu) <case_sensitivity>: New.
|
|
||||||
(struct attribute) <string_is_canonical>: Update the comment.
|
|
||||||
(canonical_case): New declaration.
|
|
||||||
(read_partial_die): Call canonical_case.
|
|
||||||
(canonical_case): New function.
|
|
||||||
(dwarf2_canonicalize_name): Update the function comment. Call
|
|
||||||
canonical_case, adjust the obstack allocation.
|
|
||||||
(dwarf2_name): Call canonical_case, set DW_STRING_IS_CANONICAL.
|
|
||||||
(init_one_comp_unit, prepare_one_comp_unit): Set cu->case_sensitivity.
|
|
||||||
|
|
||||||
gdb/testsuite/
|
|
||||||
2010-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
PR 11313 - case insensitive identifiers in DWARF not in lowercase.
|
|
||||||
* gdb.dwarf2/dw2-case-insensitive-debug.S: New.
|
|
||||||
* gdb.dwarf2/dw2-case-insensitive.c: New.
|
|
||||||
* gdb.dwarf2/dw2-case-insensitive.exp: New.
|
|
||||||
* gdb.mi/mi-var-child-f.exp (mi_runto): Use lowercase main__.
|
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/dwarf2read.c 2010-11-07 05:38:21.000000000 +0100
|
|
||||||
+++ gdb-7.2/gdb/dwarf2read.c 2010-11-07 05:38:47.000000000 +0100
|
|
||||||
@@ -55,6 +55,7 @@
|
|
||||||
#include "gdb_stat.h"
|
|
||||||
#include "completer.h"
|
|
||||||
#include "top.h"
|
|
||||||
+#include <ctype.h>
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include "gdb_string.h"
|
|
||||||
@@ -376,6 +377,10 @@ struct dwarf2_cu
|
|
||||||
DIEs for namespaces, we don't need to try to infer them
|
|
||||||
from mangled names. */
|
|
||||||
unsigned int has_namespace_info : 1;
|
|
||||||
+
|
|
||||||
+ /* Are identifiers in this CU case sensitive or should they be lowercased
|
|
||||||
+ before storing them into GDB symbol tables? */
|
|
||||||
+ enum case_sensitivity case_sensitivity;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* When using the index (and thus not using psymtabs), each CU has an
|
|
||||||
@@ -621,9 +626,10 @@ struct attribute
|
|
||||||
ENUM_BITFIELD(dwarf_attribute) name : 16;
|
|
||||||
ENUM_BITFIELD(dwarf_form) form : 15;
|
|
||||||
|
|
||||||
- /* Has DW_STRING already been updated by dwarf2_canonicalize_name? This
|
|
||||||
- field should be in u.str (existing only for DW_STRING) but it is kept
|
|
||||||
- here for better struct attribute alignment. */
|
|
||||||
+ /* Has DW_STRING already been updated by dwarf2_canonicalize_name or
|
|
||||||
+ canonical_case? This field should be in u.str (existing only for
|
|
||||||
+ DW_STRING) but it is kept here for better struct attribute alignment.
|
|
||||||
+ */
|
|
||||||
unsigned int string_is_canonical : 1;
|
|
||||||
|
|
||||||
union
|
|
||||||
@@ -1109,6 +1115,9 @@ static gdb_byte *read_full_die (const st
|
|
||||||
|
|
||||||
static void process_die (struct die_info *, struct dwarf2_cu *);
|
|
||||||
|
|
||||||
+static char *canonical_case (char *name, struct dwarf2_cu *cu,
|
|
||||||
+ struct obstack *obstack);
|
|
||||||
+
|
|
||||||
static char *dwarf2_canonicalize_name (char *, struct dwarf2_cu *,
|
|
||||||
struct obstack *);
|
|
||||||
|
|
||||||
@@ -8589,7 +8598,8 @@ read_partial_die (struct partial_die_inf
|
|
||||||
case DW_TAG_enumerator:
|
|
||||||
/* These tags always have simple identifiers already; no need
|
|
||||||
to canonicalize them. */
|
|
||||||
- part_die->name = DW_STRING (&attr);
|
|
||||||
+ part_die->name = canonical_case (DW_STRING (&attr), cu,
|
|
||||||
+ &cu->objfile->objfile_obstack);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
part_die->name
|
|
||||||
@@ -11043,7 +11053,36 @@ sibling_die (struct die_info *die)
|
|
||||||
return die->sibling;
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Get name of a die, return NULL if not found. */
|
|
||||||
+/* Convert NAME to the lower case if CU is case_sensitive_off. Allocate
|
|
||||||
+ memory on OBSTACK if needed, otherwise return the NAME pointer. */
|
|
||||||
+
|
|
||||||
+static char *
|
|
||||||
+canonical_case (char *name, struct dwarf2_cu *cu,
|
|
||||||
+ struct obstack *obstack)
|
|
||||||
+{
|
|
||||||
+ char *retval;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ if (cu->case_sensitivity == case_sensitive_on)
|
|
||||||
+ return name;
|
|
||||||
+
|
|
||||||
+ for (i = 0; name[i] != 0; i++)
|
|
||||||
+ if (tolower (name[i]) != name[i])
|
|
||||||
+ break;
|
|
||||||
+ if (name[i] == 0)
|
|
||||||
+ return name;
|
|
||||||
+
|
|
||||||
+ retval = obstack_alloc (obstack, strlen (name) + 1);
|
|
||||||
+
|
|
||||||
+ for (i = 0; name[i] != 0; i++)
|
|
||||||
+ retval[i] = tolower (name[i]);
|
|
||||||
+ retval[i] = 0;
|
|
||||||
+
|
|
||||||
+ return retval;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* Get name of a die, return NULL if not found. canonical_case is always
|
|
||||||
+ already called for the returned string. */
|
|
||||||
|
|
||||||
static char *
|
|
||||||
dwarf2_canonicalize_name (char *name, struct dwarf2_cu *cu,
|
|
||||||
@@ -11055,14 +11094,26 @@ dwarf2_canonicalize_name (char *name, st
|
|
||||||
|
|
||||||
if (canon_name != NULL)
|
|
||||||
{
|
|
||||||
- if (strcmp (canon_name, name) != 0)
|
|
||||||
- name = obsavestring (canon_name, strlen (canon_name),
|
|
||||||
+ char *cased_name;
|
|
||||||
+
|
|
||||||
+ cased_name = canonical_case (canon_name, cu, obstack);
|
|
||||||
+
|
|
||||||
+ /* Push CASED_NAME on OBSTACK only if it isn't already pushed there
|
|
||||||
+ by canonical_case and if it was allocated using xmalloc by
|
|
||||||
+ cp_canonicalize_string. */
|
|
||||||
+ if (strcmp (canon_name, cased_name) == 0
|
|
||||||
+ && strcmp (canon_name, name) != 0)
|
|
||||||
+ name = obsavestring (cased_name, strlen (cased_name),
|
|
||||||
obstack);
|
|
||||||
+ else
|
|
||||||
+ name = cased_name;
|
|
||||||
xfree (canon_name);
|
|
||||||
+
|
|
||||||
+ return name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- return name;
|
|
||||||
+ return canonical_case (name, cu, obstack);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get name of a die, return NULL if not found. */
|
|
||||||
@@ -11088,7 +11139,13 @@ dwarf2_name (struct die_info *die, struc
|
|
||||||
case DW_TAG_enumeration_type:
|
|
||||||
case DW_TAG_enumerator:
|
|
||||||
/* These tags always have simple identifiers already; no need
|
|
||||||
- to canonicalize them. */
|
|
||||||
+ to call dwarf2_canonicalize_name for them. */
|
|
||||||
+ if (!DW_STRING_IS_CANONICAL (attr))
|
|
||||||
+ {
|
|
||||||
+ DW_STRING (attr) = canonical_case (DW_STRING (attr), cu,
|
|
||||||
+ &cu->objfile->objfile_obstack);
|
|
||||||
+ DW_STRING_IS_CANONICAL (attr) = 1;
|
|
||||||
+ }
|
|
||||||
return DW_STRING (attr);
|
|
||||||
|
|
||||||
case DW_TAG_subprogram:
|
|
||||||
@@ -13743,6 +13800,7 @@ init_one_comp_unit (struct dwarf2_cu *cu
|
|
||||||
memset (cu, 0, sizeof (*cu));
|
|
||||||
cu->objfile = objfile;
|
|
||||||
obstack_init (&cu->comp_unit_obstack);
|
|
||||||
+ cu->case_sensitivity = case_sensitive_on;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initiailize basic fields of dwarf_cu CU according to DIE COMP_UNIT_DIE. */
|
|
||||||
@@ -13758,6 +13816,13 @@ prepare_one_comp_unit (struct dwarf2_cu
|
|
||||||
set_cu_language (DW_UNSND (attr), cu);
|
|
||||||
else
|
|
||||||
set_cu_language (language_minimal, cu);
|
|
||||||
+
|
|
||||||
+ attr = dwarf2_attr (comp_unit_die, DW_AT_identifier_case, cu);
|
|
||||||
+ if (attr)
|
|
||||||
+ cu->case_sensitivity = (DW_UNSND (attr) == DW_ID_case_sensitive
|
|
||||||
+ ? case_sensitive_on : case_sensitive_off);
|
|
||||||
+ else
|
|
||||||
+ cu->case_sensitivity = cu->language_defn->la_case_sensitivity;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Release one cached compilation unit, CU. We unlink it from the tree
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S 2010-11-07 05:38:35.000000000 +0100
|
|
||||||
@@ -0,0 +1,122 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2004, 2007, 2008, 2009, 2010 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/>. */
|
|
||||||
+
|
|
||||||
+ .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 2 /* Abbrev: DW_TAG_compile_unit */
|
|
||||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
|
||||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
|
||||||
+ .byte 2 /* DW_AT_language (DW_LANG_C) */
|
|
||||||
+ .byte 3 /* DW_AT_identifier_case (DW_ID_case_insensitive) */
|
|
||||||
+ .4byte FUNC_attr /* DW_AT_low_pc */
|
|
||||||
+ .4byte FUNC_lang /* DW_AT_high_pc */
|
|
||||||
+
|
|
||||||
+ .uleb128 3 /* Abbrev: DW_TAG_subprogram */
|
|
||||||
+ .byte 1 /* DW_AT_external */
|
|
||||||
+ .ascii "FUNC_attr\0" /* DW_AT_name */
|
|
||||||
+ .4byte FUNC_attr /* DW_AT_low_pc */
|
|
||||||
+ .4byte FUNC_lang /* DW_AT_high_pc */
|
|
||||||
+
|
|
||||||
+ .byte 0 /* End of children of CU */
|
|
||||||
+.Lcu1_end:
|
|
||||||
+
|
|
||||||
+.Lcu2_begin:
|
|
||||||
+ /* CU header */
|
|
||||||
+ .4byte .Lcu2_end - .Lcu2_start /* Length of Compilation Unit */
|
|
||||||
+.Lcu2_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 */
|
|
||||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
|
||||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
|
||||||
+ .byte 8 /* DW_AT_language (DW_LANG_Fortran90) */
|
|
||||||
+ .4byte FUNC_lang /* DW_AT_low_pc */
|
|
||||||
+ .4byte main /* DW_AT_high_pc */
|
|
||||||
+
|
|
||||||
+ .uleb128 3 /* Abbrev: DW_TAG_subprogram */
|
|
||||||
+ .byte 1 /* DW_AT_external */
|
|
||||||
+ .ascii "FUNC_lang\0" /* DW_AT_name */
|
|
||||||
+ .4byte FUNC_lang /* DW_AT_low_pc */
|
|
||||||
+ .4byte main /* DW_AT_high_pc */
|
|
||||||
+
|
|
||||||
+ .byte 0 /* End of children of CU */
|
|
||||||
+.Lcu2_end:
|
|
||||||
+
|
|
||||||
+/* Abbrev table */
|
|
||||||
+ .section .debug_abbrev
|
|
||||||
+.Labbrev1_begin:
|
|
||||||
+ .uleb128 1 /* Abbrev code */
|
|
||||||
+ .uleb128 0x11 /* DW_TAG_compile_unit */
|
|
||||||
+ .byte 1 /* has_children */
|
|
||||||
+ .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 */
|
|
||||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .uleb128 2 /* Abbrev code */
|
|
||||||
+ .uleb128 0x11 /* DW_TAG_compile_unit */
|
|
||||||
+ .byte 1 /* has_children */
|
|
||||||
+ .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 */
|
|
||||||
+ .uleb128 0x42 /* DW_AT_identifier_case */
|
|
||||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
|
||||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .uleb128 3 /* Abbrev code */
|
|
||||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
|
||||||
+ .byte 0 /* has_children */
|
|
||||||
+ .uleb128 0x3f /* DW_AT_external */
|
|
||||||
+ .uleb128 0xc /* DW_FORM_flag */
|
|
||||||
+ .uleb128 0x3 /* DW_AT_name */
|
|
||||||
+ .uleb128 0x8 /* DW_FORM_string */
|
|
||||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
|
||||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
+ .byte 0x0 /* Terminator */
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c 2010-11-07 05:38:35.000000000 +0100
|
|
||||||
@@ -0,0 +1,36 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2004, 2007, 2008, 2009, 2010 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/>. */
|
|
||||||
+
|
|
||||||
+/* This one is DW_LANG_C but it uses DW_ID_case_insensitive. */
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+FUNC_attr (void)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* This one has no DW_AT_identifier_case but it is DW_LANG_Fortran90. */
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+FUNC_lang (void)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main()
|
|
||||||
+{
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp 2010-11-07 05:38:35.000000000 +0100
|
|
||||||
@@ -0,0 +1,41 @@
|
|
||||||
+# Copyright 2010 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/>.
|
|
||||||
+
|
|
||||||
+# 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-case-insensitive"
|
|
||||||
+
|
|
||||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_test_no_output "set language fortran"
|
|
||||||
+
|
|
||||||
+if {[gdb_breakpoint "fuNC_attr"] == 1} {
|
|
||||||
+ pass "setting breakpoint at fuNC_attr"
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if {[gdb_breakpoint "fuNC_lang"] == 1} {
|
|
||||||
+ pass "setting breakpoint at fuNC_lang"
|
|
||||||
+}
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.mi/mi-var-child-f.exp
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/testsuite/gdb.mi/mi-var-child-f.exp 2010-01-01 08:32:03.000000000 +0100
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.mi/mi-var-child-f.exp 2010-11-07 05:38:35.000000000 +0100
|
|
||||||
@@ -36,7 +36,7 @@ if {[gdb_compile "${srcdir}/${subdir}/${
|
|
||||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
mi_gdb_load ${binfile}
|
|
||||||
|
|
||||||
-mi_runto MAIN__
|
|
||||||
+mi_runto main__
|
|
||||||
|
|
||||||
mi_gdb_test "-var-create array * array" \
|
|
||||||
"\\^done,name=\"array\",numchild=\"3\",value=\".*\",type=\"integer \\(2,-1:1\\)\"" \
|
|
@ -1,418 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00519.html
|
|
||||||
Subject: [patch] Fix inferior execl of new PIE x86_64
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
gcc -o 1 1.c -Wall -g -fPIE -pie; gdb -nx ./1 -ex 'b main' -ex r -ex c
|
|
||||||
|
|
||||||
Starting program: .../gdb/1
|
|
||||||
Breakpoint 1, main (argc=1, argv=0x7fffffffdff8) at 1.c:7
|
|
||||||
7 setbuf (stdout, NULL);
|
|
||||||
Continuing.
|
|
||||||
re-exec
|
|
||||||
process 28056 is executing new program: .../gdb/1
|
|
||||||
Error in re-setting breakpoint 1: Cannot access memory at address 0x80c
|
|
||||||
exit
|
|
||||||
Program exited normally.
|
|
||||||
(gdb) _
|
|
||||||
|
|
||||||
while it should be:
|
|
||||||
|
|
||||||
re-exec
|
|
||||||
process 28095 is executing new program: .../gdb/1
|
|
||||||
Breakpoint 1, main (argc=2, argv=0x7fffffffe008) at 1.c:7
|
|
||||||
7 setbuf (stdout, NULL);
|
|
||||||
(gdb) _
|
|
||||||
|
|
||||||
The error comes from:
|
|
||||||
|
|
||||||
throw_error <- memory_error <- read_memory <- read_memory_unsigned_integer <-
|
|
||||||
amd64_analyze_prologue <- amd64_skip_prologue <- gdbarch_skip_prologue <-
|
|
||||||
skip_prologue_sal <- find_function_start_sal <- symbol_found <- decode_variable
|
|
||||||
<- decode_line_1 <- breakpoint_re_set_one <- catch_errors <- breakpoint_re_set
|
|
||||||
<- clear_symtab_users <- new_symfile_objfile <-
|
|
||||||
symbol_file_add_with_addrs_or_offsets <- symbol_file_add_from_bfd <-
|
|
||||||
symbol_file_add <- symbol_file_add_main_1 <- symbol_file_add_main <-
|
|
||||||
follow_exec
|
|
||||||
|
|
||||||
|
|
||||||
I understand this hack is not nice, the correct way would be to unify more
|
|
||||||
follow_exec with post_create_inferior. But I could break it for non-GNU/Linux
|
|
||||||
targets a lot.
|
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
for the demo above:
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
int
|
|
||||||
main (int argc, char **argv)
|
|
||||||
{
|
|
||||||
setbuf (stdout, NULL);
|
|
||||||
if (argc == 1)
|
|
||||||
{
|
|
||||||
puts ("re-exec");
|
|
||||||
execl ("/proc/self/exe", argv[0], "foo", NULL);
|
|
||||||
assert (0);
|
|
||||||
}
|
|
||||||
puts ("exit");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-09-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* infrun.c (follow_exec): Replace symbol_file_add_main by
|
|
||||||
symbol_file_add with SYMFILE_DEFER_BP_RESET, set_initial_language and
|
|
||||||
breakpoint_re_set.
|
|
||||||
* m32r-rom.c (m32r_load, m32r_upload_command): Use parameter 0 for
|
|
||||||
clear_symtab_users.
|
|
||||||
* objfiles.c (free_all_objfiles): Likewise.
|
|
||||||
* remote-m32r-sdi.c (m32r_load): Likewise.
|
|
||||||
* solib-som.c (som_solib_create_inferior_hook): Likewise.
|
|
||||||
* symfile.c (new_symfile_objfile): New comment for add_flags. Call
|
|
||||||
clear_symtab_users with ADD_FLAGS.
|
|
||||||
(reread_symbols): Use parameter 0 for clear_symtab_users.
|
|
||||||
(clear_symtab_users): New parameter add_flags. Do not call
|
|
||||||
breakpoint_re_set if SYMFILE_DEFER_BP_RESET.
|
|
||||||
(clear_symtab_users_cleanup): Use parameter 0 for clear_symtab_users.
|
|
||||||
* symtab.h (clear_symtab_users): New parameter add_flags.
|
|
||||||
|
|
||||||
gdb/testsuite/
|
|
||||||
2010-09-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.base/pie-execl.exp: New file.
|
|
||||||
* gdb.base/pie-execl.c: New file.
|
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/infrun.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/infrun.c 2010-10-12 18:27:58.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/infrun.c 2010-10-12 18:29:24.000000000 +0200
|
|
||||||
@@ -840,8 +840,15 @@ follow_exec (ptid_t pid, char *execd_pat
|
|
||||||
/* That a.out is now the one to use. */
|
|
||||||
exec_file_attach (execd_pathname, 0);
|
|
||||||
|
|
||||||
- /* Load the main file's symbols. */
|
|
||||||
- symbol_file_add_main (execd_pathname, 0);
|
|
||||||
+ /* SYMFILE_DEFER_BP_RESET is used as the proper displacement for PIE
|
|
||||||
+ (Position Independent Executable) main symbol file will get applied by
|
|
||||||
+ solib_create_inferior_hook below. breakpoint_re_set would fail to insert
|
|
||||||
+ the breakpoints with the zero displacement. */
|
|
||||||
+
|
|
||||||
+ symbol_file_add (execd_pathname, SYMFILE_MAINLINE | SYMFILE_DEFER_BP_RESET,
|
|
||||||
+ NULL, 0);
|
|
||||||
+
|
|
||||||
+ set_initial_language ();
|
|
||||||
|
|
||||||
#ifdef SOLIB_CREATE_INFERIOR_HOOK
|
|
||||||
SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
|
|
||||||
@@ -851,6 +858,8 @@ follow_exec (ptid_t pid, char *execd_pat
|
|
||||||
|
|
||||||
jit_inferior_created_hook ();
|
|
||||||
|
|
||||||
+ breakpoint_re_set ();
|
|
||||||
+
|
|
||||||
/* Reinsert all breakpoints. (Those which were symbolic have
|
|
||||||
been reset to the proper address in the new a.out, thanks
|
|
||||||
to symbol_file_command...) */
|
|
||||||
Index: gdb-7.2/gdb/m32r-rom.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/m32r-rom.c 2010-01-01 08:31:37.000000000 +0100
|
|
||||||
+++ gdb-7.2/gdb/m32r-rom.c 2010-10-12 18:29:24.000000000 +0200
|
|
||||||
@@ -188,7 +188,7 @@ m32r_load (char *filename, int from_tty)
|
|
||||||
the stack may not be valid, and things would get horribly
|
|
||||||
confused... */
|
|
||||||
|
|
||||||
- clear_symtab_users ();
|
|
||||||
+ clear_symtab_users (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -551,7 +551,7 @@ m32r_upload_command (char *args, int fro
|
|
||||||
the stack may not be valid, and things would get horribly
|
|
||||||
confused... */
|
|
||||||
|
|
||||||
- clear_symtab_users ();
|
|
||||||
+ clear_symtab_users (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Provide a prototype to silence -Wmissing-prototypes. */
|
|
||||||
Index: gdb-7.2/gdb/objfiles.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/objfiles.c 2010-10-12 18:27:56.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/objfiles.c 2010-10-12 18:29:39.000000000 +0200
|
|
||||||
@@ -699,7 +699,7 @@ free_all_objfiles (void)
|
|
||||||
{
|
|
||||||
free_objfile (objfile);
|
|
||||||
}
|
|
||||||
- clear_symtab_users ();
|
|
||||||
+ clear_symtab_users (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS
|
|
||||||
Index: gdb-7.2/gdb/remote-m32r-sdi.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/remote-m32r-sdi.c 2010-07-07 18:15:16.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/remote-m32r-sdi.c 2010-10-12 18:29:24.000000000 +0200
|
|
||||||
@@ -1377,7 +1377,7 @@ m32r_load (char *args, int from_tty)
|
|
||||||
might be to call normal_stop, except that the stack may not be valid,
|
|
||||||
and things would get horribly confused... */
|
|
||||||
|
|
||||||
- clear_symtab_users ();
|
|
||||||
+ clear_symtab_users (0);
|
|
||||||
|
|
||||||
if (!nostart)
|
|
||||||
{
|
|
||||||
Index: gdb-7.2/gdb/solib-som.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/solib-som.c 2010-05-17 01:49:58.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/solib-som.c 2010-10-12 18:29:24.000000000 +0200
|
|
||||||
@@ -354,7 +354,7 @@ keep_going:
|
|
||||||
/* Make the breakpoint at "_start" a shared library event breakpoint. */
|
|
||||||
create_solib_event_breakpoint (target_gdbarch, anaddr);
|
|
||||||
|
|
||||||
- clear_symtab_users ();
|
|
||||||
+ clear_symtab_users (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
Index: gdb-7.2/gdb/symfile.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/symfile.c 2010-10-12 18:27:57.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/symfile.c 2010-10-12 18:29:24.000000000 +0200
|
|
||||||
@@ -1036,7 +1036,7 @@ syms_from_objfile (struct objfile *objfi
|
|
||||||
|
|
||||||
/* Perform required actions after either reading in the initial
|
|
||||||
symbols for a new objfile, or mapping in the symbols from a reusable
|
|
||||||
- objfile. */
|
|
||||||
+ objfile. ADD_FLAGS is a bitmask of enum symfile_add_flags. */
|
|
||||||
|
|
||||||
void
|
|
||||||
new_symfile_objfile (struct objfile *objfile, int add_flags)
|
|
||||||
@@ -1049,7 +1049,7 @@ new_symfile_objfile (struct objfile *obj
|
|
||||||
/* OK, make it the "real" symbol file. */
|
|
||||||
symfile_objfile = objfile;
|
|
||||||
|
|
||||||
- clear_symtab_users ();
|
|
||||||
+ clear_symtab_users (add_flags);
|
|
||||||
}
|
|
||||||
else if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0)
|
|
||||||
{
|
|
||||||
@@ -2527,7 +2527,7 @@ reread_symbols (void)
|
|
||||||
/* Notify objfiles that we've modified objfile sections. */
|
|
||||||
objfiles_changed ();
|
|
||||||
|
|
||||||
- clear_symtab_users ();
|
|
||||||
+ clear_symtab_users (0);
|
|
||||||
/* At least one objfile has changed, so we can consider that
|
|
||||||
the executable we're debugging has changed too. */
|
|
||||||
observer_notify_executable_changed ();
|
|
||||||
@@ -2745,10 +2745,10 @@ allocate_symtab (char *filename, struct
|
|
||||||
|
|
||||||
|
|
||||||
/* Reset all data structures in gdb which may contain references to symbol
|
|
||||||
- table data. */
|
|
||||||
+ table data. ADD_FLAGS is a bitmask of enum symfile_add_flags. */
|
|
||||||
|
|
||||||
void
|
|
||||||
-clear_symtab_users (void)
|
|
||||||
+clear_symtab_users (int add_flags)
|
|
||||||
{
|
|
||||||
/* Someday, we should do better than this, by only blowing away
|
|
||||||
the things that really need to be blown. */
|
|
||||||
@@ -2758,7 +2758,8 @@ clear_symtab_users (void)
|
|
||||||
clear_current_source_symtab_and_line ();
|
|
||||||
|
|
||||||
clear_displays ();
|
|
||||||
- breakpoint_re_set ();
|
|
||||||
+ if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0)
|
|
||||||
+ breakpoint_re_set ();
|
|
||||||
set_default_breakpoint (0, NULL, 0, 0, 0);
|
|
||||||
clear_pc_function_cache ();
|
|
||||||
observer_notify_new_objfile (NULL);
|
|
||||||
@@ -2777,7 +2778,7 @@ clear_symtab_users (void)
|
|
||||||
static void
|
|
||||||
clear_symtab_users_cleanup (void *ignore)
|
|
||||||
{
|
|
||||||
- clear_symtab_users ();
|
|
||||||
+ clear_symtab_users (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* OVERLAYS:
|
|
||||||
Index: gdb-7.2/gdb/symtab.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/symtab.h 2010-10-12 18:27:56.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/symtab.h 2010-10-12 18:29:24.000000000 +0200
|
|
||||||
@@ -1170,7 +1170,7 @@ extern void skip_prologue_sal (struct sy
|
|
||||||
|
|
||||||
/* symfile.c */
|
|
||||||
|
|
||||||
-extern void clear_symtab_users (void);
|
|
||||||
+extern void clear_symtab_users (int add_flags);
|
|
||||||
|
|
||||||
extern enum language deduce_language_from_filename (const char *);
|
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.base/pie-execl.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.base/pie-execl.c 2010-10-12 18:29:24.000000000 +0200
|
|
||||||
@@ -0,0 +1,51 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2010 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 <stdio.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#include <assert.h>
|
|
||||||
+
|
|
||||||
+static void pie_execl_marker (void);
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (int argc, char **argv)
|
|
||||||
+{
|
|
||||||
+ setbuf (stdout, NULL);
|
|
||||||
+
|
|
||||||
+#if BIN == 1
|
|
||||||
+ if (argc == 2)
|
|
||||||
+ {
|
|
||||||
+ printf ("pie-execl: re-exec: %s\n", argv[1]);
|
|
||||||
+ execl (argv[1], argv[1], NULL);
|
|
||||||
+ assert (0);
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+ pie_execl_marker ();
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* pie_execl_marker must be on a different address than in `pie-execl2.c'. */
|
|
||||||
+
|
|
||||||
+volatile int v;
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+pie_execl_marker (void)
|
|
||||||
+{
|
|
||||||
+ v = 1;
|
|
||||||
+}
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.base/pie-execl.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.base/pie-execl.exp 2010-10-12 18:29:24.000000000 +0200
|
|
||||||
@@ -0,0 +1,94 @@
|
|
||||||
+# Copyright 2010 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/>.
|
|
||||||
+
|
|
||||||
+# The problem was due to amd64_skip_prologue attempting to access inferior
|
|
||||||
+# memory before the PIE (Position Independent Executable) gets relocated.
|
|
||||||
+
|
|
||||||
+if { ![istarget *-linux*]} {
|
|
||||||
+ continue
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile "pie-execl"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set executable1 ${testfile}1
|
|
||||||
+set executable2 ${testfile}2
|
|
||||||
+set binfile1 ${objdir}/${subdir}/${executable1}
|
|
||||||
+set binfile2 ${objdir}/${subdir}/${executable2}
|
|
||||||
+
|
|
||||||
+# Use conditional compilation according to `BIN' as GDB remembers the source
|
|
||||||
+# file name of the breakpoint.
|
|
||||||
+
|
|
||||||
+set opts [list debug {additional_flags=-fPIE -pie}]
|
|
||||||
+if {[build_executable ${testfile}.exp $executable1 $srcfile [concat $opts {additional_flags=-DBIN=1}]] == ""
|
|
||||||
+ || [build_executable ${testfile}.exp $executable2 $srcfile [concat $opts {additional_flags=-DBIN=2}]] == ""} {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+clean_restart ${executable1}
|
|
||||||
+
|
|
||||||
+gdb_test_no_output "set args ${binfile2}"
|
|
||||||
+
|
|
||||||
+if ![runto_main] {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Do not stop on `main' after re-exec.
|
|
||||||
+delete_breakpoints
|
|
||||||
+
|
|
||||||
+gdb_breakpoint "pie_execl_marker"
|
|
||||||
+gdb_test "info breakpoints" ".*" ""
|
|
||||||
+
|
|
||||||
+set addr1 ""
|
|
||||||
+set test "pie_execl_marker address first"
|
|
||||||
+gdb_test_multiple "p/x &pie_execl_marker" $test {
|
|
||||||
+ -re " = (0x\[0-9a-f\]+)\r\n$gdb_prompt $" {
|
|
||||||
+ set addr1 $expect_out(1,string)
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+verbose -log "addr1 is $addr1"
|
|
||||||
+
|
|
||||||
+set test "continue"
|
|
||||||
+gdb_test_multiple $test $test {
|
|
||||||
+ -re "Error in re-setting breakpoint" {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+ -re "Cannot access memory" {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+ -re "pie-execl: re-exec.*executing new program.*\r\nBreakpoint \[0-9\]+,\[^\r\n\]* pie_execl_marker .*\r\n$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_test "info breakpoints" ".*" ""
|
|
||||||
+
|
|
||||||
+set addr2 ""
|
|
||||||
+set test "pie_execl_marker address second"
|
|
||||||
+gdb_test_multiple "p/x &pie_execl_marker" $test {
|
|
||||||
+ -re " = (0x\[0-9a-f\]+)\r\n$gdb_prompt $" {
|
|
||||||
+ set addr2 $expect_out(1,string)
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+verbose -log "addr2 is $addr2"
|
|
||||||
+
|
|
||||||
+# Ensure we cannot get a false PASS and the inferior has really changed.
|
|
||||||
+set test "pie_execl_marker address has changed"
|
|
||||||
+if [string equal $addr1 $addr2] {
|
|
||||||
+ fail $test
|
|
||||||
+} else {
|
|
||||||
+ pass $test
|
|
||||||
+}
|
|
@ -1,8 +1,8 @@
|
|||||||
Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/dwarf2read.c 2010-07-13 00:13:02.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/dwarf2read.c 2010-11-16 08:19:54.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/dwarf2read.c 2010-07-13 00:26:25.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/dwarf2read.c 2010-11-16 08:25:21.000000000 +0100
|
||||||
@@ -5727,12 +5727,14 @@ read_set_type (struct die_info *die, str
|
@@ -7315,12 +7315,14 @@ read_set_type (struct die_info *die, str
|
||||||
return set_die_type (die, set_type, cu);
|
return set_die_type (die, set_type, cu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
struct attribute *attr;
|
struct attribute *attr;
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
CORE_ADDR base = (CORE_ADDR) 0;
|
CORE_ADDR base = (CORE_ADDR) 0;
|
||||||
@@ -5757,10 +5759,40 @@ read_common_block (struct die_info *die,
|
@@ -7345,10 +7347,40 @@ read_common_block (struct die_info *die,
|
||||||
}
|
}
|
||||||
if (die->child != NULL)
|
if (die->child != NULL)
|
||||||
{
|
{
|
||||||
@ -58,9 +58,9 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
+
|
+
|
||||||
+ /* Undocumented in DWARF3, when it can be present? */
|
+ /* Undocumented in DWARF3, when it can be present? */
|
||||||
attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu);
|
attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu);
|
||||||
if (attr)
|
if (sym != NULL && attr != NULL)
|
||||||
{
|
{
|
||||||
@@ -5778,8 +5810,25 @@ read_common_block (struct die_info *die,
|
@@ -7366,8 +7398,25 @@ read_common_block (struct die_info *die,
|
||||||
SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset;
|
SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset;
|
||||||
add_symbol_to_list (sym, &global_symbols);
|
add_symbol_to_list (sym, &global_symbols);
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9106,6 +9155,13 @@ new_symbol (struct die_info *die, struct
|
@@ -10954,6 +11003,13 @@ new_symbol_full (struct die_info *die, s
|
||||||
{
|
{
|
||||||
var_decode_location (attr, sym, cu);
|
var_decode_location (attr, sym, cu);
|
||||||
attr2 = dwarf2_attr (die, DW_AT_external, cu);
|
attr2 = dwarf2_attr (die, DW_AT_external, cu);
|
||||||
@ -97,12 +97,12 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
+ && die->parent->tag == DW_TAG_common_block)
|
+ && die->parent->tag == DW_TAG_common_block)
|
||||||
+ attr2 = NULL;
|
+ attr2 = NULL;
|
||||||
+
|
+
|
||||||
if (attr2 && (DW_UNSND (attr2) != 0))
|
if (SYMBOL_CLASS (sym) == LOC_STATIC
|
||||||
{
|
&& SYMBOL_VALUE_ADDRESS (sym) == 0
|
||||||
struct pending **list_to_add;
|
&& !dwarf2_per_objfile->has_section_at_zero)
|
||||||
@@ -9277,6 +9333,11 @@ new_symbol (struct die_info *die, struct
|
@@ -11126,6 +11182,11 @@ new_symbol_full (struct die_info *die, s
|
||||||
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
||||||
add_symbol_to_list (sym, &global_symbols);
|
list_to_add = &global_symbols;
|
||||||
break;
|
break;
|
||||||
+ case DW_TAG_common_block:
|
+ case DW_TAG_common_block:
|
||||||
+ SYMBOL_CLASS (sym) = LOC_STATIC;
|
+ SYMBOL_CLASS (sym) = LOC_STATIC;
|
||||||
@ -112,10 +112,10 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
|
|||||||
default:
|
default:
|
||||||
/* Not a tag we recognize. Hopefully we aren't processing
|
/* Not a tag we recognize. Hopefully we aren't processing
|
||||||
trash data, but since we must specifically ignore things
|
trash data, but since we must specifically ignore things
|
||||||
Index: gdb-7.1.90.20100711/gdb/f-lang.c
|
Index: gdb-7.2.50.20101116/gdb/f-lang.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/f-lang.c 2010-07-13 00:24:04.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/f-lang.c 2010-11-16 08:21:46.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/f-lang.c 2010-07-13 00:25:56.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/f-lang.c 2010-11-16 08:22:05.000000000 +0100
|
||||||
@@ -443,27 +443,3 @@ _initialize_f_language (void)
|
@@ -443,27 +443,3 @@ _initialize_f_language (void)
|
||||||
|
|
||||||
add_language (&f_language_defn);
|
add_language (&f_language_defn);
|
||||||
@ -144,10 +144,10 @@ Index: gdb-7.1.90.20100711/gdb/f-lang.c
|
|||||||
- }
|
- }
|
||||||
- return (NULL);
|
- return (NULL);
|
||||||
-}
|
-}
|
||||||
Index: gdb-7.1.90.20100711/gdb/f-lang.h
|
Index: gdb-7.2.50.20101116/gdb/f-lang.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/f-lang.h 2010-07-13 00:24:04.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/f-lang.h 2010-11-16 08:21:46.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/f-lang.h 2010-07-13 00:25:56.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/f-lang.h 2010-11-16 08:22:05.000000000 +0100
|
||||||
@@ -52,36 +52,8 @@ enum f90_range_type
|
@@ -52,36 +52,8 @@ enum f90_range_type
|
||||||
NONE_BOUND_DEFAULT /* "(low:high)" */
|
NONE_BOUND_DEFAULT /* "(low:high)" */
|
||||||
};
|
};
|
||||||
@ -185,10 +185,10 @@ Index: gdb-7.1.90.20100711/gdb/f-lang.h
|
|||||||
|
|
||||||
/* When reasonable array bounds cannot be fetched, such as when
|
/* When reasonable array bounds cannot be fetched, such as when
|
||||||
you ask to 'mt print symbols' and there is no stack frame and
|
you ask to 'mt print symbols' and there is no stack frame and
|
||||||
Index: gdb-7.1.90.20100711/gdb/f-valprint.c
|
Index: gdb-7.2.50.20101116/gdb/f-valprint.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/f-valprint.c 2010-07-13 00:24:25.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/f-valprint.c 2010-11-16 08:21:46.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/f-valprint.c 2010-07-13 00:32:05.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/f-valprint.c 2010-11-16 08:22:05.000000000 +0100
|
||||||
@@ -34,6 +34,8 @@
|
@@ -34,6 +34,8 @@
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
@ -371,11 +371,11 @@ Index: gdb-7.1.90.20100711/gdb/f-valprint.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Index: gdb-7.1.90.20100711/gdb/stack.c
|
Index: gdb-7.2.50.20101116/gdb/stack.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/stack.c 2010-07-01 17:36:17.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/stack.c 2010-09-30 12:29:00.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/stack.c 2010-07-13 00:29:49.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/stack.c 2010-11-16 08:22:05.000000000 +0100
|
||||||
@@ -1484,6 +1484,8 @@ iterate_over_block_locals (struct block
|
@@ -1490,6 +1490,8 @@ iterate_over_block_locals (struct block
|
||||||
case LOC_COMPUTED:
|
case LOC_COMPUTED:
|
||||||
if (SYMBOL_IS_ARGUMENT (sym))
|
if (SYMBOL_IS_ARGUMENT (sym))
|
||||||
break;
|
break;
|
||||||
@ -384,11 +384,11 @@ Index: gdb-7.1.90.20100711/gdb/stack.c
|
|||||||
(*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
|
(*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/symtab.h
|
Index: gdb-7.2.50.20101116/gdb/symtab.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/symtab.h 2010-07-12 23:07:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/symtab.h 2010-11-16 07:53:59.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/symtab.h 2010-07-13 00:27:02.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/symtab.h 2010-11-16 08:22:05.000000000 +0100
|
||||||
@@ -396,7 +396,10 @@ typedef enum domain_enum_tag
|
@@ -408,7 +408,10 @@ typedef enum domain_enum_tag
|
||||||
FUNCTIONS_DOMAIN,
|
FUNCTIONS_DOMAIN,
|
||||||
|
|
||||||
/* All defined types */
|
/* All defined types */
|
||||||
@ -400,10 +400,10 @@ Index: gdb-7.1.90.20100711/gdb/symtab.h
|
|||||||
}
|
}
|
||||||
domain_enum;
|
domain_enum;
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/common-block.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/common-block.exp 2010-07-13 00:25:56.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp 2010-11-16 08:22:05.000000000 +0100
|
||||||
@@ -0,0 +1,101 @@
|
@@ -0,0 +1,101 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
@ -506,10 +506,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/common-block.exp
|
|||||||
+gdb_test "p ix_x" " = 1 *" "p ix_x in"
|
+gdb_test "p ix_x" " = 1 *" "p ix_x in"
|
||||||
+gdb_test "p iy_y" " = 2 *" "p iy_y in"
|
+gdb_test "p iy_y" " = 2 *" "p iy_y in"
|
||||||
+gdb_test "p iz_z2" " = 3 *" "p iz_z2 in"
|
+gdb_test "p iz_z2" " = 3 *" "p iz_z2 in"
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/common-block.f90
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.f90
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/common-block.f90 2010-07-13 00:25:56.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.f90 2010-11-16 08:22:05.000000000 +0100
|
||||||
@@ -0,0 +1,67 @@
|
@@ -0,0 +1,67 @@
|
||||||
+! Copyright 2008 Free Software Foundation, Inc.
|
+! Copyright 2008 Free Software Foundation, Inc.
|
||||||
+!
|
+!
|
||||||
|
@ -40,11 +40,11 @@ Subject: [PATCH 4/4] add gdb-add-index
|
|||||||
5 files changed, 57 insertions(+), 1 deletions(-)
|
5 files changed, 57 insertions(+), 1 deletions(-)
|
||||||
create mode 100755 gdb/gdb-add-index
|
create mode 100755 gdb/gdb-add-index
|
||||||
|
|
||||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
Index: gdb-7.2.50.20101116/gdb/Makefile.in
|
||||||
index 6dbb284..8210a2c 100644
|
===================================================================
|
||||||
--- a/gdb/Makefile.in
|
--- gdb-7.2.50.20101116.orig/gdb/Makefile.in 2010-11-16 08:03:17.000000000 +0100
|
||||||
+++ b/gdb/Makefile.in
|
+++ gdb-7.2.50.20101116/gdb/Makefile.in 2010-11-16 08:47:45.000000000 +0100
|
||||||
@@ -1018,7 +1018,16 @@ install-only: $(CONFIG_INSTALL) xml-syscall-install
|
@@ -986,7 +986,16 @@ install-only: install-gstack $(CONFIG_IN
|
||||||
$(SHELL) $(srcdir)/../mkinstalldirs \
|
$(SHELL) $(srcdir)/../mkinstalldirs \
|
||||||
$(DESTDIR)$(man1dir) ; \
|
$(DESTDIR)$(man1dir) ; \
|
||||||
$(INSTALL_DATA) $(srcdir)/gdb.1 \
|
$(INSTALL_DATA) $(srcdir)/gdb.1 \
|
||||||
@ -62,11 +62,11 @@ index 6dbb284..8210a2c 100644
|
|||||||
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||||
.PHONY: install-tui
|
.PHONY: install-tui
|
||||||
install-tui:
|
install-tui:
|
||||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
Index: gdb-7.2.50.20101116/gdb/doc/gdb.texinfo
|
||||||
index 69141e3..457e6b4 100644
|
===================================================================
|
||||||
--- a/gdb/doc/gdb.texinfo
|
--- gdb-7.2.50.20101116.orig/gdb/doc/gdb.texinfo 2010-11-16 08:04:18.000000000 +0100
|
||||||
+++ b/gdb/doc/gdb.texinfo
|
+++ gdb-7.2.50.20101116/gdb/doc/gdb.texinfo 2010-11-16 08:56:30.000000000 +0100
|
||||||
@@ -15045,6 +15045,14 @@ There are currently some limitation on indices. They only work when
|
@@ -15500,6 +15500,14 @@ There are currently some limitation on i
|
||||||
for DWARF debugging information, not stabs. And, they do not
|
for DWARF debugging information, not stabs. And, they do not
|
||||||
currently work for programs using Ada.
|
currently work for programs using Ada.
|
||||||
|
|
||||||
@ -78,14 +78,13 @@ index 69141e3..457e6b4 100644
|
|||||||
+$ gdb-add-index symfile
|
+$ gdb-add-index symfile
|
||||||
+@end smallexample
|
+@end smallexample
|
||||||
+
|
+
|
||||||
|
|
||||||
@node Symbol Errors
|
@node Symbol Errors
|
||||||
@section Errors Reading Symbol Files
|
@section Errors Reading Symbol Files
|
||||||
diff --git a/gdb/gdb-add-index b/gdb/gdb-add-index
|
|
||||||
new file mode 100755
|
Index: gdb-7.2.50.20101116/gdb/gdb-add-index
|
||||||
index 0000000..c9a03b0
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/gdb-add-index
|
+++ gdb-7.2.50.20101116/gdb/gdb-add-index 2010-11-16 08:47:45.000000000 +0100
|
||||||
@@ -0,0 +1,30 @@
|
@@ -0,0 +1,30 @@
|
||||||
+#! /bin/sh
|
+#! /bin/sh
|
||||||
+
|
+
|
||||||
@ -117,6 +116,3 @@ index 0000000..c9a03b0
|
|||||||
+fi
|
+fi
|
||||||
+
|
+
|
||||||
+exit 0
|
+exit 0
|
||||||
--
|
|
||||||
1.6.2.5
|
|
||||||
|
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00273.html
|
|
||||||
Subject: [patch] .gdb_index: Fix Ada regression
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
on a system with libraries using .gdb_index all the Ada testcases FAIL:
|
|
||||||
|
|
||||||
Running ./gdb.ada/print_pc.exp ...
|
|
||||||
FAIL: gdb.ada/print_pc.exp: start inferior (GDB internal error)
|
|
||||||
FAIL: gdb.ada/print_pc.exp: p /x $pc
|
|
||||||
|
|
||||||
dwarf2read.c:2374: internal-error: map_ada_symtabs called via index method
|
|
||||||
|
|
||||||
FAIl is on Fedora 14 snapshot using gcc-debuginfo-4.5.1-3.fc14.x86_64 file:
|
|
||||||
/usr/lib/debug/lib64/libgcc_s-4.5.1-20100907.so.1.debug
|
|
||||||
|
|
||||||
The regressions get fixed on x86_64-fedora14snapshot-linux-gnu by the attached
|
|
||||||
patch. No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu.
|
|
||||||
|
|
||||||
During my tests with `set language ada' I could not lookup non-Ada symbols
|
|
||||||
anyway so I believe the patch is OK but sure it needs an Ada-wise review.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-09-14 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* dwarf2read.c (dw2_map_ada_symtabs): Remove the internal_error.
|
|
||||||
Update the comment.
|
|
||||||
|
|
||||||
--- a/gdb/dwarf2read.c
|
|
||||||
+++ b/gdb/dwarf2read.c
|
|
||||||
@@ -2369,10 +2369,9 @@ dw2_map_ada_symtabs (struct objfile *objfile,
|
|
||||||
domain_enum namespace, int wild,
|
|
||||||
void *data)
|
|
||||||
{
|
|
||||||
- /* For now, we don't support Ada, so this function can't be
|
|
||||||
- reached. */
|
|
||||||
- internal_error (__FILE__, __LINE__,
|
|
||||||
- _("map_ada_symtabs called via index method"));
|
|
||||||
+ /* For now, we don't support Ada. Still the function can be called if the
|
|
||||||
+ current language is Ada for a non-Ada objfile using GNU index. As Ada
|
|
||||||
+ does not look for non-Ada symbols this function should just return. */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
|
|
@ -1,96 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00434.html
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-09/msg00155.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/09/24 14:47:52 1.12202
|
|
||||||
### src/gdb/ChangeLog 2010/09/24 16:11:44 1.12203
|
|
||||||
## -1,3 +1,9 @@
|
|
||||||
+2010-09-24 Tom Tromey <tromey@redhat.com>
|
|
||||||
+
|
|
||||||
+ * dwarf2read.c (dw2_expand_symtabs_matching): Add missing
|
|
||||||
+ MAYBE_SWAPs.
|
|
||||||
+ (dw2_map_symbol_names): Likewise.
|
|
||||||
+
|
|
||||||
2010-09-24 Sami Wagiaalla <swagiaal@redhat.com>
|
|
||||||
|
|
||||||
* valops.c (find_oload_champ_namespace_loop): replace incorrect
|
|
||||||
--- src/gdb/dwarf2read.c 2010/09/22 19:22:44 1.460
|
|
||||||
+++ src/gdb/dwarf2read.c 2010/09/24 16:11:46 1.461
|
|
||||||
@@ -2382,10 +2382,12 @@
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
offset_type iter;
|
|
||||||
+ struct mapped_index *index;
|
|
||||||
|
|
||||||
dw2_setup (objfile);
|
|
||||||
if (!dwarf2_per_objfile->index_table)
|
|
||||||
return;
|
|
||||||
+ index = dwarf2_per_objfile->index_table;
|
|
||||||
|
|
||||||
for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
@@ -2411,28 +2413,24 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- for (iter = 0;
|
|
||||||
- iter < dwarf2_per_objfile->index_table->index_table_slots;
|
|
||||||
- ++iter)
|
|
||||||
+ for (iter = 0; iter < index->index_table_slots; ++iter)
|
|
||||||
{
|
|
||||||
offset_type idx = 2 * iter;
|
|
||||||
const char *name;
|
|
||||||
offset_type *vec, vec_len, vec_idx;
|
|
||||||
|
|
||||||
- if (dwarf2_per_objfile->index_table->index_table[idx] == 0
|
|
||||||
- && dwarf2_per_objfile->index_table->index_table[idx + 1] == 0)
|
|
||||||
+ if (index->index_table[idx] == 0 && index->index_table[idx + 1] == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
- name = (dwarf2_per_objfile->index_table->constant_pool
|
|
||||||
- + dwarf2_per_objfile->index_table->index_table[idx]);
|
|
||||||
+ name = index->constant_pool + MAYBE_SWAP (index->index_table[idx]);
|
|
||||||
|
|
||||||
if (! (*name_matcher) (name, data))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* The name was matched, now expand corresponding CUs that were
|
|
||||||
marked. */
|
|
||||||
- vec = (offset_type *) (dwarf2_per_objfile->index_table->constant_pool
|
|
||||||
- + dwarf2_per_objfile->index_table->index_table[idx + 1]);
|
|
||||||
+ vec = (offset_type *) (index->constant_pool
|
|
||||||
+ + MAYBE_SWAP (index->index_table[idx + 1]));
|
|
||||||
vec_len = MAYBE_SWAP (vec[0]);
|
|
||||||
for (vec_idx = 0; vec_idx < vec_len; ++vec_idx)
|
|
||||||
{
|
|
||||||
@@ -2476,25 +2474,24 @@
|
|
||||||
void *data)
|
|
||||||
{
|
|
||||||
offset_type iter;
|
|
||||||
+ struct mapped_index *index;
|
|
||||||
+
|
|
||||||
dw2_setup (objfile);
|
|
||||||
|
|
||||||
if (!dwarf2_per_objfile->index_table)
|
|
||||||
return;
|
|
||||||
+ index = dwarf2_per_objfile->index_table;
|
|
||||||
|
|
||||||
- for (iter = 0;
|
|
||||||
- iter < dwarf2_per_objfile->index_table->index_table_slots;
|
|
||||||
- ++iter)
|
|
||||||
+ for (iter = 0; iter < index->index_table_slots; ++iter)
|
|
||||||
{
|
|
||||||
offset_type idx = 2 * iter;
|
|
||||||
const char *name;
|
|
||||||
offset_type *vec, vec_len, vec_idx;
|
|
||||||
|
|
||||||
- if (dwarf2_per_objfile->index_table->index_table[idx] == 0
|
|
||||||
- && dwarf2_per_objfile->index_table->index_table[idx + 1] == 0)
|
|
||||||
+ if (index->index_table[idx] == 0 && index->index_table[idx + 1] == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
- name = (dwarf2_per_objfile->index_table->constant_pool
|
|
||||||
- + dwarf2_per_objfile->index_table->index_table[idx]);
|
|
||||||
+ name = (index->constant_pool + MAYBE_SWAP (index->index_table[idx]));
|
|
||||||
|
|
||||||
(*fun) (name, data);
|
|
||||||
}
|
|
@ -1,689 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-cvs/2010-07/msg00139.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/07/23 21:10:54 1.12013
|
|
||||||
### src/gdb/ChangeLog 2010/07/23 22:15:13 1.12014
|
|
||||||
## -1,3 +1,31 @@
|
|
||||||
+2010-07-23 Tom Tromey <tromey@redhat.com>
|
|
||||||
+
|
|
||||||
+ * dwarf2read.c (struct dwarf2_per_objfile) <n_type_comp_units,
|
|
||||||
+ type_comp_units>: New fields.
|
|
||||||
+ (dw2_get_cu): New function.
|
|
||||||
+ (create_cus_from_index): Remove unused argument.
|
|
||||||
+ (create_signatured_type_hash_from_index): New function.
|
|
||||||
+ (create_addrmap_from_index): Update.
|
|
||||||
+ (dwarf2_read_index): Handle version 2.
|
|
||||||
+ (dw2_find_last_source_symtab, dw2_forget_cached_source_info)
|
|
||||||
+ (dw2_lookup_symtab, dw2_do_expand_symtabs_matching)
|
|
||||||
+ (dw2_print_stats, dw2_expand_all_symtabs)
|
|
||||||
+ (dw2_expand_symtabs_with_filename, dw2_find_symbol_file)
|
|
||||||
+ (dw2_expand_symtabs_matching, dw2_map_symbol_filenames): Update.
|
|
||||||
+ (dwarf2_initialize_objfile): Call create_debug_types_hash_table.
|
|
||||||
+ (allocate_signatured_type_hash_table): New function.
|
|
||||||
+ (add_signatured_type_cu_to_list): Likewise.
|
|
||||||
+ (create_debug_types_hash_table): Use them. Set type_comp_units.
|
|
||||||
+ (read_signatured_type): Ensure section data is available.
|
|
||||||
+ (add_address_entry): Don't record empty ranges.
|
|
||||||
+ (struct signatured_type_index_data): New.
|
|
||||||
+ (write_one_signatured_type): New function.
|
|
||||||
+ (write_psymtabs_to_index): Write type CUs.
|
|
||||||
+ (save_gdb_index_command): Update comment.
|
|
||||||
+ (process_type_comp_unit): Move inititalization of
|
|
||||||
+ from_debug_types...
|
|
||||||
+ (create_debug_types_hash_table): ... here.
|
|
||||||
+
|
|
||||||
2010-07-23 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb_gcore.sh (tmpfile): Remove the variable, its initialization,
|
|
||||||
Index: gdb-7.2/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/dwarf2read.c 2010-10-12 18:10:47.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/dwarf2read.c 2010-10-12 18:11:16.000000000 +0200
|
|
||||||
@@ -184,6 +184,12 @@ struct dwarf2_per_objfile
|
|
||||||
/* The number of compilation units in ALL_COMP_UNITS. */
|
|
||||||
int n_comp_units;
|
|
||||||
|
|
||||||
+ /* The number of .debug_types-related CUs. */
|
|
||||||
+ int n_type_comp_units;
|
|
||||||
+
|
|
||||||
+ /* The .debug_types-related CUs. */
|
|
||||||
+ struct dwarf2_per_cu_data **type_comp_units;
|
|
||||||
+
|
|
||||||
/* A chain of compilation units that are currently read in, so that
|
|
||||||
they can be freed later. */
|
|
||||||
struct dwarf2_per_cu_data *read_in_chain;
|
|
||||||
@@ -1226,6 +1232,8 @@ static struct type *set_die_type (struct
|
|
||||||
|
|
||||||
static void create_all_comp_units (struct objfile *);
|
|
||||||
|
|
||||||
+static int create_debug_types_hash_table (struct objfile *objfile);
|
|
||||||
+
|
|
||||||
static void load_full_comp_unit (struct dwarf2_per_cu_data *,
|
|
||||||
struct objfile *);
|
|
||||||
|
|
||||||
@@ -1269,6 +1277,8 @@ static void init_cu_die_reader (struct d
|
|
||||||
static const char *dwarf2_physname (char *name, struct die_info *die,
|
|
||||||
struct dwarf2_cu *cu);
|
|
||||||
|
|
||||||
+static htab_t allocate_signatured_type_hash_table (struct objfile *objfile);
|
|
||||||
+
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
|
|
||||||
/* Convert VALUE between big- and little-endian. */
|
|
||||||
@@ -1646,6 +1656,18 @@ dw2_instantiate_symtab (struct objfile *
|
|
||||||
return per_cu->v.quick->symtab;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Return the CU given its index. */
|
|
||||||
+static struct dwarf2_per_cu_data *
|
|
||||||
+dw2_get_cu (int index)
|
|
||||||
+{
|
|
||||||
+ if (index >= dwarf2_per_objfile->n_comp_units)
|
|
||||||
+ {
|
|
||||||
+ index -= dwarf2_per_objfile->n_comp_units;
|
|
||||||
+ return dwarf2_per_objfile->type_comp_units[index];
|
|
||||||
+ }
|
|
||||||
+ return dwarf2_per_objfile->all_comp_units[index];
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* A helper function that knows how to read a 64-bit value in a way
|
|
||||||
that doesn't make gdb die. Returns 1 if the conversion went ok, 0
|
|
||||||
otherwise. */
|
|
||||||
@@ -1672,11 +1694,10 @@ extract_cu_value (const char *bytes, ULO
|
|
||||||
the CU objects for this objfile. Return 0 if something went wrong,
|
|
||||||
1 if everything went ok. */
|
|
||||||
static int
|
|
||||||
-create_cus_from_index (struct objfile *objfile, struct mapped_index *index,
|
|
||||||
- const gdb_byte *cu_list, offset_type cu_list_elements)
|
|
||||||
+create_cus_from_index (struct objfile *objfile, const gdb_byte *cu_list,
|
|
||||||
+ offset_type cu_list_elements)
|
|
||||||
{
|
|
||||||
offset_type i;
|
|
||||||
- const char *entry;
|
|
||||||
|
|
||||||
dwarf2_per_objfile->n_comp_units = cu_list_elements / 2;
|
|
||||||
dwarf2_per_objfile->all_comp_units
|
|
||||||
@@ -1707,6 +1728,58 @@ create_cus_from_index (struct objfile *o
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Create the signatured type hash table from the index. */
|
|
||||||
+static int
|
|
||||||
+create_signatured_type_hash_from_index (struct objfile *objfile,
|
|
||||||
+ const gdb_byte *bytes,
|
|
||||||
+ offset_type elements)
|
|
||||||
+{
|
|
||||||
+ offset_type i;
|
|
||||||
+ htab_t type_hash;
|
|
||||||
+
|
|
||||||
+ dwarf2_per_objfile->n_type_comp_units = elements / 3;
|
|
||||||
+ dwarf2_per_objfile->type_comp_units
|
|
||||||
+ = obstack_alloc (&objfile->objfile_obstack,
|
|
||||||
+ dwarf2_per_objfile->n_type_comp_units
|
|
||||||
+ * sizeof (struct dwarf2_per_cu_data *));
|
|
||||||
+
|
|
||||||
+ type_hash = allocate_signatured_type_hash_table (objfile);
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < elements; i += 3)
|
|
||||||
+ {
|
|
||||||
+ struct signatured_type *type_sig;
|
|
||||||
+ ULONGEST offset, type_offset, signature;
|
|
||||||
+ void **slot;
|
|
||||||
+
|
|
||||||
+ if (!extract_cu_value (bytes, &offset)
|
|
||||||
+ || !extract_cu_value (bytes + 8, &type_offset))
|
|
||||||
+ return 0;
|
|
||||||
+ signature = extract_unsigned_integer (bytes + 16, 8, BFD_ENDIAN_LITTLE);
|
|
||||||
+ bytes += 3 * 8;
|
|
||||||
+
|
|
||||||
+ type_sig = OBSTACK_ZALLOC (&objfile->objfile_obstack,
|
|
||||||
+ struct signatured_type);
|
|
||||||
+ type_sig->signature = signature;
|
|
||||||
+ type_sig->offset = offset;
|
|
||||||
+ type_sig->type_offset = type_offset;
|
|
||||||
+ type_sig->per_cu.from_debug_types = 1;
|
|
||||||
+ type_sig->per_cu.offset = offset;
|
|
||||||
+ type_sig->per_cu.objfile = objfile;
|
|
||||||
+ type_sig->per_cu.v.quick
|
|
||||||
+ = OBSTACK_ZALLOC (&objfile->objfile_obstack,
|
|
||||||
+ struct dwarf2_per_cu_quick_data);
|
|
||||||
+
|
|
||||||
+ slot = htab_find_slot (type_hash, type_sig, INSERT);
|
|
||||||
+ *slot = type_sig;
|
|
||||||
+
|
|
||||||
+ dwarf2_per_objfile->type_comp_units[i / 3] = &type_sig->per_cu;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ dwarf2_per_objfile->signatured_types = type_hash;
|
|
||||||
+
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Read the address map data from the mapped index, and use it to
|
|
||||||
populate the objfile's psymtabs_addrmap. */
|
|
||||||
static void
|
|
||||||
@@ -1738,7 +1811,7 @@ create_addrmap_from_index (struct objfil
|
|
||||||
iter += 4;
|
|
||||||
|
|
||||||
addrmap_set_empty (mutable_map, lo + baseaddr, hi + baseaddr - 1,
|
|
||||||
- dwarf2_per_objfile->all_comp_units[cu_index]);
|
|
||||||
+ dw2_get_cu (cu_index));
|
|
||||||
}
|
|
||||||
|
|
||||||
objfile->psymtabs_addrmap = addrmap_create_fixed (mutable_map,
|
|
||||||
@@ -1805,8 +1878,9 @@ dwarf2_read_index (struct objfile *objfi
|
|
||||||
char *addr;
|
|
||||||
struct mapped_index *map;
|
|
||||||
offset_type *metadata;
|
|
||||||
- const gdb_byte *cu_list;
|
|
||||||
- offset_type cu_list_elements;
|
|
||||||
+ const gdb_byte *cu_list, *types_list;
|
|
||||||
+ offset_type version, cu_list_elements, types_list_elements;
|
|
||||||
+ int i;
|
|
||||||
|
|
||||||
if (dwarf2_per_objfile->gdb_index.asection == NULL
|
|
||||||
|| dwarf2_per_objfile->gdb_index.size == 0)
|
|
||||||
@@ -1822,26 +1896,58 @@ dwarf2_read_index (struct objfile *objfi
|
|
||||||
|
|
||||||
addr = dwarf2_per_objfile->gdb_index.buffer;
|
|
||||||
/* Version check. */
|
|
||||||
- if (MAYBE_SWAP (*(offset_type *) addr) != 1)
|
|
||||||
+ version = MAYBE_SWAP (*(offset_type *) addr);
|
|
||||||
+ if (version == 1)
|
|
||||||
+ {
|
|
||||||
+ /* Index version 1 neglected to account for .debug_types. So,
|
|
||||||
+ if we see .debug_types, we cannot use this index. */
|
|
||||||
+ if (dwarf2_per_objfile->types.asection != NULL
|
|
||||||
+ && dwarf2_per_objfile->types.size != 0)
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+ else if (version != 2)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index);
|
|
||||||
map->total_size = dwarf2_per_objfile->gdb_index.size;
|
|
||||||
|
|
||||||
metadata = (offset_type *) (addr + sizeof (offset_type));
|
|
||||||
- cu_list = addr + MAYBE_SWAP (metadata[0]);
|
|
||||||
- cu_list_elements = ((MAYBE_SWAP (metadata[1]) - MAYBE_SWAP (metadata[0]))
|
|
||||||
+
|
|
||||||
+ i = 0;
|
|
||||||
+ cu_list = addr + MAYBE_SWAP (metadata[i]);
|
|
||||||
+ cu_list_elements = ((MAYBE_SWAP (metadata[i + 1]) - MAYBE_SWAP (metadata[i]))
|
|
||||||
/ 8);
|
|
||||||
- map->address_table = addr + MAYBE_SWAP (metadata[1]);
|
|
||||||
- map->address_table_size = (MAYBE_SWAP (metadata[2])
|
|
||||||
- - MAYBE_SWAP (metadata[1]));
|
|
||||||
- map->index_table = (offset_type *) (addr + MAYBE_SWAP (metadata[2]));
|
|
||||||
- map->index_table_slots = ((MAYBE_SWAP (metadata[3])
|
|
||||||
- - MAYBE_SWAP (metadata[2]))
|
|
||||||
+ ++i;
|
|
||||||
+
|
|
||||||
+ if (version == 2)
|
|
||||||
+ {
|
|
||||||
+ types_list = addr + MAYBE_SWAP (metadata[i]);
|
|
||||||
+ types_list_elements = ((MAYBE_SWAP (metadata[i + 1])
|
|
||||||
+ - MAYBE_SWAP (metadata[i]))
|
|
||||||
+ / 8);
|
|
||||||
+ ++i;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ map->address_table = addr + MAYBE_SWAP (metadata[i]);
|
|
||||||
+ map->address_table_size = (MAYBE_SWAP (metadata[i + 1])
|
|
||||||
+ - MAYBE_SWAP (metadata[i]));
|
|
||||||
+ ++i;
|
|
||||||
+
|
|
||||||
+ map->index_table = (offset_type *) (addr + MAYBE_SWAP (metadata[i]));
|
|
||||||
+ map->index_table_slots = ((MAYBE_SWAP (metadata[i + 1])
|
|
||||||
+ - MAYBE_SWAP (metadata[i]))
|
|
||||||
/ (2 * sizeof (offset_type)));
|
|
||||||
- map->constant_pool = addr + MAYBE_SWAP (metadata[3]);
|
|
||||||
+ ++i;
|
|
||||||
|
|
||||||
- if (!create_cus_from_index (objfile, map, cu_list, cu_list_elements))
|
|
||||||
+ map->constant_pool = addr + MAYBE_SWAP (metadata[i]);
|
|
||||||
+
|
|
||||||
+ if (!create_cus_from_index (objfile, cu_list, cu_list_elements))
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+ if (version == 2
|
|
||||||
+ && types_list_elements
|
|
||||||
+ && !create_signatured_type_hash_from_index (objfile, types_list,
|
|
||||||
+ types_list_elements))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
create_addrmap_from_index (objfile, map);
|
|
||||||
@@ -1968,8 +2074,7 @@ dw2_find_last_source_symtab (struct objf
|
|
||||||
int index;
|
|
||||||
dw2_setup (objfile);
|
|
||||||
index = dwarf2_per_objfile->n_comp_units - 1;
|
|
||||||
- return dw2_instantiate_symtab (objfile,
|
|
||||||
- dwarf2_per_objfile->all_comp_units[index]);
|
|
||||||
+ return dw2_instantiate_symtab (objfile, dw2_get_cu (index));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -1978,9 +2083,10 @@ dw2_forget_cached_source_info (struct ob
|
|
||||||
int i;
|
|
||||||
|
|
||||||
dw2_setup (objfile);
|
|
||||||
- for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
+ for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ + dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
{
|
|
||||||
- struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (i);
|
|
||||||
|
|
||||||
if (cu->v.quick->full_names)
|
|
||||||
{
|
|
||||||
@@ -2002,10 +2108,11 @@ dw2_lookup_symtab (struct objfile *objfi
|
|
||||||
struct dwarf2_per_cu_data *base_cu = NULL;
|
|
||||||
|
|
||||||
dw2_setup (objfile);
|
|
||||||
- for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
+ for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ + dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
- struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (i);
|
|
||||||
|
|
||||||
if (cu->v.quick->symtab)
|
|
||||||
continue;
|
|
||||||
@@ -2097,8 +2204,8 @@ dw2_do_expand_symtabs_matching (struct o
|
|
||||||
for (i = 0; i < len; ++i)
|
|
||||||
{
|
|
||||||
offset_type cu_index = MAYBE_SWAP (vec[i + 1]);
|
|
||||||
- struct dwarf2_per_cu_data *cu;
|
|
||||||
- cu = dwarf2_per_objfile->all_comp_units[cu_index];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (cu_index);
|
|
||||||
+
|
|
||||||
dw2_instantiate_symtab (objfile, cu);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2120,9 +2227,10 @@ dw2_print_stats (struct objfile *objfile
|
|
||||||
|
|
||||||
dw2_setup (objfile);
|
|
||||||
count = 0;
|
|
||||||
- for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
+ for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ + dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
{
|
|
||||||
- struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (i);
|
|
||||||
|
|
||||||
if (!cu->v.quick->symtab)
|
|
||||||
++count;
|
|
||||||
@@ -2156,9 +2264,11 @@ dw2_expand_all_symtabs (struct objfile *
|
|
||||||
int i;
|
|
||||||
|
|
||||||
dw2_setup (objfile);
|
|
||||||
- for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ + dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
{
|
|
||||||
- struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (i);
|
|
||||||
|
|
||||||
dw2_instantiate_symtab (objfile, cu);
|
|
||||||
}
|
|
||||||
@@ -2171,10 +2281,11 @@ dw2_expand_symtabs_with_filename (struct
|
|
||||||
int i;
|
|
||||||
|
|
||||||
dw2_setup (objfile);
|
|
||||||
- for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
+ for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ + dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
- struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (i);
|
|
||||||
|
|
||||||
if (cu->v.quick->symtab)
|
|
||||||
continue;
|
|
||||||
@@ -2215,7 +2326,7 @@ dw2_find_symbol_file (struct objfile *ob
|
|
||||||
should be rewritten so that it doesn't require a custom hook. It
|
|
||||||
could just use the ordinary symbol tables. */
|
|
||||||
/* vec[0] is the length, which must always be >0. */
|
|
||||||
- cu = dwarf2_per_objfile->all_comp_units[MAYBE_SWAP (vec[1])];
|
|
||||||
+ cu = dw2_get_cu (MAYBE_SWAP (vec[1]));
|
|
||||||
|
|
||||||
dw2_require_line_header (objfile, cu);
|
|
||||||
if (!cu->v.quick->lines)
|
|
||||||
@@ -2253,10 +2364,11 @@ dw2_expand_symtabs_matching (struct objf
|
|
||||||
if (!dwarf2_per_objfile->index_table)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
+ for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ + dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
- struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (i);
|
|
||||||
|
|
||||||
cu->v.quick->mark = 0;
|
|
||||||
if (cu->v.quick->symtab)
|
|
||||||
@@ -2301,8 +2413,9 @@ dw2_expand_symtabs_matching (struct objf
|
|
||||||
vec_len = MAYBE_SWAP (vec[0]);
|
|
||||||
for (vec_idx = 0; vec_idx < vec_len; ++vec_idx)
|
|
||||||
{
|
|
||||||
- struct dwarf2_per_cu_data *cu
|
|
||||||
- = dwarf2_per_objfile->all_comp_units[MAYBE_SWAP (vec[vec_idx + 1])];
|
|
||||||
+ struct dwarf2_per_cu_data *cu;
|
|
||||||
+
|
|
||||||
+ cu = dw2_get_cu (MAYBE_SWAP (vec[vec_idx + 1]));
|
|
||||||
if (cu->v.quick->mark)
|
|
||||||
dw2_instantiate_symtab (objfile, cu);
|
|
||||||
}
|
|
||||||
@@ -2372,10 +2485,11 @@ dw2_map_symbol_filenames (struct objfile
|
|
||||||
int i;
|
|
||||||
|
|
||||||
dw2_setup (objfile);
|
|
||||||
- for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
+ for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ + dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
- struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (i);
|
|
||||||
|
|
||||||
if (cu->v.quick->symtab)
|
|
||||||
continue;
|
|
||||||
@@ -2436,10 +2550,12 @@ dwarf2_initialize_objfile (struct objfil
|
|
||||||
|
|
||||||
dwarf2_per_objfile->using_index = 1;
|
|
||||||
create_all_comp_units (objfile);
|
|
||||||
+ create_debug_types_hash_table (objfile);
|
|
||||||
|
|
||||||
- for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
+ for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ + dwarf2_per_objfile->n_type_comp_units); ++i)
|
|
||||||
{
|
|
||||||
- struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
+ struct dwarf2_per_cu_data *cu = dw2_get_cu (i);
|
|
||||||
|
|
||||||
cu->v.quick = OBSTACK_ZALLOC (&objfile->objfile_obstack,
|
|
||||||
struct dwarf2_per_cu_quick_data);
|
|
||||||
@@ -2653,6 +2769,34 @@ eq_type_signature (const void *item_lhs,
|
|
||||||
return lhs->signature == rhs->signature;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Allocate a hash table for signatured types. */
|
|
||||||
+
|
|
||||||
+static htab_t
|
|
||||||
+allocate_signatured_type_hash_table (struct objfile *objfile)
|
|
||||||
+{
|
|
||||||
+ return htab_create_alloc_ex (41,
|
|
||||||
+ hash_type_signature,
|
|
||||||
+ eq_type_signature,
|
|
||||||
+ NULL,
|
|
||||||
+ &objfile->objfile_obstack,
|
|
||||||
+ hashtab_obstack_allocate,
|
|
||||||
+ dummy_obstack_deallocate);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* A helper function to add a signatured type CU to a list. */
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+add_signatured_type_cu_to_list (void **slot, void *datum)
|
|
||||||
+{
|
|
||||||
+ struct signatured_type *sigt = *slot;
|
|
||||||
+ struct dwarf2_per_cu_data ***datap = datum;
|
|
||||||
+
|
|
||||||
+ **datap = &sigt->per_cu;
|
|
||||||
+ ++*datap;
|
|
||||||
+
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Create the hash table of all entries in the .debug_types section.
|
|
||||||
The result is zero if there is an error (e.g. missing .debug_types section),
|
|
||||||
otherwise non-zero. */
|
|
||||||
@@ -2662,6 +2806,7 @@ create_debug_types_hash_table (struct ob
|
|
||||||
{
|
|
||||||
gdb_byte *info_ptr;
|
|
||||||
htab_t types_htab;
|
|
||||||
+ struct dwarf2_per_cu_data **iter;
|
|
||||||
|
|
||||||
dwarf2_read_section (objfile, &dwarf2_per_objfile->types);
|
|
||||||
info_ptr = dwarf2_per_objfile->types.buffer;
|
|
||||||
@@ -2672,13 +2817,7 @@ create_debug_types_hash_table (struct ob
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- types_htab = htab_create_alloc_ex (41,
|
|
||||||
- hash_type_signature,
|
|
||||||
- eq_type_signature,
|
|
||||||
- NULL,
|
|
||||||
- &objfile->objfile_obstack,
|
|
||||||
- hashtab_obstack_allocate,
|
|
||||||
- dummy_obstack_deallocate);
|
|
||||||
+ types_htab = allocate_signatured_type_hash_table (objfile);
|
|
||||||
|
|
||||||
if (dwarf2_die_debug)
|
|
||||||
fprintf_unfiltered (gdb_stdlog, "Signatured types:\n");
|
|
||||||
@@ -2726,6 +2865,7 @@ create_debug_types_hash_table (struct ob
|
|
||||||
type_sig->offset = offset;
|
|
||||||
type_sig->type_offset = type_offset;
|
|
||||||
type_sig->per_cu.objfile = objfile;
|
|
||||||
+ type_sig->per_cu.from_debug_types = 1;
|
|
||||||
|
|
||||||
slot = htab_find_slot (types_htab, type_sig, INSERT);
|
|
||||||
gdb_assert (slot != NULL);
|
|
||||||
@@ -2740,6 +2880,16 @@ create_debug_types_hash_table (struct ob
|
|
||||||
|
|
||||||
dwarf2_per_objfile->signatured_types = types_htab;
|
|
||||||
|
|
||||||
+ dwarf2_per_objfile->n_type_comp_units = htab_elements (types_htab);
|
|
||||||
+ dwarf2_per_objfile->type_comp_units
|
|
||||||
+ = obstack_alloc (&objfile->objfile_obstack,
|
|
||||||
+ dwarf2_per_objfile->n_type_comp_units
|
|
||||||
+ * sizeof (struct dwarf2_per_cu_data *));
|
|
||||||
+ iter = &dwarf2_per_objfile->type_comp_units[0];
|
|
||||||
+ htab_traverse_noresize (types_htab, add_signatured_type_cu_to_list, &iter);
|
|
||||||
+ gdb_assert (iter - &dwarf2_per_objfile->type_comp_units[0]
|
|
||||||
+ == dwarf2_per_objfile->n_type_comp_units);
|
|
||||||
+
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -3008,7 +3158,6 @@ process_type_comp_unit (void **slot, voi
|
|
||||||
struct dwarf2_per_cu_data *this_cu;
|
|
||||||
|
|
||||||
this_cu = &entry->per_cu;
|
|
||||||
- this_cu->from_debug_types = 1;
|
|
||||||
|
|
||||||
gdb_assert (dwarf2_per_objfile->types.readin);
|
|
||||||
process_psymtab_comp_unit (objfile, this_cu,
|
|
||||||
@@ -12483,13 +12632,16 @@ static void
|
|
||||||
read_signatured_type (struct objfile *objfile,
|
|
||||||
struct signatured_type *type_sig)
|
|
||||||
{
|
|
||||||
- gdb_byte *types_ptr = dwarf2_per_objfile->types.buffer + type_sig->offset;
|
|
||||||
+ gdb_byte *types_ptr;
|
|
||||||
struct die_reader_specs reader_specs;
|
|
||||||
struct dwarf2_cu *cu;
|
|
||||||
ULONGEST signature;
|
|
||||||
struct cleanup *back_to, *free_cu_cleanup;
|
|
||||||
struct attribute *attr;
|
|
||||||
|
|
||||||
+ dwarf2_read_section (objfile, &dwarf2_per_objfile->types);
|
|
||||||
+ types_ptr = dwarf2_per_objfile->types.buffer + type_sig->offset;
|
|
||||||
+
|
|
||||||
gdb_assert (type_sig->per_cu.cu == NULL);
|
|
||||||
|
|
||||||
cu = xmalloc (sizeof (struct dwarf2_cu));
|
|
||||||
@@ -14402,6 +14554,10 @@ add_address_entry (struct objfile *objfi
|
|
||||||
char addr[8];
|
|
||||||
CORE_ADDR baseaddr;
|
|
||||||
|
|
||||||
+ /* Don't bother recording empty ranges. */
|
|
||||||
+ if (pst->textlow == pst->texthigh)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
|
||||||
|
|
||||||
store_unsigned_integer (addr, 8, BFD_ENDIAN_LITTLE, pst->textlow - baseaddr);
|
|
||||||
@@ -14447,13 +14603,53 @@ unlink_if_set (void *p)
|
|
||||||
unlink (*filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* A helper struct used when iterating over debug_types. */
|
|
||||||
+struct signatured_type_index_data
|
|
||||||
+{
|
|
||||||
+ struct objfile *objfile;
|
|
||||||
+ struct mapped_symtab *symtab;
|
|
||||||
+ struct obstack *types_list;
|
|
||||||
+ int cu_index;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* A helper function that writes a single signatured_type to an
|
|
||||||
+ obstack. */
|
|
||||||
+static int
|
|
||||||
+write_one_signatured_type (void **slot, void *d)
|
|
||||||
+{
|
|
||||||
+ struct signatured_type_index_data *info = d;
|
|
||||||
+ struct signatured_type *entry = (struct signatured_type *) *slot;
|
|
||||||
+ struct dwarf2_per_cu_data *cu = &entry->per_cu;
|
|
||||||
+ struct partial_symtab *psymtab = cu->v.psymtab;
|
|
||||||
+ gdb_byte val[8];
|
|
||||||
+
|
|
||||||
+ write_psymbols (info->symtab,
|
|
||||||
+ info->objfile->global_psymbols.list + psymtab->globals_offset,
|
|
||||||
+ psymtab->n_global_syms, info->cu_index);
|
|
||||||
+ write_psymbols (info->symtab,
|
|
||||||
+ info->objfile->static_psymbols.list + psymtab->statics_offset,
|
|
||||||
+ psymtab->n_static_syms, info->cu_index);
|
|
||||||
+
|
|
||||||
+ store_unsigned_integer (val, 8, BFD_ENDIAN_LITTLE, entry->offset);
|
|
||||||
+ obstack_grow (info->types_list, val, 8);
|
|
||||||
+ store_unsigned_integer (val, 8, BFD_ENDIAN_LITTLE, entry->type_offset);
|
|
||||||
+ obstack_grow (info->types_list, val, 8);
|
|
||||||
+ store_unsigned_integer (val, 8, BFD_ENDIAN_LITTLE, entry->signature);
|
|
||||||
+ obstack_grow (info->types_list, val, 8);
|
|
||||||
+
|
|
||||||
+ ++info->cu_index;
|
|
||||||
+
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Create an index file for OBJFILE in the directory DIR. */
|
|
||||||
static void
|
|
||||||
write_psymtabs_to_index (struct objfile *objfile, const char *dir)
|
|
||||||
{
|
|
||||||
struct cleanup *cleanup;
|
|
||||||
char *filename, *cleanup_filename;
|
|
||||||
- struct obstack contents, addr_obstack, constant_pool, symtab_obstack, cu_list;
|
|
||||||
+ struct obstack contents, addr_obstack, constant_pool, symtab_obstack;
|
|
||||||
+ struct obstack cu_list, types_cu_list;
|
|
||||||
int i;
|
|
||||||
FILE *out_file;
|
|
||||||
struct mapped_symtab *symtab;
|
|
||||||
@@ -14489,6 +14685,12 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
obstack_init (&cu_list);
|
|
||||||
make_cleanup_obstack_free (&cu_list);
|
|
||||||
|
|
||||||
+ obstack_init (&types_cu_list);
|
|
||||||
+ make_cleanup_obstack_free (&types_cu_list);
|
|
||||||
+
|
|
||||||
+ /* The list is already sorted, so we don't need to do additional
|
|
||||||
+ work here. Also, the debug_types entries do not appear in
|
|
||||||
+ all_comp_units, but only in their own hash table. */
|
|
||||||
for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
|
||||||
{
|
|
||||||
struct dwarf2_per_cu_data *cu = dwarf2_per_objfile->all_comp_units[i];
|
|
||||||
@@ -14510,6 +14712,19 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
obstack_grow (&cu_list, val, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* Write out the .debug_type entries, if any. */
|
|
||||||
+ if (dwarf2_per_objfile->signatured_types)
|
|
||||||
+ {
|
|
||||||
+ struct signatured_type_index_data sig_data;
|
|
||||||
+
|
|
||||||
+ sig_data.objfile = objfile;
|
|
||||||
+ sig_data.symtab = symtab;
|
|
||||||
+ sig_data.types_list = &types_cu_list;
|
|
||||||
+ sig_data.cu_index = dwarf2_per_objfile->n_comp_units;
|
|
||||||
+ htab_traverse_noresize (dwarf2_per_objfile->signatured_types,
|
|
||||||
+ write_one_signatured_type, &sig_data);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
obstack_init (&constant_pool);
|
|
||||||
make_cleanup_obstack_free (&constant_pool);
|
|
||||||
obstack_init (&symtab_obstack);
|
|
||||||
@@ -14518,11 +14733,11 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
|
|
||||||
obstack_init (&contents);
|
|
||||||
make_cleanup_obstack_free (&contents);
|
|
||||||
- size_of_contents = 5 * sizeof (offset_type);
|
|
||||||
+ size_of_contents = 6 * sizeof (offset_type);
|
|
||||||
total_len = size_of_contents;
|
|
||||||
|
|
||||||
/* The version number. */
|
|
||||||
- val = MAYBE_SWAP (1);
|
|
||||||
+ val = MAYBE_SWAP (2);
|
|
||||||
obstack_grow (&contents, &val, sizeof (val));
|
|
||||||
|
|
||||||
/* The offset of the CU list from the start of the file. */
|
|
||||||
@@ -14530,6 +14745,11 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
obstack_grow (&contents, &val, sizeof (val));
|
|
||||||
total_len += obstack_object_size (&cu_list);
|
|
||||||
|
|
||||||
+ /* The offset of the types CU list from the start of the file. */
|
|
||||||
+ val = MAYBE_SWAP (total_len);
|
|
||||||
+ obstack_grow (&contents, &val, sizeof (val));
|
|
||||||
+ total_len += obstack_object_size (&types_cu_list);
|
|
||||||
+
|
|
||||||
/* The offset of the address table from the start of the file. */
|
|
||||||
val = MAYBE_SWAP (total_len);
|
|
||||||
obstack_grow (&contents, &val, sizeof (val));
|
|
||||||
@@ -14549,6 +14769,7 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
|
|
||||||
write_obstack (out_file, &contents);
|
|
||||||
write_obstack (out_file, &cu_list);
|
|
||||||
+ write_obstack (out_file, &types_cu_list);
|
|
||||||
write_obstack (out_file, &addr_obstack);
|
|
||||||
write_obstack (out_file, &symtab_obstack);
|
|
||||||
write_obstack (out_file, &constant_pool);
|
|
||||||
@@ -14573,18 +14794,33 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
|
|
||||||
1. The file header. This is a sequence of values, of offset_type
|
|
||||||
unless otherwise noted:
|
|
||||||
- [0] The version number. Currently 1.
|
|
||||||
+ [0] The version number. Currently 1 or 2. The differences are
|
|
||||||
+ noted below. Version 1 did not account for .debug_types sections;
|
|
||||||
+ the presence of a .debug_types section invalidates any version 1
|
|
||||||
+ index that may exist.
|
|
||||||
[1] The offset, from the start of the file, of the CU list.
|
|
||||||
+ [1.5] In version 2, the offset, from the start of the file, of the
|
|
||||||
+ types CU list. This offset does not appear in version 1. Note
|
|
||||||
+ that this can be empty, in which case this offset will be equal to
|
|
||||||
+ the next offset.
|
|
||||||
[2] The offset, from the start of the file, of the address section.
|
|
||||||
[3] The offset, from the start of the file, of the symbol table.
|
|
||||||
[4] The offset, from the start of the file, of the constant pool.
|
|
||||||
|
|
||||||
2. The CU list. This is a sequence of pairs of 64-bit
|
|
||||||
- little-endian values. The first element in each pair is the offset
|
|
||||||
- of a CU in the .debug_info section. The second element in each
|
|
||||||
- pair is the length of that CU. References to a CU elsewhere in the
|
|
||||||
- map are done using a CU index, which is just the 0-based index into
|
|
||||||
- this table.
|
|
||||||
+ little-endian values, sorted by the CU offset. The first element
|
|
||||||
+ in each pair is the offset of a CU in the .debug_info section. The
|
|
||||||
+ second element in each pair is the length of that CU. References
|
|
||||||
+ to a CU elsewhere in the map are done using a CU index, which is
|
|
||||||
+ just the 0-based index into this table. Note that if there are
|
|
||||||
+ type CUs, then conceptually CUs and type CUs form a single list for
|
|
||||||
+ the purposes of CU indices.
|
|
||||||
+
|
|
||||||
+ 2.5 The types CU list. This does not appear in a version 1 index.
|
|
||||||
+ This is a sequence of triplets of 64-bit little-endian values. In
|
|
||||||
+ a triplet, the first value is the CU offset, the second value is
|
|
||||||
+ the type offset in the CU, and the third value is the type
|
|
||||||
+ signature. The types CU list is not sorted.
|
|
||||||
|
|
||||||
3. The address section. The address section consists of a sequence
|
|
||||||
of address entries. Each address entry has three elements.
|
|
@ -1,278 +0,0 @@
|
|||||||
FYI: index pre-expansion fix
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00452.html
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-09/msg00165.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/09/27 17:41:35 1.12206
|
|
||||||
### src/gdb/ChangeLog 2010/09/27 18:42:35 1.12207
|
|
||||||
## -1,5 +1,17 @@
|
|
||||||
2010-09-27 Tom Tromey <tromey@redhat.com>
|
|
||||||
|
|
||||||
+ * dwarf2read.c (dwarf2_read_index): Only allow version 3.
|
|
||||||
+ (write_psymbols): Add 'psyms_seen' and 'is_static' arguments.
|
|
||||||
+ Only emit a given psymbol once.
|
|
||||||
+ (struct signatured_type_index_data) <psyms_seen>: New field.
|
|
||||||
+ (write_one_signatured_type): Update.
|
|
||||||
+ (cleanup_htab): New function.
|
|
||||||
+ (write_psymtabs_to_index): Update. Create psyms_seen hash. Bump
|
|
||||||
+ version to 3.
|
|
||||||
+ (save_gdb_index_command): Update index documentation.
|
|
||||||
+
|
|
||||||
+2010-09-27 Tom Tromey <tromey@redhat.com>
|
|
||||||
+
|
|
||||||
* bcache.c (expand_hash_table): Use hash_function, not hash.
|
|
||||||
|
|
||||||
2010-09-27 Tom Tromey <tromey@redhat.com>
|
|
||||||
Index: gdb-7.2/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/dwarf2read.c 2010-10-12 18:11:27.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/dwarf2read.c 2010-10-12 18:12:03.000000000 +0200
|
|
||||||
@@ -1897,15 +1897,10 @@ dwarf2_read_index (struct objfile *objfi
|
|
||||||
addr = dwarf2_per_objfile->gdb_index.buffer;
|
|
||||||
/* Version check. */
|
|
||||||
version = MAYBE_SWAP (*(offset_type *) addr);
|
|
||||||
- if (version == 1)
|
|
||||||
- {
|
|
||||||
- /* Index version 1 neglected to account for .debug_types. So,
|
|
||||||
- if we see .debug_types, we cannot use this index. */
|
|
||||||
- if (dwarf2_per_objfile->types.asection != NULL
|
|
||||||
- && dwarf2_per_objfile->types.size != 0)
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
- else if (version != 2)
|
|
||||||
+ /* Versions earlier than 3 emitted every copy of a psymbol. This
|
|
||||||
+ causes the index to behave very poorly for certain requests. So,
|
|
||||||
+ it seems better to just ignore such indices. */
|
|
||||||
+ if (version < 3)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index);
|
|
||||||
@@ -1919,14 +1914,11 @@ dwarf2_read_index (struct objfile *objfi
|
|
||||||
/ 8);
|
|
||||||
++i;
|
|
||||||
|
|
||||||
- if (version == 2)
|
|
||||||
- {
|
|
||||||
- types_list = addr + MAYBE_SWAP (metadata[i]);
|
|
||||||
- types_list_elements = ((MAYBE_SWAP (metadata[i + 1])
|
|
||||||
- - MAYBE_SWAP (metadata[i]))
|
|
||||||
- / 8);
|
|
||||||
- ++i;
|
|
||||||
- }
|
|
||||||
+ types_list = addr + MAYBE_SWAP (metadata[i]);
|
|
||||||
+ types_list_elements = ((MAYBE_SWAP (metadata[i + 1])
|
|
||||||
+ - MAYBE_SWAP (metadata[i]))
|
|
||||||
+ / 8);
|
|
||||||
+ ++i;
|
|
||||||
|
|
||||||
map->address_table = addr + MAYBE_SWAP (metadata[i]);
|
|
||||||
map->address_table_size = (MAYBE_SWAP (metadata[i + 1])
|
|
||||||
@@ -1944,8 +1936,7 @@ dwarf2_read_index (struct objfile *objfi
|
|
||||||
if (!create_cus_from_index (objfile, cu_list, cu_list_elements))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
- if (version == 2
|
|
||||||
- && types_list_elements
|
|
||||||
+ if (types_list_elements
|
|
||||||
&& !create_signatured_type_hash_from_index (objfile, types_list,
|
|
||||||
types_list_elements))
|
|
||||||
return 0;
|
|
||||||
@@ -14568,15 +14559,38 @@ add_address_entry (struct objfile *objfi
|
|
||||||
/* Add a list of partial symbols to SYMTAB. */
|
|
||||||
static void
|
|
||||||
write_psymbols (struct mapped_symtab *symtab,
|
|
||||||
+ htab_t psyms_seen,
|
|
||||||
struct partial_symbol **psymp,
|
|
||||||
int count,
|
|
||||||
- offset_type cu_index)
|
|
||||||
+ offset_type cu_index,
|
|
||||||
+ int is_static)
|
|
||||||
{
|
|
||||||
for (; count-- > 0; ++psymp)
|
|
||||||
{
|
|
||||||
+ void **slot, *lookup;
|
|
||||||
+
|
|
||||||
if (SYMBOL_LANGUAGE (*psymp) == language_ada)
|
|
||||||
error (_("Ada is not currently supported by the index"));
|
|
||||||
- add_index_entry (symtab, SYMBOL_NATURAL_NAME (*psymp), cu_index);
|
|
||||||
+
|
|
||||||
+ /* We only want to add a given psymbol once. However, we also
|
|
||||||
+ want to account for whether it is global or static. So, we
|
|
||||||
+ may add it twice, using slightly different values. */
|
|
||||||
+ if (is_static)
|
|
||||||
+ {
|
|
||||||
+ uintptr_t val = 1 | (uintptr_t) *psymp;
|
|
||||||
+
|
|
||||||
+ lookup = (void *) val;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ lookup = *psymp;
|
|
||||||
+
|
|
||||||
+ /* Only add a given psymbol once. */
|
|
||||||
+ slot = htab_find_slot (psyms_seen, lookup, INSERT);
|
|
||||||
+ if (!*slot)
|
|
||||||
+ {
|
|
||||||
+ *slot = lookup;
|
|
||||||
+ add_index_entry (symtab, SYMBOL_NATURAL_NAME (*psymp), cu_index);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -14606,6 +14620,7 @@ struct signatured_type_index_data
|
|
||||||
struct objfile *objfile;
|
|
||||||
struct mapped_symtab *symtab;
|
|
||||||
struct obstack *types_list;
|
|
||||||
+ htab_t psyms_seen;
|
|
||||||
int cu_index;
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -14621,11 +14636,15 @@ write_one_signatured_type (void **slot,
|
|
||||||
gdb_byte val[8];
|
|
||||||
|
|
||||||
write_psymbols (info->symtab,
|
|
||||||
+ info->psyms_seen,
|
|
||||||
info->objfile->global_psymbols.list + psymtab->globals_offset,
|
|
||||||
- psymtab->n_global_syms, info->cu_index);
|
|
||||||
+ psymtab->n_global_syms, info->cu_index,
|
|
||||||
+ 0);
|
|
||||||
write_psymbols (info->symtab,
|
|
||||||
+ info->psyms_seen,
|
|
||||||
info->objfile->static_psymbols.list + psymtab->statics_offset,
|
|
||||||
- psymtab->n_static_syms, info->cu_index);
|
|
||||||
+ psymtab->n_static_syms, info->cu_index,
|
|
||||||
+ 1);
|
|
||||||
|
|
||||||
store_unsigned_integer (val, 8, BFD_ENDIAN_LITTLE, entry->offset);
|
|
||||||
obstack_grow (info->types_list, val, 8);
|
|
||||||
@@ -14639,6 +14658,14 @@ write_one_signatured_type (void **slot,
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* A cleanup function for an htab_t. */
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+cleanup_htab (void *arg)
|
|
||||||
+{
|
|
||||||
+ htab_delete (arg);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Create an index file for OBJFILE in the directory DIR. */
|
|
||||||
static void
|
|
||||||
write_psymtabs_to_index (struct objfile *objfile, const char *dir)
|
|
||||||
@@ -14653,6 +14680,7 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
offset_type val, size_of_contents, total_len;
|
|
||||||
struct stat st;
|
|
||||||
char buf[8];
|
|
||||||
+ htab_t psyms_seen;
|
|
||||||
|
|
||||||
if (!objfile->psymtabs)
|
|
||||||
return;
|
|
||||||
@@ -14685,6 +14713,10 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
obstack_init (&types_cu_list);
|
|
||||||
make_cleanup_obstack_free (&types_cu_list);
|
|
||||||
|
|
||||||
+ psyms_seen = htab_create_alloc (100, htab_hash_pointer, htab_eq_pointer,
|
|
||||||
+ NULL, xcalloc, xfree);
|
|
||||||
+ make_cleanup (cleanup_htab, psyms_seen);
|
|
||||||
+
|
|
||||||
/* The list is already sorted, so we don't need to do additional
|
|
||||||
work here. Also, the debug_types entries do not appear in
|
|
||||||
all_comp_units, but only in their own hash table. */
|
|
||||||
@@ -14695,11 +14727,15 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
gdb_byte val[8];
|
|
||||||
|
|
||||||
write_psymbols (symtab,
|
|
||||||
+ psyms_seen,
|
|
||||||
objfile->global_psymbols.list + psymtab->globals_offset,
|
|
||||||
- psymtab->n_global_syms, i);
|
|
||||||
+ psymtab->n_global_syms, i,
|
|
||||||
+ 0);
|
|
||||||
write_psymbols (symtab,
|
|
||||||
+ psyms_seen,
|
|
||||||
objfile->static_psymbols.list + psymtab->statics_offset,
|
|
||||||
- psymtab->n_static_syms, i);
|
|
||||||
+ psymtab->n_static_syms, i,
|
|
||||||
+ 1);
|
|
||||||
|
|
||||||
add_address_entry (objfile, &addr_obstack, psymtab, i);
|
|
||||||
|
|
||||||
@@ -14717,6 +14753,7 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
sig_data.objfile = objfile;
|
|
||||||
sig_data.symtab = symtab;
|
|
||||||
sig_data.types_list = &types_cu_list;
|
|
||||||
+ sig_data.psyms_seen = psyms_seen;
|
|
||||||
sig_data.cu_index = dwarf2_per_objfile->n_comp_units;
|
|
||||||
htab_traverse_noresize (dwarf2_per_objfile->signatured_types,
|
|
||||||
write_one_signatured_type, &sig_data);
|
|
||||||
@@ -14734,7 +14771,7 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
total_len = size_of_contents;
|
|
||||||
|
|
||||||
/* The version number. */
|
|
||||||
- val = MAYBE_SWAP (2);
|
|
||||||
+ val = MAYBE_SWAP (3);
|
|
||||||
obstack_grow (&contents, &val, sizeof (val));
|
|
||||||
|
|
||||||
/* The offset of the CU list from the start of the file. */
|
|
||||||
@@ -14791,18 +14828,16 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
|
|
||||||
1. The file header. This is a sequence of values, of offset_type
|
|
||||||
unless otherwise noted:
|
|
||||||
- [0] The version number. Currently 1 or 2. The differences are
|
|
||||||
- noted below. Version 1 did not account for .debug_types sections;
|
|
||||||
- the presence of a .debug_types section invalidates any version 1
|
|
||||||
- index that may exist.
|
|
||||||
+
|
|
||||||
+ [0] The version number, currently 3. Versions 1 and 2 are
|
|
||||||
+ obsolete.
|
|
||||||
[1] The offset, from the start of the file, of the CU list.
|
|
||||||
- [1.5] In version 2, the offset, from the start of the file, of the
|
|
||||||
- types CU list. This offset does not appear in version 1. Note
|
|
||||||
- that this can be empty, in which case this offset will be equal to
|
|
||||||
- the next offset.
|
|
||||||
- [2] The offset, from the start of the file, of the address section.
|
|
||||||
- [3] The offset, from the start of the file, of the symbol table.
|
|
||||||
- [4] The offset, from the start of the file, of the constant pool.
|
|
||||||
+ [2] The offset, from the start of the file, of the types CU list.
|
|
||||||
+ Note that this section can be empty, in which case this offset will
|
|
||||||
+ be equal to the next offset.
|
|
||||||
+ [3] The offset, from the start of the file, of the address section.
|
|
||||||
+ [4] The offset, from the start of the file, of the symbol table.
|
|
||||||
+ [5] The offset, from the start of the file, of the constant pool.
|
|
||||||
|
|
||||||
2. The CU list. This is a sequence of pairs of 64-bit
|
|
||||||
little-endian values, sorted by the CU offset. The first element
|
|
||||||
@@ -14813,19 +14848,19 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
type CUs, then conceptually CUs and type CUs form a single list for
|
|
||||||
the purposes of CU indices.
|
|
||||||
|
|
||||||
- 2.5 The types CU list. This does not appear in a version 1 index.
|
|
||||||
- This is a sequence of triplets of 64-bit little-endian values. In
|
|
||||||
- a triplet, the first value is the CU offset, the second value is
|
|
||||||
- the type offset in the CU, and the third value is the type
|
|
||||||
- signature. The types CU list is not sorted.
|
|
||||||
+ 3. The types CU list. This is a sequence of triplets of 64-bit
|
|
||||||
+ little-endian values. In a triplet, the first value is the CU
|
|
||||||
+ offset, the second value is the type offset in the CU, and the
|
|
||||||
+ third value is the type signature. The types CU list is not
|
|
||||||
+ sorted.
|
|
||||||
|
|
||||||
- 3. The address section. The address section consists of a sequence
|
|
||||||
+ 4. The address section. The address section consists of a sequence
|
|
||||||
of address entries. Each address entry has three elements.
|
|
||||||
[0] The low address. This is a 64-bit little-endian value.
|
|
||||||
[1] The high address. This is a 64-bit little-endian value.
|
|
||||||
[2] The CU index. This is an offset_type value.
|
|
||||||
|
|
||||||
- 4. The symbol table. This is a hash table. The size of the hash
|
|
||||||
+ 5. The symbol table. This is a hash table. The size of the hash
|
|
||||||
table is always a power of 2. The initial hash and the step are
|
|
||||||
currently defined by the `find_slot' function.
|
|
||||||
|
|
||||||
@@ -14847,7 +14882,7 @@ write_psymtabs_to_index (struct objfile
|
|
||||||
element in the hash table is used to indicate which CUs define the
|
|
||||||
symbol.
|
|
||||||
|
|
||||||
- 5. The constant pool. This is simply a bunch of bytes. It is
|
|
||||||
+ 6. The constant pool. This is simply a bunch of bytes. It is
|
|
||||||
organized so that alignment is correct: CU vectors are stored
|
|
||||||
first, followed by strings. */
|
|
||||||
static void
|
|
1283
gdb-next-over-throw.patch
Normal file
1283
gdb-next-over-throw.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,99 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00321.html
|
|
||||||
Subject: [patch] PR 12028 "GDB crashes on a double free during overload resolution"
|
|
||||||
|
|
||||||
old_cleanups was being set twice making the later call to
|
|
||||||
discard_cleanups ignore the first 'make_cleanup' request.
|
|
||||||
|
|
||||||
The patch is proposed for both head and the 7.2 branch.
|
|
||||||
|
|
||||||
This has been regression tested on x8664 with gcc-4.4.4-10.fc13
|
|
||||||
|
|
||||||
|
|
||||||
Fix PR 12028: "GDB crashes on a double free during overload resolution "
|
|
||||||
|
|
||||||
2010-09-16 Sami Wagiaalla <swagiaal@redhat.com>
|
|
||||||
|
|
||||||
PR C++/12028
|
|
||||||
* valops.c (find_oload_champ_namespace_loop): removed incorrect
|
|
||||||
'old_cleanups' reassignment.
|
|
||||||
|
|
||||||
2010-09-16 Sami Wagiaalla <swagiaal@redhat.com>
|
|
||||||
|
|
||||||
* gdb.cp/pr12028.cc: New.
|
|
||||||
* gdb.cp/pr12028.exp: New.
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr12028.cc b/gdb/testsuite/gdb.cp/pr12028.cc
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..0fcab6b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr12028.cc
|
|
||||||
@@ -0,0 +1,21 @@
|
|
||||||
+class A{};
|
|
||||||
+class B{};
|
|
||||||
+class C: public B {};
|
|
||||||
+
|
|
||||||
+namespace D{
|
|
||||||
+ int foo (A) { return 11; }
|
|
||||||
+ int foo (C) { return 12; }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int main()
|
|
||||||
+{
|
|
||||||
+ A a;
|
|
||||||
+ B b;
|
|
||||||
+ C c;
|
|
||||||
+
|
|
||||||
+ D::foo (a);
|
|
||||||
+ // D::foo (b);
|
|
||||||
+ D::foo (c);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr12028.exp b/gdb/testsuite/gdb.cp/pr12028.exp
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..746c6b5
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr12028.exp
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+
|
|
||||||
+set testfile pr12028
|
|
||||||
+set srcfile ${testfile}.cc
|
|
||||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+############################################
|
|
||||||
+
|
|
||||||
+if ![runto_main] then {
|
|
||||||
+ perror "couldn't run to breakpoint main"
|
|
||||||
+ continue
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_test "p D::foo(b)" "Cannot resolve function foo to any overloaded instance"
|
|
||||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
|
||||||
index 7fbad10..4e83a04 100644
|
|
||||||
--- a/gdb/valops.c
|
|
||||||
+++ b/gdb/valops.c
|
|
||||||
@@ -2715,7 +2715,7 @@ find_oload_champ_namespace_loop (struct type **arg_types, int nargs,
|
|
||||||
function symbol to start off with.) */
|
|
||||||
|
|
||||||
old_cleanups = make_cleanup (xfree, *oload_syms);
|
|
||||||
- old_cleanups = make_cleanup (xfree, *oload_champ_bv);
|
|
||||||
+ make_cleanup (xfree, *oload_champ_bv);
|
|
||||||
new_namespace = alloca (namespace_len + 1);
|
|
||||||
strncpy (new_namespace, qualified_name, namespace_len);
|
|
||||||
new_namespace[namespace_len] = '\0';
|
|
@ -1,592 +0,0 @@
|
|||||||
http://sourceware.org/ml/gdb-patches/2010-10/msg00175.html
|
|
||||||
Subject: Re: [patch] python: save/restore/fix error state
|
|
||||||
|
|
||||||
On Fri, 08 Oct 2010 22:08:27 +0200, Doug Evans wrote:
|
|
||||||
> The comment above this code says:
|
|
||||||
>
|
|
||||||
> /* Note: If an exception occurs python will print the traceback and
|
|
||||||
> clear the error indicator. */
|
|
||||||
>
|
|
||||||
> ISTM that either this comment is wrong or the above patch is wrong, or
|
|
||||||
> some combination thereof.
|
|
||||||
|
|
||||||
This comment is right, Python has no bug there, other gdb/python/ code has
|
|
||||||
bugs. That is some gdb/python/ code returned success value while still
|
|
||||||
leaving the python exception set. Such case is undefined and unchecked by
|
|
||||||
Python. Python error state does not follow the errno POSIX semantics
|
|
||||||
The setting of errno after a successful call to a function is
|
|
||||||
unspecified [...].
|
|
||||||
as Python requires instead:
|
|
||||||
The Python error state after a successful call to a function must be
|
|
||||||
cleared.
|
|
||||||
|
|
||||||
I have checked callers of these functions, as a closure on the callers of the
|
|
||||||
top py-utils.c functions. That does not mean this Python error state handling
|
|
||||||
verification is complete:
|
|
||||||
python_string_to_unicode unicode_to_encoded_string
|
|
||||||
unicode_to_encoded_python_string unicode_to_target_string
|
|
||||||
unicode_to_target_python_string python_string_to_target_string
|
|
||||||
python_string_to_target_python_string python_string_to_host_string
|
|
||||||
target_string_to_unicode gdbpy_obj_to_string gdbpy_exception_to_string
|
|
||||||
get_addr_from_python convert_value_from_python frapy_read_var
|
|
||||||
gdbpy_get_display_hint valpy_getitem FIXME set_parameter_value
|
|
||||||
compute_enum_values infpy_read_memory infpy_write_memory
|
|
||||||
infpy_search_memory valpy_new valpy_call valpy_binop valpy_richcompare
|
|
||||||
pretty_print_one_value set_attr parmpy_init
|
|
||||||
|
|
||||||
Therefore I have removed the check after PyRun_SimpleFile.
|
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu.
|
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
|
||||||
2010-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* python/py-breakpoint.c (bppy_set_condition): New comment.
|
|
||||||
* python/py-cmd.c (cmdpy_function): Call also gdbpy_print_stack for
|
|
||||||
failed PyUnicode_Decode.
|
|
||||||
(cmdpy_completer): Skip element for failed
|
|
||||||
python_string_to_host_string.
|
|
||||||
(cmdpy_init): Return -1 on failed python_string_to_host_string.
|
|
||||||
* python/py-frame.c (frapy_read_var): Extend the function comment.
|
|
||||||
* python/py-function.c (fnpy_init): Return -1 on failed
|
|
||||||
python_string_to_host_string.
|
|
||||||
* python/py-inferior.c (infpy_read_memory, infpy_write_memory): Extend
|
|
||||||
the function comment.
|
|
||||||
(infpy_search_memory): Extend the function comment. Remove the
|
|
||||||
PyErr_SetString call on already set error state.
|
|
||||||
* python/py-param.c (set_parameter_value): Extend the function
|
|
||||||
comment. Return -1 on failed python_string_to_host_string, twice.
|
|
||||||
(set_attr): Extend the function comment.
|
|
||||||
(compute_enum_values): Extend the function comment. New variable
|
|
||||||
back_to. Protect self->enumeration by BACK_TO cleanups. Return 0 on
|
|
||||||
failed python_string_to_host_string.
|
|
||||||
(get_doc_string): Call gdbpy_print_stack on failed
|
|
||||||
python_string_to_host_string.
|
|
||||||
(parmpy_init): Extend the function comment.
|
|
||||||
* python/py-prettyprint.c (pretty_print_one_value): Likewise.
|
|
||||||
(gdbpy_get_display_hint, print_children): Call gdbpy_print_stack on
|
|
||||||
failed python_string_to_host_string.
|
|
||||||
* python/py-value.c (valpy_new, valpy_getitem, valpy_call)
|
|
||||||
(valpy_binop, valpy_richcompare): Extend the function comment.
|
|
||||||
* python/python.c
|
|
||||||
(struct python_env) <error_type, error_value, error_traceback>: New
|
|
||||||
fields.
|
|
||||||
(restore_python_env): Handle PyErr_Occurred. Call PyErr_Restore.
|
|
||||||
(ensure_python_env): Call PyErr_Fetch.
|
|
||||||
* varobj.c (update_dynamic_varobj_children): Call gdbpy_print_stack on
|
|
||||||
failed convert_value_from_python.
|
|
||||||
(value_get_print_value): Call gdbpy_print_stack on failed
|
|
||||||
python_string_to_target_python_string.
|
|
||||||
|
|
||||||
gdb/testsuite/
|
|
||||||
2010-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.python/py-error.exp: New file.
|
|
||||||
* gdb.python/py-error.py: New file.
|
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/python/py-breakpoint.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/py-breakpoint.c 2010-10-12 18:27:54.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/py-breakpoint.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -420,6 +420,9 @@ bppy_get_condition (PyObject *self, void
|
|
||||||
return PyString_Decode (str, strlen (str), host_charset (), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Returns 0 on success. Returns -1 on error, with a python exception set.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
|
|
||||||
{
|
|
||||||
Index: gdb-7.2/gdb/python/py-cmd.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/py-cmd.c 2010-10-12 18:27:54.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/py-cmd.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -138,7 +138,10 @@ cmdpy_function (struct cmd_list_element
|
|
||||||
args = "";
|
|
||||||
argobj = PyUnicode_Decode (args, strlen (args), host_charset (), NULL);
|
|
||||||
if (! argobj)
|
|
||||||
- error (_("Could not convert arguments to Python string."));
|
|
||||||
+ {
|
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
+ error (_("Could not convert arguments to Python string."));
|
|
||||||
+ }
|
|
||||||
|
|
||||||
ttyobj = from_tty ? Py_True : Py_False;
|
|
||||||
Py_INCREF (ttyobj);
|
|
||||||
@@ -255,6 +258,12 @@ cmdpy_completer (struct cmd_list_element
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
result[out] = python_string_to_host_string (elt);
|
|
||||||
+ if (result[out] == NULL)
|
|
||||||
+ {
|
|
||||||
+ /* Skip problem elements. */
|
|
||||||
+ PyErr_Clear ();
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
++out;
|
|
||||||
}
|
|
||||||
result[out] = NULL;
|
|
||||||
@@ -465,7 +474,15 @@ cmdpy_init (PyObject *self, PyObject *ar
|
|
||||||
PyObject *ds_obj = PyObject_GetAttr (self, gdbpy_doc_cst);
|
|
||||||
|
|
||||||
if (ds_obj && gdbpy_is_string (ds_obj))
|
|
||||||
- docstring = python_string_to_host_string (ds_obj);
|
|
||||||
+ {
|
|
||||||
+ docstring = python_string_to_host_string (ds_obj);
|
|
||||||
+ if (docstring == NULL)
|
|
||||||
+ {
|
|
||||||
+ xfree (cmd_name);
|
|
||||||
+ xfree (pfx_name);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
if (! docstring)
|
|
||||||
docstring = xstrdup (_("This command is not documented."));
|
|
||||||
Index: gdb-7.2/gdb/python/py-frame.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/py-frame.c 2010-06-28 23:16:03.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/py-frame.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -385,7 +385,8 @@ frapy_find_sal (PyObject *self, PyObject
|
|
||||||
start the search from that block, otherwise search from the frame's
|
|
||||||
current block (determined by examining the resume address of the
|
|
||||||
frame). The variable argument must be a string or an instance of a
|
|
||||||
- gdb.Symbol. The block argument must be an instance of gdb.Block. */
|
|
||||||
+ gdb.Symbol. The block argument must be an instance of gdb.Block. Returns
|
|
||||||
+ NULL on error, with a python exception set. */
|
|
||||||
static PyObject *
|
|
||||||
frapy_read_var (PyObject *self, PyObject *args)
|
|
||||||
{
|
|
||||||
Index: gdb-7.2/gdb/python/py-function.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/py-function.c 2010-05-17 23:23:25.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/py-function.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -113,7 +113,14 @@ fnpy_init (PyObject *self, PyObject *arg
|
|
||||||
{
|
|
||||||
PyObject *ds_obj = PyObject_GetAttrString (self, "__doc__");
|
|
||||||
if (ds_obj && gdbpy_is_string (ds_obj))
|
|
||||||
- docstring = python_string_to_host_string (ds_obj);
|
|
||||||
+ {
|
|
||||||
+ docstring = python_string_to_host_string (ds_obj);
|
|
||||||
+ if (docstring == NULL)
|
|
||||||
+ {
|
|
||||||
+ Py_DECREF (self);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
if (! docstring)
|
|
||||||
docstring = xstrdup (_("This function is not documented."));
|
|
||||||
Index: gdb-7.2/gdb/python/py-inferior.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/py-inferior.c 2010-06-28 23:16:03.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/py-inferior.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -293,7 +293,8 @@ gdbpy_inferiors (PyObject *unused, PyObj
|
|
||||||
|
|
||||||
/* Implementation of gdb.read_memory (address, length).
|
|
||||||
Returns a Python buffer object with LENGTH bytes of the inferior's
|
|
||||||
- memory at ADDRESS. Both arguments are integers. */
|
|
||||||
+ memory at ADDRESS. Both arguments are integers. Returns NULL on error,
|
|
||||||
+ with a python exception set. */
|
|
||||||
static PyObject *
|
|
||||||
infpy_read_memory (PyObject *self, PyObject *args, PyObject *kw)
|
|
||||||
{
|
|
||||||
@@ -361,7 +362,8 @@ infpy_read_memory (PyObject *self, PyObj
|
|
||||||
Writes the contents of BUFFER (a Python object supporting the read
|
|
||||||
buffer protocol) at ADDRESS in the inferior's memory. Write LENGTH
|
|
||||||
bytes from BUFFER, or its entire contents if the argument is not
|
|
||||||
- provided. The function returns nothing. */
|
|
||||||
+ provided. The function returns nothing. Returns NULL on error, with
|
|
||||||
+ a python exception set. */
|
|
||||||
static PyObject *
|
|
||||||
infpy_write_memory (PyObject *self, PyObject *args, PyObject *kw)
|
|
||||||
{
|
|
||||||
@@ -473,7 +475,8 @@ get_char_buffer (PyObject *self, Py_ssiz
|
|
||||||
search from ADDRESS. PATTERN is the pattern to search for (and
|
|
||||||
must be a Python object supporting the buffer protocol).
|
|
||||||
Returns a Python Long object holding the address where the pattern
|
|
||||||
- was located, or if the pattern was not found, returns None. */
|
|
||||||
+ was located, or if the pattern was not found, returns None. Returns NULL
|
|
||||||
+ on error, with a python exception set. */
|
|
||||||
static PyObject *
|
|
||||||
infpy_search_memory (PyObject *self, PyObject *args, PyObject *kw)
|
|
||||||
{
|
|
||||||
@@ -511,12 +514,7 @@ infpy_search_memory (PyObject *self, PyO
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
- {
|
|
||||||
- PyErr_SetString (PyExc_RuntimeError,
|
|
||||||
- _("Cannot get search address/range from Python."));
|
|
||||||
-
|
|
||||||
- return NULL;
|
|
||||||
- }
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
if (!PyObject_CheckReadBuffer (pattern))
|
|
||||||
{
|
|
||||||
Index: gdb-7.2/gdb/python/py-param.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/py-param.c 2010-05-17 23:23:25.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/py-param.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -110,8 +110,8 @@ get_attr (PyObject *obj, PyObject *attr_
|
|
||||||
return PyObject_GenericGetAttr (obj, attr_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Set a parameter value from a Python value. Return 0 on success, -1
|
|
||||||
- on failure. */
|
|
||||||
+/* Set a parameter value from a Python value. Return 0 on success. Returns
|
|
||||||
+ -1 on error, with a python exception set. */
|
|
||||||
static int
|
|
||||||
set_parameter_value (parmpy_object *self, PyObject *value)
|
|
||||||
{
|
|
||||||
@@ -142,7 +142,11 @@ set_parameter_value (parmpy_object *self
|
|
||||||
self->value.stringval = NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
- self->value.stringval = python_string_to_host_string (value);
|
|
||||||
+ {
|
|
||||||
+ self->value.stringval = python_string_to_host_string (value);
|
|
||||||
+ if (self->value.stringval == NULL)
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
|
|
||||||
case var_enum:
|
|
||||||
@@ -158,6 +162,8 @@ set_parameter_value (parmpy_object *self
|
|
||||||
}
|
|
||||||
|
|
||||||
str = python_string_to_host_string (value);
|
|
||||||
+ if (str == NULL)
|
|
||||||
+ return -1;
|
|
||||||
for (i = 0; self->enumeration[i]; ++i)
|
|
||||||
if (! strcmp (self->enumeration[i], str))
|
|
||||||
break;
|
|
||||||
@@ -258,7 +264,7 @@ set_parameter_value (parmpy_object *self
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Set an attribute. */
|
|
||||||
+/* Set an attribute. Returns -1 on error, with a python exception set. */
|
|
||||||
static int
|
|
||||||
set_attr (PyObject *obj, PyObject *attr_name, PyObject *val)
|
|
||||||
{
|
|
||||||
@@ -358,12 +364,13 @@ add_setshow_generic (int parmclass, enum
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* A helper which computes enum values. Returns 1 on success, 0 on
|
|
||||||
- error. */
|
|
||||||
+/* A helper which computes enum values. Returns 1 on success. Returns 0 on
|
|
||||||
+ error, with a python exception set. */
|
|
||||||
static int
|
|
||||||
compute_enum_values (parmpy_object *self, PyObject *enum_values)
|
|
||||||
{
|
|
||||||
Py_ssize_t size, i;
|
|
||||||
+ struct cleanup *back_to;
|
|
||||||
|
|
||||||
if (! enum_values)
|
|
||||||
{
|
|
||||||
@@ -390,6 +397,7 @@ compute_enum_values (parmpy_object *self
|
|
||||||
}
|
|
||||||
|
|
||||||
self->enumeration = xmalloc ((size + 1) * sizeof (char *));
|
|
||||||
+ back_to = make_cleanup (free_current_contents, &self->enumeration);
|
|
||||||
memset (self->enumeration, 0, (size + 1) * sizeof (char *));
|
|
||||||
|
|
||||||
for (i = 0; i < size; ++i)
|
|
||||||
@@ -397,16 +405,27 @@ compute_enum_values (parmpy_object *self
|
|
||||||
PyObject *item = PySequence_GetItem (enum_values, i);
|
|
||||||
|
|
||||||
if (! item)
|
|
||||||
- return 0;
|
|
||||||
+ {
|
|
||||||
+ do_cleanups (back_to);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
if (! gdbpy_is_string (item))
|
|
||||||
{
|
|
||||||
+ do_cleanups (back_to);
|
|
||||||
PyErr_SetString (PyExc_RuntimeError,
|
|
||||||
_("The enumeration item not a string."));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
self->enumeration[i] = python_string_to_host_string (item);
|
|
||||||
+ if (self->enumeration[i] == NULL)
|
|
||||||
+ {
|
|
||||||
+ do_cleanups (back_to);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+ make_cleanup (xfree, (char *) self->enumeration[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ discard_cleanups (back_to);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -422,7 +441,11 @@ get_doc_string (PyObject *object, PyObje
|
|
||||||
PyObject *ds_obj = PyObject_GetAttr (object, attr);
|
|
||||||
|
|
||||||
if (ds_obj && gdbpy_is_string (ds_obj))
|
|
||||||
- result = python_string_to_host_string (ds_obj);
|
|
||||||
+ {
|
|
||||||
+ result = python_string_to_host_string (ds_obj);
|
|
||||||
+ if (result == NULL)
|
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
if (! result)
|
|
||||||
result = xstrdup (_("This command is not documented."));
|
|
||||||
@@ -449,8 +472,9 @@ get_doc_string (PyObject *object, PyObje
|
|
||||||
|
|
||||||
The documentation for the parameter is taken from the doc string
|
|
||||||
for the python class.
|
|
||||||
-
|
|
||||||
-*/
|
|
||||||
+
|
|
||||||
+ Returns -1 on error, with a python exception set. */
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
|
|
||||||
{
|
|
||||||
Index: gdb-7.2/gdb/python/py-prettyprint.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/py-prettyprint.c 2010-10-12 18:27:57.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/py-prettyprint.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -185,8 +185,8 @@ find_pretty_printer (PyObject *value)
|
|
||||||
is returned. If the function returns Py_NONE that means the pretty
|
|
||||||
printer returned the Python None as a value. Otherwise, if the
|
|
||||||
function returns a value, *OUT_VALUE is set to the value, and NULL
|
|
||||||
- is returned. On error, *OUT_VALUE is set to NULL, and NULL is
|
|
||||||
- returned. */
|
|
||||||
+ is returned. On error, *OUT_VALUE is set to NULL, NULL is
|
|
||||||
+ returned, with a python exception set. */
|
|
||||||
|
|
||||||
static PyObject *
|
|
||||||
pretty_print_one_value (PyObject *printer, struct value **out_value)
|
|
||||||
@@ -232,7 +232,11 @@ gdbpy_get_display_hint (PyObject *printe
|
|
||||||
if (hint)
|
|
||||||
{
|
|
||||||
if (gdbpy_is_string (hint))
|
|
||||||
- result = python_string_to_host_string (hint);
|
|
||||||
+ {
|
|
||||||
+ result = python_string_to_host_string (hint);
|
|
||||||
+ if (result == NULL)
|
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
+ }
|
|
||||||
Py_DECREF (hint);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
@@ -574,7 +578,10 @@ print_children (PyObject *printer, const
|
|
||||||
else
|
|
||||||
{
|
|
||||||
output = python_string_to_host_string (py_v);
|
|
||||||
- fputs_filtered (output, stream);
|
|
||||||
+ if (!output)
|
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
+ else
|
|
||||||
+ fputs_filtered (output, stream);
|
|
||||||
xfree (output);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Index: gdb-7.2/gdb/python/py-value.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/py-value.c 2010-10-12 18:27:54.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/py-value.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -114,7 +114,8 @@ note_value (value_object *value_obj)
|
|
||||||
values_in_python = value_obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Called when a new gdb.Value object needs to be allocated. */
|
|
||||||
+/* Called when a new gdb.Value object needs to be allocated. Returns NULL on
|
|
||||||
+ error, with a python exception set. */
|
|
||||||
static PyObject *
|
|
||||||
valpy_new (PyTypeObject *subtype, PyObject *args, PyObject *keywords)
|
|
||||||
{
|
|
||||||
@@ -334,7 +335,7 @@ valpy_length (PyObject *self)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Given string name of an element inside structure, return its value
|
|
||||||
- object. */
|
|
||||||
+ object. Returns NULL on error, with a python exception set. */
|
|
||||||
static PyObject *
|
|
||||||
valpy_getitem (PyObject *self, PyObject *key)
|
|
||||||
{
|
|
||||||
@@ -468,7 +469,8 @@ enum valpy_opcode
|
|
||||||
((TYPE_CODE (TYPE) == TYPE_CODE_REF) ? (TYPE_TARGET_TYPE (TYPE)) : (TYPE))
|
|
||||||
|
|
||||||
/* Returns a value object which is the result of applying the operation
|
|
||||||
- specified by OPCODE to the given arguments. */
|
|
||||||
+ specified by OPCODE to the given arguments. Returns NULL on error, with
|
|
||||||
+ a python exception set. */
|
|
||||||
static PyObject *
|
|
||||||
valpy_binop (enum valpy_opcode opcode, PyObject *self, PyObject *other)
|
|
||||||
{
|
|
||||||
@@ -723,7 +725,8 @@ valpy_xor (PyObject *self, PyObject *oth
|
|
||||||
return valpy_binop (VALPY_BITXOR, self, other);
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Implements comparison operations for value objects. */
|
|
||||||
+/* Implements comparison operations for value objects. Returns NULL on error,
|
|
||||||
+ with a python exception set. */
|
|
||||||
static PyObject *
|
|
||||||
valpy_richcompare (PyObject *self, PyObject *other, int op)
|
|
||||||
{
|
|
||||||
Index: gdb-7.2/gdb/python/python.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/python/python.c 2010-10-12 18:27:54.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/python/python.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -82,6 +82,7 @@ struct python_env
|
|
||||||
PyGILState_STATE state;
|
|
||||||
struct gdbarch *gdbarch;
|
|
||||||
const struct language_defn *language;
|
|
||||||
+ PyObject *error_type, *error_value, *error_traceback;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -89,6 +90,16 @@ restore_python_env (void *p)
|
|
||||||
{
|
|
||||||
struct python_env *env = (struct python_env *)p;
|
|
||||||
|
|
||||||
+ /* Leftover Python error is forbidden by Python Exception Handling. */
|
|
||||||
+ if (PyErr_Occurred ())
|
|
||||||
+ {
|
|
||||||
+ /* This order is similar to the one calling error afterwards. */
|
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
+ warning (_("internal error: Unhandled Python exception"));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ PyErr_Restore (env->error_type, env->error_value, env->error_traceback);
|
|
||||||
+
|
|
||||||
PyGILState_Release (env->state);
|
|
||||||
python_gdbarch = env->gdbarch;
|
|
||||||
python_language = env->language;
|
|
||||||
@@ -111,6 +122,9 @@ ensure_python_env (struct gdbarch *gdbar
|
|
||||||
python_gdbarch = gdbarch;
|
|
||||||
python_language = language;
|
|
||||||
|
|
||||||
+ /* Save it and ensure ! PyErr_Occurred () afterwards. */
|
|
||||||
+ PyErr_Fetch (&env->error_type, &env->error_value, &env->error_traceback);
|
|
||||||
+
|
|
||||||
return make_cleanup (restore_python_env, env);
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.python/py-error.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.python/py-error.exp 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -0,0 +1,56 @@
|
|
||||||
+# Copyright (C) 2010 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 error while loading *-gdb.py. IBM1047 is chosen as possibly supported
|
|
||||||
+# by glibc but unsupported by Python
|
|
||||||
+
|
|
||||||
+set testfile "py-error"
|
|
||||||
+
|
|
||||||
+load_lib gdb-python.exp
|
|
||||||
+
|
|
||||||
+# Start with a fresh gdb.
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+
|
|
||||||
+# Skip all tests if Python scripting is not enabled.
|
|
||||||
+if { [skip_python_tests] } { continue }
|
|
||||||
+
|
|
||||||
+set charset "IBM1047"
|
|
||||||
+
|
|
||||||
+set test2 "main reached"
|
|
||||||
+
|
|
||||||
+set test "set host-charset $charset"
|
|
||||||
+set test_regex [string_to_regexp $test]
|
|
||||||
+gdb_test_multiple $test $test {
|
|
||||||
+ -re "^$test_regex\r\n$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "^$test_regex\r\nUndefined item: \"$charset\"\\.\r\n$gdb_prompt $" {
|
|
||||||
+ xfail $test
|
|
||||||
+ untested $test2
|
|
||||||
+ set test2 ""
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if {$test2 == ""} {
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
|
||||||
+
|
|
||||||
+# argc=LookupError: unknown encoding: IBM1047
|
|
||||||
+gdb_test "source $remote_python_file" "Traceback.*ClassName.*\r\nLookupError: unknown encoding: $charset" $test2
|
|
||||||
+
|
|
||||||
+gdb_test "p 1" " = 1" "no delayed error"
|
|
||||||
Index: gdb-7.2/gdb/testsuite/gdb.python/py-error.py
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.python/py-error.py 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -0,0 +1,25 @@
|
|
||||||
+# Copyright (C) 2010 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/>.
|
|
||||||
+
|
|
||||||
+import gdb
|
|
||||||
+
|
|
||||||
+class ClassName(gdb.Command):
|
|
||||||
+ 'a'
|
|
||||||
+ def __init__(self):
|
|
||||||
+ gdb.Command.__init__ (self, "ClassName", gdb.COMMAND_DATA, prefix=True)
|
|
||||||
+ def invoke(self, args, from_tty):
|
|
||||||
+ print
|
|
||||||
+
|
|
||||||
+ClassName()
|
|
||||||
Index: gdb-7.2/gdb/varobj.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.2.orig/gdb/varobj.c 2010-10-12 18:27:54.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/varobj.c 2010-10-12 18:28:58.000000000 +0200
|
|
||||||
@@ -1054,6 +1054,8 @@ update_dynamic_varobj_children (struct v
|
|
||||||
error (_("Invalid item from the child list"));
|
|
||||||
|
|
||||||
v = convert_value_from_python (py_v);
|
|
||||||
+ if (v == NULL)
|
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
install_dynamic_child (var, can_mention ? changed : NULL,
|
|
||||||
can_mention ? new : NULL,
|
|
||||||
can_mention ? unchanged : NULL,
|
|
||||||
@@ -2542,6 +2544,8 @@ value_get_print_value (struct value *val
|
|
||||||
type = builtin_type (gdbarch)->builtin_char;
|
|
||||||
Py_DECREF (py_str);
|
|
||||||
}
|
|
||||||
+ else
|
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
}
|
|
||||||
Py_DECREF (output);
|
|
||||||
}
|
|
@ -1,10 +1,10 @@
|
|||||||
Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
|
Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
|
||||||
the default gcc and gfortran binaries are from gcc-4.1.
|
the default gcc and gfortran binaries are from gcc-4.1.
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/vla.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/vla.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.base/vla.exp 2010-07-12 23:07:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.base/vla.exp 2010-11-16 09:26:50.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/vla.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/vla.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -16,7 +16,25 @@
|
@@ -16,7 +16,25 @@
|
||||||
set testfile vla
|
set testfile vla
|
||||||
set srcfile ${testfile}.c
|
set srcfile ${testfile}.c
|
||||||
@ -32,10 +32,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/vla.exp
|
|||||||
untested "Couldn't compile test program"
|
untested "Couldn't compile test program"
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/break-interp.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/break-interp.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.base/break-interp.exp 2010-07-05 20:04:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.base/break-interp.exp 2010-10-12 20:41:06.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/break-interp.exp 2010-07-13 23:11:22.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/break-interp.exp 2010-11-16 09:28:40.000000000 +0100
|
||||||
@@ -33,9 +33,29 @@ if [get_compiler_info ${binfile_lib}] {
|
@@ -33,9 +33,29 @@ if [get_compiler_info ${binfile_lib}] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
@ -55,8 +55,8 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/break-interp.exp
|
|||||||
+
|
+
|
||||||
# Use -soname so that the new library gets copied by build_executable_own_libs.
|
# Use -soname so that the new library gets copied by build_executable_own_libs.
|
||||||
|
|
||||||
-if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug additional_flags=-Wl,-soname,${test}.so]] != ""} {
|
-if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]] != ""} {
|
||||||
+set err [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug additional_flags=-Wl,-soname,${test}.so]]
|
+set err [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]]
|
||||||
+
|
+
|
||||||
+unset_board_info compiler
|
+unset_board_info compiler
|
||||||
+if [info exists old_compiler] {
|
+if [info exists old_compiler] {
|
||||||
@ -67,10 +67,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/break-interp.exp
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/common-block.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/common-block.exp 2010-07-13 00:25:56.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/common-block.exp 2010-11-16 09:26:54.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/common-block.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -20,7 +20,25 @@ set testfile "common-block"
|
@@ -20,7 +20,25 @@ set testfile "common-block"
|
||||||
set srcfile ${testfile}.f90
|
set srcfile ${testfile}.f90
|
||||||
set binfile ${objdir}/${subdir}/${testfile}
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
@ -98,10 +98,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/common-block.exp
|
|||||||
untested "Couldn't compile ${srcfile}"
|
untested "Couldn't compile ${srcfile}"
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-07-12 23:07:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-11-16 09:26:50.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -27,7 +27,25 @@
|
@@ -27,7 +27,25 @@
|
||||||
set testfile dwarf-stride
|
set testfile dwarf-stride
|
||||||
set srcfile ${testfile}.f90
|
set srcfile ${testfile}.f90
|
||||||
@ -129,10 +129,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/dynamic.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2010-07-12 23:07:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2010-11-16 09:26:50.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/dynamic.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dynamic.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -25,7 +25,25 @@ set testfile "dynamic"
|
@@ -25,7 +25,25 @@ set testfile "dynamic"
|
||||||
set srcfile ${testfile}.f90
|
set srcfile ${testfile}.f90
|
||||||
set binfile ${objdir}/${subdir}/${testfile}
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
@ -160,10 +160,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/dynamic.exp
|
|||||||
untested "Couldn't compile ${srcfile}"
|
untested "Couldn't compile ${srcfile}"
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/library-module.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/library-module.exp 2010-06-03 00:41:56.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/library-module.exp 2010-06-03 00:41:56.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/library-module.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -25,16 +25,34 @@ if [get_compiler_info not-used] {
|
@@ -25,16 +25,34 @@ if [get_compiler_info not-used] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
@ -203,10 +203,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/library-module.exp
|
|||||||
untested "Couldn't compile ${srcfile}"
|
untested "Couldn't compile ${srcfile}"
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/module.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/module.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/module.exp 2010-06-03 01:01:01.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/module.exp 2010-09-22 21:22:44.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/module.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/module.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -16,7 +16,25 @@
|
@@ -16,7 +16,25 @@
|
||||||
set testfile "module"
|
set testfile "module"
|
||||||
set srcfile ${testfile}.f90
|
set srcfile ${testfile}.f90
|
||||||
@ -234,10 +234,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/module.exp
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/string.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/string.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/string.exp 2010-07-12 23:07:33.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/string.exp 2010-11-16 09:26:50.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/string.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/string.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -23,7 +23,25 @@ set testfile "string"
|
@@ -23,7 +23,25 @@ set testfile "string"
|
||||||
set srcfile ${testfile}.f90
|
set srcfile ${testfile}.f90
|
||||||
set binfile ${objdir}/${subdir}/${testfile}
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
@ -265,10 +265,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/string.exp
|
|||||||
untested "Couldn't compile ${srcfile}"
|
untested "Couldn't compile ${srcfile}"
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/omp-step.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2010-07-13 00:21:30.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2010-11-16 09:26:54.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/omp-step.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/omp-step.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -15,7 +15,26 @@
|
@@ -15,7 +15,26 @@
|
||||||
|
|
||||||
set testfile "omp-step"
|
set testfile "omp-step"
|
||||||
@ -297,10 +297,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/omp-step.exp
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/derived-type.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/derived-type.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2010-01-01 08:32:02.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2010-01-01 08:32:02.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/derived-type.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/derived-type.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -28,8 +28,26 @@ set testfile "derived-type"
|
@@ -28,8 +28,26 @@ set testfile "derived-type"
|
||||||
set srcfile ${testfile}.f90
|
set srcfile ${testfile}.f90
|
||||||
set binfile ${objdir}/${subdir}/${testfile}
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
@ -330,10 +330,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/derived-type.exp
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/subarray.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/subarray.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.fortran/subarray.exp 2010-01-01 08:32:02.000000000 +0100
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/subarray.exp 2010-01-01 08:32:02.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/subarray.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/subarray.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -28,8 +28,26 @@ set testfile "subarray"
|
@@ -28,8 +28,26 @@ set testfile "subarray"
|
||||||
set srcfile ${testfile}.f
|
set srcfile ${testfile}.f
|
||||||
set binfile ${objdir}/${subdir}/${testfile}
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
@ -363,10 +363,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.fortran/subarray.exp
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-07-12 23:07:34.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-11-16 09:26:51.000000000 +0100
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-07-13 23:05:14.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
|
@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
|
||||||
|
|
||||||
# FIXME: gcc dependency (-Wl,-soname).
|
# FIXME: gcc dependency (-Wl,-soname).
|
||||||
@ -394,10 +394,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
|||||||
untested "Couldn't compile test library"
|
untested "Couldn't compile test library"
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
Index: gdb-7.1.90.20100711/gdb/testsuite/lib/prelink-support.exp
|
Index: gdb-7.2.50.20101116/gdb/testsuite/lib/prelink-support.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/lib/prelink-support.exp 2010-07-05 20:02:56.000000000 +0200
|
--- gdb-7.2.50.20101116.orig/gdb/testsuite/lib/prelink-support.exp 2010-10-12 20:12:49.000000000 +0200
|
||||||
+++ gdb-7.1.90.20100711/gdb/testsuite/lib/prelink-support.exp 2010-07-13 23:09:34.000000000 +0200
|
+++ gdb-7.2.50.20101116/gdb/testsuite/lib/prelink-support.exp 2010-11-16 09:27:20.000000000 +0100
|
||||||
@@ -118,9 +118,31 @@ proc file_copy {src dest} {
|
@@ -118,9 +118,31 @@ proc file_copy {src dest} {
|
||||||
proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} {
|
proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} {
|
||||||
global objdir subdir
|
global objdir subdir
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
ad20e5eb15d037a31e3b484e9f57542dc927c0a9
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-10/msg00005.html
|
|
||||||
|
|
||||||
### src/gdb/testsuite/ChangeLog 2010/09/30 18:58:07 1.2462
|
|
||||||
### src/gdb/testsuite/ChangeLog 2010/10/01 17:03:49 1.2463
|
|
||||||
## -1,3 +1,19 @@
|
|
||||||
+2010-10-01 Doug Evans <dje@google.com>
|
|
||||||
+
|
|
||||||
+ * lib/gdb-python.exp: New file.
|
|
||||||
+ * gdb.python/py-block.exp: Use it.
|
|
||||||
+ * gdb.python/py-breakpoint.exp: Ditto.
|
|
||||||
+ * gdb.python/py-frame.exp: Ditto.
|
|
||||||
+ * gdb.python/py-inferior.exp: Ditto.
|
|
||||||
+ * gdb.python/py-param.exp: Ditto.
|
|
||||||
+ * gdb.python/py-prettyprint.exp: Ditto.
|
|
||||||
+ * gdb.python/py-shared.exp: Ditto.
|
|
||||||
+ * gdb.python/py-symbol.exp: Ditto.
|
|
||||||
+ * gdb.python/py-symtab.exp: Ditto.
|
|
||||||
+ * gdb.python/py-type.exp: Ditto.
|
|
||||||
+ * gdb.python/py-value.exp: Ditto.
|
|
||||||
+ * gdb.python/python.exp: Ditto.
|
|
||||||
+
|
|
||||||
2010-09-30 Tom Tromey <tromey@redhat.com>
|
|
||||||
|
|
||||||
* gdb.base/anon.exp: New file.
|
|
||||||
--- src/gdb/testsuite/lib/gdb-python.exp
|
|
||||||
+++ src/gdb/testsuite/lib/gdb-python.exp 2010-10-12 17:58:35.904468000 +0000
|
|
||||||
@@ -0,0 +1,47 @@
|
|
||||||
+# Copyright 2010 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/>.
|
|
||||||
+
|
|
||||||
+# Utilities for python-scripting related tests.
|
|
||||||
+
|
|
||||||
+# Run a command in GDB, and report a failure if a Python exception is thrown.
|
|
||||||
+# If report_pass is true, report a pass if no exception is thrown.
|
|
||||||
+
|
|
||||||
+proc gdb_py_test_silent_cmd { cmd name report_pass } {
|
|
||||||
+ global gdb_prompt
|
|
||||||
+
|
|
||||||
+ gdb_test_multiple $cmd $name {
|
|
||||||
+ -re "Traceback.*$gdb_prompt $" { fail $name }
|
|
||||||
+ -re "$gdb_prompt $" { if $report_pass { pass $name } }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Usage: gdb_py_test_multiple NAME INPUT RESULT {INPUT RESULT}...
|
|
||||||
+# Run a test named NAME, consisting of multiple lines of input.
|
|
||||||
+# After each input line INPUT, search for result line RESULT.
|
|
||||||
+# Succeed if all results are seen; fail otherwise.
|
|
||||||
+
|
|
||||||
+proc gdb_py_test_multiple { name args } {
|
|
||||||
+ global gdb_prompt
|
|
||||||
+ foreach {input result} $args {
|
|
||||||
+ if {[gdb_test_multiple $input "$name - $input" {
|
|
||||||
+ -re "\[\r\n\]*($result)\[\r\n\]+($gdb_prompt | *>)$" {
|
|
||||||
+ pass "$name - $input"
|
|
||||||
+ }
|
|
||||||
+ }]} {
|
|
||||||
+ return 1
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
@ -1,467 +0,0 @@
|
|||||||
https://bugzilla.redhat.com/show_bug.cgi?id=610986
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-08/msg00112.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/08/18 22:57:45 1.12097
|
|
||||||
### src/gdb/ChangeLog 2010/08/19 07:34:26 1.12098
|
|
||||||
## -1,3 +1,9 @@
|
|
||||||
+2010-08-19 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+
|
|
||||||
+ * varobj.c (varobj_create): Replace variable old_fi with old_id,
|
|
||||||
+ initialize it by null_frame_id, wrap its usage by get_frame_id,
|
|
||||||
+ frame_id_p and frame_find_by_id.
|
|
||||||
+
|
|
||||||
2010-08-18 Tom Tromey <tromey@redhat.com>
|
|
||||||
|
|
||||||
PR python/11900:
|
|
||||||
--- src/gdb/varobj.c 2010/08/06 14:17:56 1.159
|
|
||||||
+++ src/gdb/varobj.c 2010/08/19 07:34:27 1.160
|
|
||||||
@@ -524,7 +524,7 @@ varobj_create (char *objname,
|
|
||||||
{
|
|
||||||
struct varobj *var;
|
|
||||||
struct frame_info *fi;
|
|
||||||
- struct frame_info *old_fi = NULL;
|
|
||||||
+ struct frame_id old_id = null_frame_id;
|
|
||||||
struct block *block;
|
|
||||||
struct cleanup *old_chain;
|
|
||||||
|
|
||||||
@@ -611,7 +611,7 @@
|
|
||||||
|
|
||||||
var->root->frame = get_frame_id (fi);
|
|
||||||
var->root->thread_id = pid_to_thread_id (inferior_ptid);
|
|
||||||
- old_fi = get_selected_frame (NULL);
|
|
||||||
+ old_id = get_frame_id (get_selected_frame (NULL));
|
|
||||||
select_frame (fi);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -639,8 +639,8 @@
|
|
||||||
var->root->rootvar = var;
|
|
||||||
|
|
||||||
/* Reset the selected frame */
|
|
||||||
- if (old_fi != NULL)
|
|
||||||
- select_frame (old_fi);
|
|
||||||
+ if (frame_id_p (old_id))
|
|
||||||
+ select_frame (frame_find_by_id (old_id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the variable object name is null, that means this
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=627506
|
|
||||||
Re: [patch] Fix nesting of ui_out_redirect
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00122.html
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-09/msg00031.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/09/03 01:29:09 1.12149
|
|
||||||
### src/gdb/ChangeLog 2010/09/03 15:41:59 1.12150
|
|
||||||
## -1,3 +1,27 @@
|
|
||||||
+2010-09-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+
|
|
||||||
+ * breakpoint.c (save_breakpoints): Use RETURN_MASK_ALL.
|
|
||||||
+ * cli-out.c: Include vec.h.
|
|
||||||
+ (cli_field_fmt, cli_spaces, cli_text, cli_message, cli_flush): New
|
|
||||||
+ variable stream, initialize it, use it.
|
|
||||||
+ (cli_redirect): New function comment. Replace the stream and
|
|
||||||
+ original_stream fields by the new streams field. Remove the
|
|
||||||
+ original_stream != NULL conditional, assert error on NULL instead.
|
|
||||||
+ (out_field_fmt, field_separator): New variable stream, initialize it, use it.
|
|
||||||
+ (cli_out_data_ctor): Assert non-NULL stream. Replace the stream and
|
|
||||||
+ original_stream fields by the new streams field.
|
|
||||||
+ (cli_out_set_stream): Replace the stream field by the new streams
|
|
||||||
+ field.
|
|
||||||
+ * cli-out.h: Include vec.h.
|
|
||||||
+ (ui_filep): New typedef, call DEF_VEC_P for it.
|
|
||||||
+ (struct cli_ui_out_data): Replace the stream and original_stream
|
|
||||||
+ fields by the new streams field.
|
|
||||||
+ * cli/cli-logging.c (set_logging_redirect): Call ui_out_redirect with
|
|
||||||
+ NULL first. Extend the comment.
|
|
||||||
+ (handle_redirections): Call ui_out_redirect with output.
|
|
||||||
+ * python/py-breakpoint.c (bppy_get_commands): Move ui_out_redirect
|
|
||||||
+ calls outside of the TRY_CATCH block.
|
|
||||||
+
|
|
||||||
|
|
||||||
[ cli/cli-logging.c removed. ]
|
|
||||||
|
|
||||||
--- src/gdb/breakpoint.c 2010/08/30 09:49:12 1.511
|
|
||||||
+++ src/gdb/breakpoint.c 2010/09/03 15:42:02 1.512
|
|
||||||
@@ -11487,7 +11487,7 @@
|
|
||||||
fprintf_unfiltered (fp, " commands\n");
|
|
||||||
|
|
||||||
ui_out_redirect (uiout, fp);
|
|
||||||
- TRY_CATCH (ex, RETURN_MASK_ERROR)
|
|
||||||
+ TRY_CATCH (ex, RETURN_MASK_ALL)
|
|
||||||
{
|
|
||||||
print_command_lines (uiout, tp->commands->commands, 2);
|
|
||||||
}
|
|
||||||
--- src/gdb/cli-out.c 2010/05/13 23:53:32 1.30
|
|
||||||
+++ src/gdb/cli-out.c 2010/09/03 15:42:02 1.31
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include "cli-out.h"
|
|
||||||
#include "gdb_string.h"
|
|
||||||
#include "gdb_assert.h"
|
|
||||||
+#include "vec.h"
|
|
||||||
|
|
||||||
typedef struct cli_ui_out_data cli_out_data;
|
|
||||||
|
|
||||||
@@ -224,11 +225,13 @@
|
|
||||||
va_list args)
|
|
||||||
{
|
|
||||||
cli_out_data *data = ui_out_data (uiout);
|
|
||||||
+ struct ui_file *stream;
|
|
||||||
|
|
||||||
if (data->suppress_output)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- vfprintf_filtered (data->stream, format, args);
|
|
||||||
+ stream = VEC_last (ui_filep, data->streams);
|
|
||||||
+ vfprintf_filtered (stream, format, args);
|
|
||||||
|
|
||||||
if (align != ui_noalign)
|
|
||||||
field_separator ();
|
|
||||||
@@ -238,20 +241,26 @@
|
|
||||||
cli_spaces (struct ui_out *uiout, int numspaces)
|
|
||||||
{
|
|
||||||
cli_out_data *data = ui_out_data (uiout);
|
|
||||||
+ struct ui_file *stream;
|
|
||||||
|
|
||||||
if (data->suppress_output)
|
|
||||||
return;
|
|
||||||
- print_spaces_filtered (numspaces, data->stream);
|
|
||||||
+
|
|
||||||
+ stream = VEC_last (ui_filep, data->streams);
|
|
||||||
+ print_spaces_filtered (numspaces, stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
cli_text (struct ui_out *uiout, const char *string)
|
|
||||||
{
|
|
||||||
cli_out_data *data = ui_out_data (uiout);
|
|
||||||
+ struct ui_file *stream;
|
|
||||||
|
|
||||||
if (data->suppress_output)
|
|
||||||
return;
|
|
||||||
- fputs_filtered (string, data->stream);
|
|
||||||
+
|
|
||||||
+ stream = VEC_last (ui_filep, data->streams);
|
|
||||||
+ fputs_filtered (string, stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ATTRIBUTE_PRINTF (3, 0)
|
|
||||||
@@ -262,8 +271,13 @@
|
|
||||||
|
|
||||||
if (data->suppress_output)
|
|
||||||
return;
|
|
||||||
+
|
|
||||||
if (ui_out_get_verblvl (uiout) >= verbosity)
|
|
||||||
- vfprintf_unfiltered (data->stream, format, args);
|
|
||||||
+ {
|
|
||||||
+ struct ui_file *stream = VEC_last (ui_filep, data->streams);
|
|
||||||
+
|
|
||||||
+ vfprintf_unfiltered (stream, format, args);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -280,25 +294,24 @@
|
|
||||||
cli_flush (struct ui_out *uiout)
|
|
||||||
{
|
|
||||||
cli_out_data *data = ui_out_data (uiout);
|
|
||||||
+ struct ui_file *stream = VEC_last (ui_filep, data->streams);
|
|
||||||
|
|
||||||
- gdb_flush (data->stream);
|
|
||||||
+ gdb_flush (stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* OUTSTREAM as non-NULL will push OUTSTREAM on the stack of output streams
|
|
||||||
+ and make it therefore active. OUTSTREAM as NULL will pop the last pushed
|
|
||||||
+ output stream; it is an internal error if it does not exist. */
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
cli_redirect (struct ui_out *uiout, struct ui_file *outstream)
|
|
||||||
{
|
|
||||||
cli_out_data *data = ui_out_data (uiout);
|
|
||||||
|
|
||||||
if (outstream != NULL)
|
|
||||||
- {
|
|
||||||
- data->original_stream = data->stream;
|
|
||||||
- data->stream = outstream;
|
|
||||||
- }
|
|
||||||
- else if (data->original_stream != NULL)
|
|
||||||
- {
|
|
||||||
- data->stream = data->original_stream;
|
|
||||||
- data->original_stream = NULL;
|
|
||||||
- }
|
|
||||||
+ VEC_safe_push (ui_filep, data->streams, outstream);
|
|
||||||
+ else
|
|
||||||
+ VEC_pop (ui_filep, data->streams);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -315,10 +328,11 @@
|
|
||||||
const char *format,...)
|
|
||||||
{
|
|
||||||
cli_out_data *data = ui_out_data (uiout);
|
|
||||||
+ struct ui_file *stream = VEC_last (ui_filep, data->streams);
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start (args, format);
|
|
||||||
- vfprintf_filtered (data->stream, format, args);
|
|
||||||
+ vfprintf_filtered (stream, format, args);
|
|
||||||
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
@@ -329,8 +343,9 @@
|
|
||||||
field_separator (void)
|
|
||||||
{
|
|
||||||
cli_out_data *data = ui_out_data (uiout);
|
|
||||||
+ struct ui_file *stream = VEC_last (ui_filep, data->streams);
|
|
||||||
|
|
||||||
- fputc_filtered (' ', data->stream);
|
|
||||||
+ fputc_filtered (' ', stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is the CLI ui-out implementation functions vector */
|
|
||||||
@@ -364,8 +379,11 @@
|
|
||||||
void
|
|
||||||
cli_out_data_ctor (cli_out_data *self, struct ui_file *stream)
|
|
||||||
{
|
|
||||||
- self->stream = stream;
|
|
||||||
- self->original_stream = NULL;
|
|
||||||
+ gdb_assert (stream != NULL);
|
|
||||||
+
|
|
||||||
+ self->streams = NULL;
|
|
||||||
+ VEC_safe_push (ui_filep, self->streams, stream);
|
|
||||||
+
|
|
||||||
self->suppress_output = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -385,8 +403,10 @@
|
|
||||||
cli_out_set_stream (struct ui_out *uiout, struct ui_file *stream)
|
|
||||||
{
|
|
||||||
cli_out_data *data = ui_out_data (uiout);
|
|
||||||
- struct ui_file *old = data->stream;
|
|
||||||
+ struct ui_file *old;
|
|
||||||
+
|
|
||||||
+ old = VEC_pop (ui_filep, data->streams);
|
|
||||||
+ VEC_quick_push (ui_filep, data->streams, stream);
|
|
||||||
|
|
||||||
- data->stream = stream;
|
|
||||||
return old;
|
|
||||||
}
|
|
||||||
--- src/gdb/cli-out.h 2010/04/18 00:11:55 1.11
|
|
||||||
+++ src/gdb/cli-out.h 2010/09/03 15:42:02 1.12
|
|
||||||
@@ -22,14 +22,19 @@
|
|
||||||
#define CLI_OUT_H
|
|
||||||
|
|
||||||
#include "ui-out.h"
|
|
||||||
+#include "vec.h"
|
|
||||||
+
|
|
||||||
+/* Used for cli_ui_out_data->streams. */
|
|
||||||
+
|
|
||||||
+typedef struct ui_file *ui_filep;
|
|
||||||
+DEF_VEC_P (ui_filep);
|
|
||||||
|
|
||||||
/* These are exported so that they can be extended by other `ui_out'
|
|
||||||
implementations, like TUI's. */
|
|
||||||
|
|
||||||
struct cli_ui_out_data
|
|
||||||
{
|
|
||||||
- struct ui_file *stream;
|
|
||||||
- struct ui_file *original_stream;
|
|
||||||
+ VEC (ui_filep) *streams;
|
|
||||||
int suppress_output;
|
|
||||||
};
|
|
||||||
|
|
||||||
--- src/gdb/python/py-breakpoint.c 2010/07/01 10:36:12 1.4
|
|
||||||
+++ src/gdb/python/py-breakpoint.c 2010/09/03 15:42:03 1.5
|
|
||||||
@@ -474,12 +474,12 @@
|
|
||||||
string_file = mem_fileopen ();
|
|
||||||
chain = make_cleanup_ui_file_delete (string_file);
|
|
||||||
|
|
||||||
+ ui_out_redirect (uiout, string_file);
|
|
||||||
TRY_CATCH (except, RETURN_MASK_ALL)
|
|
||||||
{
|
|
||||||
- ui_out_redirect (uiout, string_file);
|
|
||||||
print_command_lines (uiout, breakpoint_commands (bp), 0);
|
|
||||||
- ui_out_redirect (uiout, NULL);
|
|
||||||
}
|
|
||||||
+ ui_out_redirect (uiout, NULL);
|
|
||||||
cmdstr = ui_file_xstrdup (string_file, &length);
|
|
||||||
GDB_PY_HANDLE_EXCEPTION (except);
|
|
||||||
|
|
||||||
### src/gdb/testsuite/ChangeLog 2010/09/02 15:19:56 1.2435
|
|
||||||
### src/gdb/testsuite/ChangeLog 2010/09/03 15:42:04 1.2436
|
|
||||||
## -1,3 +1,7 @@
|
|
||||||
+2010-09-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+
|
|
||||||
+ * gdb.base/ui-redirect.exp: New file.
|
|
||||||
+
|
|
||||||
2010-09-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
Joel Brobecker <brobecker@adacore.com>
|
|
||||||
|
|
||||||
--- src/gdb/testsuite/gdb.base/ui-redirect.exp
|
|
||||||
+++ src/gdb/testsuite/gdb.base/ui-redirect.exp 2010-09-11 18:42:40.040910000 +0000
|
|
||||||
@@ -0,0 +1,41 @@
|
|
||||||
+# Copyright (C) 2010 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+
|
|
||||||
+if { [prepare_for_testing ui-redirect.exp ui-redirect start.c] } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_breakpoint main
|
|
||||||
+
|
|
||||||
+set test "commands"
|
|
||||||
+gdb_test_multiple $test $test {
|
|
||||||
+ -re "End with a line saying just \"end\"\\.\r\n>$" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set test "print 1"
|
|
||||||
+gdb_test_multiple $test $test {
|
|
||||||
+ -re "\r\n>$" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+gdb_test_no_output "end"
|
|
||||||
+
|
|
||||||
+gdb_test_no_output "set logging file /dev/null"
|
|
||||||
+gdb_test "set logging on" "Copying output to /dev/null\\."
|
|
||||||
+gdb_test "save breakpoints /dev/null" "Saved to file '/dev/null'\\."
|
|
||||||
+gdb_test "set logging off" "Done logging to /dev/null\\."
|
|
||||||
+gdb_test "help" "List of classes of commands:.*"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=627506
|
|
||||||
Re: [patch] Fix uiout for execute_command_to_string
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00235.html
|
|
||||||
http://sourceware.org/ml/gdb-cvs/2010-09/msg00080.html
|
|
||||||
|
|
||||||
### src/gdb/ChangeLog 2010/09/10 16:17:11 1.12170
|
|
||||||
### src/gdb/ChangeLog 2010/09/11 16:00:20 1.12171
|
|
||||||
## -1,3 +1,21 @@
|
|
||||||
+2010-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+ Paul Bolle <pebolle@tiscali.nl>
|
|
||||||
+
|
|
||||||
+ Redirect also uiout and stdtarg{,err} in execute_command_to_string.
|
|
||||||
+ * cli-logging.c (struct saved_output_files) <targerr>: New.
|
|
||||||
+ (set_logging_redirect, pop_output_files, handle_redirections):
|
|
||||||
+ Redirect also gdb_stdtargerr.
|
|
||||||
+ * defs.h (struct ui_out, make_cleanup_ui_out_redirect_pop): New
|
|
||||||
+ declarations.
|
|
||||||
+ * event-top.c (gdb_setup_readline, gdb_disable_readline): Redirect
|
|
||||||
+ also gdb_stdtargerr.
|
|
||||||
+ * top.c (execute_command_to_string): Move make_cleanup_ui_file_delete
|
|
||||||
+ to the top. Redirect also gdb_stdlog, gdb_stdtarg and gdb_stdtargerr.
|
|
||||||
+ Use ui_out_redirect, register make_cleanup_ui_out_redirect_pop.
|
|
||||||
+ * tui/tui-io.c (tui_setup_io): Redirect also gdb_stdtargerr.
|
|
||||||
+ * utils.c (do_ui_out_redirect_pop, make_cleanup_ui_out_redirect_pop):
|
|
||||||
+ New functions.
|
|
||||||
+
|
|
||||||
|
|
||||||
### src/gdb/testsuite/ChangeLog 2010/09/10 20:29:25 1.2444
|
|
||||||
### src/gdb/testsuite/ChangeLog 2010/09/11 16:00:26 1.2445
|
|
||||||
## -1,3 +1,8 @@
|
|
||||||
+2010-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
+
|
|
||||||
+ * gdb.python/python.exp (set height 0, collect help from uiout)
|
|
||||||
+ (verify help to uiout): New tests.
|
|
||||||
+
|
|
||||||
|
|
||||||
[ gdb_stdtargerr handling dropped. ]
|
|
||||||
|
|
||||||
--- src/gdb/defs.h 2010/08/31 18:08:43 1.278
|
|
||||||
+++ src/gdb/defs.h 2010/09/11 16:00:25 1.279
|
|
||||||
@@ -337,6 +337,10 @@
|
|
||||||
struct ui_file;
|
|
||||||
extern struct cleanup *make_cleanup_ui_file_delete (struct ui_file *);
|
|
||||||
|
|
||||||
+struct ui_out;
|
|
||||||
+extern struct cleanup *
|
|
||||||
+ make_cleanup_ui_out_redirect_pop (struct ui_out *uiout);
|
|
||||||
+
|
|
||||||
struct section_addr_info;
|
|
||||||
extern struct cleanup *(make_cleanup_free_section_addr_info
|
|
||||||
(struct section_addr_info *));
|
|
||||||
--- src/gdb/top.c 2010/08/07 15:00:37 1.183
|
|
||||||
+++ src/gdb/top.c 2010/09/11 16:00:25 1.184
|
|
||||||
@@ -475,12 +475,23 @@
|
|
||||||
|
|
||||||
str_file = mem_fileopen ();
|
|
||||||
|
|
||||||
+ make_cleanup_ui_file_delete (str_file);
|
|
||||||
make_cleanup_restore_ui_file (&gdb_stdout);
|
|
||||||
make_cleanup_restore_ui_file (&gdb_stderr);
|
|
||||||
- make_cleanup_ui_file_delete (str_file);
|
|
||||||
+ make_cleanup_restore_ui_file (&gdb_stdlog);
|
|
||||||
+ make_cleanup_restore_ui_file (&gdb_stdtarg);
|
|
||||||
+ make_cleanup_restore_ui_file (&gdb_stdtargerr);
|
|
||||||
+
|
|
||||||
+ if (ui_out_redirect (uiout, str_file) < 0)
|
|
||||||
+ warning (_("Current output protocol does not support redirection"));
|
|
||||||
+ else
|
|
||||||
+ make_cleanup_ui_out_redirect_pop (uiout);
|
|
||||||
|
|
||||||
gdb_stdout = str_file;
|
|
||||||
gdb_stderr = str_file;
|
|
||||||
+ gdb_stdlog = str_file;
|
|
||||||
+ gdb_stdtarg = str_file;
|
|
||||||
+ gdb_stdtargerr = str_file;
|
|
||||||
|
|
||||||
execute_command (p, from_tty);
|
|
||||||
|
|
||||||
--- src/gdb/utils.c 2010/08/07 15:00:37 1.239
|
|
||||||
+++ src/gdb/utils.c 2010/09/11 16:00:25 1.240
|
|
||||||
@@ -311,6 +311,26 @@
|
|
||||||
return make_my_cleanup (&cleanup_chain, do_ui_file_delete, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Helper function for make_cleanup_ui_out_redirect_pop. */
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+do_ui_out_redirect_pop (void *arg)
|
|
||||||
+{
|
|
||||||
+ struct ui_out *uiout = arg;
|
|
||||||
+
|
|
||||||
+ if (ui_out_redirect (uiout, NULL) < 0)
|
|
||||||
+ warning (_("Cannot restore redirection of the current output protocol"));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* Return a new cleanup that pops the last redirection by ui_out_redirect
|
|
||||||
+ with NULL parameter. */
|
|
||||||
+
|
|
||||||
+struct cleanup *
|
|
||||||
+make_cleanup_ui_out_redirect_pop (struct ui_out *uiout)
|
|
||||||
+{
|
|
||||||
+ return make_my_cleanup (&cleanup_chain, do_ui_out_redirect_pop, uiout);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
do_free_section_addr_info (void *arg)
|
|
||||||
{
|
|
||||||
--- gdb-7.2/gdb/testsuite/gdb.python/python.exp-orig 2010-08-09 21:23:00.000000000 +0200
|
|
||||||
+++ gdb-7.2/gdb/testsuite/gdb.python/python.exp 2010-09-11 20:49:22.000000000 +0200
|
|
||||||
@@ -110,3 +110,9 @@ gdb_test_multiple "python print \"\\n\"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gdb_test "q" "Quit" "verify pagination afterwards: q"
|
|
||||||
+
|
|
||||||
+gdb_test_no_output "set height 0"
|
|
||||||
+
|
|
||||||
+gdb_test_no_output "python a = gdb.execute('help', to_string=True)" "collect help from uiout"
|
|
||||||
+
|
|
||||||
+gdb_test "python print a" ".*aliases -- Aliases of other commands.*" "verify help to uiout"
|
|
139
gdb.spec
139
gdb.spec
@ -23,18 +23,19 @@ Name: gdb%{?_with_debug:-debug}
|
|||||||
# Set version to contents of gdb/version.in.
|
# Set version to contents of gdb/version.in.
|
||||||
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
|
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
|
||||||
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
|
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
|
||||||
Version: 7.2
|
Version: 7.2.50.20101117
|
||||||
|
|
||||||
# The release always contains a leading reserved number, start it at 1.
|
# 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.
|
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||||
Release: 25%{?_with_upstream:.upstream}%{dist}
|
Release: 1%{?_with_upstream:.upstream}%{dist}
|
||||||
|
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
# Do not provide URL for snapshots as the file lasts there only for 2 days.
|
# Do not provide URL for snapshots as the file lasts there only for 2 days.
|
||||||
|
# ftp://sourceware.org/pub/gdb/snapshots/current/gdb-%{version}.tar.bz2
|
||||||
# ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
|
# ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
|
||||||
# ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2
|
# ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2
|
||||||
Source: ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
|
Source: ftp://sourceware.org/pub/gdb/snapshots/current/gdb-%{version}.tar.bz2
|
||||||
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
URL: http://gnu.org/software/gdb/
|
URL: http://gnu.org/software/gdb/
|
||||||
|
|
||||||
@ -276,8 +277,8 @@ Patch229: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
|||||||
Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||||
|
|
||||||
# Backported fixups post the source tarball.
|
# Backported fixups post the source tarball.
|
||||||
#=drop: Just backports.
|
#Xdrop: Just backports.
|
||||||
Patch232: gdb-upstream.patch
|
#Patch232: gdb-upstream.patch
|
||||||
|
|
||||||
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||||
#=fedoratest+ppc
|
#=fedoratest+ppc
|
||||||
@ -291,10 +292,6 @@ Patch235: gdb-6.3-bz231832-obstack-2gb.patch
|
|||||||
#=push
|
#=push
|
||||||
Patch241: gdb-6.6-bz225783-gdb-debuginfo-paths.patch
|
Patch241: gdb-6.6-bz225783-gdb-debuginfo-paths.patch
|
||||||
|
|
||||||
# Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
|
|
||||||
#=fedoratest: Drop the obsoleted gdb_gcore.sh change.
|
|
||||||
Patch245: gdb-6.6-bz229517-gcore-without-terminal.patch
|
|
||||||
|
|
||||||
# Notify user of a child forked process being detached (BZ 235197).
|
# Notify user of a child forked process being detached (BZ 235197).
|
||||||
#=push: This is more about discussion if/what should be printed.
|
#=push: This is more about discussion if/what should be printed.
|
||||||
Patch247: gdb-6.6-bz235197-fork-detach-info.patch
|
Patch247: gdb-6.6-bz235197-fork-detach-info.patch
|
||||||
@ -357,8 +354,6 @@ Patch289: gdb-6.5-ia64-libunwind-leak-test.patch
|
|||||||
Patch290: gdb-6.5-missed-trap-on-step-test.patch
|
Patch290: gdb-6.5-missed-trap-on-step-test.patch
|
||||||
|
|
||||||
# Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ 426600).
|
# Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ 426600).
|
||||||
#=maybepush
|
|
||||||
Patch293: gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch
|
|
||||||
#=fedoratest
|
#=fedoratest
|
||||||
Patch294: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
|
Patch294: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
|
||||||
|
|
||||||
@ -419,10 +414,6 @@ Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
|
|||||||
#=push: Useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
#=push: Useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
||||||
Patch331: gdb-6.8-quit-never-aborts.patch
|
Patch331: gdb-6.8-quit-never-aborts.patch
|
||||||
|
|
||||||
# Support DW_TAG_constant for Fortran in recent Fedora/RH GCCs.
|
|
||||||
#=push
|
|
||||||
Patch332: gdb-6.8-fortran-tag-constant.patch
|
|
||||||
|
|
||||||
# Fix attaching to stopped processes and/or pending signals.
|
# Fix attaching to stopped processes and/or pending signals.
|
||||||
#=push+work
|
#=push+work
|
||||||
Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
|
Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||||
@ -435,19 +426,14 @@ Patch343: gdb-6.8-watchpoint-conditionals-test.patch
|
|||||||
#=fedoratest
|
#=fedoratest
|
||||||
Patch348: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
Patch348: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||||
|
|
||||||
# The merged branch `archer' of: http://sourceware.org/gdb/wiki/ProjectArcher
|
# The merged branch `archer-jankratochvil-fedora15' of:
|
||||||
|
# http://sourceware.org/gdb/wiki/ProjectArcher
|
||||||
#=push
|
#=push
|
||||||
#archer-jankratochvil-vla
|
#archer-jankratochvil-vla
|
||||||
#=push
|
#=push
|
||||||
#archer-jankratochvil-watchpoint3
|
#archer-jankratochvil-watchpoint3
|
||||||
#=push
|
#=push
|
||||||
#archer-jankratochvil-ifunc
|
#archer-jankratochvil-ifunc
|
||||||
#=push
|
|
||||||
#archer-pmuldoon-next-over-throw2
|
|
||||||
#=maybepush
|
|
||||||
#archer-tromey-python
|
|
||||||
#=maybepush
|
|
||||||
#archer-tromey-optional-psymtab
|
|
||||||
Patch349: gdb-archer.patch
|
Patch349: gdb-archer.patch
|
||||||
#=maybepush
|
#=maybepush
|
||||||
Patch420: gdb-archer-ada.patch
|
Patch420: gdb-archer-ada.patch
|
||||||
@ -512,12 +498,6 @@ Patch412: gdb-unused-revert.patch
|
|||||||
#=push+work: It should be fixed properly instead.
|
#=push+work: It should be fixed properly instead.
|
||||||
Patch417: gdb-bz541866-rwatch-before-run.patch
|
Patch417: gdb-bz541866-rwatch-before-run.patch
|
||||||
|
|
||||||
# Fix crash on C++ types in some debug info files (BZ 575292, Keith Seitz).
|
|
||||||
# Temporarily workaround the crash of BZ 575292 as there was now BZ 585445.
|
|
||||||
# Re-enable the BZ 575292 and BZ 585445 C++ fix using an updated patch.
|
|
||||||
#=maybepush: Not sure if all the parts are upstream.
|
|
||||||
Patch451: gdb-bz575292-delayed-physname.patch
|
|
||||||
|
|
||||||
# Fix crash when using GNU IFUNC call from breakpoint condition.
|
# Fix crash when using GNU IFUNC call from breakpoint condition.
|
||||||
#=drop: After archer-jankratochvil-ifunc gets in this one gets obsoleted.
|
#=drop: After archer-jankratochvil-ifunc gets in this one gets obsoleted.
|
||||||
Patch454: gdb-bz539590-gnu-ifunc-fix-cond.patch
|
Patch454: gdb-bz539590-gnu-ifunc-fix-cond.patch
|
||||||
@ -526,10 +506,6 @@ Patch454: gdb-bz539590-gnu-ifunc-fix-cond.patch
|
|||||||
#=push+work: Currently it is still not fully safe.
|
#=push+work: Currently it is still not fully safe.
|
||||||
Patch459: gdb-moribund-utrace-workaround.patch
|
Patch459: gdb-moribund-utrace-workaround.patch
|
||||||
|
|
||||||
# Remove core file when starting a process (BZ 594560).
|
|
||||||
#=maybepush
|
|
||||||
Patch461: gdb-bz594560-core-vs-process.patch
|
|
||||||
|
|
||||||
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
||||||
#=fedoratest
|
#=fedoratest
|
||||||
Patch470: gdb-archer-next-over-throw-cxx-exec.patch
|
Patch470: gdb-archer-next-over-throw-cxx-exec.patch
|
||||||
@ -544,18 +520,10 @@ Patch486: gdb-bz562763-pretty-print-2d-vectors.patch
|
|||||||
#=push+work: There are some outstanding issues, check the mails.
|
#=push+work: There are some outstanding issues, check the mails.
|
||||||
Patch487: gdb-bz562763-pretty-print-2d-vectors-libstdcxx.patch
|
Patch487: gdb-bz562763-pretty-print-2d-vectors-libstdcxx.patch
|
||||||
|
|
||||||
# Fix prelinked executables with sepdebug and copy relocations (BZ 614659).
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch489: gdb-bz614659-prelink-dynbss.patch
|
|
||||||
|
|
||||||
# Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey).
|
# Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey).
|
||||||
#=drop: Re-check against the upstream version.
|
#=drop: Re-check against the upstream version.
|
||||||
Patch491: gdb-gdb-add-index-script.patch
|
Patch491: gdb-gdb-add-index-script.patch
|
||||||
|
|
||||||
# Fix gcore from very small terminal windows (BZ 555076).
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch493: gdb-bz555076-gcore-small-height.patch
|
|
||||||
|
|
||||||
# Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248).
|
# Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248).
|
||||||
#=drop+work: Inferior objects should be read in parts, then this patch gets obsoleted.
|
#=drop+work: Inferior objects should be read in parts, then this patch gets obsoleted.
|
||||||
Patch496: gdb-bz568248-oom-is-error.patch
|
Patch496: gdb-bz568248-oom-is-error.patch
|
||||||
@ -564,76 +532,23 @@ Patch496: gdb-bz568248-oom-is-error.patch
|
|||||||
#=push
|
#=push
|
||||||
Patch497: gdb-false-gcc-warning.patch
|
Patch497: gdb-false-gcc-warning.patch
|
||||||
|
|
||||||
# Do not crash on broken separate debuginfo due to old elfutils (BZ 631575).
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch499: gdb-bz631575-gdb-index-nobits.patch
|
|
||||||
|
|
||||||
# Fix symbol lookup misses methods of current class (BZ 631158, Sami Wagiaalla).
|
|
||||||
#=maybepush
|
|
||||||
Patch500: gdb-bz631158-cxx-this-lookup.patch
|
|
||||||
|
|
||||||
# Fix Ada regression when any .gdb_index library is present.
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch501: gdb-gdbindex-ada-regression.patch
|
|
||||||
|
|
||||||
# python: load *-gdb.py for shlibs during attach (BZ 634660).
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch502: gdb-bz634660-gdbpy-load-on-attach.patch
|
|
||||||
|
|
||||||
# Fix double free crash during overload resolution (PR 12028, Sami Wagiaalla).
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch503: gdb-pr12028-double-free.patch
|
|
||||||
|
|
||||||
# Fix gcore writer for -Wl,-z,relro (PR corefiles/11804).
|
# Fix gcore writer for -Wl,-z,relro (PR corefiles/11804).
|
||||||
#=push: There is different patch on gdb-patches, waiting now for resolution in kernel.
|
#=push: There is different patch on gdb-patches, waiting now for resolution in kernel.
|
||||||
Patch504: gdb-bz623749-gcore-relro.patch
|
Patch504: gdb-bz623749-gcore-relro.patch
|
||||||
|
|
||||||
# Fix infinite loop crash on self-referencing class (BZ 627432).
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch506: gdb-bz627432-loop-static-self-class.patch
|
|
||||||
|
|
||||||
# Fix lost siginfo_t in linux-nat (BZ 592031).
|
# Fix lost siginfo_t in linux-nat (BZ 592031).
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch507: gdb-bz592031-siginfo-lost-1of5.patch
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch508: gdb-bz592031-siginfo-lost-2of5.patch
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch509: gdb-bz592031-siginfo-lost-3of5.patch
|
|
||||||
#=push
|
#=push
|
||||||
Patch510: gdb-bz592031-siginfo-lost-4of5.patch
|
Patch510: gdb-bz592031-siginfo-lost-4of5.patch
|
||||||
#=push
|
#=push
|
||||||
Patch511: gdb-bz592031-siginfo-lost-5of5.patch
|
Patch511: gdb-bz592031-siginfo-lost-5of5.patch
|
||||||
|
|
||||||
# Fix .gdb_index for big-endian hosts (Tom Tromey).
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch514: gdb-gdbindex-v1-to-v2.patch
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch512: gdb-gdbindex-bigendian.patch
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch515: gdb-gdbindex-v2-to-v3.patch
|
|
||||||
|
|
||||||
# [ifunc] Fix crash on deleting watchpoint of an autovariable (BZ 637770).
|
|
||||||
#=drop: A part of archer-jankratochvil-ifunc work.
|
|
||||||
Patch513: gdb-bz637770-ifunc-watchpoint-delete.patch
|
|
||||||
|
|
||||||
# Fix python stale error state, also fix its save/restore (BZ 639089).
|
|
||||||
#=drop: Just a backport.
|
|
||||||
Patch518: gdb-testsuite-lib-python.patch
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch516: gdb-python-error-state.patch
|
|
||||||
|
|
||||||
# Fix inferior exec of new PIE x86_64 (BZ 638979).
|
|
||||||
#=drop: Upstreamed.
|
|
||||||
Patch517: gdb-exec-pie-amd64.patch
|
|
||||||
|
|
||||||
# Fix crash on CTRL-C while reading an ELF symbol file (BZ 642879).
|
# Fix crash on CTRL-C while reading an ELF symbol file (BZ 642879).
|
||||||
#=push
|
#=push
|
||||||
Patch520: gdb-bz642879-elfread-sigint-stale.patch
|
Patch520: gdb-bz642879-elfread-sigint-stale.patch
|
||||||
|
|
||||||
# iFort compat. - case insensitive DWARF not in lowercase (BZ 645773).
|
# Fix next/finish/etc -vs- exceptions (Tom Tromey).
|
||||||
Patch522: gdb-bz645773-ifort-case-1of3.patch
|
#=push
|
||||||
Patch523: gdb-bz645773-ifort-case-2of3.patch
|
Patch525: gdb-next-over-throw.patch
|
||||||
Patch524: gdb-bz645773-ifort-case-3of3.patch
|
|
||||||
|
|
||||||
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
|
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
|
||||||
Requires: readline%{?_isa}
|
Requires: readline%{?_isa}
|
||||||
@ -769,7 +684,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||||||
|
|
||||||
%if 0%{!?_with_upstream:1}
|
%if 0%{!?_with_upstream:1}
|
||||||
|
|
||||||
%patch232 -p1
|
#patch232 -p1
|
||||||
%patch349 -p1
|
%patch349 -p1
|
||||||
%patch420 -p1
|
%patch420 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
@ -820,7 +735,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||||||
%patch234 -p1
|
%patch234 -p1
|
||||||
%patch235 -p1
|
%patch235 -p1
|
||||||
%patch241 -p1
|
%patch241 -p1
|
||||||
%patch245 -p1
|
|
||||||
%patch247 -p1
|
%patch247 -p1
|
||||||
%patch254 -p1
|
%patch254 -p1
|
||||||
%patch258 -p1
|
%patch258 -p1
|
||||||
@ -837,7 +751,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||||||
%patch287 -p1
|
%patch287 -p1
|
||||||
%patch289 -p1
|
%patch289 -p1
|
||||||
%patch290 -p1
|
%patch290 -p1
|
||||||
%patch293 -p1
|
|
||||||
%patch294 -p1
|
%patch294 -p1
|
||||||
%patch296 -p1
|
%patch296 -p1
|
||||||
%patch298 -p1
|
%patch298 -p1
|
||||||
@ -853,7 +766,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||||||
%patch329 -p1
|
%patch329 -p1
|
||||||
%patch330 -p1
|
%patch330 -p1
|
||||||
%patch331 -p1
|
%patch331 -p1
|
||||||
%patch332 -p1
|
|
||||||
%patch337 -p1
|
%patch337 -p1
|
||||||
%patch343 -p1
|
%patch343 -p1
|
||||||
%patch348 -p1
|
%patch348 -p1
|
||||||
@ -872,10 +784,8 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||||||
%patch408 -p1
|
%patch408 -p1
|
||||||
%patch412 -p1
|
%patch412 -p1
|
||||||
%patch417 -p1
|
%patch417 -p1
|
||||||
%patch451 -p1
|
|
||||||
%patch454 -p1
|
%patch454 -p1
|
||||||
%patch459 -p1
|
%patch459 -p1
|
||||||
%patch461 -p1
|
|
||||||
%patch470 -p1
|
%patch470 -p1
|
||||||
%patch475 -p1
|
%patch475 -p1
|
||||||
%patch486 -p1
|
%patch486 -p1
|
||||||
@ -883,34 +793,14 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||||||
#patch487 -p1
|
#patch487 -p1
|
||||||
%patch415 -p1
|
%patch415 -p1
|
||||||
%patch519 -p1
|
%patch519 -p1
|
||||||
%patch489 -p1
|
|
||||||
%patch491 -p1
|
%patch491 -p1
|
||||||
%patch493 -p1
|
|
||||||
%patch496 -p1
|
%patch496 -p1
|
||||||
%patch497 -p1
|
%patch497 -p1
|
||||||
%patch499 -p1
|
|
||||||
%patch500 -p1
|
|
||||||
%patch501 -p1
|
|
||||||
%patch502 -p1
|
|
||||||
%patch503 -p1
|
|
||||||
%patch504 -p1
|
%patch504 -p1
|
||||||
%patch506 -p1
|
|
||||||
%patch507 -p1
|
|
||||||
%patch508 -p1
|
|
||||||
%patch509 -p1
|
|
||||||
%patch510 -p1
|
%patch510 -p1
|
||||||
%patch511 -p1
|
%patch511 -p1
|
||||||
%patch514 -p1
|
|
||||||
%patch512 -p1
|
|
||||||
%patch515 -p1
|
|
||||||
%patch513 -p1
|
|
||||||
%patch516 -p1
|
|
||||||
%patch517 -p1
|
|
||||||
%patch518 -p1
|
|
||||||
%patch520 -p1
|
%patch520 -p1
|
||||||
%patch522 -p1
|
%patch525 -p1
|
||||||
%patch523 -p1
|
|
||||||
%patch524 -p1
|
|
||||||
|
|
||||||
%patch393 -p1
|
%patch393 -p1
|
||||||
%patch335 -p1
|
%patch335 -p1
|
||||||
@ -1281,6 +1171,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 17 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20101117-1.fc15
|
||||||
|
- Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release).
|
||||||
|
|
||||||
* Sun Nov 7 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2-25.fc14
|
* Sun Nov 7 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2-25.fc14
|
||||||
- iFort compat. - case insensitive DWARF not in lowercase (BZ 645773).
|
- iFort compat. - case insensitive DWARF not in lowercase (BZ 645773).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user