Rebase to FSF GDB 7.4.50.20120103.
This commit is contained in:
parent
4862a154d1
commit
254f0e90bc
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
/libstdc++-v3-python-r155978.tar.bz2
|
||||
/gdb-7.3.50.20110722.tar.bz2
|
||||
/gdb-7.4.50.20120103.tar.bz2
|
||||
|
@ -1,11 +1,11 @@
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
|
||||
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/symmisc.c
|
||||
Index: gdb-7.4.50.20111218/gdb/symmisc.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/symmisc.c 2010-11-16 07:53:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/symmisc.c 2010-11-16 08:03:08.000000000 +0100
|
||||
@@ -186,8 +186,8 @@ print_objfile_statistics (void)
|
||||
--- gdb-7.4.50.20111218.orig/gdb/symmisc.c 2011-04-04 17:19:59.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/symmisc.c 2011-12-19 00:28:18.189232014 +0100
|
||||
@@ -147,8 +147,8 @@ print_objfile_statistics (void)
|
||||
if (OBJSTAT (objfile, sz_strtab) > 0)
|
||||
printf_filtered (_(" Space used by a.out string tables: %d\n"),
|
||||
OBJSTAT (objfile, sz_strtab));
|
||||
@ -16,10 +16,10 @@ Index: gdb-7.2.50.20101116/gdb/symmisc.c
|
||||
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
|
||||
bcache_memory_used (psymbol_bcache_get_bcache
|
||||
(objfile->psymbol_cache)));
|
||||
Index: gdb-7.2.50.20101116/include/obstack.h
|
||||
Index: gdb-7.4.50.20111218/include/obstack.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/include/obstack.h 2008-10-21 01:03:31.000000000 +0200
|
||||
+++ gdb-7.2.50.20101116/include/obstack.h 2010-11-16 08:02:37.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/include/obstack.h 2011-10-22 03:35:29.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/include/obstack.h 2011-12-19 00:28:18.189232014 +0100
|
||||
@@ -188,31 +188,31 @@ struct obstack /* control current objec
|
||||
|
||||
/* Declare the external functions we use; they are in obstack.c. */
|
||||
@ -125,19 +125,10 @@ Index: gdb-7.2.50.20101116/include/obstack.h
|
||||
if (__o->chunk_limit - __o->next_free < __len) \
|
||||
_obstack_newchunk (__o, __len); \
|
||||
obstack_blank_fast (__o, __len); \
|
||||
@@ -532,7 +532,7 @@ __extension__ \
|
||||
# define obstack_free(h,obj) \
|
||||
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
|
||||
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
|
||||
- ? (int) ((h)->next_free = (h)->object_base \
|
||||
+ ? (PTR_INT_TYPE) ((h)->next_free = (h)->object_base \
|
||||
= (h)->temp + (char *) (h)->chunk) \
|
||||
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
|
||||
|
||||
Index: gdb-7.2.50.20101116/libiberty/obstack.c
|
||||
Index: gdb-7.4.50.20111218/libiberty/obstack.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
|
||||
+++ gdb-7.2.50.20101116/libiberty/obstack.c 2010-11-16 08:02:37.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/libiberty/obstack.c 2011-12-19 00:28:18.191232006 +0100
|
||||
@@ -44,9 +44,11 @@
|
||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#include <gnu-versions.h>
|
||||
|
@ -4,11 +4,11 @@
|
||||
to install and uninstall.
|
||||
* gstack.sh, gstack.1: New files.
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/Makefile.in
|
||||
Index: gdb-7.4.50.20120103/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/Makefile.in 2010-11-05 15:31:25.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/Makefile.in 2010-11-16 07:56:10.000000000 +0100
|
||||
@@ -972,7 +972,7 @@ gdb.z:gdb.1
|
||||
--- gdb-7.4.50.20120103.orig/gdb/Makefile.in 2012-01-03 05:52:15.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/Makefile.in 2012-01-03 05:53:25.974210230 +0100
|
||||
@@ -1017,7 +1017,7 @@ gdb.z:gdb.1
|
||||
install: all
|
||||
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
||||
|
||||
@ -17,7 +17,7 @@ Index: gdb-7.2.50.20101116/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e "$$t"` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1008,7 +1008,25 @@ install-tui:
|
||||
@@ -1039,7 +1039,25 @@ install-only: $(CONFIG_INSTALL)
|
||||
install-python:
|
||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
||||
|
||||
@ -44,10 +44,10 @@ Index: gdb-7.2.50.20101116/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e $$t` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1030,6 +1048,17 @@ uninstall-tui:
|
||||
fi ; \
|
||||
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
|
||||
@@ -1051,6 +1069,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
$(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
+.PHONY: uninstall-gstack
|
||||
+uninstall-gstack:
|
||||
+ transformed_name=`t='$(program_transform_name)'; \
|
||||
@ -59,13 +59,14 @@ Index: gdb-7.2.50.20101116/gdb/Makefile.in
|
||||
+ fi ; \
|
||||
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
|
||||
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||
|
||||
+
|
||||
# The C++ name parser can be built standalone for testing.
|
||||
test-cp-name-parser.o: cp-name-parser.c
|
||||
Index: gdb-7.2.50.20101116/gdb/gstack.sh
|
||||
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
|
||||
Index: gdb-7.4.50.20120103/gdb/gstack.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101116/gdb/gstack.sh 2010-11-16 07:55:47.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/gstack.sh 2012-01-03 05:52:37.278385632 +0100
|
||||
@@ -0,0 +1,48 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
@ -115,10 +116,10 @@ Index: gdb-7.2.50.20101116/gdb/gstack.sh
|
||||
+ -e 's/^\((gdb) \)*//' \
|
||||
+ -e '/^#/p' \
|
||||
+ -e '/^Thread/p'
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.exp
|
||||
Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.exp 2010-11-16 07:55:47.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp 2012-01-03 05:52:37.279385629 +0100
|
||||
@@ -0,0 +1,71 @@
|
||||
+# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -191,10 +192,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.exp
|
||||
+gdb_exit
|
||||
+
|
||||
+remote_exec host "kill -9 $pid"
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.c
|
||||
Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.c 2010-11-16 07:55:47.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.c 2012-01-03 05:52:37.279385629 +0100
|
||||
@@ -0,0 +1,43 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
|
@ -1,31 +0,0 @@
|
||||
2004-10-22 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* solib-svr4.c (enable_break): Convert a symbol descriptor into
|
||||
the corresponding function entry point.
|
||||
(solib_break_names): Delete "._dl_debug_state", no longer needed.
|
||||
|
||||
2007-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.7.
|
||||
|
||||
Index: gdb-6.8.50.20090802/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090802.orig/gdb/solib-svr4.c 2009-08-03 10:03:36.000000000 +0200
|
||||
+++ gdb-6.8.50.20090802/gdb/solib-svr4.c 2009-08-03 10:51:15.000000000 +0200
|
||||
@@ -1431,7 +1431,15 @@ enable_break (struct svr4_info *info)
|
||||
{
|
||||
sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep);
|
||||
if (sym_addr != 0)
|
||||
- break;
|
||||
+ {
|
||||
+ /* The symbol might be a descriptor, convert to into the
|
||||
+ corresponding code address. */
|
||||
+ sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
|
||||
+ sym_addr,
|
||||
+ tmp_bfd_target);
|
||||
+ if (sym_addr != 0)
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (sym_addr != 0)
|
@ -11,10 +11,10 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.4.50.20111218/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/doc/gdb.texinfo 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/doc/gdb.texinfo 2011-07-22 19:15:13.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/doc/gdb.texinfo 2011-12-19 02:52:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/doc/gdb.texinfo 2011-12-19 02:52:25.765407434 +0100
|
||||
@@ -1005,6 +1005,12 @@ Read each symbol file's entire symbol ta
|
||||
the default, which is to read it incrementally as it is needed.
|
||||
This makes startup slower, but makes future operations faster.
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.3.50.20110722/gdb/doc/gdb.texinfo
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-7.3.50.20110722/gdb/main.c
|
||||
Index: gdb-7.4.50.20111218/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/main.c 2011-07-22 19:14:25.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/main.c 2011-07-22 19:15:13.000000000 +0200
|
||||
@@ -399,6 +399,7 @@ captured_main (void *data)
|
||||
--- gdb-7.4.50.20111218.orig/gdb/main.c 2011-12-19 02:52:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/main.c 2011-12-19 02:52:36.925364438 +0100
|
||||
@@ -406,6 +406,7 @@ captured_main (void *data)
|
||||
{"xdb", no_argument, &xdb_commands, 1},
|
||||
{"dbx", no_argument, &dbx_commands, 1},
|
||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.3.50.20110722/gdb/main.c
|
||||
{"r", no_argument, &readnow_symbol_files, 1},
|
||||
{"quiet", no_argument, &quiet, 1},
|
||||
{"q", no_argument, &quiet, 1},
|
||||
@@ -1065,6 +1066,7 @@ Options:\n\n\
|
||||
@@ -1072,6 +1073,7 @@ Options:\n\n\
|
||||
fputs_unfiltered (_("\
|
||||
--quiet Do not print version number on startup.\n\
|
||||
--readnow Fully read symbol files on first access.\n\
|
||||
@ -48,11 +48,11 @@ Index: gdb-7.3.50.20110722/gdb/main.c
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||
Index: gdb-7.3.50.20110722/gdb/symfile.c
|
||||
Index: gdb-7.4.50.20111218/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/symfile.c 2011-05-11 06:56:07.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/symfile.c 2011-07-22 19:15:13.000000000 +0200
|
||||
@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup (
|
||||
--- gdb-7.4.50.20111218.orig/gdb/symfile.c 2011-12-15 16:36:55.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/symfile.c 2011-12-19 02:52:25.767407426 +0100
|
||||
@@ -82,6 +82,7 @@ static void clear_symtab_users_cleanup (
|
||||
|
||||
/* Global variables owned by this file. */
|
||||
int readnow_symbol_files; /* Read full symbols immediately. */
|
||||
@ -60,11 +60,11 @@ Index: gdb-7.3.50.20110722/gdb/symfile.c
|
||||
|
||||
/* External variables and functions referenced. */
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
Index: gdb-7.4.50.20111218/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/dwarf2read.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/dwarf2read.c 2011-07-22 19:15:41.000000000 +0200
|
||||
@@ -58,6 +58,7 @@
|
||||
--- gdb-7.4.50.20111218.orig/gdb/dwarf2read.c 2011-12-19 02:52:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/dwarf2read.c 2011-12-19 02:52:25.769407418 +0100
|
||||
@@ -59,6 +59,7 @@
|
||||
#include "c-lang.h"
|
||||
#include "valprint.h"
|
||||
#include <ctype.h>
|
||||
@ -72,7 +72,7 @@ Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "gdb_string.h"
|
||||
@@ -1388,8 +1389,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
@@ -1405,8 +1406,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
(void *) names);
|
||||
dwarf2_per_objfile->objfile = objfile;
|
||||
}
|
||||
@ -84,11 +84,11 @@ Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
}
|
||||
|
||||
/* When loading sections, we look either for uncompressed section or for
|
||||
Index: gdb-7.3.50.20110722/gdb/top.h
|
||||
Index: gdb-7.4.50.20111218/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/top.h 2011-07-21 13:03:45.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/top.h 2011-07-22 19:15:13.000000000 +0200
|
||||
@@ -59,6 +59,7 @@ extern void set_prompt (const char *);
|
||||
--- gdb-7.4.50.20111218.orig/gdb/top.h 2011-12-16 21:29:28.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/top.h 2011-12-19 02:52:25.769407418 +0100
|
||||
@@ -61,6 +61,7 @@ extern void set_prompt (const char *s);
|
||||
|
||||
/* From random places. */
|
||||
extern int readnow_symbol_files;
|
||||
|
@ -19,11 +19,11 @@ Proposed upstream but never committed upstream.
|
||||
(source_command): Update documentation. Check permissions if
|
||||
FROM_TTY is -1.
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.c
|
||||
Index: gdb-7.4.50.20111218/gdb/cli/cli-cmds.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/cli/cli-cmds.c 2011-06-07 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/cli/cli-cmds.c 2011-07-22 19:14:25.000000000 +0200
|
||||
@@ -39,6 +39,7 @@
|
||||
--- gdb-7.4.50.20111218.orig/gdb/cli/cli-cmds.c 2011-12-16 22:17:42.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/cli/cli-cmds.c 2011-12-19 00:27:16.572468926 +0100
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "source.h"
|
||||
#include "disasm.h"
|
||||
#include "tracepoint.h"
|
||||
@ -31,7 +31,7 @@ Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.c
|
||||
|
||||
#include "ui-out.h"
|
||||
|
||||
@@ -489,7 +490,7 @@ show_script_ext_mode (struct ui_file *fi
|
||||
@@ -485,7 +486,7 @@ show_script_ext_mode (struct ui_file *fi
|
||||
|
||||
int
|
||||
find_and_open_script (const char *script_file, int search_path,
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.c
|
||||
{
|
||||
char *file;
|
||||
int fd;
|
||||
@@ -515,6 +516,32 @@ find_and_open_script (const char *script
|
||||
@@ -511,6 +512,32 @@ find_and_open_script (const char *script
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.c
|
||||
do_cleanups (old_cleanups);
|
||||
|
||||
*streamp = fdopen (fd, FOPEN_RT);
|
||||
@@ -574,13 +601,14 @@ source_script_with_search (const char *f
|
||||
@@ -572,13 +599,14 @@ source_script_with_search (const char *f
|
||||
if (file == NULL || *file == 0)
|
||||
error (_("source command requires file name of file to source."));
|
||||
|
||||
@ -81,7 +81,7 @@ Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.c
|
||||
+ if (!find_and_open_script (file, search_path, &stream, &full_path,
|
||||
+ from_tty))
|
||||
{
|
||||
/* The script wasn't found, or was otherwise inaccessible.
|
||||
/* The script wasn't found, or was otherwise inaccessible.
|
||||
If the source command was invoked interactively, throw an
|
||||
error. Otherwise (e.g. if it was invoked by a script),
|
||||
silently ignore the error. */
|
||||
@ -90,10 +90,10 @@ Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.c
|
||||
perror_with_name (file);
|
||||
else
|
||||
return;
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.exp 2011-07-22 19:14:25.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.base/gdbinit.exp 2011-12-19 00:25:26.079891954 +0100
|
||||
@@ -0,0 +1,91 @@
|
||||
+# Copyright 2005
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -186,17 +186,17 @@ Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
+}
|
||||
+
|
||||
+remote_exec build "rm .gdbinit"
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.sample
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.base/gdbinit.sample
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.sample 2011-07-22 19:14:25.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.base/gdbinit.sample 2011-12-19 00:25:26.079891954 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+echo "\nin gdbinit"
|
||||
Index: gdb-7.3.50.20110722/gdb/main.c
|
||||
Index: gdb-7.4.50.20111218/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/main.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/main.c 2011-07-22 19:14:25.000000000 +0200
|
||||
@@ -849,7 +849,7 @@ captured_main (void *data)
|
||||
--- gdb-7.4.50.20111218.orig/gdb/main.c 2011-11-05 18:08:30.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/main.c 2011-12-19 00:25:26.080891950 +0100
|
||||
@@ -822,7 +822,7 @@ captured_main (void *data)
|
||||
debugging or what directory you are in. */
|
||||
|
||||
if (home_gdbinit && !inhibit_gdbinit)
|
||||
@ -205,7 +205,7 @@ Index: gdb-7.3.50.20110722/gdb/main.c
|
||||
|
||||
/* Now perform all the actions indicated by the arguments. */
|
||||
if (cdarg != NULL)
|
||||
@@ -928,7 +928,7 @@ captured_main (void *data)
|
||||
@@ -901,7 +901,7 @@ captured_main (void *data)
|
||||
/* Read the .gdbinit file in the current directory, *if* it isn't
|
||||
the same as the $HOME/.gdbinit file (it should exist, also). */
|
||||
if (local_gdbinit && !inhibit_gdbinit)
|
||||
@ -214,10 +214,10 @@ Index: gdb-7.3.50.20110722/gdb/main.c
|
||||
|
||||
/* Now that all .gdbinit's have been read and all -d options have been
|
||||
processed, we can read any scripts mentioned in SYMARG.
|
||||
Index: gdb-7.3.50.20110722/gdb/python/py-auto-load.c
|
||||
Index: gdb-7.4.50.20111218/gdb/python/py-auto-load.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/python/py-auto-load.c 2011-05-16 18:33:57.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/python/py-auto-load.c 2011-07-22 19:14:54.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/python/py-auto-load.c 2011-12-10 23:51:47.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/python/py-auto-load.c 2011-12-19 00:25:26.080891950 +0100
|
||||
@@ -284,7 +284,7 @@ source_section_scripts (struct objfile *
|
||||
}
|
||||
|
||||
@ -227,11 +227,11 @@ Index: gdb-7.3.50.20110722/gdb/python/py-auto-load.c
|
||||
|
||||
/* If one script isn't found it's not uncommon for more to not be
|
||||
found either. We don't want to print an error message for each
|
||||
Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.h
|
||||
Index: gdb-7.4.50.20111218/gdb/cli/cli-cmds.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/cli/cli-cmds.h 2011-01-01 16:33:20.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/cli/cli-cmds.h 2011-07-22 19:14:25.000000000 +0200
|
||||
@@ -127,7 +127,8 @@ extern void source_script (char *, int);
|
||||
--- gdb-7.4.50.20111218.orig/gdb/cli/cli-cmds.h 2011-11-01 15:51:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/cli/cli-cmds.h 2011-12-19 00:25:26.080891950 +0100
|
||||
@@ -129,7 +129,8 @@ extern void source_script (char *, int);
|
||||
/* Exported to objfiles.c. */
|
||||
|
||||
extern int find_and_open_script (const char *file, int search_path,
|
||||
|
@ -1,188 +0,0 @@
|
||||
2005-02-11 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* testsuite/gdb.threads/step-thread-exit.c: New testcase.
|
||||
* testsuite/gdb.threads/step-thread-exit.exp: Ditto.
|
||||
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c 2008-12-08 22:21:26.000000000 +0100
|
||||
@@ -0,0 +1,50 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2005 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. */
|
||||
+
|
||||
+#include <pthread.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+void *thread_function (void *ptr)
|
||||
+{
|
||||
+ int *x = (int *)ptr;
|
||||
+ printf("In thread_function, *x is %d\n", *x);
|
||||
+} /* thread_function_end */
|
||||
+
|
||||
+volatile int repeat = 0;
|
||||
+
|
||||
+main()
|
||||
+{
|
||||
+ int ret;
|
||||
+ pthread_t th;
|
||||
+ int i = 3;
|
||||
+
|
||||
+ ret = pthread_create (&th, NULL, thread_function, &i);
|
||||
+ do
|
||||
+ {
|
||||
+ repeat = 0;
|
||||
+ sleep (3); /* sleep */
|
||||
+ }
|
||||
+ while (repeat);
|
||||
+ pthread_join (th, NULL);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp 2008-12-08 22:22:14.000000000 +0100
|
||||
@@ -0,0 +1,123 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2005 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.
|
||||
+
|
||||
+# Check that GDB can step over a thread exit.
|
||||
+
|
||||
+set testfile "step-thread-exit"
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+# Reset the debug file directory so we can't debug within the C library
|
||||
+gdb_test "set debug-file-directory ." "" ""
|
||||
+
|
||||
+#
|
||||
+# Run to `main' where we begin our tests.
|
||||
+#
|
||||
+
|
||||
+if ![runto_main] then {
|
||||
+ gdb_suppress_tests
|
||||
+}
|
||||
+
|
||||
+# FIXME: Currently the main thread will escape/exit before our thread finishes
|
||||
+# without this setting.
|
||||
+gdb_test "set scheduler-locking step"
|
||||
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking first"
|
||||
+
|
||||
+set sleep_line [expr [gdb_get_line_number "sleep"]]
|
||||
+set end_line [expr [gdb_get_line_number "thread_function_end"]]
|
||||
+
|
||||
+gdb_breakpoint "$end_line"
|
||||
+gdb_test "continue" "Break.*thread_function.*" "continue to thread_function 1"
|
||||
+
|
||||
+# Keep nexting until we cause the thread to exit. We expect the main
|
||||
+# thread to be stopped and a message printed to tell us we have stepped
|
||||
+# over the thread exit.
|
||||
+set test "step over thread exit 1"
|
||||
+gdb_test_multiple "next" "$test" {
|
||||
+ -re "\}.*$gdb_prompt $" {
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ -re "\[Thread .* exited\].*Program received signal SIGSTOP.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ -re "start_thread.*$gdb_prompt $" {
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Without this fixup we could end up in:
|
||||
+# #0 0x00110416 in __kernel_vsyscall ()
|
||||
+# #1 0x0011de26 in __lll_unlock_wake_private () from /lib/libpthread.so.0
|
||||
+# #2 0x001179f4 in _L_unlock_3164 () from /lib/libpthread.so.0
|
||||
+# #3 0x00116f01 in pthread_create@@GLIBC_2.1 () from /lib/libpthread.so.0
|
||||
+# #4 0x08048531 in main () at ../.././gdb/testsuite/gdb.threads/step-thread-exit.c:39
|
||||
+gdb_breakpoint "$sleep_line"
|
||||
+gdb_test "set repeat=1" "" "Get to the sleep function prepare 1"
|
||||
+gdb_test "continue" "Break.*$sleep_line.*" "Get to the sleep function 1"
|
||||
+
|
||||
+gdb_test "bt" "main.*$sleep_line.*" "backtrace after step 1"
|
||||
+
|
||||
+runto_main
|
||||
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking second"
|
||||
+
|
||||
+gdb_breakpoint "$sleep_line"
|
||||
+gdb_breakpoint "$end_line"
|
||||
+set test "continue to thread_function 2"
|
||||
+gdb_test_multiple "continue" "$test" {
|
||||
+ -re "Break.*thread_function.*$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "Break.*$sleep_line.*$gdb_prompt $" {
|
||||
+ gdb_test "set repeat=1" "" ""
|
||||
+ send_gdb "continue\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Keep nexting until we cause the thread to exit. In this case, we
|
||||
+# expect the breakpoint in the main thread to have already triggered
|
||||
+# and so we should stop there with a message that we stepped over
|
||||
+# the thread exit.
|
||||
+set test "step over thread exit 2"
|
||||
+gdb_test_multiple "next" "$test" {
|
||||
+ -re "\}.*$gdb_prompt $" {
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ -re "\[Thread .* exited\].*Break.*$sleep_line.*$gdb_prompt $" {
|
||||
+ pass "$test (breakpoint hit)"
|
||||
+ }
|
||||
+ -re "\[Thread .* exited\].*$gdb_prompt $" {
|
||||
+ pass "$test (breakpoint not hit)"
|
||||
+ }
|
||||
+ -re "start_thread.*$gdb_prompt $" {
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+}
|
||||
+
|
@ -1,32 +1,7 @@
|
||||
Index: gdb/testsuite/ChangeLog
|
||||
2005-01-21 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* gdb.cp/constructortest.exp: New test.
|
||||
* gdb.cp/constructortest.cc: Ditto.
|
||||
* gdb.cp/templates.exp: Change break of dtor to be fully quoted.
|
||||
|
||||
2007-09-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.cp/constructortest.exp, gdb.cp/constructortest.cc: Test also the
|
||||
`$delete' destructor variant.
|
||||
|
||||
2007-09-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.cp/constructortest.exp: Delete the FIXME workaround of restarting
|
||||
the whole GDB.
|
||||
|
||||
2007-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.cp/constructortest.exp: Test BREAKPOINT_RE_SET for multiple PCs
|
||||
by PIE.
|
||||
* gdb.cp/constructortest.exp: Handle the change of settings breakpoints
|
||||
always at all the ctor/dtor variants.
|
||||
|
||||
[ Removed the `gdb.cp/templates.exp' patch. ]
|
||||
[ Updated the patch for "(X location") of GDB-6.8+. ]
|
||||
|
||||
--- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc.fix Fri Jan 21 17:06:56 2005
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc Fri Jan 21 17:05:18 2005
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.cc 2011-12-19 22:05:02.825431735 +0100
|
||||
@@ -0,0 +1,99 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -127,8 +102,10 @@ Index: gdb/testsuite/ChangeLog
|
||||
+{
|
||||
+ y = 2; /* First line D */
|
||||
+}
|
||||
--- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp.fix Fri Jan 21 17:07:02 2005
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp Fri Jan 21 17:05:29 2005
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.exp 2011-12-19 23:07:24.148290893 +0100
|
||||
@@ -0,0 +1,130 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -232,7 +209,7 @@ Index: gdb/testsuite/ChangeLog
|
||||
+set define_line_dtor [gdb_get_line_number "Destructor C"]
|
||||
+# Break on the various forms of the C::~C destructor
|
||||
+# " ([23] locations)" is displayed depending on G++ version.
|
||||
+gdb_test "break C\:\:~C" "Breakpoint .*, line ($define_line_dtor|$define_line_dtor)\\..*" "breaking on C::~C"
|
||||
+gdb_test "break C\:\:~C" "Breakpoint .*: C::~C\\. \\(2 locations\\)" "breaking on C::~C"
|
||||
+gdb_continue_to_breakpoint "First line ~C"
|
||||
+
|
||||
+# Verify that we can break by line number in a destructor and find
|
||||
|
@ -1,29 +1,29 @@
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/configure.ac
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110320.orig/gdb/testsuite/configure.ac 2011-03-03 17:57:55.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/configure.ac 2011-03-20 20:21:43.000000000 +0100
|
||||
--- gdb-7.4.50.20111219.orig/gdb/testsuite/configure.ac 2011-12-19 21:07:02.178472157 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/configure.ac 2011-12-19 22:05:02.704432213 +0100
|
||||
@@ -97,6 +97,6 @@ AC_OUTPUT([Makefile \
|
||||
gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
|
||||
gdb.hp/gdb.defects/Makefile \
|
||||
gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile \
|
||||
gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
|
||||
- gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
|
||||
+ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
|
||||
gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
|
||||
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/configure
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/configure
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110320.orig/gdb/testsuite/configure 2011-03-03 17:57:55.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/configure 2011-03-20 20:21:43.000000000 +0100
|
||||
--- gdb-7.4.50.20111219.orig/gdb/testsuite/configure 2011-12-19 21:07:02.179472153 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/configure 2011-12-19 22:05:02.735432090 +0100
|
||||
@@ -3448,7 +3448,7 @@ done
|
||||
|
||||
|
||||
|
||||
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/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.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/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.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/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.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -4173,6 +4173,7 @@ do
|
||||
@@ -4174,6 +4174,7 @@ do
|
||||
"gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
|
||||
"gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
|
||||
"gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
|
||||
@ -31,10 +31,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/configure
|
||||
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
|
||||
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
|
||||
"gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;;
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.c
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/attach.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.c 2011-03-20 20:21:43.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/attach.c 2011-12-19 22:05:02.782431905 +0100
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -56,10 +56,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach2.c
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/attach2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach2.c 2011-03-20 20:21:43.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/attach2.c 2011-12-19 22:05:02.786431889 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -85,10 +85,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach2.c
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.c
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/break.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.c 2011-03-20 20:21:43.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/break.c 2011-12-19 22:05:02.787431885 +0100
|
||||
@@ -0,0 +1,146 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -236,10 +236,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break1.c
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/break1.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break1.c 2011-03-20 20:21:43.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/break1.c 2011-12-19 22:05:02.787431885 +0100
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -285,10 +285,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break1.c
|
||||
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
||||
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
||||
+#endif
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/coremaker.c
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/coremaker.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/coremaker.c 2011-03-20 20:21:43.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/coremaker.c 2011-12-19 22:05:02.787431885 +0100
|
||||
@@ -0,0 +1,142 @@
|
||||
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
||||
+ Free Software Foundation, Inc.
|
||||
@ -432,10 +432,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/coremaker.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.exp
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/attach.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.exp 2011-03-20 20:25:53.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/attach.exp 2011-12-19 22:05:02.787431885 +0100
|
||||
@@ -0,0 +1,417 @@
|
||||
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -854,11 +854,11 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.exp
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.exp
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/break.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.exp 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -0,0 +1,966 @@
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/break.exp 2011-12-19 23:11:51.092333080 +0100
|
||||
@@ -0,0 +1,962 @@
|
||||
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
+# 2000, 2002, 2003, 2004
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -1246,14 +1246,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.exp
|
||||
+# Verify that GDB responds gracefully when asked to set a breakpoint
|
||||
+# on a nonexistent source line.
|
||||
+#
|
||||
+send_gdb "break 999\n"
|
||||
+gdb_expect {
|
||||
+ -re "No line 999 in file .*$gdb_prompt $"\
|
||||
+ {pass "break on non-existent source line"}
|
||||
+ -re "$gdb_prompt $"\
|
||||
+ {fail "break on non-existent source line"}
|
||||
+ timeout {fail "(timeout) break on non-existent source line"}
|
||||
+}
|
||||
+gdb_test_no_output "set breakpoint pending off"
|
||||
+gdb_test "break 999" \
|
||||
+ "No line 999 in the current file." \
|
||||
+ "break on non-existent source line"
|
||||
+
|
||||
+# Run to the desired default location. If not positioned here, the
|
||||
+# tests below don't work.
|
||||
@ -1825,10 +1821,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.exp
|
||||
+ send_gdb "set args main\n"
|
||||
+ gdb_expect -re ".*$gdb_prompt $" {}
|
||||
+}
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/corefile.exp
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/corefile.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/corefile.exp 2011-03-20 20:21:43.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/corefile.exp 2011-12-19 22:05:02.788431881 +0100
|
||||
@@ -0,0 +1,233 @@
|
||||
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -2063,10 +2059,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/corefile.exp
|
||||
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
|
||||
+
|
||||
+gdb_test "core" "No core file now."
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/Makefile.in
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/Makefile.in
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/Makefile.in 2011-03-20 20:21:43.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.pie/Makefile.in 2011-12-19 22:05:02.788431881 +0100
|
||||
@@ -0,0 +1,19 @@
|
||||
+VPATH = @srcdir@
|
||||
+srcdir = @srcdir@
|
||||
|
@ -32,17 +32,20 @@
|
||||
(amd64_linux_hw_breakpoint, amd64_linux_remove_hw_breakpoint): Ditto.
|
||||
(amd64_linux_new_thread): Ditto.
|
||||
(_initialize_amd64_linux_nat): Register linux new thread observer.
|
||||
* testsuite/gdb.threads/watchthreads2.c: New test case.
|
||||
* testsuite/gdb.threads/watchthreads2.exp: Ditto.
|
||||
* testsuite/gdb.threads/watchthreads-threaded.c: New test case.
|
||||
* testsuite/gdb.threads/watchthreads-threaded.exp: Ditto.
|
||||
|
||||
[ With recent upstream GDB (6.8) reduced only to the testcase. ]
|
||||
|
||||
[ It was called watchthreads2.{exp,c} before but it conflicted with FSF GDB new
|
||||
testcase of the same name. ]
|
||||
|
||||
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
|
||||
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2006-07-12 01:54:29.000000000 -0300
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2011-12-19 22:05:02.867431570 +0100
|
||||
@@ -0,0 +1,66 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -110,10 +113,10 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
|
||||
+ pthread_exit(NULL);
|
||||
+}
|
||||
+
|
||||
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2006-07-12 01:54:29.000000000 -0300
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2011-12-19 22:28:33.294911982 +0100
|
||||
@@ -0,0 +1,126 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -141,7 +144,7 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+set testfile "watchthreads2"
|
||||
+set testfile "watchthreads-threaded"
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
@ -198,13 +201,13 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
|
||||
+for {set i 0} {$i < 30} {incr i} {
|
||||
+ set test_flag 0
|
||||
+ gdb_test_multiple "continue" "threaded watch loop" {
|
||||
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads2.c:$init_line.*$gdb_prompt $"
|
||||
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
|
||||
+ { set args_2 1; set test_flag 1 }
|
||||
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads2.c:$init_line.*$gdb_prompt $"
|
||||
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
|
||||
+ { set args_3 1; set test_flag 1 }
|
||||
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*in thread_function \\\(arg=0x2\\\) at .*watchthreads2.c:$inc_line.*$gdb_prompt $"
|
||||
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*in thread_function \\\(arg=0x2\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
|
||||
+ { set args_2 [expr $args_2+1]; set test_flag 1 }
|
||||
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*in thread_function \\\(arg=0x3\\\) at .*watchthreads2.c:$inc_line.*$gdb_prompt $"
|
||||
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*in thread_function \\\(arg=0x3\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
|
||||
+ { set args_3 [expr $args_3+1]; set test_flag 1 }
|
||||
+ }
|
||||
+ # If we fail above, don't bother continuing loop
|
||||
|
@ -58,13 +58,13 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
|
||||
* exec.c (exec_file_attach): Print a more useful error message if the
|
||||
user did "gdb core".
|
||||
|
||||
Index: gdb-7.2.50.20110218/gdb/exceptions.h
|
||||
Index: gdb-7.4.50.20111218/gdb/exceptions.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110218.orig/gdb/exceptions.h 2011-02-14 12:35:44.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/exceptions.h 2011-02-18 10:45:31.000000000 +0100
|
||||
@@ -85,6 +85,9 @@ enum errors {
|
||||
traceframe. */
|
||||
NOT_AVAILABLE_ERROR,
|
||||
--- gdb-7.4.50.20111218.orig/gdb/exceptions.h 2011-10-09 21:21:38.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/exceptions.h 2011-12-19 01:41:20.900509347 +0100
|
||||
@@ -88,6 +88,9 @@ enum errors {
|
||||
/* DW_OP_GNU_entry_value resolving failed. */
|
||||
NO_ENTRY_VALUE_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
@ -72,11 +72,11 @@ Index: gdb-7.2.50.20110218/gdb/exceptions.h
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
Index: gdb-7.2.50.20110218/gdb/exec.c
|
||||
Index: gdb-7.4.50.20111218/gdb/exec.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110218.orig/gdb/exec.c 2011-02-14 23:08:48.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/exec.c 2011-02-18 10:45:16.000000000 +0100
|
||||
@@ -34,6 +34,7 @@
|
||||
--- gdb-7.4.50.20111218.orig/gdb/exec.c 2011-03-23 19:23:54.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/exec.c 2011-12-19 01:41:04.863568846 +0100
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "arch-utils.h"
|
||||
#include "gdbthread.h"
|
||||
#include "progspace.h"
|
||||
@ -84,7 +84,7 @@ Index: gdb-7.2.50.20110218/gdb/exec.c
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "readline/readline.h"
|
||||
@@ -253,12 +254,27 @@ exec_file_attach (char *filename, int fr
|
||||
@@ -254,12 +255,27 @@ exec_file_attach (char *filename, int fr
|
||||
|
||||
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||
{
|
||||
@ -115,11 +115,11 @@ Index: gdb-7.2.50.20110218/gdb/exec.c
|
||||
}
|
||||
|
||||
/* FIXME - This should only be run for RS6000, but the ifdef is a poor
|
||||
Index: gdb-7.2.50.20110218/gdb/main.c
|
||||
Index: gdb-7.4.50.20111218/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110218.orig/gdb/main.c 2011-02-18 10:44:17.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/main.c 2011-02-18 10:45:16.000000000 +0100
|
||||
@@ -243,6 +243,36 @@ captured_command_loop (void *data)
|
||||
--- gdb-7.4.50.20111218.orig/gdb/main.c 2011-12-19 00:28:01.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/main.c 2011-12-19 01:41:04.863568846 +0100
|
||||
@@ -248,6 +248,36 @@ captured_command_loop (void *data)
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ Index: gdb-7.2.50.20110218/gdb/main.c
|
||||
static int
|
||||
captured_main (void *data)
|
||||
{
|
||||
@@ -727,6 +757,8 @@ captured_main (void *data)
|
||||
@@ -704,6 +734,8 @@ captured_main (void *data)
|
||||
{
|
||||
symarg = argv[optind];
|
||||
execarg = argv[optind];
|
||||
@ -165,7 +165,7 @@ Index: gdb-7.2.50.20110218/gdb/main.c
|
||||
optind++;
|
||||
}
|
||||
|
||||
@@ -868,11 +900,25 @@ captured_main (void *data)
|
||||
@@ -845,11 +877,25 @@ captured_main (void *data)
|
||||
&& symarg != NULL
|
||||
&& strcmp (execarg, symarg) == 0)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.3.50.20110722/gdb/event-top.c
|
||||
Index: gdb-7.4.50.20111218/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/event-top.c 2011-07-21 13:03:45.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/event-top.c 2011-07-22 19:28:49.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/event-top.c 2011-09-21 17:21:28.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/event-top.c 2011-12-19 01:18:56.087539251 +0100
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "observer.h"
|
||||
#include "continuations.h"
|
||||
@ -10,16 +10,16 @@ Index: gdb-7.3.50.20110722/gdb/event-top.c
|
||||
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -193,6 +194,8 @@ cli_command_loop (void)
|
||||
char *a_prompt;
|
||||
char *gdb_prompt = get_prompt ();
|
||||
|
||||
+ debug_flush_missing ();
|
||||
@@ -176,6 +177,8 @@ rl_callback_read_char_wrapper (gdb_clien
|
||||
void
|
||||
cli_command_loop (void)
|
||||
{
|
||||
+ debug_flush_missing ();
|
||||
+
|
||||
/* Tell readline what the prompt to display is and what function
|
||||
it will need to call after a whole line is read. This also
|
||||
displays the first prompt. */
|
||||
@@ -264,6 +267,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
display_gdb_prompt (0);
|
||||
|
||||
/* Now it's time to start the event loop. */
|
||||
@@ -241,6 +244,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.3.50.20110722/gdb/event-top.c
|
||||
/* Each interpreter has its own rules on displaying the command
|
||||
prompt. */
|
||||
if (!current_interp_display_prompt_p ())
|
||||
Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
Index: gdb-7.4.50.20111218/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/elfread.c 2011-07-22 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/elfread.c 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -49,6 +49,7 @@
|
||||
--- gdb-7.4.50.20111218.orig/gdb/elfread.c 2011-12-19 00:54:09.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/elfread.c 2011-12-19 01:16:15.248455897 +0100
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "gdbcore.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "observer.h"
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
@@ -1652,8 +1653,361 @@ build_id_to_filename (struct build_id *b
|
||||
@@ -1622,8 +1623,361 @@ build_id_to_filename (struct build_id *b
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -1707,11 +2061,17 @@ missing_filepair_change (void)
|
||||
@@ -1677,11 +2031,17 @@ missing_filepair_change (void)
|
||||
/* All their memory came just from missing_filepair_OBSTACK. */
|
||||
missing_filepair_hash = NULL;
|
||||
}
|
||||
@ -421,7 +421,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -1778,14 +2138,35 @@ debug_print_missing (const char *binary,
|
||||
@@ -1748,14 +2108,35 @@ debug_print_missing (const char *binary,
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
@ -464,11 +464,11 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
}
|
||||
|
||||
static char *
|
||||
Index: gdb-7.3.50.20110722/gdb/symfile.h
|
||||
Index: gdb-7.4.50.20111218/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/symfile.h 2011-07-22 19:27:06.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/symfile.h 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -615,6 +615,8 @@ extern struct build_id *build_id_addr_ge
|
||||
--- gdb-7.4.50.20111218.orig/gdb/symfile.h 2011-12-19 00:54:09.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/symfile.h 2011-12-19 01:16:15.249455893 +0100
|
||||
@@ -568,6 +568,8 @@ extern struct build_id *build_id_addr_ge
|
||||
extern char *build_id_to_filename (struct build_id *build_id,
|
||||
char **link_return, int add_debug_suffix);
|
||||
extern void debug_print_missing (const char *binary, const char *debug);
|
||||
@ -477,11 +477,11 @@ Index: gdb-7.3.50.20110722/gdb/symfile.h
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/lib/gdb.exp 2011-07-22 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -1390,7 +1390,7 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/lib/gdb.exp 2011-12-19 00:54:09.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/lib/gdb.exp 2011-12-19 01:16:15.250455889 +0100
|
||||
@@ -1387,7 +1387,7 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -490,23 +490,23 @@ Index: gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp
|
||||
send_gdb "set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re "$gdb_prompt $" {
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/lib/mi-support.exp 2011-07-22 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -222,7 +222,7 @@ proc default_mi_gdb_start { args } {
|
||||
}
|
||||
}
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/lib/mi-support.exp 2011-12-19 00:54:49.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/lib/mi-support.exp 2011-12-19 01:20:34.921163977 +0100
|
||||
@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
- # Turn off the missing warnings as the testsuite does not expect it.
|
||||
+ # Turn off the missing RPMs warnings as the testsuite does not expect it.
|
||||
send_gdb "190-gdb-set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
|
||||
Index: gdb-7.3.50.20110722/gdb/tui/tui-interp.c
|
||||
Index: gdb-7.4.50.20111218/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/tui/tui-interp.c 2011-01-01 16:33:52.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/tui/tui-interp.c 2011-07-22 19:28:34.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/tui/tui-interp.c 2011-09-12 23:24:51.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/tui/tui-interp.c 2011-12-19 01:16:15.252455883 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
@ -515,19 +515,10 @@ Index: gdb-7.3.50.20110722/gdb/tui/tui-interp.c
|
||||
|
||||
/* Set to 1 when the TUI mode must be activated when we first start
|
||||
gdb. */
|
||||
@@ -147,6 +148,8 @@ tui_command_loop (void *data)
|
||||
char *a_prompt;
|
||||
char *gdb_prompt = get_prompt ();
|
||||
|
||||
+ debug_flush_missing ();
|
||||
+
|
||||
/* Tell readline what the prompt to display is and what function
|
||||
it will need to call after a whole line is read. This also
|
||||
displays the first prompt. */
|
||||
Index: gdb-7.3.50.20110722/gdb/aclocal.m4
|
||||
Index: gdb-7.4.50.20111218/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/aclocal.m4 2011-02-15 22:05:53.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/aclocal.m4 2011-07-22 19:28:34.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/aclocal.m4 2011-02-15 22:05:53.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/aclocal.m4 2011-12-19 01:16:15.252455883 +0100
|
||||
@@ -19,6 +19,162 @@ You have another version of autoconf. I
|
||||
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'.])])
|
||||
@ -691,10 +682,10 @@ Index: gdb-7.3.50.20110722/gdb/aclocal.m4
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
Index: gdb-7.3.50.20110722/gdb/config.in
|
||||
Index: gdb-7.4.50.20111218/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/config.in 2011-05-12 01:38:38.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/config.in 2011-07-22 19:28:34.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/config.in 2011-11-20 09:59:56.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/config.in 2011-12-19 01:16:15.253455879 +0100
|
||||
@@ -46,6 +46,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
@ -715,11 +706,11 @@ Index: gdb-7.3.50.20110722/gdb/config.in
|
||||
/* Define if libunwind library is being used. */
|
||||
#undef HAVE_LIBUNWIND
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/configure
|
||||
Index: gdb-7.4.50.20111218/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/configure 2011-05-12 01:38:38.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/configure 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -682,6 +682,9 @@ REPORT_BUGS_TO
|
||||
--- gdb-7.4.50.20111218.orig/gdb/configure 2011-11-20 09:59:56.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/configure 2011-12-19 01:16:15.256455867 +0100
|
||||
@@ -684,6 +684,9 @@ REPORT_BUGS_TO
|
||||
PKGVERSION
|
||||
TARGET_OBS
|
||||
subdirs
|
||||
@ -729,7 +720,7 @@ Index: gdb-7.3.50.20110722/gdb/configure
|
||||
GDB_DATADIR
|
||||
DEBUGDIR
|
||||
am__fastdepCC_FALSE
|
||||
@@ -948,6 +951,7 @@ enable_dependency_tracking
|
||||
@@ -952,6 +955,7 @@ enable_dependency_tracking
|
||||
with_separate_debug_dir
|
||||
with_gdb_datadir
|
||||
with_relocated_sources
|
||||
@ -737,7 +728,7 @@ Index: gdb-7.3.50.20110722/gdb/configure
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbcli
|
||||
@@ -990,6 +994,9 @@ LDFLAGS
|
||||
@@ -995,6 +999,9 @@ LDFLAGS
|
||||
LIBS
|
||||
CPPFLAGS
|
||||
CPP
|
||||
@ -747,7 +738,7 @@ Index: gdb-7.3.50.20110722/gdb/configure
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1653,6 +1660,8 @@ Optional Packages:
|
||||
@@ -1658,6 +1665,8 @@ Optional Packages:
|
||||
[DATADIR/gdb]
|
||||
--with-relocated-sources=PATH
|
||||
automatically relocate this path for source files
|
||||
@ -756,7 +747,7 @@ Index: gdb-7.3.50.20110722/gdb/configure
|
||||
--with-libunwind use libunwind frame unwinding support
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1689,6 +1698,9 @@ Some influential environment variables:
|
||||
@@ -1696,6 +1705,9 @@ Some influential environment variables:
|
||||
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
|
||||
you have headers in a nonstandard directory <include dir>
|
||||
CPP C preprocessor
|
||||
@ -766,7 +757,7 @@ Index: gdb-7.3.50.20110722/gdb/configure
|
||||
YACC The `Yet Another C Compiler' implementation to use. Defaults to
|
||||
the first program found out of: `bison -y', `byacc', `yacc'.
|
||||
YFLAGS The list of arguments that will be passed by default to $YACC.
|
||||
@@ -7886,6 +7898,486 @@ _ACEOF
|
||||
@@ -7968,6 +7980,486 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
@ -1253,11 +1244,11 @@ Index: gdb-7.3.50.20110722/gdb/configure
|
||||
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
Index: gdb-7.3.50.20110722/gdb/configure.ac
|
||||
Index: gdb-7.4.50.20111218/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/configure.ac 2011-05-12 01:38:38.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/configure.ac 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -108,6 +108,199 @@ AS_HELP_STRING([--with-relocated-sources
|
||||
--- gdb-7.4.50.20111218.orig/gdb/configure.ac 2011-11-20 09:59:56.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/configure.ac 2011-12-19 01:16:15.257455863 +0100
|
||||
@@ -140,6 +140,199 @@ AS_HELP_STRING([--with-relocated-sources
|
||||
[Relocated directory for source files. ])
|
||||
])
|
||||
|
||||
@ -1457,10 +1448,10 @@ Index: gdb-7.3.50.20110722/gdb/configure.ac
|
||||
AC_CONFIG_SUBDIRS(testsuite)
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
Index: gdb-7.3.50.20110722/gdb/acinclude.m4
|
||||
Index: gdb-7.4.50.20111218/gdb/acinclude.m4
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/acinclude.m4 2011-07-22 19:28:34.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/acinclude.m4 2011-12-19 01:16:15.257455863 +0100
|
||||
@@ -1,3 +1,5 @@
|
||||
+# serial 1
|
||||
+
|
||||
@ -1476,10 +1467,10 @@ Index: gdb-7.3.50.20110722/gdb/acinclude.m4
|
||||
# @defmac AC_PROG_CC_STDC
|
||||
# @maindex PROG_CC_STDC
|
||||
# @ovindex CC
|
||||
Index: gdb-7.3.50.20110722/gdb/corelow.c
|
||||
Index: gdb-7.4.50.20111218/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/corelow.c 2011-07-22 19:27:26.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/corelow.c 2011-07-22 19:28:34.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/corelow.c 2011-12-19 00:54:09.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/corelow.c 2011-12-19 01:16:15.258455859 +0100
|
||||
@@ -321,7 +321,7 @@ build_id_locate_exec (int from_tty)
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.3.50.20110722/gdb/corelow.c
|
||||
Index: gdb-7.4.50.20120103/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/corelow.c 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/corelow.c 2011-07-22 20:13:00.000000000 +0200
|
||||
--- gdb-7.4.50.20120103.orig/gdb/corelow.c 2011-04-17 21:12:20.000000000 +0200
|
||||
+++ gdb-7.4.50.20120103/gdb/corelow.c 2012-01-03 15:20:54.905851456 +0100
|
||||
@@ -48,6 +48,9 @@
|
||||
#include "progspace.h"
|
||||
#include "objfiles.h"
|
||||
@ -12,7 +12,7 @@ Index: gdb-7.3.50.20110722/gdb/corelow.c
|
||||
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
@@ -279,6 +282,52 @@ add_to_thread_list (bfd *abfd, asection
|
||||
@@ -279,6 +282,52 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@ -90,11 +90,11 @@ Index: gdb-7.3.50.20110722/gdb/corelow.c
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-7.3.50.20110722/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.4.50.20120103/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/doc/gdb.texinfo 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/doc/gdb.texinfo 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -15402,6 +15402,27 @@ information files.
|
||||
--- gdb-7.4.50.20120103.orig/gdb/doc/gdb.texinfo 2012-01-03 05:53:41.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/doc/gdb.texinfo 2012-01-03 15:20:54.910851436 +0100
|
||||
@@ -15971,6 +15971,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -122,71 +122,74 @@ Index: gdb-7.3.50.20110722/gdb/doc/gdb.texinfo
|
||||
@cindex @code{.gnu_debuglink} sections
|
||||
@cindex debug link sections
|
||||
A debug link is a special section of the executable file named
|
||||
Index: gdb-7.3.50.20110722/gdb/solib-svr4.c
|
||||
Index: gdb-7.4.50.20120103/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/solib-svr4.c 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/solib-svr4.c 2011-07-22 20:16:10.000000000 +0200
|
||||
@@ -1201,9 +1201,49 @@ svr4_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
{
|
||||
- strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- strcpy (new->so_original_name, new->so_name);
|
||||
+ struct build_id *build_id;
|
||||
+
|
||||
+ strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ /* May get overwritten below. */
|
||||
+ strcpy (new->so_name, new->so_original_name);
|
||||
+
|
||||
+ build_id = build_id_addr_get (lm_dynamic_from_link_map (new));
|
||||
+ if (build_id != NULL)
|
||||
+ {
|
||||
+ char *name, *build_id_filename;
|
||||
+
|
||||
+ /* Missing the build-id matching separate debug info file
|
||||
+ would be handled while SO_NAME gets loaded. */
|
||||
+ name = build_id_to_filename (build_id, &build_id_filename, 0);
|
||||
+ if (name != NULL)
|
||||
+ {
|
||||
+ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ xfree (name);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ debug_print_missing (new->so_name, build_id_filename);
|
||||
+
|
||||
+ /* In the case the main executable was found according to
|
||||
+ its build-id (from a core file) prevent loading
|
||||
+ a different build of a library with accidentally the
|
||||
+ same SO_NAME.
|
||||
+
|
||||
+ It suppresses bogus backtraces (and prints "??" there
|
||||
+ instead) if the on-disk files no longer match the
|
||||
+ running program version. */
|
||||
+
|
||||
+ if (symfile_objfile != NULL
|
||||
+ && (symfile_objfile->flags
|
||||
+ & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
||||
+ new->so_name[0] = 0;
|
||||
+ }
|
||||
+
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ }
|
||||
}
|
||||
xfree (buffer);
|
||||
--- gdb-7.4.50.20120103.orig/gdb/solib-svr4.c 2011-12-03 19:32:29.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/solib-svr4.c 2012-01-03 15:20:54.911851432 +0100
|
||||
@@ -1228,9 +1228,52 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
continue;
|
||||
}
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
- strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- strcpy (new->so_original_name, new->so_name);
|
||||
+ {
|
||||
+ struct build_id *build_id;
|
||||
+
|
||||
+ strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ /* May get overwritten below. */
|
||||
+ strcpy (new->so_name, new->so_original_name);
|
||||
+
|
||||
+ build_id = build_id_addr_get (new->lm_info->l_ld);
|
||||
+ if (build_id != NULL)
|
||||
+ {
|
||||
+ char *name, *build_id_filename;
|
||||
+
|
||||
+ /* Missing the build-id matching separate debug info file
|
||||
+ would be handled while SO_NAME gets loaded. */
|
||||
+ name = build_id_to_filename (build_id, &build_id_filename, 0);
|
||||
+ if (name != NULL)
|
||||
+ {
|
||||
+ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ xfree (name);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ debug_print_missing (new->so_name, build_id_filename);
|
||||
+
|
||||
+ /* In the case the main executable was found according to
|
||||
+ its build-id (from a core file) prevent loading
|
||||
+ a different build of a library with accidentally the
|
||||
+ same SO_NAME.
|
||||
+
|
||||
+ It suppresses bogus backtraces (and prints "??" there
|
||||
+ instead) if the on-disk files no longer match the
|
||||
+ running program version. */
|
||||
+
|
||||
+ if (symfile_objfile != NULL
|
||||
+ && (symfile_objfile->flags
|
||||
+ & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
||||
+ new->so_name[0] = 0;
|
||||
+ }
|
||||
+
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
xfree (buffer);
|
||||
|
||||
/* If this entry has no name, or its name matches the name
|
||||
Index: gdb-7.4.50.20120103/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/elfread.c 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/elfread.c 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -45,6 +45,11 @@
|
||||
#include "infcall.h"
|
||||
--- gdb-7.4.50.20120103.orig/gdb/elfread.c 2012-01-03 05:52:15.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/elfread.c 2012-01-03 15:21:09.933796168 +0100
|
||||
@@ -46,6 +46,11 @@
|
||||
#include "gdbthread.h"
|
||||
#include "regcache.h"
|
||||
#include "bcache.h"
|
||||
+#include "libbfd.h"
|
||||
+#include "gdbcore.h"
|
||||
+#include "gdbcmd.h"
|
||||
@ -195,7 +198,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
|
||||
@@ -1074,16 +1079,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
|
||||
@@ -1078,16 +1083,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
|
||||
update_breakpoint_locations (b, sals, sals_end);
|
||||
}
|
||||
|
||||
@ -263,7 +266,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
{
|
||||
struct build_id *retval;
|
||||
|
||||
@@ -1099,6 +1153,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
@@ -1103,6 +1157,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -612,7 +615,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
|
||||
|
||||
static int
|
||||
@@ -1113,7 +1509,7 @@ build_id_verify (const char *filename, s
|
||||
@@ -1117,7 +1513,7 @@ build_id_verify (const char *filename, s
|
||||
if (abfd == NULL)
|
||||
return 0;
|
||||
|
||||
@ -621,7 +624,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
|
||||
if (found == NULL)
|
||||
warning (_("File \"%s\" has no build-id, file skipped"), filename);
|
||||
@@ -1131,14 +1527,15 @@ build_id_verify (const char *filename, s
|
||||
@@ -1135,14 +1531,15 @@ build_id_verify (const char *filename, s
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -641,7 +644,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
|
||||
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
|
||||
cause "/.build-id/..." lookups. */
|
||||
@@ -1149,6 +1546,8 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1153,6 +1550,8 @@ build_id_to_debug_filename (struct build
|
||||
char *s, *debugdir_end;
|
||||
gdb_byte *data = build_id->data;
|
||||
size_t size = build_id->size;
|
||||
@ -650,7 +653,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
|
||||
while (*debugdir == DIRNAME_SEPARATOR)
|
||||
debugdir++;
|
||||
@@ -1169,39 +1568,242 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1173,39 +1572,242 @@ build_id_to_debug_filename (struct build
|
||||
*s++ = '/';
|
||||
while (size-- > 0)
|
||||
s += sprintf (s, "%02x", (unsigned) *data++);
|
||||
@ -905,7 +908,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
xfree (build_id);
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (build_id_name != NULL
|
||||
@@ -1212,7 +1814,7 @@ find_separate_debug_file_by_buildid (str
|
||||
@@ -1216,7 +1818,7 @@ find_separate_debug_file_by_buildid (str
|
||||
xfree (build_id_name);
|
||||
}
|
||||
else if (build_id_name != NULL)
|
||||
@ -914,7 +917,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1432,9 +2034,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1436,9 +2038,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
`.note.gnu.build-id'. */
|
||||
else if (!objfile_has_partial_symbols (objfile))
|
||||
{
|
||||
@ -927,7 +930,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
@@ -1446,6 +2049,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1450,6 +2053,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
symbol_file_add_separate (abfd, symfile_flags, objfile);
|
||||
xfree (debugfile);
|
||||
}
|
||||
@ -940,7 +943,7 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1925,4 +2534,16 @@ _initialize_elfread (void)
|
||||
@@ -1933,4 +2542,16 @@ _initialize_elfread (void)
|
||||
|
||||
elf_objfile_gnu_ifunc_cache_data = register_objfile_data ();
|
||||
gnu_ifunc_fns_p = &elf_gnu_ifunc_fns;
|
||||
@ -957,11 +960,11 @@ Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
}
|
||||
Index: gdb-7.3.50.20110722/gdb/symfile.h
|
||||
Index: gdb-7.4.50.20120103/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/symfile.h 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/symfile.h 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -609,6 +609,13 @@ void free_symfile_segment_data (struct s
|
||||
--- gdb-7.4.50.20120103.orig/gdb/symfile.h 2012-01-03 05:52:15.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/symfile.h 2012-01-03 15:20:54.914851422 +0100
|
||||
@@ -616,6 +616,13 @@ void free_symfile_segment_data (struct s
|
||||
|
||||
extern struct cleanup *increment_reading_symtab (void);
|
||||
|
||||
@ -975,11 +978,11 @@ Index: gdb-7.3.50.20110722/gdb/symfile.h
|
||||
/* From dwarf2read.c */
|
||||
|
||||
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.4.50.20120103/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/lib/gdb.exp 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -1390,6 +1390,16 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.4.50.20120103.orig/gdb/testsuite/lib/gdb.exp 2012-01-03 05:52:15.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/testsuite/lib/gdb.exp 2012-01-03 15:20:54.914851422 +0100
|
||||
@@ -1387,6 +1387,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -996,13 +999,13 @@ Index: gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp
|
||||
return 0;
|
||||
}
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.4.50.20120103/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/lib/mi-support.exp 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -222,6 +222,16 @@ proc default_mi_gdb_start { args } {
|
||||
}
|
||||
}
|
||||
--- gdb-7.4.50.20120103.orig/gdb/testsuite/lib/mi-support.exp 2011-12-03 21:20:29.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/testsuite/lib/mi-support.exp 2012-01-03 15:20:54.915851419 +0100
|
||||
@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
+ # Turn off the missing warnings as the testsuite does not expect it.
|
||||
+ send_gdb "190-gdb-set build-id-verbose 0\n"
|
||||
@ -1014,16 +1017,16 @@ Index: gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp
|
||||
+ warning "Could not disable the missing debug infos warnings.."
|
||||
+ }
|
||||
+ }
|
||||
|
||||
detect_async
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/objfiles.h
|
||||
# If allowing the inferior to have its own PTY then assign the inferior
|
||||
# its own terminal device here.
|
||||
if { $separate_inferior_pty } {
|
||||
Index: gdb-7.4.50.20120103/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/objfiles.h 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/objfiles.h 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -434,6 +434,10 @@ struct objfile
|
||||
--- gdb-7.4.50.20120103.orig/gdb/objfiles.h 2011-12-08 19:08:12.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/objfiles.h 2012-01-03 15:20:54.915851419 +0100
|
||||
@@ -435,6 +435,10 @@ struct objfile
|
||||
|
||||
#define OBJF_PSYMTABS_READ (1 << 4)
|
||||
#define OBJF_MAINLINE (1 << 5)
|
||||
|
||||
+/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */
|
||||
+
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/inferior.h
|
||||
Index: gdb-7.4.50.20111218/gdb/inferior.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/inferior.h 2011-07-22 01:46:08.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/inferior.h 2011-07-22 19:13:30.000000000 +0200
|
||||
@@ -158,7 +158,15 @@ extern void reopen_exec_file (void);
|
||||
--- gdb-7.4.50.20111218.orig/gdb/inferior.h 2011-10-07 14:06:46.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/inferior.h 2011-12-18 23:40:59.257300451 +0100
|
||||
@@ -162,7 +162,15 @@ extern void reopen_exec_file (void);
|
||||
/* The `resume' routine should only be called in special circumstances.
|
||||
Normally, use `proceed', which handles a lot of bookkeeping. */
|
||||
|
||||
@ -42,10 +42,10 @@ Index: gdb-7.3.50.20110722/gdb/inferior.h
|
||||
|
||||
extern ptid_t user_visible_resume_ptid (int step);
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
Index: gdb-7.4.50.20111218/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/infrun.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/infrun.c 2011-07-22 19:12:56.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/infrun.c 2011-11-22 22:25:17.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/infrun.c 2011-12-19 00:12:34.470854218 +0100
|
||||
@@ -79,7 +79,7 @@ static int follow_fork (void);
|
||||
static void set_schedlock_func (char *args, int from_tty,
|
||||
struct cmd_list_element *c);
|
||||
@ -55,7 +55,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
|
||||
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
|
||||
void *data);
|
||||
@@ -1630,7 +1630,8 @@ user_visible_resume_ptid (int step)
|
||||
@@ -1668,7 +1668,8 @@ user_visible_resume_ptid (int step)
|
||||
}
|
||||
else if ((scheduler_mode == schedlock_on)
|
||||
|| (scheduler_mode == schedlock_step
|
||||
@ -65,7 +65,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
{
|
||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||
resume_ptid = inferior_ptid;
|
||||
@@ -1648,7 +1649,7 @@ user_visible_resume_ptid (int step)
|
||||
@@ -1686,7 +1687,7 @@ user_visible_resume_ptid (int step)
|
||||
STEP nonzero if we should step (zero to continue instead).
|
||||
SIG is the signal to give the inferior (zero for none). */
|
||||
void
|
||||
@ -74,7 +74,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
{
|
||||
int should_resume = 1;
|
||||
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
|
||||
@@ -1681,9 +1682,13 @@ resume (int step, enum target_signal sig
|
||||
@@ -1719,9 +1720,13 @@ resume (int step, enum target_signal sig
|
||||
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -90,7 +90,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
target_pid_to_str (inferior_ptid),
|
||||
paddress (gdbarch, pc));
|
||||
|
||||
@@ -2056,7 +2061,7 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
@@ -2094,7 +2099,7 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
struct thread_info *tp;
|
||||
CORE_ADDR pc;
|
||||
struct address_space *aspace;
|
||||
@ -99,7 +99,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
|
||||
/* If we're stopped at a fork/vfork, follow the branch set by the
|
||||
"set follow-fork-mode" command; otherwise, we'll just proceed
|
||||
@@ -2096,13 +2101,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
@@ -2134,13 +2139,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
actually be executing the breakpoint insn anyway.
|
||||
We'll be (un-)executing the previous instruction. */
|
||||
|
||||
@ -115,7 +115,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2133,13 +2138,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
@@ -2171,13 +2176,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
is required it returns TRUE and sets the current thread to
|
||||
the old thread. */
|
||||
if (prepare_to_proceed (step))
|
||||
@ -131,7 +131,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
{
|
||||
tp->control.trap_expected = 1;
|
||||
/* If displaced stepping is enabled, we can step over the
|
||||
@@ -2226,8 +2231,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
@@ -2264,8 +2269,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
/* Reset to normal state. */
|
||||
init_infwait_state ();
|
||||
|
||||
@ -146,7 +146,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
|
||||
/* Wait for it to stop (if not standalone)
|
||||
and in any case decode why it stopped, and act accordingly. */
|
||||
@@ -5123,14 +5133,19 @@ process_event_stop_test:
|
||||
@@ -5223,13 +5233,18 @@ process_event_stop_test:
|
||||
|
||||
/* Is thread TP in the middle of single-stepping? */
|
||||
|
||||
@ -157,12 +157,10 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
- return ((tp->control.step_range_end
|
||||
- && tp->control.step_resume_breakpoint == NULL)
|
||||
- || tp->control.trap_expected
|
||||
- || tp->stepping_through_solib_after_catch
|
||||
- || bpstat_should_step ());
|
||||
+ if ((tp->control.step_range_end
|
||||
+ && tp->control.step_resume_breakpoint == NULL)
|
||||
+ || tp->control.trap_expected
|
||||
+ || tp->stepping_through_solib_after_catch)
|
||||
+ || tp->control.trap_expected)
|
||||
+ return RESUME_STEP_USER;
|
||||
+
|
||||
+ if (bpstat_should_step ())
|
||||
@ -172,27 +170,28 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
}
|
||||
|
||||
/* Returns true if any thread *but* the one passed in "data" is in the
|
||||
Index: gdb-7.3.50.20110722/gdb/linux-nat.c
|
||||
Index: gdb-7.4.50.20111218/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/linux-nat.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/linux-nat.c 2011-07-22 19:10:24.000000000 +0200
|
||||
@@ -2986,7 +2986,10 @@ count_events_callback (struct lwp_info *
|
||||
static int
|
||||
--- gdb-7.4.50.20111218.orig/gdb/linux-nat.c 2011-12-18 23:35:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/linux-nat.c 2011-12-19 00:08:41.824855353 +0100
|
||||
@@ -3036,7 +3036,11 @@ static int
|
||||
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
|
||||
{
|
||||
- if (lp->step && lp->status != 0)
|
||||
+ /* We do not focus on software watchpoints as we would not catch
|
||||
+ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
|
||||
+ as they would remain pending due to `Push back breakpoint for %s'. */
|
||||
+ if (lp->step == RESUME_STEP_USER && lp->status != 0)
|
||||
if (lp->last_resume_kind == resume_step
|
||||
- && lp->status != 0)
|
||||
+ && lp->status != 0
|
||||
+ /* We do not focus on software watchpoints as we would not catch
|
||||
+ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
|
||||
+ as they would remain pending due to `Push back breakpoint for %s'. */
|
||||
+ && lp->step == RESUME_STEP_USER)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
Index: gdb-7.3.50.20110722/gdb/linux-nat.h
|
||||
Index: gdb-7.4.50.20111218/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/linux-nat.h 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/linux-nat.h 2011-07-22 19:10:24.000000000 +0200
|
||||
@@ -55,8 +55,8 @@ struct lwp_info
|
||||
--- gdb-7.4.50.20111218.orig/gdb/linux-nat.h 2011-12-18 23:35:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/linux-nat.h 2011-12-18 23:40:59.262300431 +0100
|
||||
@@ -74,8 +74,8 @@ struct lwp_info
|
||||
/* If non-zero, a pending wait status. */
|
||||
int status;
|
||||
|
||||
|
@ -1,60 +0,0 @@
|
||||
Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 07:58:15.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 07:59:06.000000000 +0100
|
||||
@@ -1863,16 +1863,18 @@ resume_set_callback (struct lwp_info *lp
|
||||
|
||||
static void
|
||||
linux_nat_resume (struct target_ops *ops,
|
||||
- ptid_t ptid, int step, enum target_signal signo)
|
||||
+ ptid_t ptid, int step_int, enum target_signal signo)
|
||||
{
|
||||
sigset_t prev_mask;
|
||||
struct lwp_info *lp;
|
||||
int resume_many;
|
||||
+ enum resume_step step = step_int;
|
||||
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
|
||||
- step ? "step" : "resume",
|
||||
+ (step == RESUME_STEP_NEEDED
|
||||
+ ? "needed" : (step ? "step" : "resume")),
|
||||
target_pid_to_str (ptid),
|
||||
(signo != TARGET_SIGNAL_0
|
||||
? strsignal (target_signal_to_host (signo)) : "0"),
|
||||
@@ -3171,10 +3173,34 @@ linux_nat_filter_event (int lwpid, int s
|
||||
|
||||
if (num_lwps (GET_PID (lp->ptid)) > 1)
|
||||
{
|
||||
+ enum resume_step step = lp->step;
|
||||
+ pid_t pid = GET_PID (lp->ptid);
|
||||
+
|
||||
/* If there is at least one more LWP, then the exit signal
|
||||
was not the end of the debugged application and should be
|
||||
ignored. */
|
||||
exit_lwp (lp);
|
||||
+
|
||||
+ if (step == RESUME_STEP_USER)
|
||||
+ {
|
||||
+ /* Now stop the closest LWP's ... */
|
||||
+ lp = find_lwp_pid (pid_to_ptid (pid));
|
||||
+ if (!lp)
|
||||
+ lp = lwp_list;
|
||||
+ gdb_assert (lp != NULL);
|
||||
+ errno = 0;
|
||||
+ ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
|
||||
+ (void *) (unsigned long) SIGSTOP);
|
||||
+ if (debug_linux_nat)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "PTRACE_CONT %s, 0, 0 (%s)\n",
|
||||
+ target_pid_to_str (lp->ptid),
|
||||
+ errno ? safe_strerror (errno)
|
||||
+ : "OK");
|
||||
+ /* Avoid the silent `delayed SIGSTOP' handling. */
|
||||
+ lp->signalled = 0;
|
||||
+ }
|
||||
+
|
||||
return NULL;
|
||||
}
|
||||
}
|
@ -1,42 +1,26 @@
|
||||
--- ./gdb/testsuite/gdb.base/annota1.exp 10 Jan 2007 03:23:04 -0000 1.23
|
||||
+++ ./gdb/testsuite/gdb.base/annota1.exp 10 May 2007 12:54:11 -0000
|
||||
@@ -57,6 +57,8 @@ if [target_info exists gdb_stub] {
|
||||
gdb_step_for_stub;
|
||||
}
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.base/annota1.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20111219.orig/gdb/testsuite/gdb.base/annota1.exp 2011-12-13 18:22:08.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.base/annota1.exp 2011-12-20 00:01:36.518847033 +0100
|
||||
@@ -50,6 +50,8 @@ gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
+gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions"
|
||||
+
|
||||
#
|
||||
# the line at which break main will put the breakpoint
|
||||
#
|
||||
--- ./gdb/testsuite/gdb.base/annota3.exp 9 Jan 2007 17:59:09 -0000 1.12
|
||||
+++ ./gdb/testsuite/gdb.base/annota3.exp 10 May 2007 12:54:11 -0000
|
||||
@@ -56,6 +56,8 @@ if [target_info exists gdb_stub] {
|
||||
gdb_step_for_stub;
|
||||
}
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.base/annota3.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20111219.orig/gdb/testsuite/gdb.base/annota3.exp 2011-12-13 18:22:08.000000000 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.base/annota3.exp 2011-12-20 00:01:36.518847033 +0100
|
||||
@@ -50,6 +50,8 @@ gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
+gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions"
|
||||
+
|
||||
#
|
||||
# the line at which break main will put the breakpoint
|
||||
#
|
||||
--- gdb-6.6/gdb/testsuite/gdb.threads/step-thread-exit.exp-orig 2007-05-10 15:03:15.000000000 +0200
|
||||
+++ gdb-6.6/gdb/testsuite/gdb.threads/step-thread-exit.exp 2007-05-10 15:04:24.000000000 +0200
|
||||
@@ -58,6 +58,9 @@ gdb_test "continue" "Break.*thread_funct
|
||||
# thread to be stopped and a message printed to tell us we have stepped
|
||||
# over the thread exit.
|
||||
set test "step over thread exit 1"
|
||||
+# ppc64 is currently failing:
|
||||
+set timeout_old $timeout
|
||||
+set timeout 60
|
||||
gdb_test_multiple "next" "$test" {
|
||||
-re "\}.*$gdb_prompt $" {
|
||||
send_gdb "next\n"
|
||||
@@ -71,6 +74,7 @@ gdb_test_multiple "next" "$test" {
|
||||
exp_continue
|
||||
}
|
||||
}
|
||||
+set timeout $timeout_old
|
||||
|
||||
# Without this fixup we could end up in:
|
||||
# #0 0x00110416 in __kernel_vsyscall ()
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.threads/staticthreads.exp
|
||||
Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/staticthreads.exp
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2010-06-02 23:53:28.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.threads/staticthreads.exp 2010-07-12 11:43:26.000000000 +0200
|
||||
@@ -44,6 +44,18 @@ gdb_test_no_output "set print sevenbit-s
|
||||
--- gdb-7.4.50.20111219.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2011-12-19 21:07:01.436475201 +0100
|
||||
+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/staticthreads.exp 2011-12-19 22:08:55.444514127 +0100
|
||||
@@ -45,6 +45,13 @@ gdb_test_no_output "set print sevenbit-s
|
||||
# See if the static multi-threaded program runs.
|
||||
|
||||
runto_main
|
||||
@ -11,12 +11,7 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.threads/staticthreads.exp
|
||||
+# * 2 Thread 135661664 (LWP 3856) main () at threadloop.c:41
|
||||
+# 1 process 3856 main () at threadloop.c:41
|
||||
+
|
||||
+set test "info threads on start"
|
||||
+gdb_test_multiple "info threads" "$test" {
|
||||
+ -re "^info threads\r?\n\[^\r\n\]* Thread \[^\r\n\]*\r?\n$gdb_prompt" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "info threads" "^info threads\r\n\[ \t\]*Id\[ \t\]+Target Id\[ \t\]+Frame\[ \t\]*\r\n\[^\r\n\]* Thread \[^\r\n\]*" "info threads on start"
|
||||
+
|
||||
gdb_test "break sem_post"
|
||||
set test "Continue to main's call of sem_post"
|
||||
|
@ -20,10 +20,10 @@ random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore
|
||||
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
|
||||
frames-invalid can happen asynchronously.
|
||||
|
||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.c
|
||||
Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.base/fileio.c 2009-10-01 17:39:13.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.c 2010-07-12 11:41:43.000000000 +0200
|
||||
--- gdb-7.4.50.20120103.orig/gdb/testsuite/gdb.base/fileio.c 2009-10-01 17:39:13.000000000 +0200
|
||||
+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c 2012-01-03 15:21:28.122729249 +0100
|
||||
@@ -58,6 +58,8 @@ system (const char * string);
|
||||
1) Invalid string/command. - returns 127. */
|
||||
static const char *strerrno (int err);
|
||||
@ -71,10 +71,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.c
|
||||
/* Don't change the order of the calls. They partly depend on each other */
|
||||
test_open ();
|
||||
test_write ();
|
||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.exp
|
||||
Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.base/fileio.exp 2010-06-09 00:58:03.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.exp 2010-07-12 11:42:07.000000000 +0200
|
||||
--- gdb-7.4.50.20120103.orig/gdb/testsuite/gdb.base/fileio.exp 2011-12-26 12:24:55.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp 2012-01-03 15:22:02.716601956 +0100
|
||||
@@ -42,8 +42,8 @@ if [get_compiler_info ${binfile}] {
|
||||
return -1;
|
||||
}
|
||||
@ -95,9 +95,9 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.exp
|
||||
|
||||
gdb_test continue \
|
||||
"Continuing\\..*open 5:.*EACCES$stop_msg" \
|
||||
@@ -250,8 +250,8 @@ gdb_test continue \
|
||||
send_gdb "quit\n"
|
||||
send_gdb "y\n"
|
||||
@@ -251,8 +251,8 @@ gdb_exit
|
||||
# Wait till GDB really exits.
|
||||
sleep 1
|
||||
|
||||
-remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test}
|
||||
-remote_exec build {sh -xc rm\ -rf\ *.fileio.test}
|
||||
|
@ -1,183 +0,0 @@
|
||||
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 11:53:34.000000000 +0100
|
||||
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 12:13:53.000000000 +0100
|
||||
@@ -208,6 +208,9 @@ blocked. */
|
||||
static struct target_ops *linux_ops;
|
||||
static struct target_ops linux_ops_saved;
|
||||
|
||||
+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */
|
||||
+static pid_t pid_was_stopped;
|
||||
+
|
||||
/* The method to call, if any, when a new thread is attached. */
|
||||
static void (*linux_nat_new_thread) (ptid_t);
|
||||
|
||||
@@ -933,7 +936,14 @@ Attaching after process %d fork to child
|
||||
parent_inf->waiting_for_vfork_done = 0;
|
||||
}
|
||||
else if (detach_fork)
|
||||
- target_detach (NULL, 0);
|
||||
+ {
|
||||
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
|
||||
+ In this point of code it cannot be 1 as we would not get FORK
|
||||
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
|
||||
+ We would have to first TARGET_STOP and WAITPID it as with running
|
||||
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
|
||||
+ target_detach (NULL, 0);
|
||||
+ }
|
||||
|
||||
/* Note that the detach above makes PARENT_INF dangling. */
|
||||
|
||||
@@ -1427,6 +1437,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNPAW: Attaching to a stopped process\n");
|
||||
+ pid_was_stopped = GET_PID (ptid);
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1757,6 +1768,9 @@ GPT: lwp %s had signal %s, but it is in
|
||||
target_signal_to_string (signo));
|
||||
}
|
||||
|
||||
+ if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
|
||||
+ *status = W_STOPCODE (SIGSTOP);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1866,6 +1880,8 @@ linux_nat_detach (struct target_ops *ops
|
||||
}
|
||||
else
|
||||
linux_ops->to_detach (ops, args, from_tty);
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
}
|
||||
|
||||
/* Resume LP. */
|
||||
@@ -2031,6 +2047,14 @@ linux_nat_resume (struct target_ops *ops
|
||||
resume_callback. */
|
||||
lp->stopped = 0;
|
||||
|
||||
+ /* At this point, we are going to resume the inferior and if we
|
||||
+ have attached to a stopped process, we no longer should leave
|
||||
+ it as stopped if the user detaches. PTID variable has PID set to LWP
|
||||
+ while we need to check the real PID here. */
|
||||
+
|
||||
+ if (!step && lp && pid_was_stopped == GET_PID (lp->ptid))
|
||||
+ pid_was_stopped = 0;
|
||||
+
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, resume_callback, NULL);
|
||||
|
||||
@@ -3923,6 +3947,8 @@ linux_nat_mourn_inferior (struct target_
|
||||
there are other viable forks to debug. Delete the exiting
|
||||
one and context-switch to the first available. */
|
||||
linux_fork_mourn_inferior ();
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
}
|
||||
|
||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
===================================================================
|
||||
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2010-01-01 08:32:06.000000000 +0100
|
||||
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp 2010-01-15 11:54:57.000000000 +0100
|
||||
@@ -62,7 +62,65 @@ proc corefunc { threadtype } {
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
- # Verify that we can attach to the stopped process.
|
||||
+ # Verify that we can attach to the process by first giving its
|
||||
+ # executable name via the file command, and using attach with the
|
||||
+ # process ID.
|
||||
+
|
||||
+ set test "$threadtype: set file, before attach1 to stopped process"
|
||||
+ gdb_test_multiple "file $binfile" "$test" {
|
||||
+ -re "Load new symbol table from.*y or n. $" {
|
||||
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
|
||||
+ "$test (re-read)"
|
||||
+ }
|
||||
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ set test "$threadtype: attach1 to stopped, after setting file"
|
||||
+ gdb_test_multiple "attach $testpid" "$test" {
|
||||
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there.
|
||||
+ if {[string equal $threadtype threaded]} {
|
||||
+ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt"
|
||||
+ } else {
|
||||
+ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt"
|
||||
+ }
|
||||
+
|
||||
+ # Exit and detach the process.
|
||||
+
|
||||
+ gdb_exit
|
||||
+
|
||||
+ # Avoid some race:
|
||||
+ sleep 2
|
||||
+
|
||||
+ if [catch {open /proc/${testpid}/status r} fileid] {
|
||||
+ set line2 "NOTFOUND"
|
||||
+ } else {
|
||||
+ gets $fileid line1;
|
||||
+ gets $fileid line2;
|
||||
+ close $fileid;
|
||||
+ }
|
||||
+
|
||||
+ set test "$threadtype: attach1, exit leaves process stopped"
|
||||
+ if {[string match "*(stopped)*" $line2]} {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ fail $test
|
||||
+ }
|
||||
+
|
||||
+ # At this point, the process should still be stopped
|
||||
+
|
||||
+ gdb_start
|
||||
+ gdb_reinitialize_dir $srcdir/$subdir
|
||||
+ gdb_load ${binfile}
|
||||
+
|
||||
+ # Verify that we can attach to the process just by giving the
|
||||
+ # process ID.
|
||||
|
||||
set test "$threadtype: attach2 to stopped, after setting file"
|
||||
gdb_test_multiple "attach $testpid" "$test" {
|
||||
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attachstop-mt.exp
|
||||
===================================================================
|
||||
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attachstop-mt.exp 2010-01-01 08:32:06.000000000 +0100
|
||||
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attachstop-mt.exp 2010-01-15 11:54:57.000000000 +0100
|
||||
@@ -176,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" "
|
||||
# Exit and detach the process.
|
||||
gdb_exit
|
||||
|
||||
-# Stop the program
|
||||
-remote_exec build "kill -s STOP ${testpid}"
|
||||
-
|
||||
# No race
|
||||
sleep 2
|
||||
|
||||
+set fileid3 [open $status2 r];
|
||||
+gets $fileid3 line1;
|
||||
+gets $fileid3 line2;
|
||||
+close $fileid3;
|
||||
+
|
||||
+set test "attach3, exit leaves process stopped"
|
||||
+if {[string match "*(stopped)*" $line2]} {
|
||||
+ pass $test
|
||||
+} else {
|
||||
+ fail $test
|
||||
+}
|
||||
+
|
||||
+# At this point, the process should still be stopped
|
||||
+
|
||||
# Continue the test as we would hit another expected bug regarding
|
||||
# Program received signal SIGSTOP, Stopped (signal).
|
||||
# across NPTL threads.
|
@ -1,8 +1,9 @@
|
||||
diff -up gdb-6.8/gdb/sparc-tdep.c.BAD gdb-6.8/gdb/sparc-tdep.c
|
||||
--- gdb-6.8/gdb/sparc-tdep.c.BAD 2008-05-15 16:12:58.000000000 -0500
|
||||
+++ gdb-6.8/gdb/sparc-tdep.c 2008-05-15 16:13:41.000000000 -0500
|
||||
@@ -1122,6 +1122,7 @@ sparc32_store_return_value (struct type
|
||||
if (sparc_floating_p (type))
|
||||
Index: gdb-7.4.50.20111218/gdb/sparc-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20111218.orig/gdb/sparc-tdep.c 2011-09-28 19:59:42.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/sparc-tdep.c 2011-12-19 01:25:29.294046199 +0100
|
||||
@@ -1316,6 +1316,7 @@ sparc32_store_return_value (struct type
|
||||
if (sparc_floating_p (type) || sparc_complex_floating_p (type))
|
||||
{
|
||||
/* Floating return values. */
|
||||
+ len = (len <= 8) ? len : 8;
|
||||
|
@ -1,24 +0,0 @@
|
||||
Provide `gdb --tui' functionality for the hardlink `gdbtui'.
|
||||
|
||||
--- ./gdb/gdb.c 1 Jan 2008 22:53:09 -0000 1.6
|
||||
+++ ./gdb/gdb.c 20 Jun 2008 08:02:57 -0000
|
||||
@@ -30,5 +30,19 @@ main (int argc, char **argv)
|
||||
args.argv = argv;
|
||||
args.use_windows = 0;
|
||||
args.interpreter_p = INTERP_CONSOLE;
|
||||
+
|
||||
+ if (argv[0])
|
||||
+ {
|
||||
+ char *s;
|
||||
+
|
||||
+ s = strrchr (argv[0], '/');
|
||||
+ if (s)
|
||||
+ s++;
|
||||
+ else
|
||||
+ s = argv[0];
|
||||
+ if (strcmp (s, "gdbtui") == 0)
|
||||
+ args.interpreter_p = INTERP_TUI;
|
||||
+ }
|
||||
+
|
||||
return gdb_main (&args);
|
||||
}
|
@ -1,13 +1,11 @@
|
||||
Index: gdb-7.3.50.20110722/gdb/breakpoint.c
|
||||
Index: gdb-7.4.50.20120103/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/breakpoint.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/breakpoint.c 2011-07-22 19:32:04.000000000 +0200
|
||||
@@ -13195,6 +13195,50 @@ iterate_over_breakpoints (int (*callback
|
||||
|
||||
return NULL;
|
||||
--- gdb-7.4.50.20120103.orig/gdb/breakpoint.c 2012-01-03 05:52:15.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/breakpoint.c 2012-01-03 15:22:56.105405559 +0100
|
||||
@@ -13724,6 +13724,50 @@ initialize_breakpoint_ops (void)
|
||||
}
|
||||
+
|
||||
+void
|
||||
|
||||
void
|
||||
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
|
||||
+{
|
||||
+ struct bp_location *bl, **blp_tmp;
|
||||
@ -50,14 +48,16 @@ Index: gdb-7.3.50.20110722/gdb/breakpoint.c
|
||||
+ qsort (bp_location, bp_location_count, sizeof (*bp_location),
|
||||
+ bp_location_compare);
|
||||
+}
|
||||
|
||||
void
|
||||
+
|
||||
+void
|
||||
_initialize_breakpoint (void)
|
||||
Index: gdb-7.3.50.20110722/gdb/breakpoint.h
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
Index: gdb-7.4.50.20120103/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/breakpoint.h 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/breakpoint.h 2011-07-22 19:31:22.000000000 +0200
|
||||
@@ -1328,4 +1328,7 @@ extern int user_breakpoint_p (struct bre
|
||||
--- gdb-7.4.50.20120103.orig/gdb/breakpoint.h 2012-01-03 05:52:15.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/breakpoint.h 2012-01-03 15:23:09.444356484 +0100
|
||||
@@ -1393,4 +1393,7 @@ extern struct gdbarch *get_sal_arch (str
|
||||
|
||||
extern void modify_semaphore (struct bp_location *location, int set);
|
||||
|
||||
@ -65,11 +65,11 @@ Index: gdb-7.3.50.20110722/gdb/breakpoint.h
|
||||
+ struct section_offsets *delta);
|
||||
+
|
||||
#endif /* !defined (BREAKPOINT_H) */
|
||||
Index: gdb-7.3.50.20110722/gdb/objfiles.c
|
||||
Index: gdb-7.4.50.20120103/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/objfiles.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/objfiles.c 2011-07-22 19:31:22.000000000 +0200
|
||||
@@ -847,6 +847,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
--- gdb-7.4.50.20120103.orig/gdb/objfiles.c 2012-01-03 05:52:15.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/objfiles.c 2012-01-03 15:23:28.141287697 +0100
|
||||
@@ -818,6 +818,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
|
||||
new_offsets, delta);
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
Index: gdb-7.4.50.20111218/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/dwarf2read.c 2011-07-22 19:30:11.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/dwarf2read.c 2011-07-22 19:30:44.000000000 +0200
|
||||
@@ -7979,7 +7979,12 @@ read_common_block (struct die_info *die,
|
||||
--- gdb-7.4.50.20111218.orig/gdb/dwarf2read.c 2011-12-19 01:31:24.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/dwarf2read.c 2011-12-19 01:33:25.263238972 +0100
|
||||
@@ -8347,7 +8347,12 @@ read_common_block (struct die_info *die,
|
||||
{
|
||||
struct attribute *attr;
|
||||
struct symbol *sym;
|
||||
@ -16,7 +16,7 @@ Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_location, cu);
|
||||
if (attr)
|
||||
@@ -7988,6 +7993,7 @@ read_common_block (struct die_info *die,
|
||||
@@ -8356,6 +8361,7 @@ read_common_block (struct die_info *die,
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
base = decode_locdesc (DW_BLOCK (attr), cu);
|
||||
@ -24,7 +24,7 @@ Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
}
|
||||
else if (attr_form_is_section_offset (attr))
|
||||
{
|
||||
@@ -8040,12 +8046,15 @@ read_common_block (struct die_info *die,
|
||||
@@ -8408,12 +8414,15 @@ read_common_block (struct die_info *die,
|
||||
if (sym != NULL
|
||||
&& handle_data_member_location (child_die, cu, &offset))
|
||||
{
|
||||
@ -42,7 +42,7 @@ Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
else
|
||||
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
|
||||
FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
|
||||
@@ -8059,7 +8068,7 @@ read_common_block (struct die_info *die,
|
||||
@@ -8427,7 +8436,7 @@ read_common_block (struct die_info *die,
|
||||
|
||||
sym = new_symbol (die, type, cu);
|
||||
/* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
|
||||
@ -51,35 +51,35 @@ Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
|
||||
set_die_type (die, type, cu);
|
||||
}
|
||||
Index: gdb-7.3.50.20110722/gdb/gdbtypes.h
|
||||
Index: gdb-7.4.50.20111218/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/gdbtypes.h 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/gdbtypes.h 2011-07-22 19:31:08.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/gdbtypes.h 2011-12-18 23:35:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/gdbtypes.h 2011-12-19 01:34:21.448025620 +0100
|
||||
@@ -396,6 +396,7 @@ enum type_instance_flag_value
|
||||
enum field_loc_kind
|
||||
{
|
||||
FIELD_LOC_KIND_BITPOS, /* bitpos */
|
||||
+ /* This address is unrelocated by the objfile's ANOFFSET. */
|
||||
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
|
||||
FIELD_LOC_KIND_PHYSNAME /* physname */
|
||||
};
|
||||
@@ -580,6 +581,7 @@ struct main_type
|
||||
FIELD_LOC_KIND_PHYSNAME, /* physname */
|
||||
FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */
|
||||
@@ -581,6 +582,7 @@ struct main_type
|
||||
is the location (in the target) of the static field.
|
||||
Otherwise, physname is the mangled label of the static field. */
|
||||
|
||||
+ /* This address is unrelocated by the objfile's ANOFFSET. */
|
||||
CORE_ADDR physaddr;
|
||||
const char *physname;
|
||||
}
|
||||
@@ -1110,6 +1112,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
|
||||
@@ -1194,6 +1196,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
|
||||
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
|
||||
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||
+/* This address is unrelocated by the objfile's ANOFFSET. */
|
||||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
|
||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
|
||||
@@ -1117,6 +1120,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1202,6 +1205,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define SET_FIELD_PHYSNAME(thisfld, name) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
||||
FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
||||
@ -87,18 +87,18 @@ Index: gdb-7.3.50.20110722/gdb/gdbtypes.h
|
||||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
@@ -1129,6 +1133,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1217,6 +1221,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_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
||||
+/* This address is unrelocated by the objfile's ANOFFSET. */
|
||||
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
||||
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
|
||||
Index: gdb-7.3.50.20110722/gdb/jv-lang.c
|
||||
Index: gdb-7.4.50.20111218/gdb/jv-lang.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/jv-lang.c 2011-07-01 20:28:52.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/jv-lang.c 2011-07-22 19:30:44.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/jv-lang.c 2011-12-06 19:54:39.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/jv-lang.c 2011-12-19 01:33:25.280238908 +0100
|
||||
@@ -430,7 +430,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
|
||||
fields = NULL;
|
||||
@ -119,11 +119,11 @@ Index: gdb-7.3.50.20110722/gdb/jv-lang.c
|
||||
else
|
||||
TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
|
||||
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
||||
Index: gdb-7.3.50.20110722/gdb/value.c
|
||||
Index: gdb-7.4.50.20111218/gdb/value.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/value.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/value.c 2011-07-22 19:30:44.000000000 +0200
|
||||
@@ -2507,7 +2507,8 @@ value_static_field (struct type *type, i
|
||||
--- gdb-7.4.50.20111218.orig/gdb/value.c 2011-12-18 23:35:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/value.c 2011-12-19 01:33:25.283238896 +0100
|
||||
@@ -2481,7 +2481,8 @@ value_static_field (struct type *type, i
|
||||
{
|
||||
case FIELD_LOC_KIND_PHYSADDR:
|
||||
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
||||
|
7864
gdb-archer.patch
7864
gdb-archer.patch
File diff suppressed because it is too large
Load Diff
@ -1,20 +1,20 @@
|
||||
Index: gdb-7.3.50.20110722/gdb/config/i386/linux64.mh
|
||||
Index: gdb-7.4.50.20111218/gdb/config/i386/linux64.mh
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/config/i386/linux64.mh 2011-07-22 01:46:10.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/config/i386/linux64.mh 2011-07-22 19:32:41.000000000 +0200
|
||||
@@ -3,7 +3,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
i386-nat.o amd64-nat.o amd64-linux-nat.o \
|
||||
--- gdb-7.4.50.20111218.orig/gdb/config/i386/linux64.mh 2011-08-24 14:07:26.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/config/i386/linux64.mh 2011-12-19 01:40:49.492625837 +0100
|
||||
@@ -4,7 +4,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
linux-nat.o linux-osdata.o \
|
||||
proc-service.o linux-thread-db.o linux-fork.o
|
||||
proc-service.o linux-thread-db.o linux-fork.o \
|
||||
linux-procfs.o
|
||||
-NAT_FILE= config/nm-linux.h
|
||||
+NAT_FILE= nm-linux64.h
|
||||
NAT_CDEPS = $(srcdir)/proc-service.list
|
||||
|
||||
# The dynamically loaded libthread_db needs access to symbols in the
|
||||
Index: gdb-7.3.50.20110722/gdb/config/i386/linux.mh
|
||||
Index: gdb-7.4.50.20111218/gdb/config/i386/linux.mh
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/config/i386/linux.mh 2011-07-22 01:46:10.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/config/i386/linux.mh 2011-07-22 19:32:21.000000000 +0200
|
||||
--- gdb-7.4.50.20111218.orig/gdb/config/i386/linux.mh 2011-08-24 14:07:26.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/config/i386/linux.mh 2011-12-19 01:40:32.453689006 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
|
||||
@ -23,10 +23,10 @@ Index: gdb-7.3.50.20110722/gdb/config/i386/linux.mh
|
||||
NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
i386-nat.o i386-linux-nat.o \
|
||||
proc-service.o linux-thread-db.o \
|
||||
Index: gdb-7.3.50.20110722/gdb/config/i386/nm-linux.h
|
||||
Index: gdb-7.4.50.20111218/gdb/config/i386/nm-linux.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.3.50.20110722/gdb/config/i386/nm-linux.h 2011-07-22 19:32:21.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/config/i386/nm-linux.h 2011-12-19 01:40:32.454689002 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux i386.
|
||||
+
|
||||
@ -56,10 +56,10 @@ Index: gdb-7.3.50.20110722/gdb/config/i386/nm-linux.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.3.50.20110722/gdb/config/i386/nm-linux64.h
|
||||
Index: gdb-7.4.50.20111218/gdb/config/i386/nm-linux64.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.3.50.20110722/gdb/config/i386/nm-linux64.h 2011-07-22 19:32:21.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/config/i386/nm-linux64.h 2011-12-19 01:40:32.455688998 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux amd64.
|
||||
+
|
||||
@ -89,11 +89,11 @@ Index: gdb-7.3.50.20110722/gdb/config/i386/nm-linux64.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.3.50.20110722/gdb/target.h
|
||||
Index: gdb-7.4.50.20111218/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/target.h 2011-06-06 14:47:07.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/target.h 2011-07-22 19:32:21.000000000 +0200
|
||||
@@ -1349,8 +1349,10 @@ extern char *target_thread_name (struct
|
||||
--- gdb-7.4.50.20111218.orig/gdb/target.h 2011-12-06 21:03:13.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/target.h 2011-12-19 01:40:32.456688995 +0100
|
||||
@@ -1391,8 +1391,10 @@ extern char *target_thread_name (struct
|
||||
bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
|
||||
(including this one?). OTHERTYPE is who knows what... */
|
||||
|
||||
@ -104,10 +104,10 @@ Index: gdb-7.3.50.20110722/gdb/target.h
|
||||
|
||||
/* Returns the number of debug registers needed to watch the given
|
||||
memory region, or zero if not supported. */
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2011-07-22 19:32:21.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2011-12-19 01:40:32.464688965 +0100
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2009, 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -78,11 +78,11 @@ gdb/testsuite/
|
||||
* gdb.threads/sigstep-threads.exp: New file.
|
||||
* gdb.threads/sigstep-threads.c: New file.
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
Index: gdb-7.4.50.20111218/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/linux-nat.c 2011-01-17 15:53:14.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/linux-nat.c 2011-01-17 16:05:57.000000000 +0100
|
||||
@@ -2803,6 +2803,8 @@ stop_wait_callback (struct lwp_info *lp,
|
||||
--- gdb-7.4.50.20111218.orig/gdb/linux-nat.c 2011-12-19 01:25:42.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/linux-nat.c 2011-12-19 02:17:05.412607735 +0100
|
||||
@@ -2843,6 +2843,8 @@ stop_wait_callback (struct lwp_info *lp,
|
||||
{
|
||||
int status;
|
||||
|
||||
@ -91,7 +91,7 @@ Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
status = wait_lwp (lp);
|
||||
if (status == 0)
|
||||
return 0;
|
||||
@@ -2828,110 +2830,61 @@ stop_wait_callback (struct lwp_info *lp,
|
||||
@@ -2868,110 +2870,61 @@ stop_wait_callback (struct lwp_info *lp,
|
||||
|
||||
if (WSTOPSIG (status) != SIGSTOP)
|
||||
{
|
||||
@ -146,9 +146,7 @@ Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
- status_to_str ((int) status));
|
||||
- kill_lwp (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
|
||||
- }
|
||||
+ /* Save the trap's siginfo in case we need it later. */
|
||||
+ save_siginfo (lp);
|
||||
|
||||
-
|
||||
- /* Save the sigtrap event. */
|
||||
- lp->status = status;
|
||||
- return 0;
|
||||
@ -157,7 +155,8 @@ Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
- {
|
||||
- /* The thread was stopped with a signal other than
|
||||
- SIGSTOP, and didn't accidentally trip a breakpoint. */
|
||||
+ save_sigtrap (lp);
|
||||
+ /* Save the trap's siginfo in case we need it later. */
|
||||
+ save_siginfo (lp);
|
||||
|
||||
- if (debug_linux_nat)
|
||||
- {
|
||||
@ -174,7 +173,8 @@ Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
- "SWC: PTRACE_CONT %s, 0, 0 (%s)\n",
|
||||
- target_pid_to_str (lp->ptid),
|
||||
- errno ? safe_strerror (errno) : "OK");
|
||||
-
|
||||
+ save_sigtrap (lp);
|
||||
|
||||
- /* Hold this event/waitstatus while we check to see if
|
||||
- there are any more (we still want to get that SIGSTOP). */
|
||||
- stop_wait_callback (lp, NULL);
|
||||
@ -248,11 +248,11 @@ Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
lp->signalled = 0;
|
||||
}
|
||||
}
|
||||
@@ -3514,52 +3467,6 @@ retry:
|
||||
@@ -3627,54 +3580,6 @@ retry:
|
||||
lp = NULL;
|
||||
}
|
||||
|
||||
- if (lp && lp->signalled)
|
||||
- if (lp && lp->signalled && lp->last_resume_kind != resume_stop)
|
||||
- {
|
||||
- /* A pending SIGSTOP may interfere with the normal stream of
|
||||
- events. In a typical case where interference is a problem,
|
||||
@ -266,6 +266,8 @@ Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
- /* Resume the thread. It should halt immediately returning the
|
||||
- pending SIGSTOP. */
|
||||
- registers_changed ();
|
||||
- if (linux_nat_prepare_to_resume != NULL)
|
||||
- linux_nat_prepare_to_resume (lp);
|
||||
- linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
|
||||
- lp->step, TARGET_SIGNAL_0);
|
||||
- if (debug_linux_nat)
|
||||
@ -301,10 +303,10 @@ Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
if (!target_can_async_p ())
|
||||
{
|
||||
/* Causes SIGINT to be passed on to the attached process. */
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.c
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/siginfo-threads.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.c 2011-01-17 16:02:40.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/siginfo-threads.c 2011-12-19 02:16:35.236720272 +0100
|
||||
@@ -0,0 +1,447 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -753,10 +755,10 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.c
|
||||
+
|
||||
+ return EXIT_SUCCESS;
|
||||
+}
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/siginfo-threads.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.exp 2011-01-17 16:02:40.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/siginfo-threads.exp 2011-12-19 02:16:35.237720268 +0100
|
||||
@@ -0,0 +1,94 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -852,10 +854,10 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.exp
|
||||
+}
|
||||
+
|
||||
+gdb_continue_to_breakpoint break-at-exit ".*break-at-exit.*"
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.c
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/sigstep-threads.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.c 2011-01-17 16:02:40.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/sigstep-threads.c 2011-12-19 02:16:35.237720268 +0100
|
||||
@@ -0,0 +1,54 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -911,10 +913,10 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.c
|
||||
+ start (NULL); /* main-start */
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/sigstep-threads.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.exp 2011-01-17 16:02:40.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/sigstep-threads.exp 2011-12-19 02:16:35.237720268 +0100
|
||||
@@ -0,0 +1,74 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -26,27 +26,27 @@ gdb/
|
||||
(linux_nat_set_siginfo_fixup): Use PTRACE_GETSIGINFO.
|
||||
* linux-nat.h (struct lwp_info) <siginfo>: Remove.
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||
Index: gdb-7.4.50.20111218/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 09:12:26.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 09:13:21.000000000 +0100
|
||||
@@ -1850,7 +1850,6 @@ resume_callback (struct lwp_info *lp, vo
|
||||
target_pid_to_str (lp->ptid));
|
||||
lp->stopped = 0;
|
||||
lp->step = 0;
|
||||
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
|
||||
lp->stopped_by_watchpoint = 0;
|
||||
}
|
||||
else if (lp->stopped && debug_linux_nat)
|
||||
@@ -1993,7 +1992,6 @@ linux_nat_resume (struct target_ops *ops
|
||||
ptid = pid_to_ptid (GET_LWP (lp->ptid));
|
||||
|
||||
--- gdb-7.4.50.20111218.orig/gdb/linux-nat.c 2011-12-19 02:17:05.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/linux-nat.c 2011-12-19 02:17:43.188466854 +0100
|
||||
@@ -1883,7 +1883,6 @@ resume_lwp (struct lwp_info *lp, int ste
|
||||
step, TARGET_SIGNAL_0);
|
||||
lp->stopped = 0;
|
||||
lp->step = step;
|
||||
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
|
||||
lp->stopped_by_watchpoint = 0;
|
||||
}
|
||||
else
|
||||
@@ -2027,7 +2026,6 @@ linux_nat_resume (struct target_ops *ops
|
||||
if (linux_nat_prepare_to_resume != NULL)
|
||||
linux_nat_prepare_to_resume (lp);
|
||||
linux_ops->to_resume (linux_ops, ptid, step, signo);
|
||||
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
|
||||
lp->stopped_by_watchpoint = 0;
|
||||
|
||||
if (debug_linux_nat)
|
||||
@@ -2503,22 +2501,6 @@ wait_lwp (struct lwp_info *lp)
|
||||
@@ -2612,22 +2610,6 @@ wait_lwp (struct lwp_info *lp)
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||
/* Send a SIGSTOP to LP. */
|
||||
|
||||
static int
|
||||
@@ -2787,9 +2769,6 @@ stop_wait_callback (struct lwp_info *lp,
|
||||
@@ -2872,9 +2854,6 @@ stop_wait_callback (struct lwp_info *lp,
|
||||
{
|
||||
/* The thread was stopped with a signal other than SIGSTOP. */
|
||||
|
||||
@ -79,7 +79,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||
save_sigtrap (lp);
|
||||
|
||||
if (debug_linux_nat)
|
||||
@@ -3155,12 +3134,7 @@ linux_nat_filter_event (int lwpid, int s
|
||||
@@ -3278,12 +3257,7 @@ linux_nat_filter_event (int lwpid, int s
|
||||
}
|
||||
|
||||
if (linux_nat_status_is_event (status))
|
||||
@ -93,7 +93,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||
|
||||
/* Check if the thread has exited. */
|
||||
if ((WIFEXITED (status) || WIFSIGNALED (status))
|
||||
@@ -3763,7 +3737,6 @@ resume_stopped_resumed_lwps (struct lwp_
|
||||
@@ -3961,7 +3935,6 @@ resume_stopped_resumed_lwps (struct lwp_
|
||||
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
|
||||
lp->step, TARGET_SIGNAL_0);
|
||||
lp->stopped = 0;
|
||||
@ -101,7 +101,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||
lp->stopped_by_watchpoint = 0;
|
||||
}
|
||||
|
||||
@@ -5932,11 +5905,19 @@ linux_nat_set_siginfo_fixup (struct targ
|
||||
@@ -6029,11 +6002,19 @@ linux_nat_set_prepare_to_resume (struct
|
||||
struct siginfo *
|
||||
linux_nat_get_siginfo (ptid_t ptid)
|
||||
{
|
||||
@ -124,11 +124,11 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
|
||||
}
|
||||
|
||||
/* Provide a prototype to silence -Wmissing-prototypes. */
|
||||
Index: gdb-7.2.50.20101116/gdb/linux-nat.h
|
||||
Index: gdb-7.4.50.20111218/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/linux-nat.h 2010-11-16 07:54:36.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/linux-nat.h 2010-11-16 09:12:44.000000000 +0100
|
||||
@@ -58,10 +58,6 @@ struct lwp_info
|
||||
--- gdb-7.4.50.20111218.orig/gdb/linux-nat.h 2011-12-18 23:40:59.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/linux-nat.h 2011-12-19 02:17:21.355548276 +0100
|
||||
@@ -77,10 +77,6 @@ struct lwp_info
|
||||
/* The kind of stepping of this LWP. */
|
||||
enum resume_step step;
|
||||
|
||||
|
@ -33,36 +33,35 @@ gdb/
|
||||
|
||||
[ Context backport. ]
|
||||
|
||||
Index: gdb-7.3.50.20110722/gdb/solib-svr4.c
|
||||
Index: gdb-7.4.50.20111218/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/solib-svr4.c 2011-07-22 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/solib-svr4.c 2011-07-22 19:29:36.000000000 +0200
|
||||
@@ -1197,8 +1197,18 @@ svr4_current_sos (void)
|
||||
target_read_string (lm_name (new), &buffer,
|
||||
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
|
||||
if (errcode != 0)
|
||||
- warning (_("Can't read pathname for load map: %s."),
|
||||
- safe_strerror (errcode));
|
||||
+ {
|
||||
+ /* During the first ever DSO list reading some strings may be
|
||||
+ unreadable as residing in the ld.so readonly memory not being
|
||||
+ present in a dumped core file. Delay the error check after
|
||||
+ the first pass of DSO list scanning when ld.so should be
|
||||
+ already mapped in and all the DSO list l_name memory gets
|
||||
+ readable. */
|
||||
--- gdb-7.4.50.20111218.orig/gdb/solib-svr4.c 2011-12-19 01:14:31.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/solib-svr4.c 2011-12-19 01:31:10.106752164 +0100
|
||||
@@ -1222,8 +1222,17 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
|
||||
if (errcode != 0)
|
||||
{
|
||||
- warning (_("Can't read pathname for load map: %s."),
|
||||
- safe_strerror (errcode));
|
||||
+ /* During the first ever DSO list reading some strings may be
|
||||
+ unreadable as residing in the ld.so readonly memory not being
|
||||
+ present in a dumped core file. Delay the error check after
|
||||
+ the first pass of DSO list scanning when ld.so should be
|
||||
+ already mapped in and all the DSO list l_name memory gets
|
||||
+ readable. */
|
||||
+
|
||||
+ if (master_so_list () != NULL)
|
||||
+ warning (_("Can't read pathname for load map: %s."),
|
||||
+ safe_strerror (errcode));
|
||||
+ }
|
||||
else
|
||||
{
|
||||
struct build_id *build_id;
|
||||
Index: gdb-7.3.50.20110722/gdb/solib.c
|
||||
+ if (master_so_list () != NULL)
|
||||
+ warning (_("Can't read pathname for load map: %s."),
|
||||
+ safe_strerror (errcode));
|
||||
+
|
||||
do_cleanups (old_chain);
|
||||
continue;
|
||||
}
|
||||
Index: gdb-7.4.50.20111218/gdb/solib.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/solib.c 2011-06-30 21:29:54.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/solib.c 2011-07-22 19:29:10.000000000 +0200
|
||||
@@ -706,6 +706,7 @@ update_solib_list (int from_tty, struct
|
||||
--- gdb-7.4.50.20111218.orig/gdb/solib.c 2011-09-12 21:00:22.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/solib.c 2011-12-19 01:29:04.815227898 +0100
|
||||
@@ -676,6 +676,7 @@ update_solib_list (int from_tty, struct
|
||||
struct target_so_ops *ops = solib_ops (target_gdbarch);
|
||||
struct so_list *inferior = ops->current_sos();
|
||||
struct so_list *gdb, **gdb_link;
|
||||
@ -70,7 +69,7 @@ Index: gdb-7.3.50.20110722/gdb/solib.c
|
||||
|
||||
/* We can reach here due to changing solib-search-path or the
|
||||
sysroot, before having any inferior. */
|
||||
@@ -846,6 +847,12 @@ update_solib_list (int from_tty, struct
|
||||
@@ -817,6 +818,12 @@ update_solib_list (int from_tty, struct
|
||||
observer_notify_solib_loaded (i);
|
||||
}
|
||||
|
||||
|
@ -1,90 +0,0 @@
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index 91e0fc2..1d7c808 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -3111,6 +3111,56 @@ fill_in_stop_func (struct gdbarch *gdbarch,
|
||||
}
|
||||
}
|
||||
|
||||
+/* Argument for at_solib_event_breakpoint_helper. */
|
||||
+
|
||||
+struct solib_event_breakpoint_helper_arg
|
||||
+{
|
||||
+ CORE_ADDR prev_pc;
|
||||
+ int shlib_bp_count;
|
||||
+ int other_bp_count;
|
||||
+};
|
||||
+
|
||||
+/* Helper for at_solib_event_breakpoint. */
|
||||
+
|
||||
+static int
|
||||
+at_solib_event_breakpoint_helper (struct breakpoint *b, void *argp)
|
||||
+{
|
||||
+ struct solib_event_breakpoint_helper_arg *arg
|
||||
+ = (struct solib_event_breakpoint_helper_arg *) argp;
|
||||
+ struct bp_location *loc;
|
||||
+
|
||||
+ for (loc = b->loc; loc; loc = loc->next)
|
||||
+ {
|
||||
+ if (loc->pspace == current_program_space
|
||||
+ && (loc->address == stop_pc || loc->address == arg->prev_pc))
|
||||
+ {
|
||||
+ if (b->type == bp_shlib_event)
|
||||
+ arg->shlib_bp_count++;
|
||||
+ else
|
||||
+ {
|
||||
+ arg->other_bp_count++;
|
||||
+ return 1; /* quick exit */
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0; /* carry on looking */
|
||||
+}
|
||||
+
|
||||
+/* Nonzero if the location stopoed at is the shlib event breakpoint. */
|
||||
+
|
||||
+static int
|
||||
+at_solib_event_breakpoint (struct execution_control_state *ecs)
|
||||
+{
|
||||
+ struct solib_event_breakpoint_helper_arg arg;
|
||||
+ arg.prev_pc = ecs->event_thread->prev_pc;
|
||||
+ arg.shlib_bp_count = arg.other_bp_count = 0;
|
||||
+
|
||||
+ iterate_over_breakpoints (at_solib_event_breakpoint_helper, &arg);
|
||||
+
|
||||
+ return arg.shlib_bp_count && !arg.other_bp_count;
|
||||
+}
|
||||
+
|
||||
/* Given an execution control state that has been freshly filled in
|
||||
by an event from the inferior, figure out what it means and take
|
||||
appropriate action. */
|
||||
@@ -3964,11 +4014,23 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||
ecs->random_signal = 0;
|
||||
stopped_by_random_signal = 0;
|
||||
|
||||
- /* Hide inlined functions starting here, unless we just performed stepi or
|
||||
- nexti. After stepi and nexti, always show the innermost frame (not any
|
||||
- inline function call sites). */
|
||||
- if (ecs->event_thread->control.step_range_end != 1)
|
||||
- skip_inline_frames (ecs->ptid);
|
||||
+ /* If we have stopped at the solib event breakpoint and
|
||||
+ stop_on_solib_events is not set then we can avoid calling
|
||||
+ anything that calls find_pc_section. This saves a lot
|
||||
+ of time when the inferior loads a lot of shared libraries,
|
||||
+ because otherwise the section map gets regenerated every
|
||||
+ time we stop. */
|
||||
+ if (stop_on_solib_events
|
||||
+ || ecs->event_thread->suspend.stop_signal != TARGET_SIGNAL_TRAP
|
||||
+ || stop_after_trap
|
||||
+ || !at_solib_event_breakpoint (ecs))
|
||||
+ {
|
||||
+ /* Hide inlined functions starting here, unless we just
|
||||
+ performed stepi or nexti. After stepi and nexti, always show
|
||||
+ the innermost frame (not any inline function call sites). */
|
||||
+ if (ecs->event_thread->control.step_range_end != 1)
|
||||
+ skip_inline_frames (ecs->ptid);
|
||||
+ }
|
||||
|
||||
if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
|
||||
&& ecs->event_thread->control.trap_expected
|
@ -1,655 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-07/msg00645.html
|
||||
Subject: [patch] workaround gcc46: prologue skip skips too far (PR 12435) #2
|
||||
|
||||
Hi,
|
||||
|
||||
this is an improved patch of a former:
|
||||
[patch] workaround gcc46: prologue skip skips too far (PR 12435)
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg01108.html
|
||||
cancel/FYI: Re: [patch] workaround gcc46: prologue skip skips too far (PR 12435)
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg01123.html
|
||||
|
||||
For example `break error' does not work for debugging GDB with gcc-4.6.x.
|
||||
|
||||
As gcc-4.6.0 and now even 4.6.1 still has this bug and I have seen a user(s?)
|
||||
on non-Fedora platform asking about this bug and as there may be enough
|
||||
binaries out there (although it affects only -O0 -g compilation) coded it
|
||||
properly I have coded the workaround properly this time.
|
||||
|
||||
It does not solve overlays well, but the code just does not work for overlays,
|
||||
it has no other negative effect.
|
||||
|
||||
I will update the code after FSF gcc gets fixed to minimize the workaround.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu.
|
||||
|
||||
I would welcome a comment whether it is suitable for FSF GDB.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-07-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR breakpoints/12435
|
||||
* amd64-tdep.c (amd64_skip_prologue): New variables start_pc_sal,
|
||||
next_sal, buf, offset and xmmreg. Advance PC if it sees the PR.
|
||||
* dwarf2read.c (process_full_comp_unit): Initialize
|
||||
amd64_prologue_line_bug.
|
||||
* symtab.h (struct symtab): New field amd64_prologue_line_bug.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-07-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR breakpoints/12435
|
||||
* gdb.arch/amd64-prologue-xmm.c: New file.
|
||||
* gdb.arch/amd64-prologue-xmm.exp: New file.
|
||||
* gdb.arch/amd64-prologue-xmm.s: New file.
|
||||
|
||||
--- a/gdb/amd64-tdep.c
|
||||
+++ b/gdb/amd64-tdep.c
|
||||
@@ -1902,6 +1902,9 @@ amd64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
|
||||
{
|
||||
struct amd64_frame_cache cache;
|
||||
CORE_ADDR pc;
|
||||
+ struct symtab_and_line start_pc_sal, next_sal;
|
||||
+ gdb_byte buf[4 + 8 * 7];
|
||||
+ int offset, xmmreg;
|
||||
|
||||
amd64_init_frame_cache (&cache);
|
||||
pc = amd64_analyze_prologue (gdbarch, start_pc, 0xffffffffffffffffLL,
|
||||
@@ -1909,7 +1912,71 @@ amd64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
|
||||
if (cache.frameless_p)
|
||||
return start_pc;
|
||||
|
||||
- return pc;
|
||||
+ /* GCC PR debug/48827 produced false prologue end:
|
||||
+ 84 c0 test %al,%al
|
||||
+ 74 23 je after
|
||||
+ <-- here is 0 lines advance - the false prologue end marker.
|
||||
+ 0f 29 85 70 ff ff ff movaps %xmm0,-0x90(%rbp)
|
||||
+ 0f 29 4d 80 movaps %xmm1,-0x80(%rbp)
|
||||
+ 0f 29 55 90 movaps %xmm2,-0x70(%rbp)
|
||||
+ 0f 29 5d a0 movaps %xmm3,-0x60(%rbp)
|
||||
+ 0f 29 65 b0 movaps %xmm4,-0x50(%rbp)
|
||||
+ 0f 29 6d c0 movaps %xmm5,-0x40(%rbp)
|
||||
+ 0f 29 75 d0 movaps %xmm6,-0x30(%rbp)
|
||||
+ 0f 29 7d e0 movaps %xmm7,-0x20(%rbp)
|
||||
+ after: */
|
||||
+
|
||||
+ if (pc == start_pc)
|
||||
+ return pc;
|
||||
+
|
||||
+ start_pc_sal = find_pc_sect_line (start_pc, NULL, 0);
|
||||
+ if (start_pc_sal.symtab == NULL
|
||||
+ || !start_pc_sal.symtab->amd64_prologue_line_bug
|
||||
+ || start_pc_sal.pc != start_pc || pc >= start_pc_sal.end)
|
||||
+ return pc;
|
||||
+
|
||||
+ next_sal = find_pc_sect_line (start_pc_sal.end, NULL, 0);
|
||||
+ if (next_sal.line != start_pc_sal.line)
|
||||
+ return pc;
|
||||
+
|
||||
+ /* START_PC can be from overlayed memory, ignored here. */
|
||||
+ if (target_read_memory (next_sal.pc - 4, buf, sizeof (buf)) != 0)
|
||||
+ return pc;
|
||||
+
|
||||
+ /* test %al,%al */
|
||||
+ if (buf[0] != 0x84 || buf[1] != 0xc0)
|
||||
+ return pc;
|
||||
+ /* je AFTER */
|
||||
+ if (buf[2] != 0x74)
|
||||
+ return pc;
|
||||
+
|
||||
+ offset = 4;
|
||||
+ for (xmmreg = 0; xmmreg < 8; xmmreg++)
|
||||
+ {
|
||||
+ /* movaps %xmmreg?,-0x??(%rbp) */
|
||||
+ if (buf[offset] != 0x0f || buf[offset + 1] != 0x29
|
||||
+ || (buf[offset + 2] & 0b00111111) != (xmmreg << 3 | 0b101))
|
||||
+ return pc;
|
||||
+
|
||||
+ if ((buf[offset + 2] & 0b11000000) == 0b01000000)
|
||||
+ {
|
||||
+ /* 8-bit displacement. */
|
||||
+ offset += 4;
|
||||
+ }
|
||||
+ else if ((buf[offset + 2] & 0b11000000) == 0b10000000)
|
||||
+ {
|
||||
+ /* 32-bit displacement. */
|
||||
+ offset += 7;
|
||||
+ }
|
||||
+ else
|
||||
+ return pc;
|
||||
+ }
|
||||
+
|
||||
+ /* je AFTER */
|
||||
+ if (offset - 4 != buf[3])
|
||||
+ return pc;
|
||||
+
|
||||
+ return next_sal.end;
|
||||
}
|
||||
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -4818,6 +4818,9 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu)
|
||||
|
||||
if (gcc_4_minor >= 5)
|
||||
symtab->epilogue_unwind_valid = 1;
|
||||
+
|
||||
+ if (gcc_4_minor >= 6)
|
||||
+ symtab->amd64_prologue_line_bug = 1;
|
||||
}
|
||||
|
||||
if (dwarf2_per_objfile->using_index)
|
||||
--- a/gdb/symtab.h
|
||||
+++ b/gdb/symtab.h
|
||||
@@ -784,6 +784,11 @@ struct symtab
|
||||
|
||||
unsigned int epilogue_unwind_valid : 1;
|
||||
|
||||
+ /* At least GCC 4.6.0 and 4.6.1 can produce invalid false prologue and marker
|
||||
+ on amd64. This flag is set independently of the symtab arch. */
|
||||
+
|
||||
+ unsigned amd64_prologue_line_bug : 1;
|
||||
+
|
||||
/* The macro table for this symtab. Like the blockvector, this
|
||||
may be shared between different symtabs --- and normally is for
|
||||
all the symtabs in a given compilation unit. */
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.c
|
||||
@@ -0,0 +1,38 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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/>. */
|
||||
+
|
||||
+static volatile int v, fail;
|
||||
+
|
||||
+static void
|
||||
+func (int i, ...)
|
||||
+{
|
||||
+ v = i;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+marker (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ func (1);
|
||||
+ fail = 1;
|
||||
+ marker ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
|
||||
@@ -0,0 +1,46 @@
|
||||
+# Copyright 2011 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 GCC PR debug/48827 workaround in GDB.
|
||||
+
|
||||
+set testfile "amd64-prologue-xmm"
|
||||
+set srcfile ${testfile}.s
|
||||
+set csrcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}.x
|
||||
+set opts {}
|
||||
+
|
||||
+if [info exists COMPILE] {
|
||||
+ # make check RUNTESTFLAGS='gdb.arch/amd64-prologue-xmm.exp COMPILE=1'
|
||||
+ set srcfile ${csrcfile}
|
||||
+ lappend opts debug optimize=-O0
|
||||
+} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
||||
+ verbose "Skipping amd64-prologue-xmm test."
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint "func"
|
||||
+gdb_breakpoint "marker"
|
||||
+
|
||||
+gdb_continue_to_breakpoint "func"
|
||||
+
|
||||
+gdb_test "p fail" " = 0" "stopped at func"
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.s
|
||||
@@ -0,0 +1,400 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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 file is compiled from gdb.arch/amd64-prologue-xmm.c
|
||||
+ using -g -dA -S. */
|
||||
+
|
||||
+ .file "amd64-prologue-xmm.c"
|
||||
+ .text
|
||||
+.Ltext0:
|
||||
+ .local v
|
||||
+ .comm v,4,4
|
||||
+ .local fail
|
||||
+ .comm fail,4,4
|
||||
+ .type func, @function
|
||||
+func:
|
||||
+.LFB0:
|
||||
+ .file 1 "gdb.arch/amd64-prologue-xmm.c"
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:22
|
||||
+ .loc 1 22 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ subq $72, %rsp
|
||||
+ movq %rsi, -168(%rbp)
|
||||
+ movq %rdx, -160(%rbp)
|
||||
+ movq %rcx, -152(%rbp)
|
||||
+ movq %r8, -144(%rbp)
|
||||
+ movq %r9, -136(%rbp)
|
||||
+ testb %al, %al
|
||||
+ je .L2
|
||||
+ # basic block 3
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:22
|
||||
+ .loc 1 22 0
|
||||
+ movaps %xmm0, -128(%rbp)
|
||||
+ movaps %xmm1, -112(%rbp)
|
||||
+ movaps %xmm2, -96(%rbp)
|
||||
+ movaps %xmm3, -80(%rbp)
|
||||
+ movaps %xmm4, -64(%rbp)
|
||||
+ movaps %xmm5, -48(%rbp)
|
||||
+ movaps %xmm6, -32(%rbp)
|
||||
+ movaps %xmm7, -16(%rbp)
|
||||
+.L2:
|
||||
+ # basic block 4
|
||||
+ movl %edi, -180(%rbp)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:23
|
||||
+ .loc 1 23 0
|
||||
+ movl -180(%rbp), %eax
|
||||
+ movl %eax, v(%rip)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:24
|
||||
+ .loc 1 24 0
|
||||
+ leave
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE0:
|
||||
+ .size func, .-func
|
||||
+ .type marker, @function
|
||||
+marker:
|
||||
+.LFB1:
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:28
|
||||
+ .loc 1 28 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:29
|
||||
+ .loc 1 29 0
|
||||
+ popq %rbp
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE1:
|
||||
+ .size marker, .-marker
|
||||
+ .globl main
|
||||
+ .type main, @function
|
||||
+main:
|
||||
+.LFB2:
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:33
|
||||
+ .loc 1 33 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:34
|
||||
+ .loc 1 34 0
|
||||
+ movl $1, %edi
|
||||
+ movl $0, %eax
|
||||
+ call func
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:35
|
||||
+ .loc 1 35 0
|
||||
+ movl $1, fail(%rip)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:36
|
||||
+ .loc 1 36 0
|
||||
+ call marker
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:37
|
||||
+ .loc 1 37 0
|
||||
+ movl $0, %eax
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:38
|
||||
+ .loc 1 38 0
|
||||
+ popq %rbp
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE2:
|
||||
+ .size main, .-main
|
||||
+.Letext0:
|
||||
+ .section .debug_info,"",@progbits
|
||||
+.Ldebug_info0:
|
||||
+ .long 0xc0 # Length of Compilation Unit Info
|
||||
+ .value 0x4 # DWARF version number
|
||||
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
|
||||
+ .byte 0x8 # Pointer Size (in bytes)
|
||||
+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
|
||||
+ .long .LASF1 # DW_AT_producer: "GNU C 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+ .byte 0x1 # DW_AT_language
|
||||
+ .long .LASF2 # DW_AT_name: "gdb.arch/amd64-prologue-xmm.c"
|
||||
+ .long .LASF3 # DW_AT_comp_dir: ""
|
||||
+ .quad .Ltext0 # DW_AT_low_pc
|
||||
+ .quad .Letext0 # DW_AT_high_pc
|
||||
+ .long .Ldebug_line0 # DW_AT_stmt_list
|
||||
+ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
|
||||
+ .long .LASF4 # DW_AT_name: "func"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .quad .LFB0 # DW_AT_low_pc
|
||||
+ .quad .LFE0 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .long 0x59 # DW_AT_sibling
|
||||
+ .uleb128 0x3 # (DIE (0x4a) DW_TAG_formal_parameter)
|
||||
+ .ascii "i\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .uleb128 0x3 # DW_AT_location
|
||||
+ .byte 0x91 # DW_OP_fbreg
|
||||
+ .sleb128 -196
|
||||
+ .uleb128 0x4 # (DIE (0x57) DW_TAG_unspecified_parameters)
|
||||
+ .byte 0 # end of children of DIE 0x2d
|
||||
+ .uleb128 0x5 # (DIE (0x59) DW_TAG_base_type)
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+ .byte 0x5 # DW_AT_encoding
|
||||
+ .ascii "int\0" # DW_AT_name
|
||||
+ .uleb128 0x6 # (DIE (0x60) DW_TAG_subprogram)
|
||||
+ .long .LASF5 # DW_AT_name: "marker"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x1b # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .quad .LFB1 # DW_AT_low_pc
|
||||
+ .quad .LFE1 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .uleb128 0x7 # (DIE (0x79) DW_TAG_subprogram)
|
||||
+ # DW_AT_external
|
||||
+ .long .LASF6 # DW_AT_name: "main"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x20 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .quad .LFB2 # DW_AT_low_pc
|
||||
+ .quad .LFE2 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_tail_call_sites
|
||||
+ .uleb128 0x8 # (DIE (0x96) DW_TAG_variable)
|
||||
+ .ascii "v\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x12 # DW_AT_decl_line
|
||||
+ .long 0xa9 # DW_AT_type
|
||||
+ .uleb128 0x9 # DW_AT_location
|
||||
+ .byte 0x3 # DW_OP_addr
|
||||
+ .quad v
|
||||
+ .uleb128 0x9 # (DIE (0xa9) DW_TAG_volatile_type)
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .uleb128 0xa # (DIE (0xae) DW_TAG_variable)
|
||||
+ .long .LASF0 # DW_AT_name: "fail"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x12 # DW_AT_decl_line
|
||||
+ .long 0xa9 # DW_AT_type
|
||||
+ .uleb128 0x9 # DW_AT_location
|
||||
+ .byte 0x3 # DW_OP_addr
|
||||
+ .quad fail
|
||||
+ .byte 0 # end of children of DIE 0xb
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
+.Ldebug_abbrev0:
|
||||
+ .uleb128 0x1 # (abbrev code)
|
||||
+ .uleb128 0x11 # (TAG: 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 0x10 # (DW_AT_stmt_list)
|
||||
+ .uleb128 0x17 # (DW_FORM_sec_offset)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x2 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x1 # (DW_AT_sibling)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x3 # (abbrev code)
|
||||
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x4 # (abbrev code)
|
||||
+ .uleb128 0x18 # (TAG: DW_TAG_unspecified_parameters)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x5 # (abbrev code)
|
||||
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
|
||||
+ .byte 0 # DW_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 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x6 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x7 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3f # (DW_AT_external)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2116 # (DW_AT_GNU_all_tail_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x8 # (abbrev code)
|
||||
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x9 # (abbrev code)
|
||||
+ .uleb128 0x35 # (TAG: DW_TAG_volatile_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xa # (abbrev code)
|
||||
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .section .debug_aranges,"",@progbits
|
||||
+ .long 0x2c # Length of Address Ranges Info
|
||||
+ .value 0x2 # DWARF Version
|
||||
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
|
||||
+ .byte 0x8 # Size of Address
|
||||
+ .byte 0 # Size of Segment Descriptor
|
||||
+ .value 0 # Pad to 16 byte boundary
|
||||
+ .value 0
|
||||
+ .quad .Ltext0 # Address
|
||||
+ .quad .Letext0-.Ltext0 # Length
|
||||
+ .quad 0
|
||||
+ .quad 0
|
||||
+ .section .debug_line,"",@progbits
|
||||
+.Ldebug_line0:
|
||||
+ .section .debug_str,"MS",@progbits,1
|
||||
+.LASF3:
|
||||
+ .string ""
|
||||
+.LASF0:
|
||||
+ .string "fail"
|
||||
+.LASF4:
|
||||
+ .string "func"
|
||||
+.LASF1:
|
||||
+ .string "GNU C 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+.LASF2:
|
||||
+ .string "gdb.arch/amd64-prologue-xmm.c"
|
||||
+.LASF5:
|
||||
+ .string "marker"
|
||||
+.LASF6:
|
||||
+ .string "main"
|
||||
+ .ident "GCC: (GNU) 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
|
118
gdb-gcc47-gcore-zero.patch
Normal file
118
gdb-gcc47-gcore-zero.patch
Normal file
@ -0,0 +1,118 @@
|
||||
http://sourceware.org/ml/binutils/2011-12/msg00298.html
|
||||
Subject: [patch] Fix zero registers core files w/gcc-4.7
|
||||
|
||||
Hello H.J.,
|
||||
|
||||
there is a regression by:
|
||||
commit 2c9c556617a7de8657c25b512d272c26b070ae22
|
||||
Author: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Thu Jun 16 22:08:10 2011 +0000
|
||||
Suport x32 gcore.
|
||||
|
||||
when built with -O2 by
|
||||
gcc (GCC) 4.7.0 20111223 (experimental)
|
||||
(not by 4.6.x)
|
||||
|
||||
as the code violates ISO C99 6.2.4 item 5 by using local variable outside of
|
||||
its block, GCC optimizes out the second memcpy, keeping there only that
|
||||
memset.
|
||||
|
||||
./gdb -nx ./gdb -ex start -ex 'gcore 1' -ex 'set confirm no' -ex q;gdb -nx ./gdb ./1 -ex q
|
||||
will print:
|
||||
Core was generated by `.../gdb/gdb'.
|
||||
#0 0x0000000000000000 in ?? ()
|
||||
|
||||
No regressions on x86_64-fedora16-linux-gnu.
|
||||
|
||||
Probably obvious, OK to check it in?
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
bfd/
|
||||
2011-12-23 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix zero registers core files when built by gcc-4.7.
|
||||
* elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
|
||||
size. Call elfcore_write_note for the local variables. Remove the
|
||||
final elfcore_write_note call. Add NOTREACHED comments.
|
||||
|
||||
--- a/bfd/elf64-x86-64.c
|
||||
+++ b/bfd/elf64-x86-64.c
|
||||
@@ -420,8 +420,6 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
|
||||
int note_type, ...)
|
||||
{
|
||||
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
||||
- const void *p;
|
||||
- int size;
|
||||
va_list ap;
|
||||
const char *fname, *psargs;
|
||||
long pid;
|
||||
@@ -445,8 +443,8 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
|
||||
memset (&data, 0, sizeof (data));
|
||||
strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
|
||||
strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
|
||||
- p = (const void *) &data;
|
||||
- size = sizeof (data);
|
||||
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
|
||||
+ &data, sizeof (data));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -454,10 +452,10 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
|
||||
memset (&data, 0, sizeof (data));
|
||||
strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
|
||||
strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
|
||||
- p = (const void *) &data;
|
||||
- size = sizeof (data);
|
||||
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
|
||||
+ &data, sizeof (data));
|
||||
}
|
||||
- break;
|
||||
+ /* NOTREACHED */
|
||||
|
||||
case NT_PRSTATUS:
|
||||
va_start (ap, note_type);
|
||||
@@ -475,8 +473,8 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
|
||||
prstat.pr_pid = pid;
|
||||
prstat.pr_cursig = cursig;
|
||||
memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
|
||||
- p = (const void *) &prstat;
|
||||
- size = sizeof (prstat);
|
||||
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
|
||||
+ &prstat, sizeof (prstat));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -485,8 +483,8 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
|
||||
prstat.pr_pid = pid;
|
||||
prstat.pr_cursig = cursig;
|
||||
memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
|
||||
- p = (const void *) &prstat;
|
||||
- size = sizeof (prstat);
|
||||
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
|
||||
+ &prstat, sizeof (prstat));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -496,14 +494,11 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
|
||||
prstat.pr_pid = pid;
|
||||
prstat.pr_cursig = cursig;
|
||||
memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
|
||||
- p = (const void *) &prstat;
|
||||
- size = sizeof (prstat);
|
||||
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
|
||||
+ &prstat, sizeof (prstat));
|
||||
}
|
||||
- break;
|
||||
}
|
||||
-
|
||||
- return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type, p,
|
||||
- size);
|
||||
+ /* NOTREACHED */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -40,16 +40,16 @@ Subject: [PATCH 4/4] add gdb-add-index
|
||||
5 files changed, 57 insertions(+), 1 deletions(-)
|
||||
create mode 100755 gdb/gdb-add-index
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/Makefile.in
|
||||
Index: gdb-7.4.50.20120103/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/Makefile.in 2010-11-16 08:03:17.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/Makefile.in 2010-11-16 08:47:45.000000000 +0100
|
||||
@@ -986,7 +986,16 @@ install-only: install-gstack $(CONFIG_IN
|
||||
$(SHELL) $(srcdir)/../mkinstalldirs \
|
||||
$(DESTDIR)$(man1dir) ; \
|
||||
--- gdb-7.4.50.20120103.orig/gdb/Makefile.in 2012-01-03 05:53:25.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/Makefile.in 2012-01-03 15:24:25.693543435 +0100
|
||||
@@ -1033,7 +1033,16 @@ install-only: install-gstack $(CONFIG_IN
|
||||
$(INSTALL_DATA) $(srcdir)/gdb.1 \
|
||||
- $(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||
+ $(DESTDIR)$(man1dir)/$$transformed_name.1; \
|
||||
$(DESTDIR)$(man1dir)/$$transformed_name.1 ; \
|
||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
|
||||
- $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
|
||||
+ $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h; \
|
||||
+ transformed_name=`t='$(program_transform_name)'; \
|
||||
+ echo gdb-add-index | sed -e "$$t"` ; \
|
||||
+ if test "x$$transformed_name" = x; then \
|
||||
@ -60,13 +60,13 @@ Index: gdb-7.2.50.20101116/gdb/Makefile.in
|
||||
+ $(INSTALL_PROGRAM) $(srcdir)/gdb-add-index \
|
||||
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT)
|
||||
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||
.PHONY: install-tui
|
||||
install-tui:
|
||||
Index: gdb-7.2.50.20101116/gdb/doc/gdb.texinfo
|
||||
|
||||
install-python:
|
||||
Index: gdb-7.4.50.20120103/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/doc/gdb.texinfo 2010-11-16 08:04:18.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/doc/gdb.texinfo 2010-11-16 08:56:30.000000000 +0100
|
||||
@@ -15500,6 +15500,14 @@ There are currently some limitation on i
|
||||
--- gdb-7.4.50.20120103.orig/gdb/doc/gdb.texinfo 2012-01-03 15:20:54.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/doc/gdb.texinfo 2012-01-03 15:23:43.295231946 +0100
|
||||
@@ -16228,6 +16228,14 @@ There are currently some limitation on i
|
||||
for DWARF debugging information, not stabs. And, they do not
|
||||
currently work for programs using Ada.
|
||||
|
||||
@ -81,10 +81,10 @@ Index: gdb-7.2.50.20101116/gdb/doc/gdb.texinfo
|
||||
@node Symbol Errors
|
||||
@section Errors Reading Symbol Files
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/gdb-add-index
|
||||
Index: gdb-7.4.50.20120103/gdb/gdb-add-index
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101116/gdb/gdb-add-index 2010-11-16 08:47:45.000000000 +0100
|
||||
+++ gdb-7.4.50.20120103/gdb/gdb-add-index 2012-01-03 15:23:43.296231942 +0100
|
||||
@@ -0,0 +1,30 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
|
@ -1,110 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-09/msg00450.html
|
||||
Subject: [patch 1/2] Code cleanup: Unify dwarf2_per_cu_addr_size, dwarf2_per_cu_offset_size
|
||||
|
||||
Hi,
|
||||
|
||||
this is more rather for patch 2/2, it has positive LoC change but still
|
||||
I would find it applicable even on its own.
|
||||
|
||||
No functionality change intended.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Code cleanup.
|
||||
* dwarf2read.c (per_cu_header_read_in): New function.
|
||||
(dwarf2_per_cu_addr_size, dwarf2_per_cu_offset_size): Use it, with new
|
||||
variables cu_header_local and cu_headerp.
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -15187,26 +15187,42 @@ dwarf2_per_cu_objfile (struct dwarf2_per_cu_data *per_cu)
|
||||
return objfile;
|
||||
}
|
||||
|
||||
+/* Return comp_unit_head for PER_CU, either already available in PER_CU->CU
|
||||
+ (CU_HEADERP is unused in such case) or prepare a temporary copy at
|
||||
+ CU_HEADERP first. */
|
||||
+
|
||||
+static const struct comp_unit_head *
|
||||
+per_cu_header_read_in (struct comp_unit_head *cu_headerp,
|
||||
+ struct dwarf2_per_cu_data *per_cu)
|
||||
+{
|
||||
+ struct objfile *objfile;
|
||||
+ struct dwarf2_per_objfile *per_objfile;
|
||||
+ gdb_byte *info_ptr;
|
||||
+
|
||||
+ if (per_cu->cu)
|
||||
+ return &per_cu->cu->header;
|
||||
+
|
||||
+ objfile = per_cu->objfile;
|
||||
+ per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
|
||||
+ info_ptr = per_objfile->info.buffer + per_cu->offset;
|
||||
+
|
||||
+ memset (cu_headerp, 0, sizeof (*cu_headerp));
|
||||
+ read_comp_unit_head (cu_headerp, info_ptr, objfile->obfd);
|
||||
+
|
||||
+ return cu_headerp;
|
||||
+}
|
||||
+
|
||||
/* Return the address size given in the compilation unit header for CU. */
|
||||
|
||||
CORE_ADDR
|
||||
dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *per_cu)
|
||||
{
|
||||
- if (per_cu->cu)
|
||||
- return per_cu->cu->header.addr_size;
|
||||
- else
|
||||
- {
|
||||
- /* If the CU is not currently read in, we re-read its header. */
|
||||
- struct objfile *objfile = per_cu->objfile;
|
||||
- struct dwarf2_per_objfile *per_objfile
|
||||
- = objfile_data (objfile, dwarf2_objfile_data_key);
|
||||
- gdb_byte *info_ptr = per_objfile->info.buffer + per_cu->offset;
|
||||
- struct comp_unit_head cu_header;
|
||||
+ struct comp_unit_head cu_header_local;
|
||||
+ const struct comp_unit_head *cu_headerp;
|
||||
|
||||
- memset (&cu_header, 0, sizeof cu_header);
|
||||
- read_comp_unit_head (&cu_header, info_ptr, objfile->obfd);
|
||||
- return cu_header.addr_size;
|
||||
- }
|
||||
+ cu_headerp = per_cu_header_read_in (&cu_header_local, per_cu);
|
||||
+
|
||||
+ return cu_headerp->addr_size;
|
||||
}
|
||||
|
||||
/* Return the offset size given in the compilation unit header for CU. */
|
||||
@@ -15214,21 +15230,12 @@ dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *per_cu)
|
||||
int
|
||||
dwarf2_per_cu_offset_size (struct dwarf2_per_cu_data *per_cu)
|
||||
{
|
||||
- if (per_cu->cu)
|
||||
- return per_cu->cu->header.offset_size;
|
||||
- else
|
||||
- {
|
||||
- /* If the CU is not currently read in, we re-read its header. */
|
||||
- struct objfile *objfile = per_cu->objfile;
|
||||
- struct dwarf2_per_objfile *per_objfile
|
||||
- = objfile_data (objfile, dwarf2_objfile_data_key);
|
||||
- gdb_byte *info_ptr = per_objfile->info.buffer + per_cu->offset;
|
||||
- struct comp_unit_head cu_header;
|
||||
+ struct comp_unit_head cu_header_local;
|
||||
+ const struct comp_unit_head *cu_headerp;
|
||||
|
||||
- memset (&cu_header, 0, sizeof cu_header);
|
||||
- read_comp_unit_head (&cu_header, info_ptr, objfile->obfd);
|
||||
- return cu_header.offset_size;
|
||||
- }
|
||||
+ cu_headerp = per_cu_header_read_in (&cu_header_local, per_cu);
|
||||
+
|
||||
+ return cu_headerp->offset_size;
|
||||
}
|
||||
|
||||
/* Return the text offset of the CU. The returned offset comes from
|
||||
|
@ -1,411 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-09/msg00451.html
|
||||
Subject: [patch 2/2] Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches
|
||||
|
||||
Hi,
|
||||
|
||||
on 64-bit targets DWARF-3+ is used DW_OP_GNU_implicit_pointer does not work.
|
||||
|
||||
DWARF-2 says:
|
||||
This type of reference (DW_FORM_ref_addr) is the size of an address on
|
||||
the target architecture;
|
||||
DWARF-3 says:
|
||||
1.5.1 Upward Compatibility
|
||||
References that use the attribute form DW_FORM_ref_addr are specified
|
||||
to be four bytes in the DWARF 32-bit format and eight bytes in the
|
||||
DWARF 64-bit format, while DWARF Version 2 specifies that such
|
||||
references have the same size as an address on the target system (see
|
||||
Sections 7.4 and 7.5.4).
|
||||
|
||||
(DW_FORM_ref_addr)
|
||||
In the 32-bit DWARF format, this offset is a 4-byte unsigned value; in
|
||||
the 64-bit DWARF format, it is an 8-byte unsigned value (see Section
|
||||
7.4).
|
||||
|
||||
GDB currently parsed DW_OP_GNU_implicit_pointer the DWARF-2 way, being
|
||||
incompatible with DWARF-3+.
|
||||
|
||||
I think DW_OP_GNU_implicit_pointer does not make sense to be used from
|
||||
.debug_frame (DWARF-5 is not yet released to say more) so for .debug_frame its
|
||||
use is just not permitted (the code would be more complicated otherwise).
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches.
|
||||
* dwarf2-frame.c (execute_stack_op): Initialize ctx->ref_addr_size.
|
||||
* dwarf2expr.c (execute_stack_op) <DW_OP_GNU_implicit_pointer>: Use
|
||||
ctx->ref_addr_size. Handle its invalid value.
|
||||
* dwarf2expr.h (struct dwarf_expr_context): New field ref_addr_size.
|
||||
* dwarf2loc.c (dwarf2_evaluate_loc_desc_full)
|
||||
(dwarf2_loc_desc_needs_frame): Initialize ctx->ref_addr_size.
|
||||
* dwarf2loc.h (dwarf2_per_cu_ref_addr_size): New declaration.
|
||||
* dwarf2read.c (decode_locdesc): Initialize ctx->ref_addr_size.
|
||||
(dwarf2_per_cu_ref_addr_size): New function.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches.
|
||||
* gdb.dwarf2/implptr-64bit.S: New file.
|
||||
* gdb.dwarf2/implptr-64bit.exp: New file.
|
||||
|
||||
--- a/gdb/dwarf2-frame.c
|
||||
+++ b/gdb/dwarf2-frame.c
|
||||
@@ -371,6 +371,7 @@ execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size,
|
||||
|
||||
ctx->gdbarch = get_frame_arch (this_frame);
|
||||
ctx->addr_size = addr_size;
|
||||
+ ctx->ref_addr_size = -1;
|
||||
ctx->offset = offset;
|
||||
ctx->baton = this_frame;
|
||||
ctx->funcs = &dwarf2_frame_ctx_funcs;
|
||||
--- a/gdb/dwarf2expr.c
|
||||
+++ b/gdb/dwarf2expr.c
|
||||
@@ -709,10 +709,14 @@ execute_stack_op (struct dwarf_expr_context *ctx,
|
||||
ULONGEST die;
|
||||
LONGEST len;
|
||||
|
||||
+ if (ctx->ref_addr_size == -1)
|
||||
+ error (_("DWARF-2 expression error: DW_OP_GNU_implicit_pointer "
|
||||
+ "is not allowed in frame context"));
|
||||
+
|
||||
/* The referred-to DIE. */
|
||||
- ctx->len = extract_unsigned_integer (op_ptr, ctx->addr_size,
|
||||
+ ctx->len = extract_unsigned_integer (op_ptr, ctx->ref_addr_size,
|
||||
byte_order);
|
||||
- op_ptr += ctx->addr_size;
|
||||
+ op_ptr += ctx->ref_addr_size;
|
||||
|
||||
/* The byte offset into the data. */
|
||||
op_ptr = read_sleb128 (op_ptr, op_end, &len);
|
||||
--- a/gdb/dwarf2expr.h
|
||||
+++ b/gdb/dwarf2expr.h
|
||||
@@ -125,6 +125,10 @@ struct dwarf_expr_context
|
||||
/* Target address size in bytes. */
|
||||
int addr_size;
|
||||
|
||||
+ /* DW_FORM_ref_addr size in bytes. If -1 DWARF is executed from a frame
|
||||
+ context and operations depending on DW_FORM_ref_addr are not allowed. */
|
||||
+ int ref_addr_size;
|
||||
+
|
||||
/* Offset used to relocate DW_OP_addr argument. */
|
||||
CORE_ADDR offset;
|
||||
|
||||
--- a/gdb/dwarf2loc.c
|
||||
+++ b/gdb/dwarf2loc.c
|
||||
@@ -1118,6 +1118,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
|
||||
ctx->gdbarch = get_objfile_arch (objfile);
|
||||
ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
|
||||
+ ctx->ref_addr_size = dwarf2_per_cu_ref_addr_size (per_cu);
|
||||
ctx->offset = dwarf2_per_cu_text_offset (per_cu);
|
||||
ctx->baton = &baton;
|
||||
ctx->funcs = &dwarf_expr_ctx_funcs;
|
||||
@@ -1398,6 +1399,7 @@ dwarf2_loc_desc_needs_frame (const gdb_byte *data, unsigned short size,
|
||||
|
||||
ctx->gdbarch = get_objfile_arch (objfile);
|
||||
ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
|
||||
+ ctx->ref_addr_size = dwarf2_per_cu_ref_addr_size (per_cu);
|
||||
ctx->offset = dwarf2_per_cu_text_offset (per_cu);
|
||||
ctx->baton = &baton;
|
||||
ctx->funcs = &needs_frame_ctx_funcs;
|
||||
--- a/gdb/dwarf2loc.h
|
||||
+++ b/gdb/dwarf2loc.h
|
||||
@@ -39,6 +39,10 @@ struct objfile *dwarf2_per_cu_objfile (struct dwarf2_per_cu_data *cu);
|
||||
/* Return the address size given in the compilation unit header for CU. */
|
||||
CORE_ADDR dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *cu);
|
||||
|
||||
+/* Return the DW_FORM_ref_addr size given in the compilation unit header for
|
||||
+ CU. */
|
||||
+int dwarf2_per_cu_ref_addr_size (struct dwarf2_per_cu_data *cu);
|
||||
+
|
||||
/* Return the offset size given in the compilation unit header for CU. */
|
||||
int dwarf2_per_cu_offset_size (struct dwarf2_per_cu_data *cu);
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -15238,6 +15239,22 @@ dwarf2_per_cu_offset_size (struct dwarf2_per_cu_data *per_cu)
|
||||
return cu_headerp->offset_size;
|
||||
}
|
||||
|
||||
+/* See its dwarf2loc.h declaration. */
|
||||
+
|
||||
+int
|
||||
+dwarf2_per_cu_ref_addr_size (struct dwarf2_per_cu_data *per_cu)
|
||||
+{
|
||||
+ struct comp_unit_head cu_header_local;
|
||||
+ const struct comp_unit_head *cu_headerp;
|
||||
+
|
||||
+ cu_headerp = per_cu_header_read_in (&cu_header_local, per_cu);
|
||||
+
|
||||
+ if (cu_headerp->version == 2)
|
||||
+ return cu_headerp->addr_size;
|
||||
+ else
|
||||
+ return cu_headerp->offset_size;
|
||||
+}
|
||||
+
|
||||
/* Return the text offset of the CU. The returned offset comes from
|
||||
this CU's objfile. If this objfile came from a separate debuginfo
|
||||
file, then the offset may be different from the corresponding
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.S
|
||||
@@ -0,0 +1,197 @@
|
||||
+/* Copyright 2010, 2011 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
|
||||
+d:
|
||||
+ /* Length of Compilation Unit Info */
|
||||
+#if OFFSET_SIZE == 4
|
||||
+# define OFFSET .4byte
|
||||
+ .4byte debug_end - 1f
|
||||
+#elif OFFSET_SIZE == 8
|
||||
+# define OFFSET .8byte
|
||||
+ .4byte 0xffffffff
|
||||
+ .8byte debug_end - 1f
|
||||
+#else
|
||||
+# error
|
||||
+#endif
|
||||
+#if ADDR_SIZE == 4
|
||||
+# define ADDR .4byte
|
||||
+#elif ADDR_SIZE == 8
|
||||
+# define ADDR .8byte
|
||||
+#else
|
||||
+# error
|
||||
+#endif
|
||||
+#if REF_ADDR_SIZE == 4
|
||||
+# define REF_ADDR .4byte
|
||||
+#elif REF_ADDR_SIZE == 8
|
||||
+# define REF_ADDR .8byte
|
||||
+#else
|
||||
+# error
|
||||
+#endif
|
||||
+1:
|
||||
+ .2byte DWARF_VERSION /* DWARF version number */
|
||||
+ OFFSET .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
|
||||
+ .byte ADDR_SIZE /* Pointer Size (in bytes) */
|
||||
+
|
||||
+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */
|
||||
+ .ascii "GNU C 4.4.3\0" /* DW_AT_producer */
|
||||
+ .byte 0x1 /* DW_AT_language */
|
||||
+ .ascii "1.c\0" /* DW_AT_name */
|
||||
+
|
||||
+.Ltype_int:
|
||||
+ .uleb128 0x7 /* DW_TAG_base_type */
|
||||
+ .byte 0x4 /* DW_AT_byte_size */
|
||||
+ .byte 0x5 /* DW_AT_encoding */
|
||||
+ .ascii "int\0" /* DW_AT_name */
|
||||
+
|
||||
+.Ltype_struct:
|
||||
+ .uleb128 0x2 /* DW_TAG_structure_type */
|
||||
+ .ascii "s\0" /* DW_AT_name */
|
||||
+ .byte 4 /* DW_AT_byte_size */
|
||||
+
|
||||
+ .uleb128 0x3 /* DW_TAG_member */
|
||||
+ .ascii "f\0" /* DW_AT_name */
|
||||
+ .4byte .Ltype_int - d /* DW_AT_type */
|
||||
+ .byte 0 /* DW_AT_data_member_location */
|
||||
+
|
||||
+ .byte 0x0 /* end of children of DW_TAG_structure_type */
|
||||
+
|
||||
+ .uleb128 6 /* Abbrev: DW_TAG_subprogram */
|
||||
+ .ascii "main\0" /* DW_AT_name */
|
||||
+ ADDR main /* DW_AT_low_pc */
|
||||
+ ADDR main + 0x100 /* DW_AT_high_pc */
|
||||
+ .4byte .Ltype_int - d /* DW_AT_type */
|
||||
+ .byte 1 /* DW_AT_external */
|
||||
+
|
||||
+.Ltype_structptr:
|
||||
+ .uleb128 0x5 /* DW_TAG_pointer_type */
|
||||
+ .byte ADDR_SIZE /* DW_AT_byte_size */
|
||||
+ .4byte .Ltype_struct - d /* DW_AT_type */
|
||||
+
|
||||
+.Lvar_out:
|
||||
+ .uleb128 0x4 /* (DW_TAG_variable) */
|
||||
+ .ascii "v\0" /* DW_AT_name */
|
||||
+ .byte 2f - 1f /* DW_AT_location: DW_FORM_block1 */
|
||||
+1:
|
||||
+ .byte 0x9e /* DW_OP_implicit_value */
|
||||
+ .uleb128 2f - 3f
|
||||
+3:
|
||||
+ .byte 1, 1, 1, 1
|
||||
+2:
|
||||
+ .4byte .Ltype_struct - d /* DW_AT_type */
|
||||
+
|
||||
+ .uleb128 0x4 /* (DW_TAG_variable) */
|
||||
+ .ascii "p\0" /* DW_AT_name */
|
||||
+ .byte 2f - 1f /* DW_AT_location: DW_FORM_block1 */
|
||||
+1:
|
||||
+ .byte 0xf2 /* DW_OP_GNU_implicit_pointer */
|
||||
+ REF_ADDR .Lvar_out - d /* referenced DIE */
|
||||
+ .sleb128 0 /* offset */
|
||||
+2:
|
||||
+ .4byte .Ltype_structptr - d /* DW_AT_type */
|
||||
+
|
||||
+ .byte 0x0 /* end of children of main */
|
||||
+
|
||||
+ .byte 0x0 /* end of children of CU */
|
||||
+debug_end:
|
||||
+
|
||||
+ .section .debug_abbrev
|
||||
+.Ldebug_abbrev0:
|
||||
+
|
||||
+ .uleb128 0x1 /* (abbrev code) */
|
||||
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x25 /* (DW_AT_producer) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x13 /* (DW_AT_language) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+
|
||||
+ .uleb128 0x2 /* (abbrev code) */
|
||||
+ .uleb128 0x13 /* (TAG: DW_TAG_structure_type) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0xb /* (DW_AT_byte_size) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+
|
||||
+ .uleb128 0x3 /* (abbrev code) */
|
||||
+ .uleb128 0xd /* (TAG: DW_TAG_member) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .uleb128 0x38 /* (DW_AT_data_member_location) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+
|
||||
+ .uleb128 0x4 /* (abbrev code) */
|
||||
+ .uleb128 0x34 /* (TAG: DW_TAG_variable) */
|
||||
+ .byte 0x0 /* DW_children_yes */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x02 /* (DW_AT_location) */
|
||||
+ .uleb128 0xa /* (DW_FORM_block1) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+
|
||||
+ .uleb128 0x5 /* (abbrev code) */
|
||||
+ .uleb128 0xf /* (TAG: DW_TAG_pointer_type) */
|
||||
+ .byte 0x0 /* DW_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 6 /* Abbrev code */
|
||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
||||
+ .byte 1 /* has_children */
|
||||
+ .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 */
|
||||
+ .uleb128 0x49 /* DW_AT_type */
|
||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
||||
+ .uleb128 0x3f /* DW_AT_external */
|
||||
+ .uleb128 0xc /* DW_FORM_flag */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 0x7 /* (abbrev code) */
|
||||
+ .uleb128 0x24 /* (TAG: DW_TAG_base_type) */
|
||||
+ .byte 0 /* DW_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 0
|
||||
+ .byte 0
|
||||
+
|
||||
+ .byte 0x0
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
|
||||
@@ -0,0 +1,51 @@
|
||||
+# Copyright 2011 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/>.
|
||||
+load_lib dwarf.exp
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+if {![dwarf2_support]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "implptr-64bit"
|
||||
+set srcfile ${testfile}.S
|
||||
+set mainfile main.c
|
||||
+
|
||||
+proc test { dwarf_version offset_size addr_size ref_addr_size } {
|
||||
+ global testfile srcfile mainfile
|
||||
+
|
||||
+ set opts {}
|
||||
+ foreach n { dwarf_version offset_size addr_size ref_addr_size } {
|
||||
+ lappend opts "additional_flags=-D[string toupper $n]=[expr "\$$n"]"
|
||||
+ }
|
||||
+
|
||||
+ set name "d${dwarf_version}o${offset_size}a${addr_size}r${ref_addr_size}"
|
||||
+ set executable ${testfile}-${name}
|
||||
+ if [prepare_for_testing ${testfile}.exp $executable "${srcfile} ${mainfile}" $opts] {
|
||||
+ return -1
|
||||
+ }
|
||||
+
|
||||
+ if ![runto_main] {
|
||||
+ return -1
|
||||
+ }
|
||||
+
|
||||
+ gdb_test "p/x p->f" " = 0x1010101" $name
|
||||
+}
|
||||
+
|
||||
+# DWARF_VERSION OFFSET_SIZE ADDR_SIZE REF_ADDR_SIZE
|
||||
+test 2 8 4 4
|
||||
+test 2 4 8 8
|
||||
+test 3 8 4 8
|
||||
+test 3 4 8 4
|
||||
|
@ -1,302 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-09/msg00449.html
|
||||
Subject: [patch] Fix internal error on optimized-out values (regression by me)
|
||||
|
||||
Hi,
|
||||
|
||||
since:
|
||||
Re: [patch] Code cleanup: Introduce allocate_optimized_out_value
|
||||
http://sourceware.org/ml/gdb-patches/2011-07/msg00327.html
|
||||
acfe85f56075910a3ba5e8b76189e0770079b8d1
|
||||
can occur:
|
||||
(gdb) p p->f
|
||||
valops.c:1118: internal-error: Unexpected lazy value type.
|
||||
A problem internal to GDB has been detected,
|
||||
|
||||
in that mail referenced above:
|
||||
# It is true it would be definitely a bug in a code incompatible with such
|
||||
# change so one may rather fix that possible regression there.
|
||||
|
||||
so this testcase exploits such case. The problem is formerly the code
|
||||
allocated (in some cases) optimized out values as non-lazy ones. Now they are
|
||||
allocated all as lazy (*) which breaks some code not expecting lazy values.
|
||||
|
||||
(*) Such lazy optimized out value still gets silently allocate_value_contents
|
||||
by value_fetch_lazy, allocate_value_contents should be suppressed in such
|
||||
case; such more radical change has never been made.
|
||||
|
||||
Formerly (incl. gdb-7.3) did:
|
||||
(gdb) p p->f
|
||||
$1 = 0
|
||||
which was also wrong, ((struct *) <optimized out>)->field should be IMO still
|
||||
<optimized out>; just it became internal-error now.
|
||||
|
||||
GDB usually does require_not_optimized_out throwing error() when it meets any
|
||||
first <optimized out> value. I have just produced new optimized value
|
||||
instead; require_not_optimized_out is not exported and I find it better this
|
||||
way.
|
||||
|
||||
Following the rule that it is better if GDB does something wrong rather then
|
||||
it throws internal-error to make the patch from July above fully safe one
|
||||
would have to change allocate_optimized_out_value to allocate everything as
|
||||
non-lazy. I find that as a too ugly workaround of the codebase.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu.
|
||||
|
||||
|
||||
Andre, do you still see the bug even with this patch?
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix internal error regression.
|
||||
* value.c (value_primitive_field): Handle value_optimized_out. Move
|
||||
packed bitfields comment.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix internal error regression.
|
||||
* gdb.dwarf2/implptr-optimized-out.S: New file.
|
||||
* gdb.dwarf2/implptr-optimized-out.exp: New file.
|
||||
|
||||
--- a/gdb/value.c
|
||||
+++ b/gdb/value.c
|
||||
@@ -2482,16 +2482,19 @@ value_primitive_field (struct value *arg1, int offset,
|
||||
description correctly. */
|
||||
check_typedef (type);
|
||||
|
||||
- /* Handle packed fields */
|
||||
-
|
||||
- if (TYPE_FIELD_BITSIZE (arg_type, fieldno))
|
||||
+ if (value_optimized_out (arg1))
|
||||
+ v = allocate_optimized_out_value (type);
|
||||
+ else if (TYPE_FIELD_BITSIZE (arg_type, fieldno))
|
||||
{
|
||||
- /* Create a new value for the bitfield, with bitpos and bitsize
|
||||
+ /* Handle packed fields.
|
||||
+
|
||||
+ Create a new value for the bitfield, with bitpos and bitsize
|
||||
set. If possible, arrange offset and bitpos so that we can
|
||||
do a single aligned read of the size of the containing type.
|
||||
Otherwise, adjust offset to the byte containing the first
|
||||
bit. Assume that the address, offset, and embedded offset
|
||||
are sufficiently aligned. */
|
||||
+
|
||||
int bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
|
||||
int container_bitsize = TYPE_LENGTH (type) * 8;
|
||||
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.S
|
||||
@@ -0,0 +1,166 @@
|
||||
+/* Copyright 2010, 2011 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
|
||||
+d:
|
||||
+ .long debug_end - 1f /* Length of Compilation Unit Info */
|
||||
+1:
|
||||
+ .2byte 0x3 /* DWARF version number */
|
||||
+ .long .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
|
||||
+ .byte 0x4 /* Pointer Size (in bytes) */
|
||||
+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */
|
||||
+ .ascii "GNU C 4.4.3\0" /* DW_AT_producer */
|
||||
+ .byte 0x1 /* DW_AT_language */
|
||||
+ .ascii "1.c\0" /* DW_AT_name */
|
||||
+
|
||||
+.Ltype_int:
|
||||
+ .uleb128 0x7 /* DW_TAG_base_type */
|
||||
+ .byte 0x4 /* DW_AT_byte_size */
|
||||
+ .byte 0x5 /* DW_AT_encoding */
|
||||
+ .ascii "int\0" /* DW_AT_name */
|
||||
+
|
||||
+.Ltype_struct:
|
||||
+ .uleb128 0x2 /* DW_TAG_structure_type */
|
||||
+ .ascii "s\0" /* DW_AT_name */
|
||||
+ .byte 4 /* DW_AT_byte_size */
|
||||
+
|
||||
+ .uleb128 0x3 /* DW_TAG_member */
|
||||
+ .ascii "f\0" /* DW_AT_name */
|
||||
+ .4byte .Ltype_int - d /* DW_AT_type */
|
||||
+ .byte 0 /* DW_AT_data_member_location */
|
||||
+
|
||||
+ .byte 0x0 /* end of children of DW_TAG_structure_type */
|
||||
+
|
||||
+ .uleb128 6 /* Abbrev: DW_TAG_subprogram */
|
||||
+ .ascii "main\0" /* DW_AT_name */
|
||||
+ .4byte main /* DW_AT_low_pc */
|
||||
+ .4byte main + 0x100 /* DW_AT_high_pc */
|
||||
+ .4byte .Ltype_int - d /* DW_AT_type */
|
||||
+ .byte 1 /* DW_AT_external */
|
||||
+
|
||||
+.Ltype_structptr:
|
||||
+ .uleb128 0x5 /* DW_TAG_pointer_type */
|
||||
+ .byte 0x4 /* DW_AT_byte_size */
|
||||
+ .long .Ltype_struct - d /* DW_AT_type */
|
||||
+
|
||||
+.Lvar_out:
|
||||
+ .uleb128 0x4 /* (DW_TAG_variable) */
|
||||
+ .ascii "v\0" /* DW_AT_name */
|
||||
+ .byte 0 /* DW_AT_location: DW_FORM_block1 */
|
||||
+ .4byte .Ltype_struct - d /* DW_AT_type */
|
||||
+
|
||||
+ .uleb128 0x4 /* (DW_TAG_variable) */
|
||||
+ .ascii "p\0" /* DW_AT_name */
|
||||
+ .byte 2f - 1f /* DW_AT_location: DW_FORM_block1 */
|
||||
+1:
|
||||
+ .byte 0xf2 /* DW_OP_GNU_implicit_pointer */
|
||||
+ .4byte .Lvar_out - d /* referenced DIE */
|
||||
+ .sleb128 0 /* offset */
|
||||
+2:
|
||||
+ .4byte .Ltype_structptr - d /* DW_AT_type */
|
||||
+
|
||||
+ .byte 0x0 /* end of children of main */
|
||||
+
|
||||
+ .byte 0x0 /* end of children of CU */
|
||||
+debug_end:
|
||||
+
|
||||
+ .section .debug_abbrev
|
||||
+.Ldebug_abbrev0:
|
||||
+
|
||||
+ .uleb128 0x1 /* (abbrev code) */
|
||||
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x25 /* (DW_AT_producer) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x13 /* (DW_AT_language) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+
|
||||
+ .uleb128 0x2 /* (abbrev code) */
|
||||
+ .uleb128 0x13 /* (TAG: DW_TAG_structure_type) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0xb /* (DW_AT_byte_size) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+
|
||||
+ .uleb128 0x3 /* (abbrev code) */
|
||||
+ .uleb128 0xd /* (TAG: DW_TAG_member) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .uleb128 0x38 /* (DW_AT_data_member_location) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+
|
||||
+ .uleb128 0x4 /* (abbrev code) */
|
||||
+ .uleb128 0x34 /* (TAG: DW_TAG_variable) */
|
||||
+ .byte 0x0 /* DW_children_yes */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x02 /* (DW_AT_location) */
|
||||
+ .uleb128 0xa /* (DW_FORM_block1) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+
|
||||
+ .uleb128 0x5 /* (abbrev code) */
|
||||
+ .uleb128 0xf /* (TAG: DW_TAG_pointer_type) */
|
||||
+ .byte 0x0 /* DW_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 6 /* Abbrev code */
|
||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
||||
+ .byte 1 /* has_children */
|
||||
+ .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 */
|
||||
+ .uleb128 0x49 /* DW_AT_type */
|
||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
||||
+ .uleb128 0x3f /* DW_AT_external */
|
||||
+ .uleb128 0xc /* DW_FORM_flag */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 0x7 /* (abbrev code) */
|
||||
+ .uleb128 0x24 /* (TAG: DW_TAG_base_type) */
|
||||
+ .byte 0 /* DW_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 0
|
||||
+ .byte 0
|
||||
+
|
||||
+ .byte 0x0
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Copyright 2011 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/>.
|
||||
+load_lib dwarf.exp
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+if {![dwarf2_support]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "implptr-optimized-out"
|
||||
+set srcfile ${testfile}.S
|
||||
+set mainfile main.c
|
||||
+set executable ${testfile}
|
||||
+set binfile ${objdir}/${subdir}/${executable}
|
||||
+
|
||||
+if [prepare_for_testing ${testfile}.exp $executable "${srcfile} ${mainfile}" {}] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# DW_OP_GNU_implicit_pointer implementation requires a valid frame.
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "p p->f" " = <optimized out>"
|
||||
|
@ -1,11 +1,11 @@
|
||||
gdb/linux-nat.c:
|
||||
- Workaround RHEL-5 kernels for detaching SIGSTOPped processes (BZ 498595).
|
||||
|
||||
Index: gdb-7.2.50.20110328/gdb/elfread.c
|
||||
Index: gdb-7.4.50.20111218/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110328.orig/gdb/elfread.c 2011-03-28 18:46:16.000000000 +0200
|
||||
+++ gdb-7.2.50.20110328/gdb/elfread.c 2011-03-28 18:48:19.000000000 +0200
|
||||
@@ -1083,7 +1083,7 @@ elf_gnu_ifunc_resolver_return_stop (stru
|
||||
--- gdb-7.4.50.20111218.orig/gdb/elfread.c 2011-12-19 01:41:31.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/elfread.c 2011-12-19 02:31:30.998241760 +0100
|
||||
@@ -1053,7 +1053,7 @@ elf_gnu_ifunc_resolver_return_stop (stru
|
||||
#define BUILD_ID_VERBOSE_NONE 0
|
||||
#define BUILD_ID_VERBOSE_FILENAMES 1
|
||||
#define BUILD_ID_VERBOSE_BINARY_PARSE 2
|
||||
@ -14,7 +14,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
|
||||
static void
|
||||
show_build_id_verbose (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
@@ -2173,8 +2173,10 @@ find_separate_debug_file_by_buildid (str
|
||||
@@ -2172,8 +2172,10 @@ find_separate_debug_file_by_buildid (str
|
||||
if (build_id_name != NULL
|
||||
&& filename_cmp (build_id_name, objfile->name) == 0)
|
||||
{
|
||||
@ -25,11 +25,11 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
|
||||
xfree (build_id_name);
|
||||
}
|
||||
else if (build_id_name != NULL)
|
||||
Index: gdb-7.2.50.20110328/gdb/corelow.c
|
||||
Index: gdb-7.4.50.20111218/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110328.orig/gdb/corelow.c 2011-03-28 18:46:16.000000000 +0200
|
||||
+++ gdb-7.2.50.20110328/gdb/corelow.c 2011-03-28 18:47:56.000000000 +0200
|
||||
@@ -282,7 +282,7 @@ add_to_thread_list (bfd *abfd, asection
|
||||
--- gdb-7.4.50.20111218.orig/gdb/corelow.c 2011-12-19 01:16:15.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/corelow.c 2011-12-19 02:31:30.998241760 +0100
|
||||
@@ -282,7 +282,7 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@ -38,32 +38,3 @@ Index: gdb-7.2.50.20110328/gdb/corelow.c
|
||||
|
||||
static void
|
||||
build_id_locate_exec (int from_tty)
|
||||
Index: gdb-7.2.50.20110328/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110328.orig/gdb/linux-nat.c 2011-03-28 18:46:16.000000000 +0200
|
||||
+++ gdb-7.2.50.20110328/gdb/linux-nat.c 2011-03-28 18:47:56.000000000 +0200
|
||||
@@ -1774,8 +1774,22 @@ get_pending_status (struct lwp_info *lp,
|
||||
target_signal_to_string (signo));
|
||||
}
|
||||
|
||||
- if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
|
||||
- *status = W_STOPCODE (SIGSTOP);
|
||||
+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
|
||||
+ many TIDs are left unstopped). See RH Bug 496732. */
|
||||
+ if (GET_PID (lp->ptid) == pid_was_stopped)
|
||||
+ {
|
||||
+ int err;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ err = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
|
||||
+ if (debug_linux_nat)
|
||||
+ {
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "SC: lwp kill %d %s\n",
|
||||
+ err,
|
||||
+ errno ? safe_strerror (errno) : "ERRNO-OK");
|
||||
+ }
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
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.
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/vla.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.base/vla.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.base/vla.exp 2010-11-16 09:26:50.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/vla.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.base/vla.exp 2011-12-18 23:35:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.base/vla.exp 2011-12-19 02:27:16.745327844 +0100
|
||||
@@ -16,7 +16,25 @@
|
||||
set testfile vla
|
||||
set srcfile ${testfile}.c
|
||||
@ -32,11 +32,11 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/vla.exp
|
||||
untested "Couldn't compile test program"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/break-interp.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.base/break-interp.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.base/break-interp.exp 2010-10-12 20:41:06.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}] {
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.base/break-interp.exp 2011-12-19 02:21:56.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.base/break-interp.exp 2011-12-19 02:27:16.745327844 +0100
|
||||
@@ -34,9 +34,29 @@ if [get_compiler_info ${binfile_lib}] {
|
||||
return -1
|
||||
}
|
||||
|
||||
@ -67,10 +67,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/break-interp.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/common-block.exp 2010-11-16 09:26:54.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/common-block.exp 2011-12-19 01:31:24.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/common-block.exp 2011-12-19 02:27:16.746327840 +0100
|
||||
@@ -20,7 +20,25 @@ set testfile "common-block"
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
@ -98,10 +98,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
untested "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-11-16 09:26:50.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2011-12-18 23:35:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2011-12-19 02:27:16.746327840 +0100
|
||||
@@ -27,7 +27,25 @@
|
||||
set testfile dwarf-stride
|
||||
set srcfile ${testfile}.f90
|
||||
@ -129,10 +129,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2010-11-16 09:26:50.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dynamic.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2011-12-18 23:35:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/dynamic.exp 2011-12-19 02:27:16.746327840 +0100
|
||||
@@ -25,7 +25,25 @@ set testfile "dynamic"
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
@ -160,10 +160,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
untested "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/library-module.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/library-module.exp 2010-06-03 00:41:56.000000000 +0200
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/library-module.exp 2011-11-30 09:24:32.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/library-module.exp 2011-12-19 02:31:10.991318026 +0100
|
||||
@@ -25,16 +25,34 @@ if [get_compiler_info not-used] {
|
||||
return -1
|
||||
}
|
||||
@ -186,9 +186,9 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp
|
||||
# just for the linking phase (and not the source compilation phase). And any
|
||||
# warnings on ignored $libfile abort the process.
|
||||
|
||||
-if { [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f90}] != "" } {
|
||||
-if { [gdb_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable [list debug f90 shlib=$objdir/$subdir/$libfile]] != "" } {
|
||||
+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f90}]
|
||||
+set err2 [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f90}]
|
||||
+set err2 [gdb_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable [list debug f90 shlib=$objdir/$subdir/$libfile]]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
@ -203,10 +203,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp
|
||||
untested "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/module.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/module.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/module.exp 2010-09-22 21:22:44.000000000 +0200
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/module.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/module.exp 2011-06-30 00:05:16.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/module.exp 2011-12-19 02:27:16.747327836 +0100
|
||||
@@ -16,7 +16,25 @@
|
||||
set testfile "module"
|
||||
set srcfile ${testfile}.f90
|
||||
@ -234,10 +234,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/module.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/string.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/string.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/string.exp 2010-11-16 09:26:50.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/string.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/string.exp 2011-12-18 23:35:23.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/string.exp 2011-12-19 02:27:16.747327836 +0100
|
||||
@@ -23,7 +23,25 @@ set testfile "string"
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
@ -265,10 +265,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/string.exp
|
||||
untested "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2010-11-16 09:26:54.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/omp-step.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2011-12-19 01:31:24.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/omp-step.exp 2011-12-19 02:27:16.748327832 +0100
|
||||
@@ -15,7 +15,26 @@
|
||||
|
||||
set testfile "omp-step"
|
||||
@ -297,10 +297,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/derived-type.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/derived-type.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2010-01-01 08:32:02.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/derived-type.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2011-06-29 19:50:47.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/derived-type.exp 2011-12-19 02:27:16.748327832 +0100
|
||||
@@ -28,8 +28,26 @@ set testfile "derived-type"
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
@ -330,10 +330,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/derived-type.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/subarray.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/subarray.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/subarray.exp 2010-01-01 08:32:02.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/subarray.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/subarray.exp 2011-06-29 19:50:47.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/subarray.exp 2011-12-19 02:27:16.748327832 +0100
|
||||
@@ -28,8 +28,26 @@ set testfile "subarray"
|
||||
set srcfile ${testfile}.f
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
@ -363,10 +363,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/subarray.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-11-16 09:26:51.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-11-16 09:27:20.000000000 +0100
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2011-12-19 00:28:11.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2011-12-19 02:27:16.748327832 +0100
|
||||
@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
|
||||
|
||||
# FIXME: gcc dependency (-Wl,-soname).
|
||||
@ -394,11 +394,11 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
untested "Couldn't compile test library"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/lib/prelink-support.exp
|
||||
Index: gdb-7.4.50.20111218/gdb/testsuite/lib/prelink-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/testsuite/lib/prelink-support.exp 2010-10-12 20:12:49.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} {
|
||||
--- gdb-7.4.50.20111218.orig/gdb/testsuite/lib/prelink-support.exp 2011-12-19 02:21:56.000000000 +0100
|
||||
+++ gdb-7.4.50.20111218/gdb/testsuite/lib/prelink-support.exp 2011-12-19 02:27:16.749327828 +0100
|
||||
@@ -119,9 +119,31 @@ proc file_copy {src dest} {
|
||||
proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} {
|
||||
global objdir subdir
|
||||
|
||||
@ -415,7 +415,7 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/lib/prelink-support.exp
|
||||
+ unset_board_info compiler
|
||||
+ } elseif [info exists old_compiler] {
|
||||
+ unset old_compiler
|
||||
}
|
||||
+ }
|
||||
+ set_board_info compiler gcc44
|
||||
+
|
||||
+ set err [build_executable $testname $executable $sources $options]
|
||||
@ -423,7 +423,7 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/lib/prelink-support.exp
|
||||
+ unset_board_info compiler
|
||||
+ if [info exists old_compiler] {
|
||||
+ set_board_info compiler $old_compiler
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ if { $err == -1 } {
|
||||
+ return ""
|
||||
|
@ -1,73 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-08/msg00283.html
|
||||
Subject: [patch] TUI: Permit stepi on stripped code
|
||||
|
||||
Hi,
|
||||
|
||||
nick <cinolt> on #gdb@freenode complained one cannot stepi on stripped binary.
|
||||
|
||||
echo -e '#include<unistd.h>\nint main(void){return alarm(0);}'|gcc -Wall -s -x c -;./gdbtui ./a.out -nx -ex 'layout asm' -ex 'b alarm' -ex r -ex fini
|
||||
will:
|
||||
0x7ffff7ae25c0 <alarm> mov $0x25,%eax
|
||||
-------------------------------------------------
|
||||
(gdb) p/x $pc
|
||||
$1 = 0x4004d2
|
||||
(gdb) stepi
|
||||
No function contains program counter for selected frame.
|
||||
(gdb) p/x $pc
|
||||
$2 = 0x4004d2
|
||||
|
||||
That is the window still displays stale content, stepi does not work at all.
|
||||
|
||||
#0 throw_verror (error=GENERIC_ERROR, fmt=0xe73d20 "No function contains program counter for selected frame.", ap=0x7fffdbd3b0a8) at exceptions.c:400
|
||||
#1 in error (string=0xe73d20 "No function contains program counter for selected frame.") at utils.c:780
|
||||
#2 in tui_show_frame_info (fi=0x3eca1e0) at ./tui/tui-stack.c:383
|
||||
#3 in tui_selected_frame_level_changed_hook (level=0) at ./tui/tui-hooks.c:218
|
||||
#4 in select_frame (fi=0x3eca1e0) at frame.c:1396
|
||||
#5 in restore_selected_frame (a_frame_id=..., frame_level=0) at thread.c:1049
|
||||
#6 in do_restore_current_thread_cleanup (arg=0x456dca0) at thread.c:1116
|
||||
#7 in do_my_cleanups (pmy_chain=0x1c865f0, old_chain=0x456de90) at utils.c:515
|
||||
#8 in do_cleanups (old_chain=0x456de90) at utils.c:497
|
||||
#9 in insert_breakpoint_locations () at breakpoint.c:2021
|
||||
#10 in insert_breakpoints () at breakpoint.c:1919
|
||||
#11 in proceed (addr=18446744073709551615, siggnal=TARGET_SIGNAL_DEFAULT, step=1) at infrun.c:2156
|
||||
#12 in step_once (skip_subroutines=0, single_inst=1, count=1, thread=-1) at infcmd.c:1068
|
||||
#13 in step_1 (skip_subroutines=0, single_inst=1, count_string=0x0) at infcmd.c:903
|
||||
#14 in stepi_command (count_string=0x0, from_tty=1) at infcmd.c:839
|
||||
|
||||
With the fix stepi works and the window correctly displays:
|
||||
0x4004d2 pop %rbp
|
||||
-------------------------------------------------
|
||||
|
||||
I haven't found any TUI testsuite.
|
||||
|
||||
I will check it in (after regression testing(?)) in some time.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-08-14 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix TUI stepi on code without symbols.
|
||||
* tui/tui-stack.c (tui_show_frame_info): Remove error, set LOW for
|
||||
current PC instead.
|
||||
|
||||
--- a/gdb/tui/tui-stack.c
|
||||
+++ b/gdb/tui/tui-stack.c
|
||||
@@ -380,8 +380,11 @@ tui_show_frame_info (struct frame_info *fi)
|
||||
{
|
||||
if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL,
|
||||
&low, (CORE_ADDR) 0) == 0)
|
||||
- error (_("No function contains program "
|
||||
- "counter for selected frame."));
|
||||
+ {
|
||||
+ /* There is no symbol available for current PC. There is no
|
||||
+ safe way how to "disassemble backwards". */
|
||||
+ low = get_frame_pc (fi);
|
||||
+ }
|
||||
else
|
||||
low = tui_get_low_disassembly_address (get_frame_arch (fi),
|
||||
low, get_frame_pc (fi));
|
||||
|
1485
gdb-upstream.patch
1485
gdb-upstream.patch
File diff suppressed because it is too large
Load Diff
@ -1,91 +0,0 @@
|
||||
commit 51dab9e418741ac7065cd5a6ec9b57285e90227c
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=738482
|
||||
|
||||
--- a/gdb/printcmd.c
|
||||
+++ b/gdb/printcmd.c
|
||||
@@ -1981,6 +1981,10 @@ print_variable_and_value (const char *name, struct symbol *var,
|
||||
struct value_print_options opts;
|
||||
|
||||
val = read_var_value (var, frame);
|
||||
+
|
||||
+ make_cleanup_restore_selected_frame ();
|
||||
+ select_frame (frame);
|
||||
+
|
||||
get_user_print_options (&opts);
|
||||
common_val_print (val, stream, indent, &opts, current_language);
|
||||
}
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-frame.c
|
||||
@@ -0,0 +1,31 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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 <string.h>
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ char s[2 + argc];
|
||||
+ void (*f) (char *) = 0;
|
||||
+
|
||||
+ memset (s, 0, sizeof (s));
|
||||
+ s[0] = 'X';
|
||||
+
|
||||
+ f (s);
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
@@ -0,0 +1,38 @@
|
||||
+# Copyright 2011 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 vla-frame
|
||||
+set executable ${testfile}
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${executable}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+set test "continue"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "Continuing\\.\r\n\r\nProgram received signal SIGSEGV, Segmentation fault\\.\r\n0x0+ in \\?\\? \\(\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "\r\n$gdb_prompt $" {
|
||||
+ untested ${testfile}.exp
|
||||
+ return
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"
|
80
gdb.spec
80
gdb.spec
@ -23,11 +23,11 @@ Name: gdb%{?_with_debug:-debug}
|
||||
# Set version to contents of gdb/version.in.
|
||||
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
|
||||
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
|
||||
Version: 7.3.50.20110722
|
||||
Version: 7.4.50.20120103
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 11%{?_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 BSD and Public Domain
|
||||
Group: Development/Debuggers
|
||||
@ -108,11 +108,6 @@ Patch2: gdb-6.3-rh-testversion-20041202.patch
|
||||
#=ia64
|
||||
Patch3: gdb-6.3-rh-testlibunwind-20041202.patch
|
||||
|
||||
# Use convert_from_func_ptr_addr on the solib breakpoint address;
|
||||
# simplifies and makes more consistent the logic.
|
||||
#=maybepush+ppc: Write new testcase.
|
||||
Patch104: gdb-6.3-ppcdotsolib-20041022.patch
|
||||
|
||||
# Better parse 64-bit PPC system call prologues.
|
||||
#=maybepush+ppc: Write new testcase.
|
||||
Patch105: gdb-6.3-ppc64syscall-20040622.patch
|
||||
@ -158,12 +153,6 @@ Patch136: gdb-6.3-test-movedir-20050125.patch
|
||||
#=ia64
|
||||
Patch140: gdb-6.3-gcore-thread-20050204.patch
|
||||
|
||||
# Stop while intentionally stepping and the thread exit is met.
|
||||
#=push
|
||||
Patch141: gdb-6.6-step-thread-exit.patch
|
||||
#=push
|
||||
Patch259: gdb-6.3-step-thread-exit-20050211-test.patch
|
||||
|
||||
# Test sibling threads to set threaded watchpoints for x86 and x86-64
|
||||
#=fedoratest
|
||||
Patch145: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
@ -260,7 +249,7 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
# Backported fixups post the source tarball.
|
||||
#Xdrop: Just backports.
|
||||
Patch232: gdb-upstream.patch
|
||||
#Patch232: gdb-upstream.patch
|
||||
|
||||
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||
#=fedoratest+ppc
|
||||
@ -358,10 +347,6 @@ Patch317: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
#=fedoratest
|
||||
Patch320: gdb-6.5-section-num-fixup-test.patch
|
||||
|
||||
# Create a single binary `gdb' autodetecting --tui by its argv[0].
|
||||
#=push+work: IIRC Tom told argv[0] should not be used by GNU programs, also drop libgdb.a.
|
||||
Patch326: gdb-6.8-tui-singlebinary.patch
|
||||
|
||||
# Fix PRPSINFO in the core files dumped by gcore (BZ 254229).
|
||||
#=push
|
||||
Patch329: gdb-6.8-bz254229-gcore-prpsinfo.patch
|
||||
@ -371,13 +356,9 @@ Patch329: gdb-6.8-bz254229-gcore-prpsinfo.patch
|
||||
Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||
|
||||
# Make the GDB quit processing non-abortable to cleanup everything properly.
|
||||
#=push: Useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
||||
#=push: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
||||
Patch331: gdb-6.8-quit-never-aborts.patch
|
||||
|
||||
# Fix attaching to stopped processes and/or pending signals.
|
||||
#=push+work
|
||||
Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||
|
||||
# Test the watchpoints conditionals works.
|
||||
#=fedoratest
|
||||
Patch343: gdb-6.8-watchpoint-conditionals-test.patch
|
||||
@ -513,10 +494,6 @@ Patch547: gdb-test-dw2-aranges.patch
|
||||
# =fedoratest
|
||||
Patch548: gdb-test-expr-cumulative-archer.patch
|
||||
|
||||
# Workaround gcc-4.6 stdarg false prologue end (GDB PR 12435 + GCC PR 47471).
|
||||
# =push
|
||||
Patch556: gdb-gcc46-stdarg-prologue.patch
|
||||
|
||||
# Toolchain on sparc is slightly broken and debuginfo files are generated
|
||||
# with non 64bit aligned tables/offsets.
|
||||
# See for example readelf -S ../Xvnc.debug.
|
||||
@ -530,32 +507,19 @@ Patch556: gdb-gcc46-stdarg-prologue.patch
|
||||
# rebuild to fix it, we need to be able to use gdb :)
|
||||
Patch579: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
|
||||
# Improve GDB performance on inferior dlopen calls (Gary Benson, BZ 698001).
|
||||
Patch617: gdb-dlopen-skip_inline_frames-perf.patch
|
||||
|
||||
# Fix dlopen of libpthread.so, patched glibc required (Gary Benson, BZ 669432).
|
||||
Patch618: gdb-dlopen-stap-probe.patch
|
||||
#FIXME:Patch618: gdb-dlopen-stap-probe.patch
|
||||
Patch619: gdb-dlopen-stap-probe-test.patch
|
||||
|
||||
# Work around PR libc/13097 "linux-vdso.so.1" warning message.
|
||||
Patch627: gdb-glibc-vdso-workaround.patch
|
||||
|
||||
# [TUI] Fix stepi on stripped code.
|
||||
Patch628: gdb-tui-strip-stepi.patch
|
||||
|
||||
# [vla] Fix VLA arrays displayed in `bt full' (BZ 738482).
|
||||
Patch629: gdb-vla-frame-set.patch
|
||||
|
||||
# Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches.
|
||||
Patch630: gdb-implptr-64bit-1of2.patch
|
||||
Patch631: gdb-implptr-64bit-2of2.patch
|
||||
|
||||
# Fix internal error on some optimized-out values.
|
||||
Patch632: gdb-optimized-out-internal-error.patch
|
||||
|
||||
# Hack for proper PIE run of the testsuite.
|
||||
Patch634: gdb-runtest-pie-override.patch
|
||||
|
||||
# Fix zero registers core files w/gcc-4.7.
|
||||
Patch638: gdb-gcc47-gcore-zero.patch
|
||||
|
||||
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
|
||||
# --without-system-readline
|
||||
# Requires: readline%{?_isa}
|
||||
@ -715,12 +679,11 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
|
||||
%if 0%{!?_with_upstream:1}
|
||||
|
||||
%patch232 -p1
|
||||
#patch232 -p1
|
||||
%patch349 -p1
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
@ -730,8 +693,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch133 -p1
|
||||
%patch136 -p1
|
||||
%patch140 -p1
|
||||
%patch141 -p1
|
||||
%patch259 -p1
|
||||
%patch145 -p1
|
||||
%patch153 -p1
|
||||
%patch157 -p1
|
||||
@ -779,11 +740,9 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch315 -p1
|
||||
%patch317 -p1
|
||||
%patch320 -p1
|
||||
%patch326 -p1
|
||||
%patch329 -p1
|
||||
%patch330 -p1
|
||||
%patch331 -p1
|
||||
%patch337 -p1
|
||||
%patch343 -p1
|
||||
%patch348 -p1
|
||||
%patch360 -p1
|
||||
@ -817,18 +776,12 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch542 -p1
|
||||
%patch547 -p1
|
||||
%patch548 -p1
|
||||
%patch556 -p1
|
||||
%patch579 -p1
|
||||
%patch617 -p1
|
||||
%patch618 -p1
|
||||
#FIXME:patch618 -p1
|
||||
%patch619 -p1
|
||||
%patch627 -p1
|
||||
%patch628 -p1
|
||||
%patch629 -p1
|
||||
%patch630 -p1
|
||||
%patch631 -p1
|
||||
%patch632 -p1
|
||||
%patch634 -p1
|
||||
%patch638 -p1
|
||||
|
||||
%patch393 -p1
|
||||
%patch335 -p1
|
||||
@ -1106,12 +1059,6 @@ make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
||||
cp $RPM_BUILD_DIR/%{gdb_src}/gdb/gdb_gcore.sh $RPM_BUILD_ROOT%{_bindir}/gcore
|
||||
chmod 755 $RPM_BUILD_ROOT%{_bindir}/gcore
|
||||
|
||||
# Remove the gdb/gdbtui binaries duplicity.
|
||||
test -x $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
|
||||
ln -sf gdb $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
|
||||
cmp $RPM_BUILD_ROOT%{_mandir}/*/gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
|
||||
ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d
|
||||
sed 's#%%{_sysconfdir}#%{_sysconfdir}#g' <%{SOURCE4} >$RPM_BUILD_ROOT%{_sysconfdir}/gdbinit
|
||||
|
||||
@ -1215,11 +1162,9 @@ fi
|
||||
%doc COPYING3 COPYING COPYING.LIB README NEWS
|
||||
%{_bindir}/gcore
|
||||
%{_bindir}/gdb
|
||||
%{_bindir}/gdbtui
|
||||
%{_sysconfdir}/gdbinit
|
||||
%{_sysconfdir}/gdbinit.d
|
||||
%{_mandir}/*/gdb.1*
|
||||
%{_mandir}/*/gdbtui.1*
|
||||
%if 0%{!?_with_upstream:1}
|
||||
%{_bindir}/gstack
|
||||
%{_mandir}/*/gstack.1*
|
||||
@ -1252,6 +1197,9 @@ fi
|
||||
%{_infodir}/gdb.info*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120103-1.fc17
|
||||
- Rebase to FSF GDB 7.4.50.20120103.
|
||||
|
||||
* Mon Nov 28 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3.50.20110722-11.fc17
|
||||
- No longer build bundled libstdc++ pretty printers on RHELs >= 7.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user