Rebase to FSF GDB 7.5.50.20130215 (pre-7.6 snapshot).
This commit is contained in:
parent
99cd04126a
commit
ab333d9938
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
/gdb-libstdc++-v3-python-r155978.tar.bz2
|
||||
/gdb-7.5.50.20130118.tar.bz2
|
||||
/gdb-7.5.50.20130215.tar.bz2
|
||||
|
@ -11,10 +11,10 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/doc/gdb.texinfo 2013-01-18 22:54:22.521155527 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/doc/gdb.texinfo 2013-01-18 22:58:15.064596580 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo 2013-02-15 22:34:22.381165443 +0100
|
||||
@@ -1026,6 +1026,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.5.50.20130118/gdb/doc/gdb.texinfo
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-7.5.50.20130118/gdb/main.c
|
||||
Index: gdb-7.5.50.20130215/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/main.c 2013-01-18 22:54:22.523155531 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/main.c 2013-01-18 22:58:15.065596598 +0100
|
||||
@@ -445,6 +445,7 @@ captured_main (void *data)
|
||||
--- gdb-7.5.50.20130215.orig/gdb/main.c 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/main.c 2013-02-15 22:34:22.382165445 +0100
|
||||
@@ -447,6 +447,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.5.50.20130118/gdb/main.c
|
||||
{"r", no_argument, &readnow_symbol_files, 1},
|
||||
{"quiet", no_argument, &quiet, 1},
|
||||
{"q", no_argument, &quiet, 1},
|
||||
@@ -1164,6 +1165,7 @@ Options:\n\n\
|
||||
@@ -1165,6 +1166,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,10 +48,10 @@ Index: gdb-7.5.50.20130118/gdb/main.c
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||
Index: gdb-7.5.50.20130118/gdb/symfile.c
|
||||
Index: gdb-7.5.50.20130215/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/symfile.c 2013-01-18 22:58:15.065596598 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/symfile.c 2013-01-18 22:58:31.249619597 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/symfile.c 2013-02-01 20:39:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/symfile.c 2013-02-15 22:34:22.383165447 +0100
|
||||
@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup (
|
||||
|
||||
/* Global variables owned by this file. */
|
||||
@ -60,19 +60,19 @@ Index: gdb-7.5.50.20130118/gdb/symfile.c
|
||||
|
||||
/* Functions this file defines. */
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/dwarf2read.c
|
||||
Index: gdb-7.5.50.20130215/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/dwarf2read.c 2013-01-18 22:54:22.528155545 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/dwarf2read.c 2013-01-18 22:59:08.940674035 +0100
|
||||
@@ -67,6 +67,7 @@
|
||||
#include <ctype.h>
|
||||
--- gdb-7.5.50.20130215.orig/gdb/dwarf2read.c 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/dwarf2read.c 2013-02-15 22:34:34.479181584 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "f-lang.h"
|
||||
#include "source.h"
|
||||
+#include "top.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "gdb_string.h"
|
||||
@@ -1782,8 +1783,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
@@ -1793,8 +1794,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
(void *) names);
|
||||
dwarf2_per_objfile->objfile = objfile;
|
||||
}
|
||||
@ -84,10 +84,10 @@ Index: gdb-7.5.50.20130118/gdb/dwarf2read.c
|
||||
}
|
||||
|
||||
/* When loading sections, we look either for uncompressed section or for
|
||||
Index: gdb-7.5.50.20130118/gdb/top.h
|
||||
Index: gdb-7.5.50.20130215/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/top.h 2013-01-18 22:54:22.528155545 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/top.h 2013-01-18 22:58:15.069596657 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/top.h 2013-01-07 17:40:36.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/top.h 2013-02-15 22:34:22.389165459 +0100
|
||||
@@ -58,6 +58,7 @@ extern void set_prompt (const char *s);
|
||||
|
||||
/* From random places. */
|
||||
|
@ -1,16 +1,16 @@
|
||||
Index: gdb-7.4.50.20120602/gdb/event-top.c
|
||||
Index: gdb-7.5.50.20130215/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/event-top.c 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/event-top.c 2012-06-02 21:08:23.479221885 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/event-top.c 2013-01-31 19:37:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/event-top.c 2013-02-15 22:36:11.217308539 +0100
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "observer.h"
|
||||
#include "continuations.h"
|
||||
#include "gdbcmd.h" /* for dont_repeat() */
|
||||
#include "annotate.h"
|
||||
+#include "symfile.h"
|
||||
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -176,6 +177,8 @@ rl_callback_read_char_wrapper (gdb_clien
|
||||
@@ -170,6 +171,8 @@ rl_callback_read_char_wrapper (gdb_clien
|
||||
void
|
||||
cli_command_loop (void)
|
||||
{
|
||||
@ -19,7 +19,7 @@ Index: gdb-7.4.50.20120602/gdb/event-top.c
|
||||
display_gdb_prompt (0);
|
||||
|
||||
/* Now it's time to start the event loop. */
|
||||
@@ -241,6 +244,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
@@ -237,6 +240,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.4.50.20120602/gdb/event-top.c
|
||||
/* Each interpreter has its own rules on displaying the command
|
||||
prompt. */
|
||||
if (!current_interp_display_prompt_p ())
|
||||
Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
Index: gdb-7.5.50.20130215/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/elfread.c 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/elfread.c 2012-06-02 21:08:23.482221882 +0200
|
||||
@@ -48,6 +48,7 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/elfread.c 2013-02-15 22:35:36.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/elfread.c 2013-02-15 22:35:59.414292874 +0100
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "gdbcore.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "observer.h"
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
@@ -1647,8 +1648,361 @@ build_id_to_filename (struct build_id *b
|
||||
@@ -1649,8 +1650,361 @@ build_id_to_filename (struct build_id *b
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -1702,11 +2056,17 @@ missing_filepair_change (void)
|
||||
@@ -1704,11 +2058,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.4.50.20120602/gdb/elfread.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -1773,14 +2133,35 @@ debug_print_missing (const char *binary,
|
||||
@@ -1775,14 +2135,35 @@ debug_print_missing (const char *binary,
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
@ -464,11 +464,11 @@ Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
}
|
||||
|
||||
static char *
|
||||
Index: gdb-7.4.50.20120602/gdb/symfile.h
|
||||
Index: gdb-7.5.50.20130215/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/symfile.h 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/symfile.h 2012-06-02 21:08:23.499221877 +0200
|
||||
@@ -621,6 +621,8 @@ extern struct build_id *build_id_addr_ge
|
||||
--- gdb-7.5.50.20130215.orig/gdb/symfile.h 2013-02-15 22:35:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/symfile.h 2013-02-15 22:35:59.414292874 +0100
|
||||
@@ -599,6 +599,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.4.50.20120602/gdb/symfile.h
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
Index: gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/gdb.exp 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp 2012-06-02 21:08:23.510221873 +0200
|
||||
@@ -1388,7 +1388,7 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:59.415292878 +0100
|
||||
@@ -1482,7 +1482,7 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -490,11 +490,11 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp
|
||||
send_gdb "set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re "$gdb_prompt $" {
|
||||
Index: gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/mi-support.exp 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp 2012-06-02 21:08:23.523221869 +0200
|
||||
@@ -213,7 +213,7 @@ proc default_mi_gdb_start { args } {
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:59.416292881 +0100
|
||||
@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -503,10 +503,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp
|
||||
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.4.50.20120602/gdb/tui/tui-interp.c
|
||||
Index: gdb-7.5.50.20130215/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/tui/tui-interp.c 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/tui/tui-interp.c 2012-06-02 21:08:23.524221869 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/tui/tui-interp.c 2013-01-01 07:41:30.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/tui/tui-interp.c 2013-02-15 22:35:59.416292881 +0100
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
@ -515,10 +515,10 @@ Index: gdb-7.4.50.20120602/gdb/tui/tui-interp.c
|
||||
|
||||
/* Set to 1 when the TUI mode must be activated when we first start
|
||||
gdb. */
|
||||
Index: gdb-7.4.50.20120602/gdb/aclocal.m4
|
||||
Index: gdb-7.5.50.20130215/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/aclocal.m4 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/aclocal.m4 2012-06-02 21:08:23.545221858 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/aclocal.m4 2013-01-17 12:06:26.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/aclocal.m4 2013-02-15 22:35:59.417292883 +0100
|
||||
@@ -11,6 +11,164 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
@ -684,11 +684,11 @@ Index: gdb-7.4.50.20120602/gdb/aclocal.m4
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
|
||||
Index: gdb-7.4.50.20120602/gdb/config.in
|
||||
Index: gdb-7.5.50.20130215/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/config.in 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/config.in 2012-06-02 21:08:23.546221859 +0200
|
||||
@@ -36,6 +36,9 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/config.in 2012-12-09 19:39:58.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/config.in 2013-02-15 22:35:59.417292883 +0100
|
||||
@@ -33,6 +33,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
|
||||
@ -698,7 +698,7 @@ Index: gdb-7.4.50.20120602/gdb/config.in
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
@@ -216,6 +219,9 @@
|
||||
@@ -210,6 +213,9 @@
|
||||
/* Define if Python 2.7 is being used. */
|
||||
#undef HAVE_LIBPYTHON2_7
|
||||
|
||||
@ -708,11 +708,11 @@ Index: gdb-7.4.50.20120602/gdb/config.in
|
||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
Index: gdb-7.4.50.20120602/gdb/configure
|
||||
Index: gdb-7.5.50.20130215/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/configure 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/configure 2012-06-02 21:20:53.245838121 +0200
|
||||
@@ -680,6 +680,11 @@ REPORT_BUGS_TO
|
||||
--- gdb-7.5.50.20130215.orig/gdb/configure 2013-01-09 18:21:33.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/configure 2013-02-15 22:35:59.422292893 +0100
|
||||
@@ -683,6 +683,11 @@ REPORT_BUGS_TO
|
||||
PKGVERSION
|
||||
TARGET_OBS
|
||||
subdirs
|
||||
@ -724,7 +724,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
GDB_DATADIR
|
||||
DEBUGDIR
|
||||
MAKEINFO_EXTRA_FLAGS
|
||||
@@ -780,6 +785,7 @@ with_gdb_datadir
|
||||
@@ -783,6 +788,7 @@ with_gdb_datadir
|
||||
with_relocated_sources
|
||||
with_auto_load_dir
|
||||
with_auto_load_safe_path
|
||||
@ -732,7 +732,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbcli
|
||||
@@ -825,6 +831,11 @@ CPPFLAGS
|
||||
@@ -831,6 +837,11 @@ CPPFLAGS
|
||||
CPP
|
||||
MAKEINFO
|
||||
MAKEINFOFLAGS
|
||||
@ -744,7 +744,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1494,6 +1505,8 @@ Optional Packages:
|
||||
@@ -1501,6 +1512,8 @@ Optional Packages:
|
||||
[--with-auto-load-dir]
|
||||
--without-auto-load-safe-path
|
||||
do not restrict auto-loaded files locations
|
||||
@ -753,7 +753,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1535,6 +1548,13 @@ Some influential environment variables:
|
||||
@@ -1545,6 +1558,13 @@ Some influential environment variables:
|
||||
MAKEINFO Parent configure detects if it is of sufficient version.
|
||||
MAKEINFOFLAGS
|
||||
Parameters for MAKEINFO.
|
||||
@ -767,7 +767,7 @@ Index: gdb-7.4.50.20120602/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.
|
||||
@@ -5015,6 +5035,491 @@ _ACEOF
|
||||
@@ -5030,6 +5050,491 @@ _ACEOF
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
||||
$as_echo "$with_auto_load_safe_path" >&6; }
|
||||
|
||||
@ -1259,10 +1259,10 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
Index: gdb-7.4.50.20120602/gdb/configure.ac
|
||||
Index: gdb-7.5.50.20130215/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/configure.ac 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/configure.ac 2012-06-02 21:08:23.560221855 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-01-09 18:21:35.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:35:59.423292895 +0100
|
||||
@@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
|
||||
[Directories safe to hold auto-loaded files.])
|
||||
AC_MSG_RESULT([$with_auto_load_safe_path])
|
||||
@ -1463,11 +1463,11 @@ Index: gdb-7.4.50.20120602/gdb/configure.ac
|
||||
AC_CONFIG_SUBDIRS(testsuite)
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
Index: gdb-7.4.50.20120602/gdb/corelow.c
|
||||
Index: gdb-7.5.50.20130215/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/corelow.c 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/corelow.c 2012-06-02 21:08:23.561221855 +0200
|
||||
@@ -317,7 +317,7 @@ build_id_locate_exec (int from_tty)
|
||||
--- gdb-7.5.50.20130215.orig/gdb/corelow.c 2013-02-15 22:35:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/corelow.c 2013-02-15 22:35:59.423292895 +0100
|
||||
@@ -313,7 +313,7 @@ build_id_locate_exec (int from_tty)
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
else
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
Index: gdb-7.5.50.20130215/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/corelow.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/corelow.c 2012-08-01 18:37:44.584925750 +0200
|
||||
@@ -47,6 +47,9 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/corelow.c 2013-01-31 19:37:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/corelow.c 2013-02-15 22:35:03.278219844 +0100
|
||||
@@ -46,6 +46,9 @@
|
||||
#include "progspace.h"
|
||||
#include "objfiles.h"
|
||||
#include "gdb_bfd.h"
|
||||
@ -12,7 +12,7 @@ Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
@@ -274,6 +277,52 @@ add_to_thread_list (bfd *abfd, asection
|
||||
@@ -271,6 +274,52 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
/* This routine opens and sets up the core file bfd. */
|
||||
|
||||
static void
|
||||
@@ -418,6 +467,14 @@ core_open (char *filename, int from_tty)
|
||||
@@ -409,6 +458,14 @@ core_open (char *filename, int from_tty)
|
||||
switch_to_thread (thread->ptid);
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
post_create_inferior (&core_ops, from_tty);
|
||||
|
||||
/* Now go through the target stack looking for threads since there
|
||||
@@ -939,4 +996,11 @@ _initialize_corelow (void)
|
||||
@@ -978,4 +1035,11 @@ _initialize_corelow (void)
|
||||
init_core_ops ();
|
||||
|
||||
add_target (&core_ops);
|
||||
@ -92,11 +92,11 @@ Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-7.4.91.20120801/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/doc/gdb.texinfo 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/doc/gdb.texinfo 2012-08-01 18:37:44.598925672 +0200
|
||||
@@ -16530,6 +16530,27 @@ information files.
|
||||
--- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo 2013-02-15 22:34:22.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo 2013-02-15 22:35:03.287219863 +0100
|
||||
@@ -16662,6 +16662,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -124,11 +124,11 @@ Index: gdb-7.4.91.20120801/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.4.91.20120801/gdb/solib-svr4.c
|
||||
Index: gdb-7.5.50.20130215/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/solib-svr4.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/solib-svr4.c 2012-08-01 18:37:44.599925667 +0200
|
||||
@@ -1228,9 +1228,52 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solib-svr4.c 2013-01-31 14:52:52.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solib-svr4.c 2013-02-15 22:35:03.287219863 +0100
|
||||
@@ -1224,9 +1224,52 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -184,10 +184,10 @@ Index: gdb-7.4.91.20120801/gdb/solib-svr4.c
|
||||
xfree (buffer);
|
||||
|
||||
/* If this entry has no name, or its name matches the name
|
||||
Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
Index: gdb-7.5.50.20130215/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/elfread.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/elfread.c 2012-08-01 18:38:08.956790879 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/elfread.c 2013-02-01 20:39:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/elfread.c 2013-02-15 22:35:36.826263354 +0100
|
||||
@@ -45,6 +45,11 @@
|
||||
#include "regcache.h"
|
||||
#include "bcache.h"
|
||||
@ -919,9 +919,9 @@ Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1436,9 +2038,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
`.note.gnu.build-id'. */
|
||||
else if (!objfile_has_partial_symbols (objfile))
|
||||
@@ -1444,9 +2046,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
&& objfile->separate_debug_objfile == NULL
|
||||
&& objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
- char *debugfile;
|
||||
+ char *debugfile, *build_id_filename;
|
||||
@ -932,7 +932,7 @@ Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
@@ -1452,6 +2055,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1460,6 +2063,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
symbol_file_add_separate (abfd, symfile_flags, objfile);
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
@ -945,7 +945,7 @@ Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
}
|
||||
|
||||
if (symtab_create_debug)
|
||||
@@ -1784,4 +2393,16 @@ _initialize_elfread (void)
|
||||
@@ -1782,4 +2391,16 @@ _initialize_elfread (void)
|
||||
|
||||
elf_objfile_gnu_ifunc_cache_data = register_objfile_data ();
|
||||
gnu_ifunc_fns_p = &elf_gnu_ifunc_fns;
|
||||
@ -962,11 +962,11 @@ Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
}
|
||||
Index: gdb-7.4.91.20120801/gdb/symfile.h
|
||||
Index: gdb-7.5.50.20130215/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/symfile.h 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/symfile.h 2012-08-01 18:37:44.600925662 +0200
|
||||
@@ -615,6 +615,13 @@ void free_symfile_segment_data (struct s
|
||||
--- gdb-7.5.50.20130215.orig/gdb/symfile.h 2013-02-03 17:20:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/symfile.h 2013-02-15 22:35:03.288219867 +0100
|
||||
@@ -593,6 +593,13 @@ void free_symfile_segment_data (struct s
|
||||
|
||||
extern struct cleanup *increment_reading_symtab (void);
|
||||
|
||||
@ -980,11 +980,11 @@ Index: gdb-7.4.91.20120801/gdb/symfile.h
|
||||
/* From dwarf2read.c */
|
||||
|
||||
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
|
||||
Index: gdb-7.4.91.20120801/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/testsuite/lib/gdb.exp 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/testsuite/lib/gdb.exp 2012-08-01 18:37:44.601925656 +0200
|
||||
@@ -1388,6 +1388,16 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/gdb.exp 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:03.289219870 +0100
|
||||
@@ -1482,6 +1482,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -1001,11 +1001,11 @@ Index: gdb-7.4.91.20120801/gdb/testsuite/lib/gdb.exp
|
||||
return 0;
|
||||
}
|
||||
|
||||
Index: gdb-7.4.91.20120801/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/testsuite/lib/mi-support.exp 2012-07-25 22:35:30.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/testsuite/lib/mi-support.exp 2012-08-01 18:37:44.601925656 +0200
|
||||
@@ -213,6 +213,16 @@ proc default_mi_gdb_start { args } {
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/mi-support.exp 2013-01-22 00:57:59.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:03.289219870 +0100
|
||||
@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -1022,10 +1022,10 @@ Index: gdb-7.4.91.20120801/gdb/testsuite/lib/mi-support.exp
|
||||
# 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.91.20120801/gdb/objfiles.h
|
||||
Index: gdb-7.5.50.20130215/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/objfiles.h 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/objfiles.h 2012-08-01 18:37:44.601925656 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/objfiles.h 2013-01-01 07:32:47.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/objfiles.h 2013-02-15 22:35:03.290219872 +0100
|
||||
@@ -432,6 +432,10 @@ struct objfile
|
||||
|
||||
#define OBJF_MAINLINE (1 << 5)
|
||||
@ -1037,10 +1037,10 @@ Index: gdb-7.4.91.20120801/gdb/objfiles.h
|
||||
/* The object file that contains the runtime common minimal symbols
|
||||
for SunOS4. Note that this objfile has no associated BFD. */
|
||||
|
||||
Index: gdb-7.4.91.20120801/gdb/testsuite/gdb.base/corefile.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/corefile.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/testsuite/gdb.base/corefile.exp 2012-06-21 22:46:21.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/testsuite/gdb.base/corefile.exp 2012-08-01 18:37:44.602925650 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.base/corefile.exp 2013-01-01 07:33:25.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/corefile.exp 2013-02-15 22:35:03.290219872 +0100
|
||||
@@ -256,3 +256,33 @@ if ![is_remote target] {
|
||||
|
||||
gdb_exit
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-7.4.50.20120714/gdb/inferior.h
|
||||
Index: gdb-7.5.50.20130215/gdb/inferior.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120714.orig/gdb/inferior.h 2012-06-13 20:15:05.000000000 +0200
|
||||
+++ gdb-7.4.50.20120714/gdb/inferior.h 2012-07-14 23:21:01.795161794 +0200
|
||||
@@ -159,7 +159,15 @@ extern void reopen_exec_file (void);
|
||||
--- gdb-7.5.50.20130215.orig/gdb/inferior.h 2013-01-16 18:31:38.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/inferior.h 2013-02-15 22:31:42.993944957 +0100
|
||||
@@ -160,7 +160,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,11 +42,11 @@ Index: gdb-7.4.50.20120714/gdb/inferior.h
|
||||
|
||||
extern ptid_t user_visible_resume_ptid (int step);
|
||||
|
||||
Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
Index: gdb-7.5.50.20130215/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120714.orig/gdb/infrun.c 2012-07-01 12:37:04.000000000 +0200
|
||||
+++ gdb-7.4.50.20120714/gdb/infrun.c 2012-07-14 23:21:01.800161767 +0200
|
||||
@@ -79,7 +79,7 @@ static int follow_fork (void);
|
||||
--- gdb-7.5.50.20130215.orig/gdb/infrun.c 2013-01-31 20:18:58.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/infrun.c 2013-02-15 22:34:07.132144519 +0100
|
||||
@@ -81,7 +81,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.4.50.20120714/gdb/infrun.c
|
||||
|
||||
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
|
||||
void *data);
|
||||
@@ -1672,7 +1672,8 @@ user_visible_resume_ptid (int step)
|
||||
@@ -1709,7 +1709,8 @@ user_visible_resume_ptid (int step)
|
||||
}
|
||||
else if ((scheduler_mode == schedlock_on)
|
||||
|| (scheduler_mode == schedlock_step
|
||||
@ -65,7 +65,7 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
{
|
||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||
resume_ptid = inferior_ptid;
|
||||
@@ -1690,7 +1691,7 @@ user_visible_resume_ptid (int step)
|
||||
@@ -1727,7 +1728,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.4.50.20120714/gdb/infrun.c
|
||||
{
|
||||
int should_resume = 1;
|
||||
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
|
||||
@@ -1723,9 +1724,13 @@ resume (int step, enum gdb_signal sig)
|
||||
@@ -1760,9 +1761,13 @@ resume (int step, enum gdb_signal sig)
|
||||
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -90,48 +90,48 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
target_pid_to_str (inferior_ptid),
|
||||
paddress (gdbarch, pc));
|
||||
|
||||
@@ -2102,7 +2107,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
struct thread_info *tp;
|
||||
@@ -2140,7 +2145,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
CORE_ADDR pc;
|
||||
struct address_space *aspace;
|
||||
- int oneproc = 0;
|
||||
/* GDB may force the inferior to step due to various reasons. */
|
||||
- int force_step = 0;
|
||||
+ enum resume_step resume_step = RESUME_STEP_CONTINUE;
|
||||
|
||||
/* If we're stopped at a fork/vfork, follow the branch set by the
|
||||
"set follow-fork-mode" command; otherwise, we'll just proceed
|
||||
@@ -2142,13 +2147,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2180,13 +2185,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
actually be executing the breakpoint insn anyway.
|
||||
We'll be (un-)executing the previous instruction. */
|
||||
|
||||
- oneproc = 1;
|
||||
- force_step = 1;
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
else if (gdbarch_single_step_through_delay_p (gdbarch)
|
||||
&& gdbarch_single_step_through_delay (gdbarch,
|
||||
get_current_frame ()))
|
||||
/* We stepped onto an instruction that needs to be stepped
|
||||
again before re-inserting the breakpoint, do so. */
|
||||
- oneproc = 1;
|
||||
- force_step = 1;
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2179,13 +2184,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2217,13 +2222,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
is required it returns TRUE and sets the current thread to
|
||||
the old thread. */
|
||||
if (prepare_to_proceed (step))
|
||||
- oneproc = 1;
|
||||
- force_step = 1;
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
}
|
||||
|
||||
/* prepare_to_proceed may change the current thread. */
|
||||
tp = inferior_thread ();
|
||||
|
||||
- if (oneproc)
|
||||
- if (force_step)
|
||||
+ if (resume_step == RESUME_STEP_USER)
|
||||
{
|
||||
tp->control.trap_expected = 1;
|
||||
/* If displaced stepping is enabled, we can step over the
|
||||
@@ -2272,8 +2277,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2310,9 +2315,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
/* Reset to normal state. */
|
||||
init_infwait_state ();
|
||||
|
||||
@ -141,12 +141,13 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
+ resume_step = RESUME_STEP_NEEDED;
|
||||
+
|
||||
/* Resume inferior. */
|
||||
- resume (oneproc || step || bpstat_should_step (), tp->suspend.stop_signal);
|
||||
- resume (force_step || step || bpstat_should_step (),
|
||||
- tp->suspend.stop_signal);
|
||||
+ resume (resume_step, tp->suspend.stop_signal);
|
||||
|
||||
/* Wait for it to stop (if not standalone)
|
||||
and in any case decode why it stopped, and act accordingly. */
|
||||
@@ -5205,13 +5215,18 @@ process_event_stop_test:
|
||||
@@ -5247,13 +5256,18 @@ process_event_stop_test:
|
||||
|
||||
/* Is thread TP in the middle of single-stepping? */
|
||||
|
||||
@ -170,11 +171,11 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
}
|
||||
|
||||
/* Returns true if any thread *but* the one passed in "data" is in the
|
||||
Index: gdb-7.4.50.20120714/gdb/linux-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120714.orig/gdb/linux-nat.c 2012-07-07 14:13:56.000000000 +0200
|
||||
+++ gdb-7.4.50.20120714/gdb/linux-nat.c 2012-07-14 23:21:01.803161750 +0200
|
||||
@@ -2982,7 +2982,11 @@ static int
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-13 15:59:49.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:31:42.997944967 +0100
|
||||
@@ -2971,7 +2971,11 @@ static int
|
||||
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
|
||||
{
|
||||
if (lp->last_resume_kind == resume_step
|
||||
@ -187,10 +188,10 @@ Index: gdb-7.4.50.20120714/gdb/linux-nat.c
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
Index: gdb-7.4.50.20120714/gdb/linux-nat.h
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120714.orig/gdb/linux-nat.h 2012-07-06 18:52:20.000000000 +0200
|
||||
+++ gdb-7.4.50.20120714/gdb/linux-nat.h 2012-07-14 23:21:17.414075355 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.h 2013-02-13 15:59:49.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.h 2013-02-15 22:31:42.998944969 +0100
|
||||
@@ -73,8 +73,8 @@ struct lwp_info
|
||||
/* If non-zero, a pending wait status. */
|
||||
int status;
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.4.50.20120703/gdb/linux-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/linux-nat.c 2012-07-03 17:46:55.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/linux-nat.c 2012-07-03 17:57:29.608734933 +0200
|
||||
@@ -180,6 +180,9 @@ blocked. */
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-15 22:38:05.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:44:59.638985719 +0100
|
||||
@@ -181,6 +181,9 @@ blocked. */
|
||||
static struct target_ops *linux_ops;
|
||||
static struct target_ops linux_ops_saved;
|
||||
|
||||
@ -12,7 +12,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
|
||||
/* The method to call, if any, when a new thread is attached. */
|
||||
static void (*linux_nat_new_thread) (struct lwp_info *);
|
||||
|
||||
@@ -909,7 +912,14 @@ holding the child stopped. Try \"set de
|
||||
@@ -914,7 +917,14 @@ holding the child stopped. Try \"set de
|
||||
parent_inf->waiting_for_vfork_done = 0;
|
||||
}
|
||||
else if (detach_fork)
|
||||
@ -28,7 +28,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
|
||||
|
||||
/* Note that the detach above makes PARENT_INF dangling. */
|
||||
|
||||
@@ -1377,6 +1387,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
@@ -1362,6 +1372,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNPAW: Attaching to a stopped process\n");
|
||||
@ -36,7 +36,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1805,6 +1816,9 @@ get_pending_status (struct lwp_info *lp,
|
||||
@@ -1790,6 +1801,9 @@ get_pending_status (struct lwp_info *lp,
|
||||
gdb_signal_to_string (signo));
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1918,6 +1932,8 @@ linux_nat_detach (struct target_ops *ops
|
||||
@@ -1900,6 +1914,8 @@ linux_nat_detach (struct target_ops *ops
|
||||
}
|
||||
else
|
||||
linux_ops->to_detach (ops, args, from_tty);
|
||||
@ -55,7 +55,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
|
||||
}
|
||||
|
||||
/* Resume LP. */
|
||||
@@ -2104,6 +2120,14 @@ linux_nat_resume (struct target_ops *ops
|
||||
@@ -2086,6 +2102,14 @@ linux_nat_resume (struct target_ops *ops
|
||||
linux_nat_resume_callback. */
|
||||
lp->stopped = 0;
|
||||
|
||||
@ -70,19 +70,19 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, linux_nat_resume_callback, NULL);
|
||||
|
||||
@@ -4129,6 +4153,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 ();
|
||||
@@ -4137,6 +4161,8 @@ linux_nat_mourn_inferior (struct target_
|
||||
|
||||
/* Let the arch-specific native code know this process is gone. */
|
||||
linux_nat_forget_process (pid);
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
}
|
||||
|
||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2012-06-26 21:23:20.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/attach-stopped.exp 2012-07-03 17:56:43.797790120 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2013-01-01 07:41:27.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.threads/attach-stopped.exp 2013-02-15 22:44:23.262930312 +0100
|
||||
@@ -61,7 +61,65 @@ proc corefunc { threadtype } {
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
@ -1,280 +0,0 @@
|
||||
Index: gdb-7.5.50.20130118/bfd/elf-bfd.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/bfd/elf-bfd.h 2013-01-18 23:02:54.809004473 +0100
|
||||
+++ gdb-7.5.50.20130118/bfd/elf-bfd.h 2013-01-18 23:02:59.316010755 +0100
|
||||
@@ -2242,8 +2242,10 @@ extern Elf_Internal_Phdr * _bfd_elf_find
|
||||
/* Exported interface for writing elf corefile notes. */
|
||||
extern char *elfcore_write_note
|
||||
(bfd *, char *, int *, const char *, int, const void *, int);
|
||||
+struct elf_prpsinfo;
|
||||
+typedef struct elf_prpsinfo prpsinfo_t;
|
||||
extern char *elfcore_write_prpsinfo
|
||||
- (bfd *, char *, int *, const char *, const char *);
|
||||
+ (bfd *, char *, int *, const prpsinfo_t *);
|
||||
extern char *elfcore_write_prstatus
|
||||
(bfd *, char *, int *, long, int, const void *);
|
||||
extern char * elfcore_write_pstatus
|
||||
Index: gdb-7.5.50.20130118/bfd/elf.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/bfd/elf.c 2013-01-18 23:02:54.812004479 +0100
|
||||
+++ gdb-7.5.50.20130118/bfd/elf.c 2013-01-18 23:02:59.319010836 +0100
|
||||
@@ -9103,56 +9103,61 @@ char *
|
||||
elfcore_write_prpsinfo (bfd *abfd,
|
||||
char *buf,
|
||||
int *bufsiz,
|
||||
- const char *fname,
|
||||
- const char *psargs)
|
||||
+ const prpsinfo_t *input)
|
||||
{
|
||||
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
||||
|
||||
if (bed->elf_backend_write_core_note != NULL)
|
||||
{
|
||||
char *ret;
|
||||
+ char fname[sizeof (input->pr_fname) + 1];
|
||||
+ char psargs[sizeof (input->pr_psargs) + 1];
|
||||
+
|
||||
+ strncpy (fname, input->pr_fname, sizeof (input->pr_fname));
|
||||
+ fname[sizeof (input->pr_fname)] = 0;
|
||||
+ strncpy (psargs, input->pr_psargs, sizeof (input->pr_psargs));
|
||||
+ psargs[sizeof (input->pr_psargs)] = 0;
|
||||
+
|
||||
ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz,
|
||||
NT_PRPSINFO, fname, psargs);
|
||||
if (ret != NULL)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
|
||||
-#if defined (HAVE_PRPSINFO32_T) || defined (HAVE_PSINFO32_T)
|
||||
+#if defined (HAVE_PRPSINFO_T)
|
||||
+#if defined (HAVE_PRPSINFO32_T)
|
||||
if (bed->s->elfclass == ELFCLASS32)
|
||||
{
|
||||
-#if defined (HAVE_PSINFO32_T)
|
||||
- psinfo32_t data;
|
||||
- int note_type = NT_PSINFO;
|
||||
-#else
|
||||
prpsinfo32_t data;
|
||||
int note_type = NT_PRPSINFO;
|
||||
-#endif
|
||||
|
||||
- memset (&data, 0, sizeof (data));
|
||||
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
|
||||
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
|
||||
+ data.pr_state = input->pr_state;
|
||||
+ data.pr_sname = input->pr_sname;
|
||||
+ data.pr_zomb = input->pr_zomb;
|
||||
+ data.pr_nice = input->pr_nice;
|
||||
+ data.pr_flag = input->pr_flag;
|
||||
+ data.pr_uid = input->pr_uid;
|
||||
+ data.pr_gid = input->pr_gid;
|
||||
+ data.pr_pid = input->pr_pid;
|
||||
+ data.pr_ppid = input->pr_ppid;
|
||||
+ data.pr_pgrp = input->pr_pgrp;
|
||||
+ data.pr_sid = input->pr_sid;
|
||||
+ BFD_ASSERT (sizeof (data.pr_fname) == sizeof (input->pr_fname));
|
||||
+ memcpy (data.pr_fname, input->pr_fname, sizeof (data.pr_fname));
|
||||
+ BFD_ASSERT (sizeof (data.pr_psargs) == sizeof (input->pr_psargs));
|
||||
+ memcpy (data.pr_psargs, input->pr_psargs, sizeof (data.pr_psargs));
|
||||
return elfcore_write_note (abfd, buf, bufsiz,
|
||||
"CORE", note_type, &data, sizeof (data));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
-#if defined (HAVE_PSINFO_T)
|
||||
- psinfo_t data;
|
||||
- int note_type = NT_PSINFO;
|
||||
-#else
|
||||
- prpsinfo_t data;
|
||||
int note_type = NT_PRPSINFO;
|
||||
-#endif
|
||||
|
||||
- memset (&data, 0, sizeof (data));
|
||||
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
|
||||
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
|
||||
return elfcore_write_note (abfd, buf, bufsiz,
|
||||
- "CORE", note_type, &data, sizeof (data));
|
||||
+ "CORE", note_type, input, sizeof (*input));
|
||||
}
|
||||
-#endif /* PSINFO_T or PRPSINFO_T */
|
||||
+#endif /* PRPSINFO_T */
|
||||
|
||||
free (buf);
|
||||
return NULL;
|
||||
Index: gdb-7.5.50.20130118/gdb/procfs.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/procfs.c 2013-01-18 23:02:54.815004487 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/procfs.c 2013-01-18 23:02:59.320010861 +0100
|
||||
@@ -5502,6 +5502,7 @@ procfs_make_note_section (bfd *obfd, int
|
||||
note_data = (char *) elfcore_write_prpsinfo (obfd,
|
||||
note_data,
|
||||
note_size,
|
||||
+ NULL,
|
||||
fname,
|
||||
psargs);
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/linux-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/linux-tdep.c 2013-01-18 23:02:54.816004489 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/linux-tdep.c 2013-01-18 23:03:10.727027317 +0100
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "cli/cli-utils.h"
|
||||
#include "arch-utils.h"
|
||||
#include "gdb_obstack.h"
|
||||
+#include <sys/procfs.h>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -1153,6 +1154,131 @@ linux_corefile_thread_callback (struct t
|
||||
return !args->note_data;
|
||||
}
|
||||
|
||||
+/* Should be always true for Linux */
|
||||
+#define HAVE_PRPSINFO_T 1
|
||||
+
|
||||
+#if defined (HAVE_PRPSINFO_T)
|
||||
+
|
||||
+/* Fills struct elf_prpsinfo{32,64} as much as possible, imitate Linux kernel
|
||||
+ binfmt_elf.c. Unknown values are filled with zeroes. The structure is
|
||||
+ malloced. */
|
||||
+
|
||||
+static const prpsinfo_t *
|
||||
+fill_prpsinfo (void)
|
||||
+{
|
||||
+ struct stat sb;
|
||||
+ char filename[sizeof ("/proc//cmdline") + sizeof (int) * 3 + 2];
|
||||
+ char buf[1024];
|
||||
+ char proc_state[5];
|
||||
+ char proc_cmdline[sizeof (((struct elf_prpsinfo*)0)->pr_psargs) + 1];
|
||||
+ unsigned flags;
|
||||
+ long proc_nice;
|
||||
+ unsigned proc_ppid;
|
||||
+ unsigned proc_pgid;
|
||||
+ unsigned proc_sid;
|
||||
+ pid_t pid;
|
||||
+ int fd, n;
|
||||
+ char *cp, *proc_comm, *state_s;
|
||||
+ /* String comes from Linux kernel binfmt_elf.c FILL_PSINFO but it is already
|
||||
+ obsolete there to <linux/sched.h> TASK_* constants. */
|
||||
+ const char state_string[] = "RSDTZW";
|
||||
+ int state_num;
|
||||
+ static prpsinfo_t retval;
|
||||
+
|
||||
+ /* Get /proc/$PID/stat. */
|
||||
+ pid = ptid_get_pid (inferior_ptid);
|
||||
+ sprintf (filename, "/proc/%u/stat", (unsigned)pid);
|
||||
+ fd = open (filename, O_RDONLY);
|
||||
+ if (fd < 0)
|
||||
+ return NULL;
|
||||
+ fstat (fd, &sb); /* No error checking (can it ever happen?). */
|
||||
+ n = read (fd, buf, sizeof (buf) - 1);
|
||||
+ close (fd);
|
||||
+ if (n < 0)
|
||||
+ return NULL;
|
||||
+ buf[n] = 0;
|
||||
+
|
||||
+ cp = strrchr (buf, ')'); /* Split into "PID (COMM" and "<rest>". */
|
||||
+ if (!cp)
|
||||
+ return NULL;
|
||||
+ *cp = 0;
|
||||
+
|
||||
+ /* Grab COMM. */
|
||||
+ proc_comm = strchr (buf, '(');
|
||||
+ if (!proc_comm)
|
||||
+ return NULL;
|
||||
+ proc_comm++;
|
||||
+
|
||||
+ /* Read /proc/$PID/cmdline. */
|
||||
+ proc_cmdline[0] = 0;
|
||||
+ strcpy (strrchr (filename, '/'), "/cmdline");
|
||||
+ fd = open (filename, O_RDONLY);
|
||||
+ if (fd >= 0)
|
||||
+ {
|
||||
+ int n;
|
||||
+
|
||||
+ n = read (fd, proc_cmdline, sizeof (proc_cmdline) - 1);
|
||||
+ if (n < 0)
|
||||
+ n = 0;
|
||||
+ proc_cmdline[n] = 0;
|
||||
+ while (n--) /* Replace NULs with spaces. */
|
||||
+ if (proc_cmdline[n] == 0)
|
||||
+ proc_cmdline[n] = ' ';
|
||||
+ close (fd);
|
||||
+ }
|
||||
+
|
||||
+ /* Parse /proc/$PID/stat. */
|
||||
+ n = sscanf (cp + 2, /* skip ") " */
|
||||
+ "%4s %u " /* state, ppid */
|
||||
+ "%u %u %*s %*s " /* pgid, sid, tty, tpgid */
|
||||
+ "%u %*s %*s %*s " /* flags, min_flt, cmin_flt, maj_flt */
|
||||
+ "%*s " /* cmaj_flt */
|
||||
+ "%*s %*s " /* utime, stime */
|
||||
+ "%*s %*s %*s " /* cutime, cstime, priority */
|
||||
+ "%ld " /* nice */
|
||||
+ /*"%*s %*s " timeout, it_real_value */
|
||||
+ /*"%lu " start_time */
|
||||
+ /*"%lu " vsize */
|
||||
+ /*"%lu " rss */
|
||||
+ /*"%lu %lu %lu " rss_rlim, start_code, end_code */
|
||||
+ /*"%lu %lu %lu " start_stack, kstk_esp, kstk_eip */
|
||||
+ /*"%u %u %u %u " signal, blocked, sigignore, sigcatch */
|
||||
+ /*"%lu %lu %lu" wchan, nswap, cnswap */
|
||||
+ , proc_state, &proc_ppid,
|
||||
+ &proc_pgid, &proc_sid,
|
||||
+ &flags,
|
||||
+ &proc_nice);
|
||||
+ if (n != 6)
|
||||
+ return NULL;
|
||||
+
|
||||
+ state_s = strchr (state_string, proc_state[0]);
|
||||
+ if (state_s != NULL)
|
||||
+ state_num = state_s - state_string;
|
||||
+ else
|
||||
+ {
|
||||
+ /* 0 means Running, some more unusal state would be better. */
|
||||
+ state_num = 0;
|
||||
+ }
|
||||
+
|
||||
+ memset (&retval, 0, sizeof (retval));
|
||||
+ retval.pr_state = state_num;
|
||||
+ retval.pr_sname = proc_state[0];
|
||||
+ retval.pr_zomb = (proc_state[0] == 'Z');
|
||||
+ retval.pr_nice = proc_nice;
|
||||
+ retval.pr_flag = flags;
|
||||
+ retval.pr_uid = sb.st_uid;
|
||||
+ retval.pr_gid = sb.st_gid;
|
||||
+ retval.pr_pid = pid;
|
||||
+ retval.pr_ppid = proc_ppid;
|
||||
+ retval.pr_pgrp = proc_pgid;
|
||||
+ retval.pr_sid = proc_sid;
|
||||
+ strncpy (retval.pr_fname, proc_comm, sizeof (retval.pr_fname));
|
||||
+ strncpy (retval.pr_psargs, proc_cmdline, sizeof (retval.pr_psargs));
|
||||
+
|
||||
+ return &retval;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* Fills the "to_make_corefile_note" target vector. Builds the note
|
||||
section for a corefile, and returns it in a malloc buffer. */
|
||||
|
||||
@@ -1168,16 +1294,9 @@ linux_make_corefile_notes (struct gdbarc
|
||||
/* Process information. */
|
||||
if (get_exec_file (0))
|
||||
{
|
||||
- const char *fname = lbasename (get_exec_file (0));
|
||||
- char *psargs = xstrdup (fname);
|
||||
+ const prpsinfo_t *data = fill_prpsinfo ();
|
||||
|
||||
- if (get_inferior_args ())
|
||||
- psargs = reconcat (psargs, psargs, " ", get_inferior_args (),
|
||||
- (char *) NULL);
|
||||
-
|
||||
- note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
|
||||
- fname, psargs);
|
||||
- xfree (psargs);
|
||||
+ note_data = elfcore_write_prpsinfo (obfd, note_data, note_size, data);
|
||||
|
||||
if (!note_data)
|
||||
return NULL;
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.5.50.20130118/gdb/breakpoint.c
|
||||
Index: gdb-7.5.50.20130215/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/breakpoint.c 2013-01-18 23:09:53.727597584 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/breakpoint.c 2013-01-18 23:10:20.158635065 +0100
|
||||
@@ -15993,6 +15993,50 @@ initialize_breakpoint_ops (void)
|
||||
--- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:37:08.216381988 +0100
|
||||
@@ -16020,6 +16020,50 @@ initialize_breakpoint_ops (void)
|
||||
static struct cmd_list_element *enablebreaklist = NULL;
|
||||
|
||||
void
|
||||
@ -53,23 +53,23 @@ Index: gdb-7.5.50.20130118/gdb/breakpoint.c
|
||||
_initialize_breakpoint (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
Index: gdb-7.5.50.20130118/gdb/breakpoint.h
|
||||
Index: gdb-7.5.50.20130215/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/breakpoint.h 2013-01-18 23:09:51.671594585 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/breakpoint.h 2013-01-18 23:09:53.728597586 +0100
|
||||
@@ -1550,4 +1550,7 @@ extern struct gdbarch *get_sal_arch (str
|
||||
--- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-03 16:57:06.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:37:19.025395693 +0100
|
||||
@@ -1556,4 +1556,7 @@ extern void handle_solib_event (void);
|
||||
|
||||
extern void handle_solib_event (void);
|
||||
extern void breakpoint_free_objfile (struct objfile *objfile);
|
||||
|
||||
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||
+ struct section_offsets *delta);
|
||||
+
|
||||
#endif /* !defined (BREAKPOINT_H) */
|
||||
Index: gdb-7.5.50.20130118/gdb/objfiles.c
|
||||
Index: gdb-7.5.50.20130215/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/objfiles.c 2013-01-18 23:09:51.671594585 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/objfiles.c 2013-01-18 23:09:53.729597588 +0100
|
||||
@@ -826,6 +826,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
--- gdb-7.5.50.20130215.orig/gdb/objfiles.c 2013-02-03 16:57:07.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/objfiles.c 2013-02-15 22:37:08.217381990 +0100
|
||||
@@ -831,6 +831,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
|
||||
new_offsets, delta);
|
||||
|
||||
|
248
gdb-archer.patch
248
gdb-archer.patch
@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
http://sourceware.org/gdb/wiki/ArcherBranchManagement
|
||||
|
||||
GIT snapshot:
|
||||
commit f1f762361e5e8a4fabdab16463ecb1fd9ba1e5e9
|
||||
commit e72ce29f8e339fc6fffd73e9ff4b854b6f2f1452
|
||||
|
||||
branch `archer' - the merge of branches:
|
||||
archer-jankratochvil-vla
|
||||
@ -10,10 +10,10 @@ archer-tromey-python
|
||||
|
||||
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
index 7305e6d..fff8cb2 100644
|
||||
index ed30db5..4356be7 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1308,6 +1308,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
@@ -1313,6 +1313,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
CONFIG_LINKS= \
|
||||
$(SHELL) config.status
|
||||
|
||||
@ -27,10 +27,10 @@ index 7305e6d..fff8cb2 100644
|
||||
$(SHELL) config.status --recheck
|
||||
|
||||
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
|
||||
index b4849a9..a6e6ca2 100644
|
||||
index 634e761..60276dc 100644
|
||||
--- a/gdb/ada-lang.c
|
||||
+++ b/gdb/ada-lang.c
|
||||
@@ -12263,6 +12263,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp,
|
||||
@@ -12262,6 +12262,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp,
|
||||
|
||||
static int
|
||||
ada_operator_check (struct expression *exp, int pos,
|
||||
@ -38,7 +38,7 @@ index b4849a9..a6e6ca2 100644
|
||||
int (*objfile_func) (struct objfile *objfile, void *data),
|
||||
void *data)
|
||||
{
|
||||
@@ -12277,12 +12278,15 @@ ada_operator_check (struct expression *exp, int pos,
|
||||
@@ -12276,12 +12277,15 @@ ada_operator_check (struct expression *exp, int pos,
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -94,10 +94,10 @@ index 02e7e8b..2931401 100644
|
||||
+
|
||||
#endif /* BLOCK_H */
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index 3ad9885..e28b44e 100644
|
||||
index fb57a57..5c03b1c 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -15641,6 +15641,24 @@ all_tracepoints (void)
|
||||
@@ -15656,6 +15656,24 @@ all_tracepoints (void)
|
||||
return tp_vec;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ index 3ad9885..e28b44e 100644
|
||||
|
||||
/* This help string is used for the break, hbreak, tbreak and thbreak
|
||||
commands. It is defined as a macro to prevent duplication.
|
||||
@@ -16612,4 +16630,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\
|
||||
@@ -16639,4 +16657,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\
|
||||
automatic_hardware_breakpoints = 1;
|
||||
|
||||
observer_attach_about_to_proceed (breakpoint_about_to_proceed);
|
||||
@ -131,10 +131,10 @@ index 3ad9885..e28b44e 100644
|
||||
+#endif
|
||||
}
|
||||
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
|
||||
index a6db162..ddfc6a9 100644
|
||||
index ca8d89b..811ad72 100644
|
||||
--- a/gdb/c-typeprint.c
|
||||
+++ b/gdb/c-typeprint.c
|
||||
@@ -692,7 +692,13 @@ c_type_print_varspec_suffix (struct type *type,
|
||||
@@ -689,7 +689,13 @@ c_type_print_varspec_suffix (struct type *type,
|
||||
|
||||
fprintf_filtered (stream, (is_vector ?
|
||||
" __attribute__ ((vector_size(" : "["));
|
||||
@ -187,7 +187,7 @@ index d98ac77..e248399 100644
|
||||
FLAGS_TO_PASS = \
|
||||
"prefix=$(prefix)" \
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index 728e44b..3659139 100644
|
||||
index e8ac8c5..b18ccd6 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -1217,6 +1217,16 @@ for remote debugging.
|
||||
@ -207,7 +207,7 @@ index 728e44b..3659139 100644
|
||||
@c resolve the situation of these eventually
|
||||
@item -tui
|
||||
@cindex @code{--tui}
|
||||
@@ -22738,8 +22748,6 @@ containing @code{end}. For example:
|
||||
@@ -22786,8 +22796,6 @@ containing @code{end}. For example:
|
||||
|
||||
@smallexample
|
||||
(@value{GDBP}) python
|
||||
@ -216,7 +216,7 @@ index 728e44b..3659139 100644
|
||||
>print 23
|
||||
>end
|
||||
23
|
||||
@@ -22753,6 +22761,14 @@ controlled using @code{set python print-stack}: if @code{full}, then
|
||||
@@ -22801,6 +22809,14 @@ controlled using @code{set python print-stack}: if @code{full}, then
|
||||
full Python stack printing is enabled; if @code{none}, then Python stack
|
||||
and message printing is disabled; if @code{message}, the default, only
|
||||
the message component of the error is printed.
|
||||
@ -231,7 +231,7 @@ index 728e44b..3659139 100644
|
||||
@end table
|
||||
|
||||
It is also possible to execute a Python script from the @value{GDBN}
|
||||
@@ -22774,6 +22790,14 @@ and thus is always available.
|
||||
@@ -22822,6 +22838,14 @@ and thus is always available.
|
||||
@cindex python api
|
||||
@cindex programming in python
|
||||
|
||||
@ -376,11 +376,11 @@ index 4a75c26..91446fe 100644
|
||||
|
||||
@node Language Support
|
||||
diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi
|
||||
index 87c08e1..cc8f498 100644
|
||||
index adb7085..5ec5b5a 100644
|
||||
--- a/gdb/doc/observer.texi
|
||||
+++ b/gdb/doc/observer.texi
|
||||
@@ -246,6 +246,11 @@ The trace state variable @var{name} is deleted. If @var{name} is
|
||||
@code{NULL}, all trace state variables are deleted.
|
||||
@@ -249,6 +249,11 @@ The trace state variable @var{tsv} is deleted. If @var{tsv} is
|
||||
The trace state value @var{tsv} is modified.
|
||||
@end deftypefun
|
||||
|
||||
+@c @deftypefun void mark_used (void)
|
||||
@ -428,10 +428,10 @@ index e85486a..e7ac799 100644
|
||||
|
||||
/* The location of a value. */
|
||||
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
|
||||
index 2282feb..13e7bbc 100644
|
||||
index 002387e..2e0e722 100644
|
||||
--- a/gdb/dwarf2loc.c
|
||||
+++ b/gdb/dwarf2loc.c
|
||||
@@ -293,6 +293,9 @@ struct dwarf_expr_baton
|
||||
@@ -298,6 +298,9 @@ struct dwarf_expr_baton
|
||||
{
|
||||
struct frame_info *frame;
|
||||
struct dwarf2_per_cu_data *per_cu;
|
||||
@ -441,7 +441,7 @@ index 2282feb..13e7bbc 100644
|
||||
};
|
||||
|
||||
/* Helper functions for dwarf2_evaluate_loc_desc. */
|
||||
@@ -356,16 +359,14 @@ static void
|
||||
@@ -361,16 +364,14 @@ static void
|
||||
dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
|
||||
const gdb_byte **start, size_t *length)
|
||||
{
|
||||
@ -460,7 +460,7 @@ index 2282feb..13e7bbc 100644
|
||||
{
|
||||
struct dwarf2_locexpr_baton *symbaton;
|
||||
|
||||
@@ -378,10 +379,23 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
|
||||
@@ -383,10 +384,23 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
|
||||
else
|
||||
*length = 0;
|
||||
}
|
||||
@ -485,7 +485,7 @@ index 2282feb..13e7bbc 100644
|
||||
}
|
||||
|
||||
/* Helper function for dwarf2_evaluate_loc_desc. Computes the CFA for
|
||||
@@ -448,6 +462,85 @@ dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
|
||||
@@ -453,6 +467,85 @@ dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
|
||||
ctx->funcs->get_frame_pc, ctx->baton);
|
||||
}
|
||||
|
||||
@ -571,7 +571,7 @@ index 2282feb..13e7bbc 100644
|
||||
/* Callback function for dwarf2_evaluate_loc_desc. */
|
||||
|
||||
static struct type *
|
||||
@@ -1150,10 +1243,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
|
||||
@@ -1155,10 +1248,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
|
||||
|
||||
saved_ctx.gdbarch = ctx->gdbarch;
|
||||
saved_ctx.addr_size = ctx->addr_size;
|
||||
@ -584,7 +584,7 @@ index 2282feb..13e7bbc 100644
|
||||
ctx->offset = dwarf2_per_cu_text_offset (baton_local.per_cu);
|
||||
ctx->baton = &baton_local;
|
||||
|
||||
@@ -1161,10 +1256,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
|
||||
@@ -1166,10 +1261,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
|
||||
|
||||
ctx->gdbarch = saved_ctx.gdbarch;
|
||||
ctx->addr_size = saved_ctx.addr_size;
|
||||
@ -680,7 +680,7 @@ index 2282feb..13e7bbc 100644
|
||||
/* Callback function for dwarf2_evaluate_loc_desc.
|
||||
Fetch the address indexed by DW_OP_GNU_addr_index. */
|
||||
|
||||
@@ -2100,22 +2280,6 @@ invalid_synthetic_pointer (void)
|
||||
@@ -2105,22 +2285,6 @@ invalid_synthetic_pointer (void)
|
||||
"referenced via synthetic pointer"));
|
||||
}
|
||||
|
||||
@ -703,7 +703,7 @@ index 2282feb..13e7bbc 100644
|
||||
/* Evaluate a location description, starting at DATA and with length
|
||||
SIZE, to find the current location of variable of TYPE in the
|
||||
context of FRAME. BYTE_OFFSET is applied after the contents are
|
||||
@@ -2128,7 +2292,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
@@ -2133,7 +2297,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
LONGEST byte_offset)
|
||||
{
|
||||
struct value *retval;
|
||||
@ -711,7 +711,7 @@ index 2282feb..13e7bbc 100644
|
||||
struct dwarf_expr_context *ctx;
|
||||
struct cleanup *old_chain, *value_chain;
|
||||
struct objfile *objfile = dwarf2_per_cu_objfile (per_cu);
|
||||
@@ -2140,29 +2303,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
@@ -2145,29 +2308,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
if (size == 0)
|
||||
return allocate_optimized_out_value (type);
|
||||
|
||||
@ -742,7 +742,7 @@ index 2282feb..13e7bbc 100644
|
||||
retval = allocate_value (type);
|
||||
mark_value_bytes_unavailable (retval, 0, TYPE_LENGTH (type));
|
||||
return retval;
|
||||
@@ -2226,6 +2378,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
@@ -2231,6 +2383,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
|
||||
|
||||
do_cleanups (value_chain);
|
||||
@ -759,7 +759,7 @@ index 2282feb..13e7bbc 100644
|
||||
retval = allocate_value_lazy (type);
|
||||
VALUE_LVAL (retval) = lval_memory;
|
||||
if (in_stack_memory)
|
||||
@@ -4143,8 +4305,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
|
||||
@@ -4147,8 +4309,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
|
||||
dlbaton->per_cu);
|
||||
}
|
||||
|
||||
@ -769,7 +769,7 @@ index 2282feb..13e7bbc 100644
|
||||
const struct symbol_computed_ops dwarf2_loclist_funcs = {
|
||||
loclist_read_variable,
|
||||
loclist_read_variable_at_entry,
|
||||
@@ -4153,6 +4314,48 @@ const struct symbol_computed_ops dwarf2_loclist_funcs = {
|
||||
@@ -4157,6 +4318,48 @@ const struct symbol_computed_ops dwarf2_loclist_funcs = {
|
||||
loclist_tracepoint_var_ref
|
||||
};
|
||||
|
||||
@ -839,10 +839,10 @@ index 36641b3..1394578 100644
|
||||
/* Compile a DWARF location expression to an agent expression.
|
||||
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 7a58c45..98aebad 100644
|
||||
index d26e7c8..9fbe61e 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -1613,6 +1613,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu,
|
||||
@@ -1624,6 +1624,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu,
|
||||
struct dwarf2_loclist_baton *baton,
|
||||
struct attribute *attr);
|
||||
|
||||
@ -852,7 +852,7 @@ index 7a58c45..98aebad 100644
|
||||
static void dwarf2_symbol_mark_computed (struct attribute *attr,
|
||||
struct symbol *sym,
|
||||
struct dwarf2_cu *cu);
|
||||
@@ -1645,6 +1648,9 @@ static void age_cached_comp_units (void);
|
||||
@@ -1656,6 +1659,9 @@ static void age_cached_comp_units (void);
|
||||
|
||||
static void free_one_cached_comp_unit (struct dwarf2_per_cu_data *);
|
||||
|
||||
@ -862,7 +862,7 @@ index 7a58c45..98aebad 100644
|
||||
static struct type *set_die_type (struct die_info *, struct type *,
|
||||
struct dwarf2_cu *);
|
||||
|
||||
@@ -1673,6 +1679,9 @@ static struct type *get_die_type_at_offset (sect_offset,
|
||||
@@ -1684,6 +1690,9 @@ static struct type *get_die_type_at_offset (sect_offset,
|
||||
|
||||
static struct type *get_die_type (struct die_info *die, struct dwarf2_cu *cu);
|
||||
|
||||
@ -872,7 +872,7 @@ index 7a58c45..98aebad 100644
|
||||
static void dwarf2_release_queue (void *dummy);
|
||||
|
||||
static void queue_comp_unit (struct dwarf2_per_cu_data *per_cu,
|
||||
@@ -11677,6 +11686,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -11702,6 +11711,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
new_symbol (die, this_type, cu);
|
||||
}
|
||||
|
||||
@ -902,16 +902,16 @@ index 7a58c45..98aebad 100644
|
||||
/* Extract all information from a DW_TAG_array_type DIE and put it in
|
||||
the DIE's type field. For now, this only handles one dimensional
|
||||
arrays. */
|
||||
@@ -11690,7 +11722,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -11715,7 +11747,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
struct type *element_type, *range_type, *index_type;
|
||||
struct type **range_types = NULL;
|
||||
struct attribute *attr;
|
||||
- int ndim = 0;
|
||||
+ int ndim = 0, i;
|
||||
struct cleanup *back_to;
|
||||
char *name;
|
||||
const char *name;
|
||||
|
||||
@@ -11743,17 +11775,19 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -11768,17 +11800,19 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
type = element_type;
|
||||
|
||||
if (read_array_order (die, cu) == DW_ORD_col_major)
|
||||
@ -942,7 +942,7 @@ index 7a58c45..98aebad 100644
|
||||
|
||||
/* Understand Dwarf2 support for vector types (like they occur on
|
||||
the PowerPC w/ AltiVec). Gcc just adds another attribute to the
|
||||
@@ -12379,29 +12413,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -12413,29 +12447,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
struct type *type, *range_type, *index_type, *char_type;
|
||||
struct attribute *attr;
|
||||
@ -1070,16 +1070,16 @@ index 7a58c45..98aebad 100644
|
||||
char_type = language_string_char_type (cu->language_defn, gdbarch);
|
||||
type = create_string_type (NULL, char_type, range_type);
|
||||
|
||||
@@ -12705,7 +12824,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -12739,7 +12858,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
struct type *base_type;
|
||||
struct type *range_type;
|
||||
struct attribute *attr;
|
||||
- LONGEST low, high;
|
||||
+ LONGEST low;
|
||||
int low_default_is_valid;
|
||||
char *name;
|
||||
const char *name;
|
||||
LONGEST negative_mask;
|
||||
@@ -12761,42 +12880,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -12795,42 +12914,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
"- DIE at 0x%x [in module %s]"),
|
||||
die->offset.sect_off, cu->objfile->name);
|
||||
|
||||
@ -1122,7 +1122,7 @@ index 7a58c45..98aebad 100644
|
||||
/* Dwarf-2 specifications explicitly allows to create subrange types
|
||||
without specifying a base type.
|
||||
In that case, the base type must be set to the type of
|
||||
@@ -12835,24 +12918,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -12869,24 +12952,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1300,7 +1300,7 @@ index 7a58c45..98aebad 100644
|
||||
|
||||
name = dwarf2_name (die, cu);
|
||||
if (name)
|
||||
@@ -15712,10 +15934,12 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
|
||||
@@ -15746,10 +15968,12 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
|
||||
(i.e. when the value of a register or memory location is
|
||||
referenced, or a thread-local block, etc.). Then again, it might
|
||||
not be worthwhile. I'm assuming that it isn't unless performance
|
||||
@ -1315,7 +1315,7 @@ index 7a58c45..98aebad 100644
|
||||
|
||||
if (SYMBOL_COMPUTED_OPS (sym) == &dwarf2_loclist_funcs)
|
||||
cu->has_loclist = 1;
|
||||
@@ -15756,6 +15980,8 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
||||
@@ -15790,6 +16014,8 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
||||
else
|
||||
sym = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symbol);
|
||||
OBJSTAT (objfile, n_syms++);
|
||||
@ -1324,7 +1324,7 @@ index 7a58c45..98aebad 100644
|
||||
|
||||
/* Cache this symbol's name and the name's demangled form (if any). */
|
||||
SYMBOL_SET_LANGUAGE (sym, cu->language);
|
||||
@@ -16565,6 +16791,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -16599,6 +16825,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1334,7 +1334,7 @@ index 7a58c45..98aebad 100644
|
||||
return this_type;
|
||||
}
|
||||
|
||||
@@ -18999,62 +19228,100 @@ fill_in_loclist_baton (struct dwarf2_cu *cu,
|
||||
@@ -19043,62 +19272,100 @@ fill_in_loclist_baton (struct dwarf2_cu *cu,
|
||||
baton->from_dwo = cu->dwo_unit != NULL;
|
||||
}
|
||||
|
||||
@ -1473,7 +1473,7 @@ index 7a58c45..98aebad 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19425,6 +19692,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs)
|
||||
@@ -19469,6 +19736,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs)
|
||||
&& ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off);
|
||||
}
|
||||
|
||||
@ -1499,7 +1499,7 @@ index 7a58c45..98aebad 100644
|
||||
/* Set the type associated with DIE to TYPE. Save it in CU's hash
|
||||
table if necessary. For convenience, return TYPE.
|
||||
|
||||
@@ -19449,6 +19735,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
@@ -19493,6 +19779,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
struct dwarf2_per_cu_offset_and_type **slot, ofs;
|
||||
struct objfile *objfile = cu->objfile;
|
||||
|
||||
@ -1509,7 +1509,7 @@ index 7a58c45..98aebad 100644
|
||||
initialized (if not already set). There are a few types where
|
||||
we should not be doing so, because the type-specific area is
|
||||
diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
index c9630df..b797189 100644
|
||||
index d7f80e2..8eca4c8 100644
|
||||
--- a/gdb/eval.c
|
||||
+++ b/gdb/eval.c
|
||||
@@ -41,6 +41,7 @@
|
||||
@ -1762,7 +1762,7 @@ index c9630df..b797189 100644
|
||||
|
||||
pc = (*pos)++;
|
||||
op = exp->elts[pc].opcode;
|
||||
@@ -1779,6 +1971,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -1776,6 +1968,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
|
||||
/* First determine the type code we are dealing with. */
|
||||
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||
@ -1771,7 +1771,7 @@ index c9630df..b797189 100644
|
||||
type = check_typedef (value_type (arg1));
|
||||
code = TYPE_CODE (type);
|
||||
|
||||
@@ -1799,23 +1993,13 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -1796,23 +1990,13 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
code = TYPE_CODE (type);
|
||||
}
|
||||
}
|
||||
@ -1797,7 +1797,7 @@ index c9630df..b797189 100644
|
||||
|
||||
case TYPE_CODE_PTR:
|
||||
case TYPE_CODE_FUNC:
|
||||
@@ -2242,49 +2426,6 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -2239,49 +2423,6 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
}
|
||||
return (arg1);
|
||||
|
||||
@ -1847,7 +1847,7 @@ index c9630df..b797189 100644
|
||||
case BINOP_LOGICAL_AND:
|
||||
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||
if (noside == EVAL_SKIP)
|
||||
@@ -2516,15 +2657,23 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -2513,15 +2654,23 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
if (expect_type && TYPE_CODE (expect_type) == TYPE_CODE_PTR)
|
||||
expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type));
|
||||
arg1 = evaluate_subexp (expect_type, exp, pos, noside);
|
||||
@ -1873,7 +1873,7 @@ index c9630df..b797189 100644
|
||||
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
|
||||
{
|
||||
type = check_typedef (value_type (arg1));
|
||||
@@ -2533,12 +2682,18 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -2530,12 +2679,18 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
/* In C you can dereference an array to get the 1st elt. */
|
||||
|| TYPE_CODE (type) == TYPE_CODE_ARRAY
|
||||
)
|
||||
@ -1897,7 +1897,7 @@ index c9630df..b797189 100644
|
||||
else
|
||||
error (_("Attempt to take contents of a non-pointer value."));
|
||||
}
|
||||
@@ -2548,9 +2703,14 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -2545,9 +2700,14 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
do. "long long" variables are rare enough that
|
||||
BUILTIN_TYPE_LONGEST would seem to be a mistake. */
|
||||
if (TYPE_CODE (type) == TYPE_CODE_INT)
|
||||
@ -1915,7 +1915,7 @@ index c9630df..b797189 100644
|
||||
|
||||
case UNOP_ADDR:
|
||||
/* C++: check for and handle pointer to members. */
|
||||
@@ -2963,7 +3123,7 @@ evaluate_subexp_with_coercion (struct expression *exp,
|
||||
@@ -2960,7 +3120,7 @@ evaluate_subexp_with_coercion (struct expression *exp,
|
||||
{
|
||||
enum exp_opcode op;
|
||||
int pc;
|
||||
@ -1924,7 +1924,7 @@ index c9630df..b797189 100644
|
||||
struct symbol *var;
|
||||
struct type *type;
|
||||
|
||||
@@ -2974,13 +3134,18 @@ evaluate_subexp_with_coercion (struct expression *exp,
|
||||
@@ -2971,13 +3131,18 @@ evaluate_subexp_with_coercion (struct expression *exp,
|
||||
{
|
||||
case OP_VAR_VALUE:
|
||||
var = exp->elts[pc + 2].symbol;
|
||||
@ -1944,7 +1944,7 @@ index c9630df..b797189 100644
|
||||
return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
|
||||
val);
|
||||
}
|
||||
@@ -3038,9 +3203,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
|
||||
@@ -3035,9 +3200,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
|
||||
|
||||
case OP_VAR_VALUE:
|
||||
(*pos) += 4;
|
||||
@ -1961,7 +1961,7 @@ index c9630df..b797189 100644
|
||||
|
||||
default:
|
||||
val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
|
||||
@@ -3071,18 +3240,25 @@ parse_and_eval_type (char *p, int length)
|
||||
@@ -3068,18 +3237,25 @@ parse_and_eval_type (char *p, int length)
|
||||
int
|
||||
calc_f77_array_dims (struct type *array_type)
|
||||
{
|
||||
@ -2096,7 +2096,7 @@ index aa33231..df998c4 100644
|
||||
{
|
||||
case TYPE_CODE_ARRAY:
|
||||
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
|
||||
index 22cca83..b2a2cc3 100644
|
||||
index d01d6ec..8a21149 100644
|
||||
--- a/gdb/f-valprint.c
|
||||
+++ b/gdb/f-valprint.c
|
||||
@@ -51,15 +51,17 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
|
||||
@ -2382,7 +2382,7 @@ index ffb7f53..a2e7e94 100644
|
||||
|
||||
b internal_error
|
||||
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
||||
index 5885241..a3db66a 100644
|
||||
index 12730d7..5a614e0 100644
|
||||
--- a/gdb/gdbtypes.c
|
||||
+++ b/gdb/gdbtypes.c
|
||||
@@ -37,6 +37,9 @@
|
||||
@ -2709,7 +2709,7 @@ index 5885241..a3db66a 100644
|
||||
}
|
||||
|
||||
type = make_qualified_type (type, instance_flags, NULL);
|
||||
@@ -3387,33 +3522,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs)
|
||||
@@ -3384,33 +3519,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs)
|
||||
}
|
||||
|
||||
/* Allocate the hash table used by copy_type_recursive to walk
|
||||
@ -2767,7 +2767,7 @@ index 5885241..a3db66a 100644
|
||||
return type;
|
||||
|
||||
/* This type shouldn't be pointing to any types in other objfiles;
|
||||
@@ -3428,9 +3572,10 @@ copy_type_recursive (struct objfile *objfile,
|
||||
@@ -3425,9 +3569,10 @@ copy_type_recursive (struct objfile *objfile,
|
||||
new_type = alloc_type_arch (get_type_arch (type));
|
||||
|
||||
/* We must add the new type to the hash table immediately, in case
|
||||
@ -2781,7 +2781,7 @@ index 5885241..a3db66a 100644
|
||||
stored->old = type;
|
||||
stored->new = new_type;
|
||||
*slot = stored;
|
||||
@@ -3441,6 +3586,21 @@ copy_type_recursive (struct objfile *objfile,
|
||||
@@ -3438,6 +3583,21 @@ copy_type_recursive (struct objfile *objfile,
|
||||
TYPE_OBJFILE_OWNED (new_type) = 0;
|
||||
TYPE_OWNER (new_type).gdbarch = get_type_arch (type);
|
||||
|
||||
@ -2803,7 +2803,7 @@ index 5885241..a3db66a 100644
|
||||
if (TYPE_NAME (type))
|
||||
TYPE_NAME (new_type) = xstrdup (TYPE_NAME (type));
|
||||
if (TYPE_TAG_NAME (type))
|
||||
@@ -3449,12 +3609,48 @@ copy_type_recursive (struct objfile *objfile,
|
||||
@@ -3446,12 +3606,48 @@ copy_type_recursive (struct objfile *objfile,
|
||||
TYPE_INSTANCE_FLAGS (new_type) = TYPE_INSTANCE_FLAGS (type);
|
||||
TYPE_LENGTH (new_type) = TYPE_LENGTH (type);
|
||||
|
||||
@ -2852,7 +2852,7 @@ index 5885241..a3db66a 100644
|
||||
TYPE_FIELDS (new_type) = XCALLOC (nfields, struct field);
|
||||
for (i = 0; i < nfields; i++)
|
||||
{
|
||||
@@ -3463,8 +3659,8 @@ copy_type_recursive (struct objfile *objfile,
|
||||
@@ -3460,8 +3656,8 @@ copy_type_recursive (struct objfile *objfile,
|
||||
TYPE_FIELD_BITSIZE (new_type, i) = TYPE_FIELD_BITSIZE (type, i);
|
||||
if (TYPE_FIELD_TYPE (type, i))
|
||||
TYPE_FIELD_TYPE (new_type, i)
|
||||
@ -2863,7 +2863,7 @@ index 5885241..a3db66a 100644
|
||||
if (TYPE_FIELD_NAME (type, i))
|
||||
TYPE_FIELD_NAME (new_type, i) =
|
||||
xstrdup (TYPE_FIELD_NAME (type, i));
|
||||
@@ -3495,24 +3691,184 @@ copy_type_recursive (struct objfile *objfile,
|
||||
@@ -3492,24 +3688,184 @@ copy_type_recursive (struct objfile *objfile,
|
||||
}
|
||||
}
|
||||
|
||||
@ -3055,7 +3055,7 @@ index 5885241..a3db66a 100644
|
||||
/* Maybe copy the type_specific bits.
|
||||
|
||||
NOTE drow/2005-12-09: We do not copy the C++-specific bits like
|
||||
@@ -3529,6 +3885,17 @@ copy_type_recursive (struct objfile *objfile,
|
||||
@@ -3526,6 +3882,17 @@ copy_type_recursive (struct objfile *objfile,
|
||||
return new_type;
|
||||
}
|
||||
|
||||
@ -3073,7 +3073,7 @@ index 5885241..a3db66a 100644
|
||||
/* Make a copy of the given TYPE, except that the pointer & reference
|
||||
types are not preserved.
|
||||
|
||||
@@ -4093,6 +4460,13 @@ void
|
||||
@@ -4090,6 +4457,13 @@ void
|
||||
_initialize_gdbtypes (void)
|
||||
{
|
||||
gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init);
|
||||
@ -3088,7 +3088,7 @@ index 5885241..a3db66a 100644
|
||||
|
||||
add_setshow_zuinteger_cmd ("overload", no_class, &overload_debug,
|
||||
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||
index 8b340a3..aea1c96 100644
|
||||
index 0ca7a87..c6029dc 100644
|
||||
--- a/gdb/gdbtypes.h
|
||||
+++ b/gdb/gdbtypes.h
|
||||
@@ -226,6 +226,11 @@ enum type_instance_flag_value
|
||||
@ -3320,7 +3320,7 @@ index 8b340a3..aea1c96 100644
|
||||
|
||||
extern struct type *copy_type (const struct type *type);
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index c9439bb..6c4acc4 100644
|
||||
index 06f3feb..141a01b 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -37,6 +37,7 @@
|
||||
@ -3340,7 +3340,7 @@ index c9439bb..6c4acc4 100644
|
||||
/* These are static so that we can take their address in an
|
||||
initializer. */
|
||||
static int print_help;
|
||||
@@ -502,10 +505,14 @@ captured_main (void *data)
|
||||
@@ -504,10 +507,14 @@ captured_main (void *data)
|
||||
{"args", no_argument, &set_args, 1},
|
||||
{"l", required_argument, 0, 'l'},
|
||||
{"return-child-result", no_argument, &return_child_result, 1},
|
||||
@ -3356,7 +3356,7 @@ index c9439bb..6c4acc4 100644
|
||||
{
|
||||
int option_index;
|
||||
|
||||
@@ -523,6 +530,9 @@ captured_main (void *data)
|
||||
@@ -525,6 +532,9 @@ captured_main (void *data)
|
||||
case 0:
|
||||
/* Long option that just sets a flag. */
|
||||
break;
|
||||
@ -3366,7 +3366,7 @@ index c9439bb..6c4acc4 100644
|
||||
case OPT_SE:
|
||||
symarg = optarg;
|
||||
execarg = optarg;
|
||||
@@ -731,7 +741,31 @@ captured_main (void *data)
|
||||
@@ -733,7 +743,31 @@ captured_main (void *data)
|
||||
|
||||
/* Now that gdb_init has created the initial inferior, we're in
|
||||
position to set args for that inferior. */
|
||||
@ -3399,7 +3399,7 @@ index c9439bb..6c4acc4 100644
|
||||
{
|
||||
/* The remaining options are the command-line options for the
|
||||
inferior. The first one is the sym/exec file, and the rest
|
||||
@@ -1011,7 +1045,8 @@ captured_main (void *data)
|
||||
@@ -1013,7 +1047,8 @@ captured_main (void *data)
|
||||
|
||||
/* Read in the old history after all the command files have been
|
||||
read. */
|
||||
@ -3409,7 +3409,7 @@ index c9439bb..6c4acc4 100644
|
||||
|
||||
if (batch_flag)
|
||||
{
|
||||
@@ -1022,13 +1057,25 @@ captured_main (void *data)
|
||||
@@ -1024,13 +1059,25 @@ captured_main (void *data)
|
||||
/* Show time and/or space usage. */
|
||||
do_cleanups (pre_stat_chain);
|
||||
|
||||
@ -3441,7 +3441,7 @@ index c9439bb..6c4acc4 100644
|
||||
}
|
||||
/* No exit -- exit is through quit_command. */
|
||||
}
|
||||
@@ -1060,7 +1107,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
@@ -1062,7 +1109,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
fputs_unfiltered (_("\
|
||||
This is the GNU debugger. Usage:\n\n\
|
||||
gdb [options] [executable-file [core-file or process-id]]\n\
|
||||
@ -3455,7 +3455,7 @@ index c9439bb..6c4acc4 100644
|
||||
Options:\n\n\
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
@@ -1103,7 +1155,13 @@ Options:\n\n\
|
||||
@@ -1104,7 +1156,13 @@ Options:\n\n\
|
||||
fputs_unfiltered (_(" files.\n\
|
||||
--nh Do not read "), stream);
|
||||
fputs_unfiltered (gdbinit, stream);
|
||||
@ -3681,18 +3681,18 @@ index 8d25311..233ed46 100644
|
||||
void *data),
|
||||
void *data);
|
||||
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||
index a576d88..273a5e1 100644
|
||||
index 155703d..545a615 100644
|
||||
--- a/gdb/printcmd.c
|
||||
+++ b/gdb/printcmd.c
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "arch-utils.h"
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "cli/cli-utils.h"
|
||||
#include "format.h"
|
||||
#include "source.h"
|
||||
+#include "dwarf2loc.h"
|
||||
|
||||
#ifdef TUI
|
||||
#include "tui/tui.h" /* For tui_active et al. */
|
||||
@@ -966,6 +967,11 @@ print_command_1 (char *exp, int voidprint)
|
||||
@@ -967,6 +968,11 @@ print_command_1 (char *exp, int voidprint)
|
||||
else
|
||||
val = access_value_history (0);
|
||||
|
||||
@ -3704,7 +3704,7 @@ index a576d88..273a5e1 100644
|
||||
if (voidprint || (val && value_type (val) &&
|
||||
TYPE_CODE (value_type (val)) != TYPE_CODE_VOID))
|
||||
{
|
||||
@@ -1038,6 +1044,9 @@ output_command (char *exp, int from_tty)
|
||||
@@ -1039,6 +1045,9 @@ output_command (char *exp, int from_tty)
|
||||
|
||||
val = evaluate_expression (expr);
|
||||
|
||||
@ -3714,7 +3714,7 @@ index a576d88..273a5e1 100644
|
||||
annotate_value_begin (value_type (val));
|
||||
|
||||
get_formatted_print_options (&opts, format);
|
||||
@@ -1466,6 +1475,24 @@ x_command (char *exp, int from_tty)
|
||||
@@ -1467,6 +1476,24 @@ x_command (char *exp, int from_tty)
|
||||
set_internalvar (lookup_internalvar ("__"), last_examine_value);
|
||||
}
|
||||
}
|
||||
@ -3739,7 +3739,7 @@ index a576d88..273a5e1 100644
|
||||
|
||||
|
||||
/* Add an expression to the auto-display chain.
|
||||
@@ -1963,6 +1990,10 @@ print_variable_and_value (const char *name, struct symbol *var,
|
||||
@@ -1964,6 +1991,10 @@ print_variable_and_value (const char *name, struct symbol *var,
|
||||
struct value_print_options opts;
|
||||
|
||||
val = read_var_value (var, frame);
|
||||
@ -3750,7 +3750,7 @@ index a576d88..273a5e1 100644
|
||||
get_user_print_options (&opts);
|
||||
opts.deref_ref = 1;
|
||||
common_val_print (val, stream, indent, &opts, current_language);
|
||||
@@ -2602,4 +2633,8 @@ Show printing of source filename and line number with <symbol>."), NULL,
|
||||
@@ -2613,4 +2644,8 @@ Show printing of source filename and line number with <symbol>."), NULL,
|
||||
add_com ("eval", no_class, eval_command, _("\
|
||||
Convert \"printf format string\", arg1, arg2, arg3, ..., argn to\n\
|
||||
a command line, and call it."));
|
||||
@ -4522,7 +4522,7 @@ index 0000000..debb3bb
|
||||
+
|
||||
+InScope ()
|
||||
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
|
||||
index 31b7776..56085d1 100644
|
||||
index 051cff0..e2f2ebe 100644
|
||||
--- a/gdb/python/py-type.c
|
||||
+++ b/gdb/python/py-type.c
|
||||
@@ -31,6 +31,8 @@
|
||||
@ -4762,7 +4762,7 @@ index 11cc038..ef238f6 100644
|
||||
|
||||
|
||||
diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
index b0f71a2..d2248c1 100644
|
||||
index 8dd65a1..82c6c86 100644
|
||||
--- a/gdb/python/python.c
|
||||
+++ b/gdb/python/python.c
|
||||
@@ -66,6 +66,8 @@ static const char *gdbpy_should_print_stack = python_excp_message;
|
||||
@ -4828,7 +4828,7 @@ index b0f71a2..d2248c1 100644
|
||||
|
||||
static PyObject *
|
||||
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
|
||||
@@ -1734,6 +1783,8 @@ static PyMethodDef GdbMethods[] =
|
||||
@@ -1733,6 +1782,8 @@ static PyMethodDef GdbMethods[] =
|
||||
"Get a value from history" },
|
||||
{ "execute", (PyCFunction) execute_gdb_command, METH_VARARGS | METH_KEYWORDS,
|
||||
"Execute a gdb command" },
|
||||
@ -4851,10 +4851,10 @@ index 24e3077..0443087 100644
|
||||
int embedded_offset, CORE_ADDR address,
|
||||
struct ui_file *stream, int recurse,
|
||||
diff --git a/gdb/stack.c b/gdb/stack.c
|
||||
index a9dabb5..6c78436 100644
|
||||
index 147d815..51115cf 100644
|
||||
--- a/gdb/stack.c
|
||||
+++ b/gdb/stack.c
|
||||
@@ -510,6 +510,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
|
||||
@@ -508,6 +508,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
|
||||
stb = mem_fileopen ();
|
||||
old_chain = make_cleanup_ui_file_delete (stb);
|
||||
|
||||
@ -7929,7 +7929,7 @@ index 0000000..4747ea9
|
||||
+ write (*,*) a ! break-static
|
||||
+end
|
||||
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
index 351fa87..0b5db6e 100644
|
||||
index 55e13cf..441c28b 100644
|
||||
--- a/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
@@ -91,6 +91,10 @@ proc do_steps_and_nexts {} {
|
||||
@ -7977,7 +7977,7 @@ index 0000000..ebced3c
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
new file mode 100644
|
||||
index 0000000..74a104e
|
||||
index 0000000..99b6cc7
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
@@ -0,0 +1,57 @@
|
||||
@ -8027,7 +8027,7 @@ index 0000000..74a104e
|
||||
+set func "main"
|
||||
+
|
||||
+mi_gdb_test "-break-insert -t $srcfile:$line" \
|
||||
+ "\\^done,bkpt=\{number=\"\[0-9\]+\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"$func\(\\\(.*\\\)\)?\",file=\".*\",line=\"$line\",times=\"0\",original-location=\".*\"\}" \
|
||||
+ "\\^done,bkpt=\{number=\"\[0-9\]+\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"$func\(\\\(.*\\\)\)?\",file=\".*\",fullname=\".*\",line=\"$line\",\[^\r\n\]*,original-location=\".*\"\}" \
|
||||
+ "breakpoint at $func"
|
||||
+
|
||||
+if { [mi_run_cmd] < 0 } {
|
||||
@ -8338,10 +8338,10 @@ index 0000000..295602d
|
||||
+ writeln(s); { set breakpoint 2 here }
|
||||
+end.
|
||||
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
index aa4d937..60d2cc8 100644
|
||||
index 806da94..b22231a 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-frame.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
@@ -90,3 +90,5 @@ gdb_test "python print ('result = %s' % f0.read_var ('variable_which_surely_does
|
||||
@@ -94,3 +94,5 @@ gdb_test "python print ('result = %s' % f0.read_var ('variable_which_surely_does
|
||||
gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.read_var - success"
|
||||
|
||||
gdb_test "python print ('result = %s' % (gdb.selected_frame () == f1))" " = True" "test gdb.selected_frame"
|
||||
@ -8427,7 +8427,7 @@ index 569fb02..cacecf4 100644
|
||||
set pascal_init_done 1
|
||||
}
|
||||
diff --git a/gdb/top.c b/gdb/top.c
|
||||
index e9d6c1c..7fe6ad1 100644
|
||||
index e9a40fc..de051c8 100644
|
||||
--- a/gdb/top.c
|
||||
+++ b/gdb/top.c
|
||||
@@ -350,6 +350,9 @@ prepare_execute_command (void)
|
||||
@ -8479,10 +8479,10 @@ index 2d5a6af..5251e3f 100644
|
||||
|
||||
get_user_print_options (&opts);
|
||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
index 8bae4eb..6eb5877 100644
|
||||
index eb99f4b..2e17e8e 100644
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -1821,6 +1821,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void)
|
||||
@@ -1804,6 +1804,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void)
|
||||
return back_to;
|
||||
}
|
||||
|
||||
@ -8520,10 +8520,10 @@ index 8bae4eb..6eb5877 100644
|
||||
|
||||
static void
|
||||
diff --git a/gdb/utils.h b/gdb/utils.h
|
||||
index 6983a53..0efa553 100644
|
||||
index 52bcaff..6ab417b 100644
|
||||
--- a/gdb/utils.h
|
||||
+++ b/gdb/utils.h
|
||||
@@ -380,4 +380,6 @@ extern int myread (int, char *, int);
|
||||
@@ -375,4 +375,6 @@ extern int myread (int, char *, int);
|
||||
extern ULONGEST align_up (ULONGEST v, int n);
|
||||
extern ULONGEST align_down (ULONGEST v, int n);
|
||||
|
||||
@ -8531,7 +8531,7 @@ index 6983a53..0efa553 100644
|
||||
+
|
||||
#endif /* UTILS_H */
|
||||
diff --git a/gdb/valarith.c b/gdb/valarith.c
|
||||
index 074cf36..5c44edc 100644
|
||||
index 18c14fc..0a3a3aa 100644
|
||||
--- a/gdb/valarith.c
|
||||
+++ b/gdb/valarith.c
|
||||
@@ -195,7 +195,10 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
|
||||
@ -8558,7 +8558,7 @@ index 074cf36..5c44edc 100644
|
||||
}
|
||||
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
index e3d36a1..a6bda4d 100644
|
||||
index 93c09d8..aef0991 100644
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -45,6 +45,7 @@
|
||||
@ -8569,7 +8569,7 @@ index e3d36a1..a6bda4d 100644
|
||||
|
||||
extern unsigned int overload_debug;
|
||||
/* Local functions. */
|
||||
@@ -919,6 +920,65 @@ value_one (struct type *type)
|
||||
@@ -903,6 +904,65 @@ value_one (struct type *type)
|
||||
return val;
|
||||
}
|
||||
|
||||
@ -8635,7 +8635,7 @@ index e3d36a1..a6bda4d 100644
|
||||
/* Helper function for value_at, value_at_lazy, and value_at_lazy_stack. */
|
||||
|
||||
static struct value *
|
||||
@@ -981,7 +1041,8 @@ int
|
||||
@@ -965,7 +1025,8 @@ int
|
||||
value_fetch_lazy (struct value *val)
|
||||
{
|
||||
gdb_assert (value_lazy (val));
|
||||
@ -8645,7 +8645,7 @@ index e3d36a1..a6bda4d 100644
|
||||
if (value_bitsize (val))
|
||||
{
|
||||
/* To read a lazy bitfield, read the entire enclosing value. This
|
||||
@@ -1014,13 +1075,24 @@ value_fetch_lazy (struct value *val)
|
||||
@@ -998,13 +1059,24 @@ value_fetch_lazy (struct value *val)
|
||||
}
|
||||
else if (VALUE_LVAL (val) == lval_memory)
|
||||
{
|
||||
@ -8718,7 +8718,7 @@ index e3d36a1..a6bda4d 100644
|
||||
}
|
||||
|
||||
/* Given a value which is a function, return a value which is a pointer
|
||||
@@ -3724,6 +3812,8 @@ value_slice (struct value *array, int lowbound, int length)
|
||||
@@ -3721,6 +3809,8 @@ value_slice (struct value *array, int lowbound, int length)
|
||||
TYPE_TARGET_TYPE (range_type),
|
||||
lowbound,
|
||||
lowbound + length - 1);
|
||||
@ -8728,7 +8728,7 @@ index e3d36a1..a6bda4d 100644
|
||||
{
|
||||
struct type *element_type = TYPE_TARGET_TYPE (array_type);
|
||||
diff --git a/gdb/valprint.c b/gdb/valprint.c
|
||||
index 42dacc5..6977f62 100644
|
||||
index 05d6c3e..5430e66 100644
|
||||
--- a/gdb/valprint.c
|
||||
+++ b/gdb/valprint.c
|
||||
@@ -37,6 +37,7 @@
|
||||
@ -8747,7 +8747,7 @@ index 42dacc5..6977f62 100644
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
@@ -1605,6 +1605,7 @@ val_print_array_elements (struct type *type,
|
||||
@@ -1604,6 +1604,7 @@ val_print_array_elements (struct type *type,
|
||||
{
|
||||
unsigned int things_printed = 0;
|
||||
unsigned len;
|
||||
@ -8755,7 +8755,7 @@ index 42dacc5..6977f62 100644
|
||||
struct type *elttype, *index_type;
|
||||
unsigned eltlen;
|
||||
/* Position of the array element we are examining to see
|
||||
@@ -1613,9 +1614,33 @@ val_print_array_elements (struct type *type,
|
||||
@@ -1612,9 +1613,33 @@ val_print_array_elements (struct type *type,
|
||||
/* Number of repetitions we have detected so far. */
|
||||
unsigned int reps;
|
||||
LONGEST low_bound, high_bound;
|
||||
@ -8791,7 +8791,7 @@ index 42dacc5..6977f62 100644
|
||||
index_type = TYPE_INDEX_TYPE (type);
|
||||
|
||||
if (get_array_bounds (type, &low_bound, &high_bound))
|
||||
@@ -1702,6 +1727,8 @@ val_print_array_elements (struct type *type,
|
||||
@@ -1701,6 +1726,8 @@ val_print_array_elements (struct type *type,
|
||||
{
|
||||
fprintf_filtered (stream, "...");
|
||||
}
|
||||
@ -8801,7 +8801,7 @@ index 42dacc5..6977f62 100644
|
||||
|
||||
/* Read LEN bytes of target memory at address MEMADDR, placing the
|
||||
diff --git a/gdb/value.c b/gdb/value.c
|
||||
index ec4b090..96a308f 100644
|
||||
index 4b70ece..7449c2a 100644
|
||||
--- a/gdb/value.c
|
||||
+++ b/gdb/value.c
|
||||
@@ -42,6 +42,7 @@
|
||||
@ -8812,7 +8812,7 @@ index ec4b090..96a308f 100644
|
||||
|
||||
/* Prototypes for exported functions. */
|
||||
|
||||
@@ -1440,12 +1441,15 @@ void
|
||||
@@ -1435,12 +1436,15 @@ void
|
||||
set_value_component_location (struct value *component,
|
||||
const struct value *whole)
|
||||
{
|
||||
@ -8828,7 +8828,7 @@ index ec4b090..96a308f 100644
|
||||
if (whole->lval == lval_computed)
|
||||
{
|
||||
const struct lval_funcs *funcs = whole->location.computed.funcs;
|
||||
@@ -1453,6 +1457,12 @@ set_value_component_location (struct value *component,
|
||||
@@ -1448,6 +1452,12 @@ set_value_component_location (struct value *component,
|
||||
if (funcs->copy_closure)
|
||||
component->location.computed.closure = funcs->copy_closure (whole);
|
||||
}
|
||||
@ -8841,7 +8841,7 @@ index ec4b090..96a308f 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -1586,6 +1596,31 @@ show_values (char *num_exp, int from_tty)
|
||||
@@ -1581,6 +1591,31 @@ show_values (char *num_exp, int from_tty)
|
||||
num_exp[1] = '\0';
|
||||
}
|
||||
}
|
||||
@ -8873,7 +8873,7 @@ index ec4b090..96a308f 100644
|
||||
|
||||
/* Internal variables. These are variables within the debugger
|
||||
that hold values assigned by debugger commands.
|
||||
@@ -2121,6 +2156,38 @@ call_internal_function (struct gdbarch *gdbarch,
|
||||
@@ -2116,6 +2151,38 @@ call_internal_function (struct gdbarch *gdbarch,
|
||||
return (*ifn->handler) (gdbarch, language, ifn->cookie, argc, argv);
|
||||
}
|
||||
|
||||
@ -8912,7 +8912,7 @@ index ec4b090..96a308f 100644
|
||||
/* The 'function' command. This does nothing -- it is just a
|
||||
placeholder to let "help function NAME" work. This is also used as
|
||||
the implementation of the sub-command that is created when
|
||||
@@ -2168,11 +2235,10 @@ preserve_one_value (struct value *value, struct objfile *objfile,
|
||||
@@ -2163,11 +2230,10 @@ preserve_one_value (struct value *value, struct objfile *objfile,
|
||||
htab_t copied_types)
|
||||
{
|
||||
if (TYPE_OBJFILE (value->type) == objfile)
|
||||
@ -8926,7 +8926,7 @@ index ec4b090..96a308f 100644
|
||||
copied_types);
|
||||
}
|
||||
|
||||
@@ -2187,7 +2253,7 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile,
|
||||
@@ -2182,7 +2248,7 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile,
|
||||
case INTERNALVAR_INTEGER:
|
||||
if (var->u.integer.type && TYPE_OBJFILE (var->u.integer.type) == objfile)
|
||||
var->u.integer.type
|
||||
@ -8935,7 +8935,7 @@ index ec4b090..96a308f 100644
|
||||
break;
|
||||
|
||||
case INTERNALVAR_VALUE:
|
||||
@@ -3285,10 +3351,27 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type,
|
||||
@@ -3280,10 +3346,27 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type,
|
||||
struct value *
|
||||
coerce_ref (struct value *arg)
|
||||
{
|
||||
@ -8964,7 +8964,7 @@ index ec4b090..96a308f 100644
|
||||
retval = coerce_ref_if_computed (arg);
|
||||
if (retval)
|
||||
return retval;
|
||||
@@ -3400,4 +3483,10 @@ VARIABLE is already initialized."));
|
||||
@@ -3405,4 +3488,10 @@ VARIABLE is already initialized."));
|
||||
add_prefix_cmd ("function", no_class, function_command, _("\
|
||||
Placeholder command for showing help on convenience functions."),
|
||||
&functionlist, "function ", 0, &cmdlist);
|
||||
@ -8976,10 +8976,10 @@ index ec4b090..96a308f 100644
|
||||
+#endif
|
||||
}
|
||||
diff --git a/gdb/value.h b/gdb/value.h
|
||||
index 67f1d04..2d2b830 100644
|
||||
index c10c3ec..8d07348 100644
|
||||
--- a/gdb/value.h
|
||||
+++ b/gdb/value.h
|
||||
@@ -533,6 +533,10 @@ extern struct value *value_from_decfloat (struct type *type,
|
||||
@@ -537,6 +537,10 @@ extern struct value *value_from_decfloat (struct type *type,
|
||||
const gdb_byte *decbytes);
|
||||
extern struct value *value_from_history_ref (char *, char **);
|
||||
|
||||
|
@ -37,10 +37,10 @@ gdb/gdbserver/
|
||||
(linux_create_inferior, linux_tracefork_child): Call it instead of
|
||||
direct ptrace.
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/common/linux-ptrace.c
|
||||
Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/common/linux-ptrace.c 2013-01-18 23:18:47.313360065 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/common/linux-ptrace.c 2013-01-18 23:19:27.269417051 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.c 2013-01-08 20:38:51.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.c 2013-02-15 22:38:05.782456279 +0100
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "gdb_assert.h"
|
||||
#include "gdb_wait.h"
|
||||
@ -81,10 +81,10 @@ Index: gdb-7.5.50.20130118/gdb/common/linux-ptrace.c
|
||||
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
|
||||
+#endif /* HAVE_LIBSELINUX */
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/common/linux-ptrace.h
|
||||
Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/common/linux-ptrace.h 2013-01-18 23:18:47.313360065 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/common/linux-ptrace.h 2013-01-18 23:19:04.990385360 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.h 2013-01-01 07:32:54.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.h 2013-02-15 22:38:05.782456279 +0100
|
||||
@@ -69,5 +69,6 @@ struct buffer;
|
||||
|
||||
extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
|
||||
@ -92,10 +92,10 @@ Index: gdb-7.5.50.20130118/gdb/common/linux-ptrace.h
|
||||
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
|
||||
|
||||
#endif /* COMMON_LINUX_PTRACE_H */
|
||||
Index: gdb-7.5.50.20130118/gdb/configure.ac
|
||||
Index: gdb-7.5.50.20130215/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/configure.ac 2013-01-18 23:18:47.315360069 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/configure.ac 2013-01-18 23:19:04.991385362 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-02-15 22:37:57.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:38:05.783456281 +0100
|
||||
@@ -2068,6 +2068,10 @@ then
|
||||
[Define if you support the personality syscall.])
|
||||
fi
|
||||
@ -107,10 +107,10 @@ Index: gdb-7.5.50.20130118/gdb/configure.ac
|
||||
dnl Handle optional features that can be enabled.
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
Index: gdb-7.5.50.20130118/gdb/gdbserver/configure.ac
|
||||
Index: gdb-7.5.50.20130215/gdb/gdbserver/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/gdbserver/configure.ac 2013-01-18 23:18:47.315360069 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/gdbserver/configure.ac 2013-01-18 23:19:04.991385362 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/gdbserver/configure.ac 2013-01-01 07:33:00.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/gdbserver/configure.ac 2013-02-15 22:38:05.783456281 +0100
|
||||
@@ -451,6 +451,10 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
@ -122,11 +122,11 @@ Index: gdb-7.5.50.20130118/gdb/gdbserver/configure.ac
|
||||
AC_SUBST(GDBSERVER_DEPFILES)
|
||||
AC_SUBST(GDBSERVER_LIBS)
|
||||
AC_SUBST(USE_THREAD_DB)
|
||||
Index: gdb-7.5.50.20130118/gdb/gdbserver/linux-low.c
|
||||
Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/gdbserver/linux-low.c 2013-01-18 23:18:47.317360073 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/gdbserver/linux-low.c 2013-01-18 23:19:04.993385366 +0100
|
||||
@@ -601,6 +601,28 @@ add_lwp (ptid_t ptid)
|
||||
--- gdb-7.5.50.20130215.orig/gdb/gdbserver/linux-low.c 2013-02-04 18:47:00.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c 2013-02-15 22:39:54.256591069 +0100
|
||||
@@ -602,6 +602,29 @@ add_lwp (ptid_t ptid)
|
||||
return lwp;
|
||||
}
|
||||
|
||||
@ -139,7 +139,8 @@ Index: gdb-7.5.50.20130118/gdb/gdbserver/linux-low.c
|
||||
+ struct buffer buffer;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ if (ptrace (PTRACE_TRACEME, 0, NULL, NULL) == 0)
|
||||
+ if (ptrace (PTRACE_TRACEME, 0,
|
||||
+ (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0) == 0)
|
||||
+ return;
|
||||
+
|
||||
+ save_errno = errno;
|
||||
@ -155,28 +156,28 @@ Index: gdb-7.5.50.20130118/gdb/gdbserver/linux-low.c
|
||||
/* Start an inferior process and returns its pid.
|
||||
ALLARGS is a vector of program-name and args. */
|
||||
|
||||
@@ -641,7 +663,7 @@ linux_create_inferior (char *program, ch
|
||||
@@ -642,7 +665,7 @@ linux_create_inferior (char *program, ch
|
||||
|
||||
if (pid == 0)
|
||||
{
|
||||
- ptrace (PTRACE_TRACEME, 0, 0, 0);
|
||||
- ptrace (PTRACE_TRACEME, 0, (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0);
|
||||
+ linux_traceme (program);
|
||||
|
||||
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
|
||||
signal (__SIGRTMIN + 1, SIG_DFL);
|
||||
@@ -4574,7 +4596,7 @@ linux_tracefork_grandchild (void *arg)
|
||||
@@ -4587,7 +4610,7 @@ linux_tracefork_grandchild (void *arg)
|
||||
static int
|
||||
linux_tracefork_child (void *arg)
|
||||
{
|
||||
- ptrace (PTRACE_TRACEME, 0, 0, 0);
|
||||
- ptrace (PTRACE_TRACEME, 0, (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0);
|
||||
+ linux_traceme ("PTRACE_O_TRACEFORK test");
|
||||
kill (getpid (), SIGSTOP);
|
||||
|
||||
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
|
||||
Index: gdb-7.5.50.20130118/gdb/inf-ptrace.c
|
||||
Index: gdb-7.5.50.20130215/gdb/inf-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/inf-ptrace.c 2013-01-18 23:18:47.318360076 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/inf-ptrace.c 2013-01-18 23:19:04.993385366 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/inf-ptrace.c 2013-01-01 07:32:45.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/inf-ptrace.c 2013-02-15 22:38:05.786456289 +0100
|
||||
@@ -104,7 +104,15 @@ static void
|
||||
inf_ptrace_me (void)
|
||||
{
|
||||
@ -193,11 +194,11 @@ Index: gdb-7.5.50.20130118/gdb/inf-ptrace.c
|
||||
}
|
||||
|
||||
/* Start a new inferior Unix child process. EXEC_FILE is the file to
|
||||
Index: gdb-7.5.50.20130118/gdb/linux-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/linux-nat.c 2013-01-18 23:18:47.320360083 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/linux-nat.c 2013-01-18 23:19:04.994385369 +0100
|
||||
@@ -1578,6 +1578,7 @@ linux_nat_create_inferior (struct target
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-15 22:34:44.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:38:05.787456291 +0100
|
||||
@@ -1557,6 +1557,7 @@ linux_nat_create_inferior (struct target
|
||||
#ifdef HAVE_PERSONALITY
|
||||
int personality_orig = 0, personality_set = 0;
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
@ -205,7 +206,7 @@ Index: gdb-7.5.50.20130118/gdb/linux-nat.c
|
||||
|
||||
/* The fork_child mechanism is synchronous and calls target_wait, so
|
||||
we have to mask the async mode. */
|
||||
@@ -1602,7 +1603,10 @@ linux_nat_create_inferior (struct target
|
||||
@@ -1581,7 +1582,10 @@ linux_nat_create_inferior (struct target
|
||||
/* Make sure we report all signals during startup. */
|
||||
linux_nat_pass_signals (0, NULL);
|
||||
|
||||
@ -217,7 +218,7 @@ Index: gdb-7.5.50.20130118/gdb/linux-nat.c
|
||||
|
||||
#ifdef HAVE_PERSONALITY
|
||||
if (personality_set)
|
||||
@@ -1614,6 +1618,24 @@ linux_nat_create_inferior (struct target
|
||||
@@ -1593,6 +1597,24 @@ linux_nat_create_inferior (struct target
|
||||
safe_strerror (errno));
|
||||
}
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
|
@ -1,99 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2013-01/msg00469.html
|
||||
Subject: [patch] Fix gdb.fortran/common-block.exp crash in PIE mode
|
||||
|
||||
Hi Tom,
|
||||
|
||||
runtest F90_FOR_TARGET="gfortran -fPIE -pie" gdb.fortran/common-block.exp
|
||||
|
||||
crashes GDB as function relocate_one_symbol
|
||||
if ((SYMBOL_CLASS (sym) == LOC_LABEL
|
||||
|| SYMBOL_CLASS (sym) == LOC_STATIC)
|
||||
&& SYMBOL_SECTION (sym) >= 0)
|
||||
SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (delta, SYMBOL_SECTION (sym));
|
||||
corrupts SYMBOL_VALUE_COMMON_BLOCK
|
||||
struct common_block *common_block;
|
||||
as it thinks it can update it like SYMBOL_VALUE_ADDRESS
|
||||
CORE_ADDR address;
|
||||
due to its LOC_STATIC.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora18-linux-gnu and in PIE mode.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2013-01-19 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix gdb.fortran/common-block.exp crash in PIE mode.
|
||||
* dwarf2read.c (new_symbol_full) <DW_TAG_common_block>: Use
|
||||
LOC_COMMON_BLOCK.
|
||||
* f-valprint.c (info_common_command_for_block): Expect
|
||||
LOC_COMMON_BLOCK in gdb_assert.
|
||||
* symtab.h (struct general_symbol_info): Update comment for the
|
||||
common_block member.
|
||||
(domain_enum): Extend comment for the COMMON_BLOCK_DOMAIN member.
|
||||
(enum address_class): New member LOC_COMMON_BLOCK.
|
||||
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 7a58c45..364e6af 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -16071,7 +16071,7 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
||||
list_to_add = &global_symbols;
|
||||
break;
|
||||
case DW_TAG_common_block:
|
||||
- SYMBOL_CLASS (sym) = LOC_STATIC;
|
||||
+ SYMBOL_CLASS (sym) = LOC_COMMON_BLOCK;
|
||||
SYMBOL_DOMAIN (sym) = COMMON_BLOCK_DOMAIN;
|
||||
add_symbol_to_list (sym, cu->list_in_scope);
|
||||
break;
|
||||
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
|
||||
index 22cca83..d01d6ec 100644
|
||||
--- a/gdb/f-valprint.c
|
||||
+++ b/gdb/f-valprint.c
|
||||
@@ -427,7 +427,7 @@ info_common_command_for_block (struct block *block, const char *comname,
|
||||
struct common_block *common = SYMBOL_VALUE_COMMON_BLOCK (sym);
|
||||
size_t index;
|
||||
|
||||
- gdb_assert (SYMBOL_CLASS (sym) == LOC_STATIC);
|
||||
+ gdb_assert (SYMBOL_CLASS (sym) == LOC_COMMON_BLOCK);
|
||||
|
||||
if (comname && (!SYMBOL_LINKAGE_NAME (sym)
|
||||
|| strcmp (comname, SYMBOL_LINKAGE_NAME (sym)) != 0))
|
||||
diff --git a/gdb/symtab.h b/gdb/symtab.h
|
||||
index c334a3a..b992266 100644
|
||||
--- a/gdb/symtab.h
|
||||
+++ b/gdb/symtab.h
|
||||
@@ -120,7 +120,7 @@ struct general_symbol_info
|
||||
|
||||
CORE_ADDR address;
|
||||
|
||||
- /* A common block. Used with COMMON_BLOCK_DOMAIN. */
|
||||
+ /* A common block. Used with LOC_COMMON_BLOCK. */
|
||||
|
||||
struct common_block *common_block;
|
||||
|
||||
@@ -414,7 +414,8 @@ typedef enum domain_enum_tag
|
||||
|
||||
LABEL_DOMAIN,
|
||||
|
||||
- /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN. */
|
||||
+ /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN.
|
||||
+ They also always use LOC_COMMON_BLOCK. */
|
||||
COMMON_BLOCK_DOMAIN
|
||||
} domain_enum;
|
||||
|
||||
@@ -533,6 +534,10 @@ enum address_class
|
||||
/* The variable's address is computed by a set of location
|
||||
functions (see "struct symbol_computed_ops" below). */
|
||||
LOC_COMPUTED,
|
||||
+
|
||||
+ /* The variable uses general_symbol_info->value->common_block field.
|
||||
+ It also always uses COMMON_BLOCK_DOMAIN. */
|
||||
+ LOC_COMMON_BLOCK,
|
||||
};
|
||||
|
||||
/* The methods needed to implement LOC_COMPUTED. These methods can
|
||||
|
@ -81,24 +81,24 @@ gdb/testsuite
|
||||
* gdb.base/break-dlmopen.c: Likewise.
|
||||
* gdb.base/break-dlmopen-solib.c: Likewise.
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/breakpoint.h
|
||||
Index: gdb-7.5.50.20130215/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/breakpoint.h 2013-01-18 23:57:14.782978485 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/breakpoint.h 2013-01-18 23:57:50.511792890 +0100
|
||||
@@ -1548,8 +1548,6 @@ extern int user_breakpoint_p (struct bre
|
||||
--- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-15 22:37:19.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:37:47.185432296 +0100
|
||||
@@ -1552,8 +1552,6 @@ extern int user_breakpoint_p (struct bre
|
||||
/* Attempt to determine architecture of location identified by SAL. */
|
||||
extern struct gdbarch *get_sal_arch (struct symtab_and_line sal);
|
||||
|
||||
-extern void handle_solib_event (void);
|
||||
-
|
||||
extern void breakpoints_relocate (struct objfile *objfile,
|
||||
struct section_offsets *delta);
|
||||
extern void breakpoint_free_objfile (struct objfile *objfile);
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/breakpoint.c
|
||||
extern void breakpoints_relocate (struct objfile *objfile,
|
||||
Index: gdb-7.5.50.20130215/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/breakpoint.c 2013-01-18 23:57:14.782978485 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/breakpoint.c 2013-01-18 23:57:50.514792879 +0100
|
||||
@@ -5254,7 +5254,7 @@ bpstat_stop_status (struct address_space
|
||||
--- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:37:30.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:37:35.755417584 +0100
|
||||
@@ -5250,7 +5250,7 @@ bpstat_stop_status (struct address_space
|
||||
{
|
||||
if (bs->breakpoint_at && bs->breakpoint_at->type == bp_shlib_event)
|
||||
{
|
||||
@ -107,7 +107,7 @@ Index: gdb-7.5.50.20130118/gdb/breakpoint.c
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5350,25 +5350,6 @@ handle_jit_event (void)
|
||||
@@ -5346,25 +5346,6 @@ handle_jit_event (void)
|
||||
target_terminal_inferior ();
|
||||
}
|
||||
|
||||
@ -133,10 +133,10 @@ Index: gdb-7.5.50.20130118/gdb/breakpoint.c
|
||||
/* Prepare WHAT final decision for infrun. */
|
||||
|
||||
/* Decide what infrun needs to do with this bpstat. */
|
||||
Index: gdb-7.5.50.20130118/gdb/solib.h
|
||||
Index: gdb-7.5.50.20130215/gdb/solib.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/solib.h 2013-01-18 23:57:14.782978485 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/solib.h 2013-01-18 23:57:50.515792875 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solib.h 2013-01-01 07:32:51.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solib.h 2013-02-15 22:37:35.757417588 +0100
|
||||
@@ -20,6 +20,9 @@
|
||||
#ifndef SOLIB_H
|
||||
#define SOLIB_H
|
||||
@ -163,10 +163,10 @@ Index: gdb-7.5.50.20130118/gdb/solib.h
|
||||
+extern void update_solib_breakpoints (void);
|
||||
+
|
||||
#endif /* SOLIB_H */
|
||||
Index: gdb-7.5.50.20130118/gdb/solib.c
|
||||
Index: gdb-7.5.50.20130215/gdb/solib.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/solib.c 2013-01-18 23:57:14.782978485 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/solib.c 2013-01-18 23:58:09.144716601 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solib.c 2013-02-15 22:37:04.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solib.c 2013-02-15 22:37:35.757417588 +0100
|
||||
@@ -1221,6 +1221,42 @@ no_shared_libraries (char *ignored, int
|
||||
objfile_purge_solibs ();
|
||||
}
|
||||
@ -210,10 +210,10 @@ Index: gdb-7.5.50.20130118/gdb/solib.c
|
||||
/* Reload shared libraries, but avoid reloading the same symbol file
|
||||
we already have loaded. */
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/solist.h
|
||||
Index: gdb-7.5.50.20130215/gdb/solist.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/solist.h 2013-01-18 23:57:14.782978485 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/solist.h 2013-01-18 23:57:50.515792875 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solist.h 2013-01-01 07:32:51.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solist.h 2013-02-15 22:37:35.758417590 +0100
|
||||
@@ -22,6 +22,8 @@
|
||||
#define SO_NAME_MAX_PATH_SIZE 512 /* FIXME: Should be dynamic */
|
||||
/* For domain_enum domain. */
|
||||
@ -244,10 +244,10 @@ Index: gdb-7.5.50.20130118/gdb/solist.h
|
||||
};
|
||||
|
||||
/* Free the memory associated with a (so_list *). */
|
||||
Index: gdb-7.5.50.20130118/gdb/infrun.c
|
||||
Index: gdb-7.5.50.20130215/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/infrun.c 2013-01-18 23:57:14.782978485 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/infrun.c 2013-01-18 23:57:50.517792865 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/infrun.c 2013-02-15 22:37:04.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/infrun.c 2013-02-15 22:37:35.760417594 +0100
|
||||
@@ -369,6 +369,16 @@ static struct symbol *step_start_functio
|
||||
/* Nonzero if we want to give control to the user when we're notified
|
||||
of shared library events by the dynamic linker. */
|
||||
@ -265,7 +265,7 @@ Index: gdb-7.5.50.20130118/gdb/infrun.c
|
||||
static void
|
||||
show_stop_on_solib_events (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
@@ -3347,7 +3357,7 @@ handle_inferior_event (struct execution_
|
||||
@@ -3346,7 +3356,7 @@ handle_inferior_event (struct execution_
|
||||
context_switch (ecs->ptid);
|
||||
regcache = get_thread_regcache (ecs->ptid);
|
||||
|
||||
@ -274,7 +274,7 @@ Index: gdb-7.5.50.20130118/gdb/infrun.c
|
||||
|
||||
ecs->event_thread->control.stop_bpstat
|
||||
= bpstat_stop_status (get_regcache_aspace (regcache),
|
||||
@@ -7327,7 +7337,7 @@ Show stopping for shared library events.
|
||||
@@ -7334,7 +7344,7 @@ Show stopping for shared library events.
|
||||
If nonzero, gdb will give control to the user when the dynamic linker\n\
|
||||
notifies gdb of shared library events. The most common event of interest\n\
|
||||
to the user would be loading/unloading of a new library."),
|
||||
@ -283,10 +283,10 @@ Index: gdb-7.5.50.20130118/gdb/infrun.c
|
||||
show_stop_on_solib_events,
|
||||
&setlist, &showlist);
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
Index: gdb-7.5.50.20130215/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/solib-svr4.c 2013-01-18 23:57:45.430815943 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/solib-svr4.c 2013-01-18 23:57:50.519792858 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solib-svr4.c 2013-02-15 22:37:30.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solib-svr4.c 2013-02-15 22:37:35.761417596 +0100
|
||||
@@ -46,10 +46,12 @@
|
||||
#include "auxv.h"
|
||||
#include "exceptions.h"
|
||||
@ -540,7 +540,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
/* Find r_brk from the inferior's debug base. */
|
||||
|
||||
static CORE_ADDR
|
||||
@@ -1163,15 +1290,17 @@ svr4_default_sos (void)
|
||||
@@ -1161,15 +1288,17 @@ svr4_default_sos (void)
|
||||
return new;
|
||||
}
|
||||
|
||||
@ -565,7 +565,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
|
||||
for (; lm != 0; prev_lm = lm, lm = next_lm)
|
||||
{
|
||||
@@ -1188,7 +1317,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
@@ -1185,7 +1314,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
if (new->lm_info == NULL)
|
||||
{
|
||||
do_cleanups (old_chain);
|
||||
@ -574,7 +574,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
}
|
||||
|
||||
next_lm = new->lm_info->l_next;
|
||||
@@ -1199,7 +1328,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
@@ -1196,7 +1325,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
paddress (target_gdbarch (), prev_lm),
|
||||
paddress (target_gdbarch (), new->lm_info->l_prev));
|
||||
do_cleanups (old_chain);
|
||||
@ -583,7 +583,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
}
|
||||
|
||||
/* For SVR4 versions, the first entry in the link map is for the
|
||||
@@ -1294,20 +1423,61 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
@@ -1291,20 +1420,61 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
**link_ptr_ptr = new;
|
||||
*link_ptr_ptr = &new->next;
|
||||
}
|
||||
@ -648,7 +648,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
|
||||
/* Fall back to manual examination of the target if the packet is not
|
||||
supported or gdbserver failed to find DT_DEBUG. gdb.server/solib-list.exp
|
||||
@@ -1330,6 +1500,10 @@ svr4_current_sos (void)
|
||||
@@ -1327,6 +1497,10 @@ svr4_current_sos (void)
|
||||
|
||||
info = get_svr4_info ();
|
||||
|
||||
@ -659,7 +659,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
/* Always locate the debug struct, in case it has moved. */
|
||||
info->debug_base = 0;
|
||||
locate_base (info);
|
||||
@@ -1339,35 +1513,12 @@ svr4_current_sos (void)
|
||||
@@ -1336,35 +1510,12 @@ svr4_current_sos (void)
|
||||
if (! info->debug_base)
|
||||
return svr4_default_sos ();
|
||||
|
||||
@ -698,7 +698,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
}
|
||||
|
||||
/* Get the address of the link_map for a given OBJFILE. */
|
||||
@@ -1452,6 +1603,498 @@ exec_entry_point (struct bfd *abfd, stru
|
||||
@@ -1449,6 +1600,498 @@ exec_entry_point (struct bfd *abfd, stru
|
||||
return gdbarch_addr_bits_remove (target_gdbarch (), addr);
|
||||
}
|
||||
|
||||
@ -1197,7 +1197,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
/* Helper function for gdb_bfd_lookup_symbol. */
|
||||
|
||||
static int
|
||||
@@ -1504,6 +2147,9 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1501,6 +2144,9 @@ enable_break (struct svr4_info *info, in
|
||||
info->interp_text_sect_low = info->interp_text_sect_high = 0;
|
||||
info->interp_plt_sect_low = info->interp_plt_sect_high = 0;
|
||||
|
||||
@ -1207,7 +1207,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
/* If we already have a shared library list in the target, and
|
||||
r_debug contains r_brk, set the breakpoint there - this should
|
||||
mean r_brk has already been relocated. Assume the dynamic linker
|
||||
@@ -1535,7 +2181,7 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1532,7 +2178,7 @@ enable_break (struct svr4_info *info, in
|
||||
That knowledge is encoded in the address, if it's Thumb the low bit
|
||||
is 1. However, we've stripped that info above and it's not clear
|
||||
what all the consequences are of passing a non-addr_bits_remove'd
|
||||
@ -1216,7 +1216,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
find_pc_section verifies we know about the address and have some
|
||||
hope of computing the right kind of breakpoint to use (via
|
||||
symbol info). It does mean that GDB needs to be pointed at a
|
||||
@@ -1573,7 +2219,7 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1570,7 +2216,7 @@ enable_break (struct svr4_info *info, in
|
||||
+ bfd_section_size (tmp_bfd, interp_sect);
|
||||
}
|
||||
|
||||
@ -1225,7 +1225,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1731,7 +2377,8 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1728,7 +2374,8 @@ enable_break (struct svr4_info *info, in
|
||||
|
||||
if (sym_addr != 0)
|
||||
{
|
||||
@ -1235,7 +1235,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
xfree (interp_name);
|
||||
return 1;
|
||||
}
|
||||
@@ -1757,7 +2404,7 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1754,7 +2401,7 @@ enable_break (struct svr4_info *info, in
|
||||
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (),
|
||||
sym_addr,
|
||||
¤t_target);
|
||||
@ -1244,7 +1244,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1773,7 +2420,7 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1770,7 +2417,7 @@ enable_break (struct svr4_info *info, in
|
||||
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (),
|
||||
sym_addr,
|
||||
¤t_target);
|
||||
@ -1253,7 +1253,7 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -2269,6 +2916,9 @@ svr4_solib_create_inferior_hook (int fro
|
||||
@@ -2266,6 +2913,9 @@ svr4_solib_create_inferior_hook (int fro
|
||||
|
||||
info = get_svr4_info ();
|
||||
|
||||
@ -1263,17 +1263,17 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
/* Relocate the main executable if necessary. */
|
||||
svr4_relocate_main_executable ();
|
||||
|
||||
@@ -2510,4 +3160,6 @@ _initialize_svr4_solib (void)
|
||||
@@ -2507,4 +3157,6 @@ _initialize_svr4_solib (void)
|
||||
svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol;
|
||||
svr4_so_ops.same = svr4_same;
|
||||
svr4_so_ops.keep_data_in_core = svr4_keep_data_in_core;
|
||||
+ svr4_so_ops.handle_solib_event = svr4_handle_solib_event;
|
||||
+ svr4_so_ops.update_breakpoints = svr4_update_solib_event_breakpoints;
|
||||
}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen-solib.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen-solib.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen-solib.c 2013-01-18 23:57:50.519792858 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen-solib.c 2013-02-15 22:37:35.761417596 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1299,10 +1299,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen-solib.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen.c 2013-01-18 23:57:50.519792858 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.c 2013-02-15 22:37:35.762417598 +0100
|
||||
@@ -0,0 +1,58 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1362,10 +1362,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen.exp 2013-01-18 23:57:50.519792858 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.exp 2013-02-15 22:37:35.762417598 +0100
|
||||
@@ -0,0 +1,125 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1492,10 +1492,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-dlmopen.exp
|
||||
+ gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)}
|
||||
+ check_info_shared "info sharedlibrary #7" 0
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-interp.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/break-interp.exp 2013-01-18 23:57:14.782978485 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp 2013-01-18 23:57:50.520792854 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.base/break-interp.exp 2013-01-01 07:33:25.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-interp.exp 2013-02-15 22:37:35.762417598 +0100
|
||||
@@ -109,12 +109,19 @@ proc strip_debug {dest} {
|
||||
}
|
||||
}
|
||||
@ -1591,10 +1591,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp
|
||||
|
||||
# Use two separate gdb_test_multiple statements to avoid timeouts due
|
||||
# to slow processing of wildcard capturing long output
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes-solib.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes-solib.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes-solib.c 2013-01-18 23:57:50.520792854 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes-solib.c 2013-02-15 22:37:35.762417598 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1620,10 +1620,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes-solib.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes.c 2013-01-18 23:57:50.520792854 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.c 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1651,10 +1651,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes.exp 2013-01-18 23:57:50.520792854 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.exp 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,76 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1732,10 +1732,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-probes.exp
|
||||
+ # Call something to ensure that relocation occurred
|
||||
+ gdb_test "call foo(23)" "foo 23.*\\\$.* = .*"
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared-solib1.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib1.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared-solib1.c 2013-01-18 23:57:50.520792854 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib1.c 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1761,10 +1761,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared-solib1.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared-solib2.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared-solib2.c 2013-01-18 23:57:50.520792854 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib2.c 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1790,10 +1790,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared-solib2.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared.c 2013-01-18 23:57:50.520792854 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.c 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,48 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1843,10 +1843,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/info-shared.exp 2013-01-18 23:57:50.521792850 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.exp 2013-02-15 22:37:35.764417602 +0100
|
||||
@@ -0,0 +1,139 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -1,142 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2013-02/msg00016.html
|
||||
Subject: [patch] Fix assert crashes with minidebuginfo
|
||||
|
||||
Hi Tom,
|
||||
|
||||
original bugreport:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=903522
|
||||
|
||||
in some cases GDB added separate debug info to minidebuginfo (which itself is
|
||||
a separate debug info). separate debug info of a separate debug info is not
|
||||
supported by GDB and it caused a gdb_assert failure.
|
||||
|
||||
So the added gdb_assert calls print such violation immediately at
|
||||
add_separate_debug_objfile, not only in a some rare case found by the
|
||||
bugreport.
|
||||
|
||||
And I have found multiple such fragile checks in GDB so I have protected them
|
||||
all so that minidebuginfo is always only a sole separate debug info.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora19pre-linux-gnu.
|
||||
|
||||
With the new gdb_asserts (and without the fix) GDB crashes on gdb.gdb/ tests
|
||||
due to current ncurses-libs-5.9-7.20121017.fc19.x86_64 files.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2013-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* elfread.c (elf_symfile_read): Limit separate debug info additions to
|
||||
files with no separate debug info.
|
||||
* objfiles.c (add_separate_debug_objfile): Add gdb_assert calls.
|
||||
* symfile.c (read_symbols): Call find_separate_debug_file_in_section
|
||||
only for files with no separate debug info.
|
||||
|
||||
gdb/testsuite/
|
||||
2013-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/gnu-debugdata.exp): Create ${binfile}.debug,
|
||||
${binfile}.mini_debuginfo-debuglink, add -k to xz, use now
|
||||
${binfile}.mini_debuginfo-debuglink and
|
||||
${binfile}.mini_debuginfo-debuglink.xz.
|
||||
|
||||
diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
index 9d630cd..6ca659f 100644
|
||||
--- a/gdb/elfread.c
|
||||
+++ b/gdb/elfread.c
|
||||
@@ -2427,8 +2427,18 @@ elf_symfile_read (struct objfile *objfil
|
||||
/* If the file has its own symbol tables it has no separate debug
|
||||
info. `.dynsym'/`.symtab' go to MSYMBOLS, `.debug_info' goes to
|
||||
SYMTABS/PSYMTABS. `.gnu_debuglink' may no longer be present with
|
||||
- `.note.gnu.build-id'. */
|
||||
- else if (!objfile_has_partial_symbols (objfile))
|
||||
+ `.note.gnu.build-id'.
|
||||
+
|
||||
+ .gnu_debugdata is !objfile_has_partial_symbols because it contains only
|
||||
+ .symtab, not .debug_* section. But if we already added .gnu_debugdata as
|
||||
+ an objfile via find_separate_debug_file_in_section there was no separate
|
||||
+ debug info available. Therefore do not attempt to search for another one,
|
||||
+ objfile->separate_debug_objfile->separate_debug_objfile GDB guarantees to
|
||||
+ be NULL and we would possibly violate it. */
|
||||
+
|
||||
+ else if (!objfile_has_partial_symbols (objfile)
|
||||
+ && objfile->separate_debug_objfile == NULL
|
||||
+ && objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
char *debugfile, *build_id_filename;
|
||||
|
||||
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
|
||||
index 5232c8f..5829699 100644
|
||||
--- a/gdb/objfiles.c
|
||||
+++ b/gdb/objfiles.c
|
||||
@@ -476,6 +476,9 @@ add_separate_debug_objfile (struct objfile *objfile, struct objfile *parent)
|
||||
/* Must not be already in a list. */
|
||||
gdb_assert (objfile->separate_debug_objfile_backlink == NULL);
|
||||
gdb_assert (objfile->separate_debug_objfile_link == NULL);
|
||||
+ gdb_assert (objfile->separate_debug_objfile == NULL);
|
||||
+ gdb_assert (parent->separate_debug_objfile_backlink == NULL);
|
||||
+ gdb_assert (parent->separate_debug_objfile_link == NULL);
|
||||
|
||||
objfile->separate_debug_objfile_backlink = parent;
|
||||
objfile->separate_debug_objfile_link = parent->separate_debug_objfile;
|
||||
diff --git a/gdb/symfile.c b/gdb/symfile.c
|
||||
index 63bf329..6f968b7 100644
|
||||
--- a/gdb/symfile.c
|
||||
+++ b/gdb/symfile.c
|
||||
@@ -823,7 +823,12 @@ static void
|
||||
read_symbols (struct objfile *objfile, int add_flags)
|
||||
{
|
||||
(*objfile->sf->sym_read) (objfile, add_flags);
|
||||
- if (!objfile_has_partial_symbols (objfile))
|
||||
+
|
||||
+ /* find_separate_debug_file_in_section should be called only if there is
|
||||
+ single binary with no existing separate debug info file. */
|
||||
+ if (!objfile_has_partial_symbols (objfile)
|
||||
+ && objfile->separate_debug_objfile == NULL
|
||||
+ && objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
bfd *abfd = find_separate_debug_file_in_section (objfile);
|
||||
struct cleanup *cleanup = make_cleanup_bfd_unref (abfd);
|
||||
diff --git a/gdb/testsuite/gdb.base/gnu-debugdata.exp b/gdb/testsuite/gdb.base/gnu-debugdata.exp
|
||||
index f34e4e8..55aa3c6 100644
|
||||
--- a/gdb/testsuite/gdb.base/gnu-debugdata.exp
|
||||
+++ b/gdb/testsuite/gdb.base/gnu-debugdata.exp
|
||||
@@ -127,14 +127,30 @@ if {[run "strip" [transform strip] \
|
||||
return -1
|
||||
}
|
||||
|
||||
+# Separate full debug info into ${binfile}.debug.
|
||||
+remote_file host delete ${binfile}.debug
|
||||
+if {[run "copydebug" [transform objcopy] \
|
||||
+ "--only-keep-debug ${binfile} ${binfile}.debug"]} {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Add the .gnu_debuglink section to the .gnu_debugdata file.
|
||||
+# .gnu_debuglink is normally not present in the .gnu_debugdata section but in
|
||||
+# some files there may be PT_NOTE with NT_GNU_BUILD_ID and GDB could look up
|
||||
+# the .debug file from it.
|
||||
+if {[run "addlink" [transform objcopy] \
|
||||
+ "--add-gnu-debuglink=${binfile}.debug ${binfile}.mini_debuginfo ${binfile}.mini_debuginfo-debuglink"]} {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
# Inject the compressed data into the .gnu_debugdata section of the
|
||||
# original binary.
|
||||
-remote_file host delete ${binfile}.mini_debuginfo.xz
|
||||
-if {[run "xz" "xz" "${binfile}.mini_debuginfo"]} {
|
||||
+remote_file host delete ${binfile}.mini_debuginfo-debuglink.xz
|
||||
+if {[run "xz" "xz" "-k ${binfile}.mini_debuginfo-debuglink"]} {
|
||||
return -1
|
||||
}
|
||||
remote_file host delete ${binfile}.test
|
||||
-if {[run "objcopy 2" [transform objcopy] "--add-section .gnu_debugdata=${binfile}.mini_debuginfo.xz ${binfile}.strip ${binfile}.test"]} {
|
||||
+if {[run "objcopy 2" [transform objcopy] "--add-section .gnu_debugdata=${binfile}.mini_debuginfo-debuglink.xz ${binfile}.strip ${binfile}.test"]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -96,10 +96,10 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=bitpos-wp.patch
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/arm-linux-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/arm-linux-nat.c 2013-01-18 23:34:43.930106839 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/arm-linux-nat.c 2013-01-18 23:34:51.206116513 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/arm-linux-nat.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/arm-linux-nat.c 2013-02-15 22:42:45.988804306 +0100
|
||||
@@ -1105,7 +1105,7 @@ arm_linux_region_ok_for_hw_watchpoint (C
|
||||
|
||||
/* Insert a Hardware breakpoint. */
|
||||
@ -127,11 +127,11 @@ Index: gdb-7.5.50.20130118/gdb/arm-linux-nat.c
|
||||
{
|
||||
return start <= addr && start + length - 1 >= addr;
|
||||
}
|
||||
Index: gdb-7.5.50.20130118/gdb/i386-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/i386-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/i386-nat.c 2013-01-18 23:34:43.931106841 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/i386-nat.c 2013-01-18 23:34:51.206116513 +0100
|
||||
@@ -591,7 +591,7 @@ i386_update_inferior_debug_regs (struct
|
||||
--- gdb-7.5.50.20130215.orig/gdb/i386-nat.c 2013-02-15 22:41:53.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/i386-nat.c 2013-02-15 22:43:14.005838741 +0100
|
||||
@@ -589,7 +589,7 @@ i386_update_inferior_debug_regs (struct
|
||||
of the type TYPE. Return 0 on success, -1 on failure. */
|
||||
|
||||
static int
|
||||
@ -139,8 +139,8 @@ Index: gdb-7.5.50.20130118/gdb/i386-nat.c
|
||||
+i386_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct i386_debug_reg_state *state = i386_debug_reg_state ();
|
||||
@@ -628,7 +628,7 @@ i386_insert_watchpoint (CORE_ADDR addr,
|
||||
struct i386_debug_reg_state *state
|
||||
@@ -627,7 +627,7 @@ i386_insert_watchpoint (CORE_ADDR addr,
|
||||
address ADDR, whose length is LEN bytes, and for accesses of the
|
||||
type TYPE. Return 0 on success, -1 on failure. */
|
||||
static int
|
||||
@ -148,11 +148,11 @@ Index: gdb-7.5.50.20130118/gdb/i386-nat.c
|
||||
+i386_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct i386_debug_reg_state *state = i386_debug_reg_state ();
|
||||
Index: gdb-7.5.50.20130118/gdb/ia64-linux-nat.c
|
||||
struct i386_debug_reg_state *state
|
||||
Index: gdb-7.5.50.20130215/gdb/ia64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/ia64-linux-nat.c 2013-01-18 23:34:43.931106841 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/ia64-linux-nat.c 2013-01-18 23:34:51.206116513 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/ia64-linux-nat.c 2013-02-15 22:34:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/ia64-linux-nat.c 2013-02-15 22:42:45.989804309 +0100
|
||||
@@ -542,7 +542,7 @@ is_power_of_2 (int val)
|
||||
}
|
||||
|
||||
@ -171,10 +171,10 @@ Index: gdb-7.5.50.20130118/gdb/ia64-linux-nat.c
|
||||
struct expression *cond)
|
||||
{
|
||||
int idx;
|
||||
Index: gdb-7.5.50.20130118/gdb/inf-ttrace.c
|
||||
Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/inf-ttrace.c 2013-01-18 23:34:43.932106844 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/inf-ttrace.c 2013-01-18 23:34:51.206116513 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/inf-ttrace.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/inf-ttrace.c 2013-02-15 22:42:45.989804309 +0100
|
||||
@@ -313,14 +313,14 @@ inf_ttrace_disable_page_protections (pid
|
||||
type TYPE. */
|
||||
|
||||
@ -211,10 +211,10 @@ Index: gdb-7.5.50.20130118/gdb/inf-ttrace.c
|
||||
|
||||
gdb_assert (type == hw_write);
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/mips-linux-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/mips-linux-nat.c 2013-01-18 23:34:43.932106844 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/mips-linux-nat.c 2013-01-18 23:34:51.208116518 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/mips-linux-nat.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/mips-linux-nat.c 2013-02-15 22:42:45.990804311 +0100
|
||||
@@ -1017,7 +1017,7 @@ populate_regs_from_watches (struct pt_wa
|
||||
watch. Return zero on success. */
|
||||
|
||||
@ -233,10 +233,10 @@ Index: gdb-7.5.50.20130118/gdb/mips-linux-nat.c
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
Index: gdb-7.5.50.20130118/gdb/nto-procfs.c
|
||||
Index: gdb-7.5.50.20130215/gdb/nto-procfs.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/nto-procfs.c 2013-01-18 23:34:43.933106847 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/nto-procfs.c 2013-01-18 23:34:51.208116518 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/nto-procfs.c 2013-01-01 07:32:47.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/nto-procfs.c 2013-02-15 22:42:45.990804311 +0100
|
||||
@@ -69,10 +69,10 @@ static ptid_t do_attach (ptid_t ptid);
|
||||
|
||||
static int procfs_can_use_hw_breakpoint (int, int, int);
|
||||
@ -267,10 +267,10 @@ Index: gdb-7.5.50.20130118/gdb/nto-procfs.c
|
||||
struct expression *cond)
|
||||
{
|
||||
return procfs_hw_watchpoint (addr, len, type);
|
||||
Index: gdb-7.5.50.20130118/gdb/ppc-linux-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/ppc-linux-nat.c 2013-01-18 23:34:43.934106849 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/ppc-linux-nat.c 2013-01-18 23:34:51.208116518 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/ppc-linux-nat.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/ppc-linux-nat.c 2013-02-15 22:42:45.991804313 +0100
|
||||
@@ -1838,11 +1838,11 @@ can_use_watchpoint_cond_accel (void)
|
||||
CONDITION_VALUE will hold the value which should be put in the
|
||||
DVC register. */
|
||||
@ -340,10 +340,10 @@ Index: gdb-7.5.50.20130118/gdb/ppc-linux-nat.c
|
||||
{
|
||||
int mask;
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/procfs.c
|
||||
Index: gdb-7.5.50.20130215/gdb/procfs.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/procfs.c 2013-01-18 23:34:43.937106855 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/procfs.c 2013-01-18 23:35:12.598145073 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/procfs.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/procfs.c 2013-02-15 22:42:45.992804315 +0100
|
||||
@@ -2433,7 +2433,7 @@ procfs_address_to_host_pointer (CORE_ADD
|
||||
#endif
|
||||
|
||||
@ -380,10 +380,10 @@ Index: gdb-7.5.50.20130118/gdb/procfs.c
|
||||
struct expression *cond)
|
||||
{
|
||||
return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0);
|
||||
Index: gdb-7.5.50.20130118/gdb/remote-m32r-sdi.c
|
||||
Index: gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/remote-m32r-sdi.c 2013-01-18 23:34:51.211116523 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/remote-m32r-sdi.c 2013-01-18 23:36:50.004276296 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/remote-m32r-sdi.c 2013-01-01 07:32:50.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c 2013-02-15 22:42:45.993804317 +0100
|
||||
@@ -1417,14 +1417,15 @@ m32r_can_use_hw_watchpoint (int type, in
|
||||
watchpoint. */
|
||||
|
||||
@ -422,10 +422,10 @@ Index: gdb-7.5.50.20130118/gdb/remote-m32r-sdi.c
|
||||
|
||||
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
|
||||
{
|
||||
Index: gdb-7.5.50.20130118/gdb/remote-mips.c
|
||||
Index: gdb-7.5.50.20130215/gdb/remote-mips.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/remote-mips.c 2013-01-18 23:34:43.939106860 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/remote-mips.c 2013-01-18 23:34:51.212116525 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/remote-mips.c 2013-01-01 07:32:50.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/remote-mips.c 2013-02-15 22:42:45.994804319 +0100
|
||||
@@ -2419,7 +2419,7 @@ calculate_mask (CORE_ADDR addr, int len)
|
||||
watchpoint. */
|
||||
|
||||
@ -444,11 +444,11 @@ Index: gdb-7.5.50.20130118/gdb/remote-mips.c
|
||||
struct expression *cond)
|
||||
{
|
||||
if (mips_clear_breakpoint (addr, len, type))
|
||||
Index: gdb-7.5.50.20130118/gdb/remote.c
|
||||
Index: gdb-7.5.50.20130215/gdb/remote.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/remote.c 2013-01-18 23:34:43.943106869 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/remote.c 2013-01-18 23:34:51.214116529 +0100
|
||||
@@ -8093,7 +8093,7 @@ watchpoint_to_Z_packet (int type)
|
||||
--- gdb-7.5.50.20130215.orig/gdb/remote.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/remote.c 2013-02-15 22:42:45.996804323 +0100
|
||||
@@ -8155,7 +8155,7 @@ watchpoint_to_Z_packet (int type)
|
||||
}
|
||||
|
||||
static int
|
||||
@ -457,7 +457,7 @@ Index: gdb-7.5.50.20130118/gdb/remote.c
|
||||
struct expression *cond)
|
||||
{
|
||||
struct remote_state *rs = get_remote_state ();
|
||||
@@ -8108,7 +8108,7 @@ remote_insert_watchpoint (CORE_ADDR addr
|
||||
@@ -8170,7 +8170,7 @@ remote_insert_watchpoint (CORE_ADDR addr
|
||||
p = strchr (rs->buf, '\0');
|
||||
addr = remote_address_masked (addr);
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
@ -466,7 +466,7 @@ Index: gdb-7.5.50.20130118/gdb/remote.c
|
||||
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
@@ -8128,7 +8128,7 @@ remote_insert_watchpoint (CORE_ADDR addr
|
||||
@@ -8190,7 +8190,7 @@ remote_insert_watchpoint (CORE_ADDR addr
|
||||
|
||||
static int
|
||||
remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
|
||||
@ -475,7 +475,7 @@ Index: gdb-7.5.50.20130118/gdb/remote.c
|
||||
{
|
||||
CORE_ADDR diff = remote_address_masked (addr - start);
|
||||
|
||||
@@ -8137,7 +8137,7 @@ remote_watchpoint_addr_within_range (str
|
||||
@@ -8199,7 +8199,7 @@ remote_watchpoint_addr_within_range (str
|
||||
|
||||
|
||||
static int
|
||||
@ -484,7 +484,7 @@ Index: gdb-7.5.50.20130118/gdb/remote.c
|
||||
struct expression *cond)
|
||||
{
|
||||
struct remote_state *rs = get_remote_state ();
|
||||
@@ -8152,7 +8152,7 @@ remote_remove_watchpoint (CORE_ADDR addr
|
||||
@@ -8214,7 +8214,7 @@ remote_remove_watchpoint (CORE_ADDR addr
|
||||
p = strchr (rs->buf, '\0');
|
||||
addr = remote_address_masked (addr);
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
@ -493,10 +493,10 @@ Index: gdb-7.5.50.20130118/gdb/remote.c
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/s390-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/s390-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/s390-nat.c 2013-01-18 23:34:43.944106871 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/s390-nat.c 2013-01-18 23:34:51.215116531 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/s390-nat.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/s390-nat.c 2013-02-15 22:42:45.997804325 +0100
|
||||
@@ -516,7 +516,7 @@ s390_fix_watch_points (struct lwp_info *
|
||||
}
|
||||
|
||||
@ -515,10 +515,10 @@ Index: gdb-7.5.50.20130118/gdb/s390-nat.c
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
Index: gdb-7.5.50.20130215/gdb/target.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/target.c 2013-01-18 23:34:43.947106878 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/target.c 2013-01-18 23:34:51.216116533 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/target.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/target.c 2013-02-15 22:42:45.997804325 +0100
|
||||
@@ -49,7 +49,8 @@ static void target_info (char *, int);
|
||||
static void default_terminal_info (char *, int);
|
||||
|
||||
@ -579,7 +579,7 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
return_zero);
|
||||
de_fault (to_terminal_init,
|
||||
(void (*) (void))
|
||||
@@ -3560,7 +3562,7 @@ default_region_ok_for_hw_watchpoint (COR
|
||||
@@ -3558,7 +3560,7 @@ default_region_ok_for_hw_watchpoint (COR
|
||||
static int
|
||||
default_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -588,7 +588,7 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
{
|
||||
return addr >= start && addr < start + length;
|
||||
}
|
||||
@@ -4267,7 +4269,7 @@ debug_to_region_ok_for_hw_watchpoint (CO
|
||||
@@ -4265,7 +4267,7 @@ debug_to_region_ok_for_hw_watchpoint (CO
|
||||
}
|
||||
|
||||
static int
|
||||
@ -597,7 +597,7 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
@@ -4277,8 +4279,8 @@ debug_to_can_accel_watchpoint_condition
|
||||
@@ -4275,8 +4277,8 @@ debug_to_can_accel_watchpoint_condition
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"target_can_accel_watchpoint_condition "
|
||||
@ -608,7 +608,7 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
host_address_to_string (cond), (unsigned long) retval);
|
||||
return retval;
|
||||
}
|
||||
@@ -4313,7 +4315,7 @@ debug_to_stopped_data_address (struct ta
|
||||
@@ -4311,7 +4313,7 @@ debug_to_stopped_data_address (struct ta
|
||||
static int
|
||||
debug_to_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -617,7 +617,7 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
{
|
||||
int retval;
|
||||
|
||||
@@ -4321,9 +4323,9 @@ debug_to_watchpoint_addr_within_range (s
|
||||
@@ -4319,9 +4321,9 @@ debug_to_watchpoint_addr_within_range (s
|
||||
start, length);
|
||||
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
@ -629,7 +629,7 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -4358,7 +4360,7 @@ debug_to_remove_hw_breakpoint (struct gd
|
||||
@@ -4356,7 +4358,7 @@ debug_to_remove_hw_breakpoint (struct gd
|
||||
}
|
||||
|
||||
static int
|
||||
@ -638,7 +638,7 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
@@ -4366,14 +4368,14 @@ debug_to_insert_watchpoint (CORE_ADDR ad
|
||||
@@ -4364,14 +4366,14 @@ debug_to_insert_watchpoint (CORE_ADDR ad
|
||||
retval = debug_target.to_insert_watchpoint (addr, len, type, cond);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -656,7 +656,7 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
@@ -4381,8 +4383,8 @@ debug_to_remove_watchpoint (CORE_ADDR ad
|
||||
@@ -4379,8 +4381,8 @@ debug_to_remove_watchpoint (CORE_ADDR ad
|
||||
retval = debug_target.to_remove_watchpoint (addr, len, type, cond);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -667,10 +667,10 @@ Index: gdb-7.5.50.20130118/gdb/target.c
|
||||
host_address_to_string (cond), (unsigned long) retval);
|
||||
return retval;
|
||||
}
|
||||
Index: gdb-7.5.50.20130118/gdb/target.h
|
||||
Index: gdb-7.5.50.20130215/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/target.h 2013-01-18 23:34:43.947106878 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/target.h 2013-01-18 23:34:51.217116536 +0100
|
||||
--- gdb-7.5.50.20130215.orig/gdb/target.h 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/target.h 2013-02-15 22:42:45.998804328 +0100
|
||||
@@ -466,8 +466,8 @@ struct target_ops
|
||||
|
||||
/* Documentation of what the two routines below are expected to do is
|
||||
|
26
gdb.spec
26
gdb.spec
@ -27,14 +27,14 @@
|
||||
Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages
|
||||
Name: %{?scl_prefix}gdb
|
||||
|
||||
%global snap 20120817
|
||||
%global snap 20130215
|
||||
# See timestamp of source gnulib installed into gdb/gnulib/ .
|
||||
%global snapgnulib 20120623
|
||||
Version: 7.5.50.20130118
|
||||
%global snapgnulib 20121213
|
||||
Version: 7.5.50.20130215
|
||||
|
||||
# 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: 6%{?dist}
|
||||
Release: 7%{?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
|
||||
@ -366,10 +366,6 @@ Patch317: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
#=fedoratest
|
||||
Patch320: gdb-6.5-section-num-fixup-test.patch
|
||||
|
||||
# Fix PRPSINFO in the core files dumped by gcore (BZ 254229).
|
||||
#=push
|
||||
Patch329: gdb-6.8-bz254229-gcore-prpsinfo.patch
|
||||
|
||||
# Fix register assignments with no GDB stack frames (BZ 436037).
|
||||
#=push+work: This fix is incorrect.
|
||||
Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||
@ -561,14 +557,6 @@ Patch816: gdb-rhbz795424-bitpos-25of25.patch
|
||||
Patch817: gdb-rhbz795424-bitpos-25of25-test.patch
|
||||
Patch818: gdb-rhbz795424-bitpos-lazyvalue.patch
|
||||
|
||||
# Fix gdb.fortran/common-block.exp in PIE mode.
|
||||
#=push
|
||||
Patch823: gdb-commonblock-pie.patch
|
||||
|
||||
#=push
|
||||
# Fix assert crashes with minidebuginfo (BZ 903522).
|
||||
Patch824: gdb-minidebuginfo-crash.patch
|
||||
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
# RL_STATE_FEDORA_GDB would not be found for:
|
||||
# Patch642: gdb-readline62-ask-more-rh.patch
|
||||
@ -829,7 +817,6 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch315 -p1
|
||||
%patch317 -p1
|
||||
%patch320 -p1
|
||||
%patch329 -p1
|
||||
%patch330 -p1
|
||||
%patch343 -p1
|
||||
%patch348 -p1
|
||||
@ -882,8 +869,6 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch816 -p1
|
||||
%patch817 -p1
|
||||
%patch818 -p1
|
||||
%patch823 -p1
|
||||
%patch824 -p1
|
||||
|
||||
%patch393 -p1
|
||||
%if 0%{!?el5:1} || 0%{?scl:1}
|
||||
@ -1383,6 +1368,9 @@ fi
|
||||
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
|
||||
|
||||
%changelog
|
||||
* Mon Feb 18 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.50.20130215-7.fc19
|
||||
- Rebase to FSF GDB 7.5.50.20130215 (pre-7.6 snapshot).
|
||||
|
||||
* Fri Feb 8 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.50.20130118-6.fc19
|
||||
- Re-enable PDF in gdb-doc after texinfo RH BZ 876710 has been fixed.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user