Rebase to FSF GDB 7.3.50.20110722.
Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471).
This commit is contained in:
parent
e6e9cf3987
commit
3b55f7833b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
/libstdc++-v3-python-r155978.tar.bz2
|
||||
/gdb-7.2.90.20110703.tar.bz2
|
||||
/gdb-7.3.50.20110722.tar.bz2
|
||||
|
@ -12,10 +12,10 @@ gdb/testsuite:
|
||||
* gdb.arch/ia64-sigill.c: New test.
|
||||
* gdb.arch/ia64-sigill.exp: Ditto.
|
||||
|
||||
Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.exp 2011-01-01 00:55:04.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.exp 2011-07-22 19:16:13.000000000 +0200
|
||||
@@ -0,0 +1,49 @@
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -66,10 +66,10 @@ Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
||||
+gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
|
||||
+gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
|
||||
+
|
||||
Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.c
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.c 2011-01-01 00:55:04.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.c 2011-07-22 19:16:13.000000000 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
@ -79,11 +79,11 @@ Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2.50.20101231/gdb/linux-nat.c
|
||||
Index: gdb-7.3.50.20110722/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/linux-nat.c 2011-01-01 00:54:04.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/linux-nat.c 2011-01-01 00:55:58.000000000 +0100
|
||||
@@ -3652,7 +3652,8 @@ retry:
|
||||
--- gdb-7.3.50.20110722.orig/gdb/linux-nat.c 2011-07-22 19:15:05.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/linux-nat.c 2011-07-22 19:16:13.000000000 +0200
|
||||
@@ -3733,7 +3733,8 @@ retry:
|
||||
threads can be a bit time-consuming so if we want decent
|
||||
performance with heavily multi-threaded programs, especially when
|
||||
they're using a high frequency timer, we'd better avoid it if we
|
||||
@ -93,14 +93,3 @@ Index: gdb-7.2.50.20101231/gdb/linux-nat.c
|
||||
|
||||
if (WIFSTOPPED (status))
|
||||
{
|
||||
@@ -3670,7 +3671,9 @@ retry:
|
||||
&& inf->control.stop_soon == NO_STOP_QUIETLY
|
||||
&& signal_stop_state (signo) == 0
|
||||
&& signal_print_state (signo) == 0
|
||||
- && signal_pass_state (signo) == 1)
|
||||
+ && signal_pass_state (signo) == 1
|
||||
+ && signo != TARGET_SIGNAL_ILL
|
||||
+ && signo != TARGET_SIGNAL_TRAP)
|
||||
{
|
||||
/* FIMXE: kettenis/2001-06-06: Should we resume all threads
|
||||
here? It is not clear we should. GDB may not expect
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-7.2.90.20110411/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.3.50.20110722/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/doc/gdb.texinfo 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/doc/gdb.texinfo 2011-04-11 19:15:51.000000000 +0200
|
||||
@@ -1007,6 +1007,12 @@ Read each symbol file's entire symbol ta
|
||||
--- gdb-7.3.50.20110722.orig/gdb/doc/gdb.texinfo 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/doc/gdb.texinfo 2011-07-22 19:15:13.000000000 +0200
|
||||
@@ -1005,6 +1005,12 @@ Read each symbol file's entire symbol ta
|
||||
the default, which is to read it incrementally as it is needed.
|
||||
This makes startup slower, but makes future operations faster.
|
||||
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.2.90.20110411/gdb/doc/gdb.texinfo
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-7.2.90.20110411/gdb/main.c
|
||||
Index: gdb-7.3.50.20110722/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/main.c 2011-04-11 19:11:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/main.c 2011-04-11 19:15:51.000000000 +0200
|
||||
@@ -398,6 +398,7 @@ captured_main (void *data)
|
||||
--- gdb-7.3.50.20110722.orig/gdb/main.c 2011-07-22 19:14:25.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/main.c 2011-07-22 19:15:13.000000000 +0200
|
||||
@@ -399,6 +399,7 @@ captured_main (void *data)
|
||||
{"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.2.90.20110411/gdb/main.c
|
||||
{"r", no_argument, &readnow_symbol_files, 1},
|
||||
{"quiet", no_argument, &quiet, 1},
|
||||
{"q", no_argument, &quiet, 1},
|
||||
@@ -1064,6 +1065,7 @@ Options:\n\n\
|
||||
@@ -1065,6 +1066,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.2.90.20110411/gdb/main.c
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||
Index: gdb-7.2.90.20110411/gdb/symfile.c
|
||||
Index: gdb-7.3.50.20110722/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/symfile.c 2011-03-23 19:23:55.000000000 +0100
|
||||
+++ gdb-7.2.90.20110411/gdb/symfile.c 2011-04-11 19:15:51.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/symfile.c 2011-05-11 06:56:07.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/symfile.c 2011-07-22 19:15:13.000000000 +0200
|
||||
@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup (
|
||||
|
||||
/* Global variables owned by this file. */
|
||||
@ -60,10 +60,10 @@ Index: gdb-7.2.90.20110411/gdb/symfile.c
|
||||
|
||||
/* External variables and functions referenced. */
|
||||
|
||||
Index: gdb-7.2.90.20110411/gdb/dwarf2read.c
|
||||
Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/dwarf2read.c 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/dwarf2read.c 2011-04-11 19:16:01.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/dwarf2read.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/dwarf2read.c 2011-07-22 19:15:41.000000000 +0200
|
||||
@@ -58,6 +58,7 @@
|
||||
#include "c-lang.h"
|
||||
#include "valprint.h"
|
||||
@ -72,8 +72,8 @@ Index: gdb-7.2.90.20110411/gdb/dwarf2read.c
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "gdb_string.h"
|
||||
@@ -1351,8 +1352,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
|
||||
@@ -1388,8 +1389,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
(void *) names);
|
||||
dwarf2_per_objfile->objfile = objfile;
|
||||
}
|
||||
- return (dwarf2_per_objfile->info.asection != NULL
|
||||
@ -83,12 +83,12 @@ Index: gdb-7.2.90.20110411/gdb/dwarf2read.c
|
||||
+ && dwarf2_per_objfile->abbrev.asection != NULL));
|
||||
}
|
||||
|
||||
/* When loading sections, we can either look for ".<name>", or for
|
||||
Index: gdb-7.2.90.20110411/gdb/top.h
|
||||
/* When loading sections, we look either for uncompressed section or for
|
||||
Index: gdb-7.3.50.20110722/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/top.h 2011-01-01 16:33:18.000000000 +0100
|
||||
+++ gdb-7.2.90.20110411/gdb/top.h 2011-04-11 19:15:51.000000000 +0200
|
||||
@@ -61,6 +61,7 @@ extern void set_prompt (char *);
|
||||
--- gdb-7.3.50.20110722.orig/gdb/top.h 2011-07-21 13:03:45.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/top.h 2011-07-22 19:15:13.000000000 +0200
|
||||
@@ -59,6 +59,7 @@ extern void set_prompt (const char *);
|
||||
|
||||
/* From random places. */
|
||||
extern int readnow_symbol_files;
|
||||
|
@ -19,10 +19,10 @@ Proposed upstream but never committed upstream.
|
||||
(source_command): Update documentation. Check permissions if
|
||||
FROM_TTY is -1.
|
||||
|
||||
Index: gdb-7.2.50.20101231/gdb/cli/cli-cmds.c
|
||||
Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/cli/cli-cmds.c 2010-12-29 03:11:04.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/cli/cli-cmds.c 2011-01-01 00:53:51.000000000 +0100
|
||||
--- gdb-7.3.50.20110722.orig/gdb/cli/cli-cmds.c 2011-06-07 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/cli/cli-cmds.c 2011-07-22 19:14:25.000000000 +0200
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "source.h"
|
||||
#include "disasm.h"
|
||||
@ -31,7 +31,7 @@ Index: gdb-7.2.50.20101231/gdb/cli/cli-cmds.c
|
||||
|
||||
#include "ui-out.h"
|
||||
|
||||
@@ -488,7 +489,7 @@ Script filename extension recognition is
|
||||
@@ -489,7 +490,7 @@ show_script_ext_mode (struct ui_file *fi
|
||||
|
||||
int
|
||||
find_and_open_script (const char *script_file, int search_path,
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.2.50.20101231/gdb/cli/cli-cmds.c
|
||||
{
|
||||
char *file;
|
||||
int fd;
|
||||
@@ -514,6 +515,32 @@ find_and_open_script (const char *script
|
||||
@@ -515,6 +516,32 @@ find_and_open_script (const char *script
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ Index: gdb-7.2.50.20101231/gdb/cli/cli-cmds.c
|
||||
do_cleanups (old_cleanups);
|
||||
|
||||
*streamp = fdopen (fd, FOPEN_RT);
|
||||
@@ -573,13 +600,14 @@ source_script_with_search (const char *f
|
||||
@@ -574,13 +601,14 @@ source_script_with_search (const char *f
|
||||
if (file == NULL || *file == 0)
|
||||
error (_("source command requires file name of file to source."));
|
||||
|
||||
@ -90,10 +90,10 @@ Index: gdb-7.2.50.20101231/gdb/cli/cli-cmds.c
|
||||
perror_with_name (file);
|
||||
else
|
||||
return;
|
||||
Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101231/gdb/testsuite/gdb.base/gdbinit.exp 2011-01-01 00:53:09.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.exp 2011-07-22 19:14:25.000000000 +0200
|
||||
@@ -0,0 +1,91 @@
|
||||
+# Copyright 2005
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -186,17 +186,17 @@ Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.base/gdbinit.exp
|
||||
+}
|
||||
+
|
||||
+remote_exec build "rm .gdbinit"
|
||||
Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.base/gdbinit.sample
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.sample
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101231/gdb/testsuite/gdb.base/gdbinit.sample 2011-01-01 00:53:09.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.base/gdbinit.sample 2011-07-22 19:14:25.000000000 +0200
|
||||
@@ -0,0 +1 @@
|
||||
+echo "\nin gdbinit"
|
||||
Index: gdb-7.2.50.20101231/gdb/main.c
|
||||
Index: gdb-7.3.50.20110722/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/main.c 2010-12-29 01:58:14.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/main.c 2011-01-01 00:53:09.000000000 +0100
|
||||
@@ -805,7 +805,7 @@ Excess command line arguments ignored. (
|
||||
--- gdb-7.3.50.20110722.orig/gdb/main.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/main.c 2011-07-22 19:14:25.000000000 +0200
|
||||
@@ -849,7 +849,7 @@ captured_main (void *data)
|
||||
debugging or what directory you are in. */
|
||||
|
||||
if (home_gdbinit && !inhibit_gdbinit)
|
||||
@ -205,7 +205,7 @@ Index: gdb-7.2.50.20101231/gdb/main.c
|
||||
|
||||
/* Now perform all the actions indicated by the arguments. */
|
||||
if (cdarg != NULL)
|
||||
@@ -880,7 +880,7 @@ Can't attach to process and specify a co
|
||||
@@ -928,7 +928,7 @@ captured_main (void *data)
|
||||
/* Read the .gdbinit file in the current directory, *if* it isn't
|
||||
the same as the $HOME/.gdbinit file (it should exist, also). */
|
||||
if (local_gdbinit && !inhibit_gdbinit)
|
||||
@ -214,24 +214,24 @@ Index: gdb-7.2.50.20101231/gdb/main.c
|
||||
|
||||
/* Now that all .gdbinit's have been read and all -d options have been
|
||||
processed, we can read any scripts mentioned in SYMARG.
|
||||
Index: gdb-7.2.50.20101231/gdb/python/py-auto-load.c
|
||||
Index: gdb-7.3.50.20110722/gdb/python/py-auto-load.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/python/py-auto-load.c 2010-12-15 18:27:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/python/py-auto-load.c 2011-01-01 00:53:09.000000000 +0100
|
||||
@@ -224,7 +224,7 @@ source_section_scripts (struct objfile *
|
||||
--- gdb-7.3.50.20110722.orig/gdb/python/py-auto-load.c 2011-05-16 18:33:57.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/python/py-auto-load.c 2011-07-22 19:14:54.000000000 +0200
|
||||
@@ -284,7 +284,7 @@ source_section_scripts (struct objfile *
|
||||
}
|
||||
|
||||
opened = find_and_open_script (file, 1 /*search_path*/,
|
||||
- &stream, &full_path);
|
||||
+ &stream, &full_path, 1 /* from_tty */);
|
||||
|
||||
/* If the file is not found, we still record the file in the hash table,
|
||||
we only want to print an error message once.
|
||||
Index: gdb-7.2.50.20101231/gdb/cli/cli-cmds.h
|
||||
/* If one script isn't found it's not uncommon for more to not be
|
||||
found either. We don't want to print an error message for each
|
||||
Index: gdb-7.3.50.20110722/gdb/cli/cli-cmds.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/cli/cli-cmds.h 2010-12-29 03:11:04.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/cli/cli-cmds.h 2011-01-01 00:53:09.000000000 +0100
|
||||
@@ -126,7 +126,8 @@ extern void source_script (char *, int);
|
||||
--- gdb-7.3.50.20110722.orig/gdb/cli/cli-cmds.h 2011-01-01 16:33:20.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/cli/cli-cmds.h 2011-07-22 19:14:25.000000000 +0200
|
||||
@@ -127,7 +127,8 @@ extern void source_script (char *, int);
|
||||
/* Exported to objfiles.c. */
|
||||
|
||||
extern int find_and_open_script (const char *file, int search_path,
|
||||
|
@ -1,16 +1,16 @@
|
||||
Index: gdb-7.2.90.20110429/gdb/event-top.c
|
||||
Index: gdb-7.3.50.20110722/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/event-top.c 2011-03-16 16:18:58.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/event-top.c 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "cli/cli-script.h" /* for reset_command_nest_depth */
|
||||
#include "main.h"
|
||||
#include "gdbthread.h"
|
||||
--- gdb-7.3.50.20110722.orig/gdb/event-top.c 2011-07-21 13:03:45.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/event-top.c 2011-07-22 19:28:49.000000000 +0200
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "observer.h"
|
||||
#include "continuations.h"
|
||||
#include "gdbcmd.h" /* for dont_repeat() */
|
||||
+#include "symfile.h"
|
||||
|
||||
#include "gdbcmd.h" /* for dont_repeat() */
|
||||
|
||||
@@ -192,6 +193,8 @@ cli_command_loop (void)
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -193,6 +194,8 @@ cli_command_loop (void)
|
||||
char *a_prompt;
|
||||
char *gdb_prompt = get_prompt ();
|
||||
|
||||
@ -19,7 +19,7 @@ Index: gdb-7.2.90.20110429/gdb/event-top.c
|
||||
/* Tell readline what the prompt to display is and what function
|
||||
it will need to call after a whole line is read. This also
|
||||
displays the first prompt. */
|
||||
@@ -263,6 +266,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
@@ -264,6 +267,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.2.90.20110429/gdb/event-top.c
|
||||
/* Each interpreter has its own rules on displaying the command
|
||||
prompt. */
|
||||
if (!current_interp_display_prompt_p ())
|
||||
Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/elfread.c 2011-05-03 05:19:27.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/elfread.c 2011-05-03 05:21:22.000000000 +0200
|
||||
@@ -53,6 +53,7 @@
|
||||
--- gdb-7.3.50.20110722.orig/gdb/elfread.c 2011-07-22 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/elfread.c 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "gdbcore.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "observer.h"
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
@@ -1655,8 +1656,361 @@ build_id_to_filename (struct build_id *b
|
||||
@@ -1652,8 +1653,361 @@ build_id_to_filename (struct build_id *b
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -1710,11 +2064,17 @@ missing_filepair_change (void)
|
||||
@@ -1707,11 +2061,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.2.90.20110429/gdb/elfread.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -1781,14 +2141,35 @@ debug_print_missing (const char *binary,
|
||||
@@ -1778,14 +2138,35 @@ debug_print_missing (const char *binary,
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
@ -464,11 +464,11 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
}
|
||||
|
||||
static char *
|
||||
Index: gdb-7.2.90.20110429/gdb/symfile.h
|
||||
Index: gdb-7.3.50.20110722/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/symfile.h 2011-05-03 05:14:57.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/symfile.h 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -611,6 +611,8 @@ extern struct build_id *build_id_addr_ge
|
||||
--- gdb-7.3.50.20110722.orig/gdb/symfile.h 2011-07-22 19:27:06.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/symfile.h 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -615,6 +615,8 @@ extern struct build_id *build_id_addr_ge
|
||||
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.2.90.20110429/gdb/symfile.h
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
Index: gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:57.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -1381,7 +1381,7 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/lib/gdb.exp 2011-07-22 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -1390,7 +1390,7 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -490,11 +490,11 @@ Index: gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp
|
||||
send_gdb "set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re "$gdb_prompt $" {
|
||||
Index: gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:14:57.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } {
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/lib/mi-support.exp 2011-07-22 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -222,7 +222,7 @@ proc default_mi_gdb_start { args } {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -503,10 +503,10 @@ Index: gdb-7.2.90.20110429/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.2.90.20110429/gdb/tui/tui-interp.c
|
||||
Index: gdb-7.3.50.20110722/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/tui/tui-interp.c 2011-01-01 16:33:52.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/tui/tui-interp.c 2011-05-03 05:21:11.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/tui/tui-interp.c 2011-01-01 16:33:52.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/tui/tui-interp.c 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
@ -524,10 +524,10 @@ Index: gdb-7.2.90.20110429/gdb/tui/tui-interp.c
|
||||
/* Tell readline what the prompt to display is and what function
|
||||
it will need to call after a whole line is read. This also
|
||||
displays the first prompt. */
|
||||
Index: gdb-7.2.90.20110429/gdb/aclocal.m4
|
||||
Index: gdb-7.3.50.20110722/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/aclocal.m4 2011-02-15 22:05:53.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/aclocal.m4 2011-05-03 05:21:11.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/aclocal.m4 2011-02-15 22:05:53.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/aclocal.m4 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -19,6 +19,162 @@ You have another version of autoconf. I
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||
@ -691,10 +691,10 @@ Index: gdb-7.2.90.20110429/gdb/aclocal.m4
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
Index: gdb-7.2.90.20110429/gdb/config.in
|
||||
Index: gdb-7.3.50.20110722/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/config.in 2011-03-17 14:19:09.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/config.in 2011-05-03 05:21:11.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/config.in 2011-05-12 01:38:38.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/config.in 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -46,6 +46,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
@ -715,10 +715,10 @@ Index: gdb-7.2.90.20110429/gdb/config.in
|
||||
/* Define if libunwind library is being used. */
|
||||
#undef HAVE_LIBUNWIND
|
||||
|
||||
Index: gdb-7.2.90.20110429/gdb/configure
|
||||
Index: gdb-7.3.50.20110722/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/configure 2011-04-03 18:32:40.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/configure 2011-05-03 05:21:11.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/configure 2011-05-12 01:38:38.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/configure 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -682,6 +682,9 @@ REPORT_BUGS_TO
|
||||
PKGVERSION
|
||||
TARGET_OBS
|
||||
@ -737,7 +737,7 @@ Index: gdb-7.2.90.20110429/gdb/configure
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbcli
|
||||
@@ -989,6 +993,9 @@ LDFLAGS
|
||||
@@ -990,6 +994,9 @@ LDFLAGS
|
||||
LIBS
|
||||
CPPFLAGS
|
||||
CPP
|
||||
@ -747,7 +747,7 @@ Index: gdb-7.2.90.20110429/gdb/configure
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1652,6 +1659,8 @@ Optional Packages:
|
||||
@@ -1653,6 +1660,8 @@ Optional Packages:
|
||||
[DATADIR/gdb]
|
||||
--with-relocated-sources=PATH
|
||||
automatically relocate this path for source files
|
||||
@ -756,7 +756,7 @@ Index: gdb-7.2.90.20110429/gdb/configure
|
||||
--with-libunwind use libunwind frame unwinding support
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1687,6 +1696,9 @@ Some influential environment variables:
|
||||
@@ -1689,6 +1698,9 @@ Some influential environment variables:
|
||||
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
|
||||
you have headers in a nonstandard directory <include dir>
|
||||
CPP C preprocessor
|
||||
@ -766,7 +766,7 @@ Index: gdb-7.2.90.20110429/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.
|
||||
@@ -7884,6 +7896,486 @@ _ACEOF
|
||||
@@ -7886,6 +7898,486 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
@ -1253,10 +1253,10 @@ Index: gdb-7.2.90.20110429/gdb/configure
|
||||
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
Index: gdb-7.2.90.20110429/gdb/configure.ac
|
||||
Index: gdb-7.3.50.20110722/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/configure.ac 2011-04-03 18:32:40.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/configure.ac 2011-05-03 05:21:11.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/configure.ac 2011-05-12 01:38:38.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/configure.ac 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -108,6 +108,199 @@ AS_HELP_STRING([--with-relocated-sources
|
||||
[Relocated directory for source files. ])
|
||||
])
|
||||
@ -1457,10 +1457,10 @@ Index: gdb-7.2.90.20110429/gdb/configure.ac
|
||||
AC_CONFIG_SUBDIRS(testsuite)
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
Index: gdb-7.2.90.20110429/gdb/acinclude.m4
|
||||
Index: gdb-7.3.50.20110722/gdb/acinclude.m4
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/acinclude.m4 2011-05-03 05:21:11.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/acinclude.m4 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -1,3 +1,5 @@
|
||||
+# serial 1
|
||||
+
|
||||
@ -1476,11 +1476,11 @@ Index: gdb-7.2.90.20110429/gdb/acinclude.m4
|
||||
# @defmac AC_PROG_CC_STDC
|
||||
# @maindex PROG_CC_STDC
|
||||
# @ovindex CC
|
||||
Index: gdb-7.2.90.20110429/gdb/corelow.c
|
||||
Index: gdb-7.3.50.20110722/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/corelow.c 2011-05-03 05:14:57.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/corelow.c 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -320,7 +320,7 @@ build_id_locate_exec (int from_tty)
|
||||
--- gdb-7.3.50.20110722.orig/gdb/corelow.c 2011-07-22 19:27:26.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/corelow.c 2011-07-22 19:28:34.000000000 +0200
|
||||
@@ -321,7 +321,7 @@ build_id_locate_exec (int from_tty)
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
else
|
||||
|
@ -1,18 +1,18 @@
|
||||
Index: gdb-7.2.90.20110429/gdb/corelow.c
|
||||
Index: gdb-7.3.50.20110722/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/corelow.c 2011-02-26 03:07:07.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/corelow.c 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -47,6 +47,9 @@
|
||||
#include "filenames.h"
|
||||
--- gdb-7.3.50.20110722.orig/gdb/corelow.c 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/corelow.c 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -48,6 +48,9 @@
|
||||
#include "progspace.h"
|
||||
#include "objfiles.h"
|
||||
#include "wrapper.h"
|
||||
+#include "auxv.h"
|
||||
+#include "elf/common.h"
|
||||
+#include "gdbcmd.h"
|
||||
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
@@ -278,6 +281,52 @@ add_to_thread_list (bfd *abfd, asection
|
||||
@@ -279,6 +282,52 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ Index: gdb-7.2.90.20110429/gdb/corelow.c
|
||||
/* This routine opens and sets up the core file bfd. */
|
||||
|
||||
static void
|
||||
@@ -379,6 +428,12 @@ core_open (char *filename, int from_tty)
|
||||
@@ -380,6 +429,12 @@ core_open (char *filename, int from_tty)
|
||||
push_target (&core_ops);
|
||||
discard_cleanups (old_chain);
|
||||
|
||||
@ -78,7 +78,7 @@ Index: gdb-7.2.90.20110429/gdb/corelow.c
|
||||
/* Do this before acknowledging the inferior, so if
|
||||
post_create_inferior throws (can happen easilly if you're loading
|
||||
a core file with the wrong exec), we aren't left with threads
|
||||
@@ -932,4 +987,11 @@ _initialize_corelow (void)
|
||||
@@ -933,4 +988,11 @@ _initialize_corelow (void)
|
||||
init_core_ops ();
|
||||
|
||||
add_target (&core_ops);
|
||||
@ -90,11 +90,11 @@ Index: gdb-7.2.90.20110429/gdb/corelow.c
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-7.2.90.20110429/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.3.50.20110722/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/doc/gdb.texinfo 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/doc/gdb.texinfo 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -15356,6 +15356,27 @@ information files.
|
||||
--- gdb-7.3.50.20110722.orig/gdb/doc/gdb.texinfo 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/doc/gdb.texinfo 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -15402,6 +15402,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -122,11 +122,11 @@ Index: gdb-7.2.90.20110429/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.2.90.20110429/gdb/solib-svr4.c
|
||||
Index: gdb-7.3.50.20110722/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/solib-svr4.c 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/solib-svr4.c 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -1179,9 +1179,49 @@ svr4_current_sos (void)
|
||||
--- gdb-7.3.50.20110722.orig/gdb/solib-svr4.c 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/solib-svr4.c 2011-07-22 20:16:10.000000000 +0200
|
||||
@@ -1201,9 +1201,49 @@ svr4_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
{
|
||||
@ -140,7 +140,7 @@ Index: gdb-7.2.90.20110429/gdb/solib-svr4.c
|
||||
+ /* May get overwritten below. */
|
||||
+ strcpy (new->so_name, new->so_original_name);
|
||||
+
|
||||
+ build_id = build_id_addr_get (LM_DYNAMIC_FROM_LINK_MAP (new));
|
||||
+ build_id = build_id_addr_get (lm_dynamic_from_link_map (new));
|
||||
+ if (build_id != NULL)
|
||||
+ {
|
||||
+ char *name, *build_id_filename;
|
||||
@ -179,11 +179,11 @@ Index: gdb-7.2.90.20110429/gdb/solib-svr4.c
|
||||
}
|
||||
xfree (buffer);
|
||||
|
||||
Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/elfread.c 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/elfread.c 2011-05-03 05:19:27.000000000 +0200
|
||||
@@ -49,6 +49,11 @@
|
||||
--- gdb-7.3.50.20110722.orig/gdb/elfread.c 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/elfread.c 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -45,6 +45,11 @@
|
||||
#include "infcall.h"
|
||||
#include "gdbthread.h"
|
||||
#include "regcache.h"
|
||||
@ -195,7 +195,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
|
||||
@@ -1077,16 +1082,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
|
||||
@@ -1074,16 +1079,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
|
||||
update_breakpoint_locations (b, sals, sals_end);
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
{
|
||||
struct build_id *retval;
|
||||
|
||||
@@ -1102,6 +1156,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
@@ -1099,6 +1153,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -612,7 +612,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
|
||||
|
||||
static int
|
||||
@@ -1116,7 +1512,7 @@ build_id_verify (const char *filename, s
|
||||
@@ -1113,7 +1509,7 @@ build_id_verify (const char *filename, s
|
||||
if (abfd == NULL)
|
||||
return 0;
|
||||
|
||||
@ -621,7 +621,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
|
||||
if (found == NULL)
|
||||
warning (_("File \"%s\" has no build-id, file skipped"), filename);
|
||||
@@ -1134,14 +1530,15 @@ build_id_verify (const char *filename, s
|
||||
@@ -1131,14 +1527,15 @@ build_id_verify (const char *filename, s
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -641,7 +641,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
|
||||
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
|
||||
cause "/.build-id/..." lookups. */
|
||||
@@ -1152,6 +1549,8 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1149,6 +1546,8 @@ build_id_to_debug_filename (struct build
|
||||
char *s, *debugdir_end;
|
||||
gdb_byte *data = build_id->data;
|
||||
size_t size = build_id->size;
|
||||
@ -650,7 +650,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
|
||||
while (*debugdir == DIRNAME_SEPARATOR)
|
||||
debugdir++;
|
||||
@@ -1172,39 +1571,242 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1169,39 +1568,242 @@ build_id_to_debug_filename (struct build
|
||||
*s++ = '/';
|
||||
while (size-- > 0)
|
||||
s += sprintf (s, "%02x", (unsigned) *data++);
|
||||
@ -905,7 +905,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
xfree (build_id);
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (build_id_name != NULL
|
||||
@@ -1215,7 +1817,7 @@ find_separate_debug_file_by_buildid (str
|
||||
@@ -1212,7 +1814,7 @@ find_separate_debug_file_by_buildid (str
|
||||
xfree (build_id_name);
|
||||
}
|
||||
else if (build_id_name != NULL)
|
||||
@ -914,7 +914,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1418,9 +2020,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1432,9 +2034,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
`.note.gnu.build-id'. */
|
||||
else if (!objfile_has_partial_symbols (objfile))
|
||||
{
|
||||
@ -927,7 +927,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
@@ -1432,6 +2035,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1446,6 +2049,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
symbol_file_add_separate (abfd, symfile_flags, objfile);
|
||||
xfree (debugfile);
|
||||
}
|
||||
@ -940,7 +940,7 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1911,4 +2520,16 @@ _initialize_elfread (void)
|
||||
@@ -1925,4 +2534,16 @@ _initialize_elfread (void)
|
||||
|
||||
elf_objfile_gnu_ifunc_cache_data = register_objfile_data ();
|
||||
gnu_ifunc_fns_p = &elf_gnu_ifunc_fns;
|
||||
@ -957,11 +957,11 @@ Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
}
|
||||
Index: gdb-7.2.90.20110429/gdb/symfile.h
|
||||
Index: gdb-7.3.50.20110722/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/symfile.h 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/symfile.h 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -605,6 +605,13 @@ void free_symfile_segment_data (struct s
|
||||
--- gdb-7.3.50.20110722.orig/gdb/symfile.h 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/symfile.h 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -609,6 +609,13 @@ void free_symfile_segment_data (struct s
|
||||
|
||||
extern struct cleanup *increment_reading_symtab (void);
|
||||
|
||||
@ -974,12 +974,12 @@ Index: gdb-7.2.90.20110429/gdb/symfile.h
|
||||
+
|
||||
/* From dwarf2read.c */
|
||||
|
||||
extern int dwarf2_has_info (struct objfile *);
|
||||
Index: gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp
|
||||
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -1381,6 +1381,16 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/lib/gdb.exp 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/gdb.exp 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -1390,6 +1390,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -996,11 +996,11 @@ Index: gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp
|
||||
return 0;
|
||||
}
|
||||
|
||||
Index: gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/mi-support.exp 2011-03-07 17:03:04.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/lib/mi-support.exp 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/mi-support.exp 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -222,6 +222,16 @@ proc default_mi_gdb_start { args } {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1017,11 +1017,11 @@ Index: gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp
|
||||
|
||||
detect_async
|
||||
|
||||
Index: gdb-7.2.90.20110429/gdb/objfiles.h
|
||||
Index: gdb-7.3.50.20110722/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/objfiles.h 2011-03-07 17:17:29.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/objfiles.h 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -441,6 +441,10 @@ struct objfile
|
||||
--- gdb-7.3.50.20110722.orig/gdb/objfiles.h 2011-07-22 20:12:40.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/objfiles.h 2011-07-22 20:13:00.000000000 +0200
|
||||
@@ -434,6 +434,10 @@ struct objfile
|
||||
|
||||
#define OBJF_PSYMTABS_READ (1 << 4)
|
||||
|
||||
|
@ -1,142 +0,0 @@
|
||||
2007-07-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* linux-nat.c (linux_lwp_is_zombie): New function.
|
||||
(wait_lwp): Fix lockup on exit of the thread group leader.
|
||||
(linux_xfer_partial): Renamed to ...
|
||||
(linux_xfer_partial_lwp): ... here.
|
||||
(linux_xfer_partial): New function wrapping LINUX_XFER_PARTIAL_LWP.
|
||||
|
||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:27:34.000000000 +0100
|
||||
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:28:14.000000000 +0100
|
||||
@@ -1981,6 +1981,31 @@ linux_handle_extended_wait (struct lwp_i
|
||||
_("unknown ptrace event %d"), event);
|
||||
}
|
||||
|
||||
+static int
|
||||
+linux_lwp_is_zombie (long lwp)
|
||||
+{
|
||||
+ char buffer[MAXPATHLEN];
|
||||
+ FILE *procfile;
|
||||
+ int retval = 0;
|
||||
+
|
||||
+ sprintf (buffer, "/proc/%ld/status", lwp);
|
||||
+ procfile = fopen (buffer, "r");
|
||||
+ if (procfile == NULL)
|
||||
+ {
|
||||
+ warning (_("unable to open /proc file '%s'"), buffer);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ while (fgets (buffer, sizeof (buffer), procfile) != NULL)
|
||||
+ if (strcmp (buffer, "State:\tZ (zombie)\n") == 0)
|
||||
+ {
|
||||
+ retval = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ fclose (procfile);
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
/* Wait for LP to stop. Returns the wait status, or 0 if the LWP has
|
||||
exited. */
|
||||
|
||||
@@ -1988,16 +2013,31 @@ static int
|
||||
wait_lwp (struct lwp_info *lp)
|
||||
{
|
||||
pid_t pid;
|
||||
- int status;
|
||||
+ int status = 0;
|
||||
int thread_dead = 0;
|
||||
|
||||
gdb_assert (!lp->stopped);
|
||||
gdb_assert (lp->status == 0);
|
||||
|
||||
- pid = my_waitpid (GET_LWP (lp->ptid), &status, 0);
|
||||
- if (pid == -1 && errno == ECHILD)
|
||||
+ /* Thread group leader may have exited but we would lock up by WAITPID as it
|
||||
+ waits on all its threads; __WCLONE is not applicable for the leader.
|
||||
+ The thread leader restrictions is only a performance optimization here.
|
||||
+ LINUX_NAT_THREAD_ALIVE cannot be used here as it requires a STOPPED
|
||||
+ process; it gets ESRCH both for the zombie and for running processes. */
|
||||
+ if (is_lwp (lp->ptid) && GET_PID (lp->ptid) == GET_LWP (lp->ptid)
|
||||
+ && linux_lwp_is_zombie (GET_LWP (lp->ptid)))
|
||||
+ {
|
||||
+ thread_dead = 1;
|
||||
+ if (debug_linux_nat)
|
||||
+ fprintf_unfiltered (gdb_stdlog, "WL: Threads leader %s vanished.\n",
|
||||
+ target_pid_to_str (lp->ptid));
|
||||
+ }
|
||||
+
|
||||
+ if (!thread_dead)
|
||||
{
|
||||
- pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
|
||||
+ pid = my_waitpid (GET_LWP (lp->ptid), &status, 0);
|
||||
+ if (pid == -1 && errno == ECHILD)
|
||||
+ pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
|
||||
if (pid == -1 && errno == ECHILD)
|
||||
{
|
||||
/* The thread has previously exited. We need to delete it
|
||||
@@ -4153,8 +4193,10 @@ linux_nat_xfer_osdata (struct target_ops
|
||||
return len;
|
||||
}
|
||||
|
||||
+/* Transfer from the specific LWP currently set by PID of INFERIOR_PTID. */
|
||||
+
|
||||
static LONGEST
|
||||
-linux_xfer_partial (struct target_ops *ops, enum target_object object,
|
||||
+linux_xfer_partial_lwp (struct target_ops *ops, enum target_object object,
|
||||
const char *annex, gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
||||
{
|
||||
@@ -4201,6 +4243,45 @@ linux_xfer_partial (struct target_ops *o
|
||||
offset, len);
|
||||
}
|
||||
|
||||
+/* nptl_db expects being able to transfer memory just by specifying PID.
|
||||
+ After the thread group leader exists the Linux kernel turns the task
|
||||
+ into zombie no longer permitting accesses to its memory.
|
||||
+ Transfer the memory from an arbitrary LWP_LIST entry in such case. */
|
||||
+
|
||||
+static LONGEST
|
||||
+linux_xfer_partial (struct target_ops *ops, enum target_object object,
|
||||
+ const char *annex, gdb_byte *readbuf,
|
||||
+ const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
||||
+{
|
||||
+ LONGEST xfer;
|
||||
+ struct lwp_info *lp;
|
||||
+ /* Not using SAVE_INFERIOR_PTID already here for better performance. */
|
||||
+ struct cleanup *old_chain = NULL;
|
||||
+ ptid_t inferior_ptid_orig = inferior_ptid;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ xfer = linux_xfer_partial_lwp (ops, object, annex, readbuf, writebuf,
|
||||
+ offset, len);
|
||||
+
|
||||
+ for (lp = lwp_list; xfer == 0 && (errno == EACCES || errno == ESRCH)
|
||||
+ && lp != NULL; lp = lp->next)
|
||||
+ {
|
||||
+ if (!is_lwp (lp->ptid) || ptid_equal (lp->ptid, inferior_ptid_orig))
|
||||
+ continue;
|
||||
+
|
||||
+ if (old_chain == NULL)
|
||||
+ old_chain = save_inferior_ptid ();
|
||||
+ inferior_ptid = BUILD_LWP (GET_LWP (lp->ptid), GET_LWP (lp->ptid));
|
||||
+ errno = 0;
|
||||
+ xfer = linux_xfer_partial_lwp (ops, object, annex, readbuf, writebuf,
|
||||
+ offset, len);
|
||||
+ }
|
||||
+
|
||||
+ if (old_chain != NULL)
|
||||
+ do_cleanups (old_chain);
|
||||
+ return xfer;
|
||||
+}
|
||||
+
|
||||
/* Create a prototype generic GNU/Linux target. The client can override
|
||||
it with local methods. */
|
||||
|
@ -1,121 +0,0 @@
|
||||
2007-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/leader-exit.c, gdb.threads/leader-exit.exp: New files.
|
||||
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.threads/leader-exit.c 7 Jul 2007 15:21:57 -0000
|
||||
@@ -0,0 +1,47 @@
|
||||
+/* Clean exit of the thread group leader should not break GDB.
|
||||
+
|
||||
+ Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
+ Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#include <pthread.h>
|
||||
+#include <assert.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+static void *start (void *arg)
|
||||
+{
|
||||
+ for (;;)
|
||||
+ pause ();
|
||||
+ /* NOTREACHED */
|
||||
+ assert (0);
|
||||
+ return arg;
|
||||
+}
|
||||
+
|
||||
+int main (void)
|
||||
+{
|
||||
+ pthread_t thread;
|
||||
+ int i;
|
||||
+
|
||||
+ i = pthread_create (&thread, NULL, start, NULL); /* create1 */
|
||||
+ assert (i == 0);
|
||||
+
|
||||
+ pthread_exit (NULL);
|
||||
+ /* NOTREACHED */
|
||||
+ assert (0);
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.threads/leader-exit.exp 7 Jul 2007 15:21:57 -0000
|
||||
@@ -0,0 +1,64 @@
|
||||
+# Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Exit of the thread group leader should not break GDB.
|
||||
+
|
||||
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
||||
+
|
||||
+if $tracelevel then {
|
||||
+ strace $tracelevel
|
||||
+}
|
||||
+
|
||||
+set testfile "leader-exit"
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+gdb_run_cmd
|
||||
+
|
||||
+proc stop_process { description } {
|
||||
+ global gdb_prompt
|
||||
+
|
||||
+ # For this to work we must be sure to consume the "Continuing."
|
||||
+ # message first, or GDB's signal handler may not be in place.
|
||||
+ after 1000 {send_gdb "\003"}
|
||||
+ gdb_expect {
|
||||
+ -re "Program received signal SIGINT.*$gdb_prompt $"
|
||||
+ {
|
||||
+ pass $description
|
||||
+ }
|
||||
+ timeout
|
||||
+ {
|
||||
+ fail "$description (timeout)"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Prevent races.
|
||||
+sleep 8
|
||||
+
|
||||
+stop_process "Threads could be stopped"
|
||||
+
|
||||
+gdb_test "info threads" \
|
||||
+ "\\* 2 Thread \[^\r\n\]* in \[^\r\n\]*" \
|
||||
+ "Single thread has been left"
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.1.90.20100711/gdb/infrun.c
|
||||
Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/infrun.c 2010-07-12 10:05:26.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/infrun.c 2010-07-12 10:58:56.000000000 +0200
|
||||
@@ -1491,7 +1491,7 @@ static const char *scheduler_enums[] = {
|
||||
--- gdb-7.3.50.20110722.orig/gdb/infrun.c 2011-07-22 19:12:56.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/infrun.c 2011-07-22 19:17:06.000000000 +0200
|
||||
@@ -1549,7 +1549,7 @@ static const char *scheduler_enums[] = {
|
||||
schedlock_step,
|
||||
NULL
|
||||
};
|
||||
@ -11,10 +11,10 @@ Index: gdb-7.1.90.20100711/gdb/infrun.c
|
||||
static void
|
||||
show_scheduler_mode (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.mi/mi-console.exp 2010-01-01 08:32:03.000000000 +0100
|
||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-console.exp 2010-07-12 10:58:56.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/gdb.mi/mi-console.exp 2011-01-01 16:33:47.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi-console.exp 2011-07-22 19:17:06.000000000 +0200
|
||||
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
|
||||
mi_run_to_main
|
||||
@ -25,10 +25,10 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
# Next over the hello() call which will produce lots of output
|
||||
mi_gdb_test "220-exec-next" \
|
||||
"220\\^running(\r\n\\*running,thread-id=\"all\")?" \
|
||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi2-console.exp
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi2-console.exp
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2010-05-26 20:12:13.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi2-console.exp 2010-07-12 10:59:14.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2011-06-23 11:40:50.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi2-console.exp 2011-07-22 19:17:27.000000000 +0200
|
||||
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
|
||||
mi_run_to_main
|
||||
@ -37,12 +37,12 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi2-console.exp
|
||||
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
|
||||
+
|
||||
# Next over the hello() call which will produce lots of output
|
||||
gdb_test_multiple "220-exec-next" "Started step over hello" {
|
||||
-re "220\\^running\r\n(\\*running,thread-id=\"all\"\r\n)?$mi_gdb_prompt" {
|
||||
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
mi_gdb_test "220-exec-next" "220\\^running(\r\n)?(\\*running,thread-id=\"all\")?" \
|
||||
"Started step over hello"
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2010-01-19 09:00:39.000000000 +0100
|
||||
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-cli.exp 2010-07-12 10:58:56.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2011-04-27 12:17:38.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi-cli.exp 2011-07-22 19:17:06.000000000 +0200
|
||||
@@ -176,7 +176,7 @@ mi_execute_to "exec-continue" "breakpoin
|
||||
# Test that the token is output even for CLI commands
|
||||
# Also test that *stopped includes frame information.
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/inferior.h
|
||||
Index: gdb-7.3.50.20110722/gdb/inferior.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/inferior.h 2011-01-09 04:08:56.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/inferior.h 2011-01-17 15:48:39.000000000 +0100
|
||||
@@ -186,7 +186,15 @@ extern void reopen_exec_file (void);
|
||||
--- gdb-7.3.50.20110722.orig/gdb/inferior.h 2011-07-22 01:46:08.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/inferior.h 2011-07-22 19:13:30.000000000 +0200
|
||||
@@ -158,7 +158,15 @@ extern void reopen_exec_file (void);
|
||||
/* The `resume' routine should only be called in special circumstances.
|
||||
Normally, use `proceed', which handles a lot of bookkeeping. */
|
||||
|
||||
@ -40,13 +40,13 @@ Index: gdb-7.2.50.20110117/gdb/inferior.h
|
||||
+
|
||||
+extern void resume (enum resume_step, enum target_signal);
|
||||
|
||||
/* From misc files */
|
||||
extern ptid_t user_visible_resume_ptid (int step);
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/infrun.c
|
||||
Index: gdb-7.3.50.20110722/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/infrun.c 2011-01-09 04:08:56.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/infrun.c 2011-01-17 15:49:40.000000000 +0100
|
||||
@@ -76,7 +76,7 @@ static int follow_fork (void);
|
||||
--- gdb-7.3.50.20110722.orig/gdb/infrun.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/infrun.c 2011-07-22 19:12:56.000000000 +0200
|
||||
@@ -79,7 +79,7 @@ static int follow_fork (void);
|
||||
static void set_schedlock_func (char *args, int from_tty,
|
||||
struct cmd_list_element *c);
|
||||
|
||||
@ -55,7 +55,17 @@ Index: gdb-7.2.50.20110117/gdb/infrun.c
|
||||
|
||||
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
|
||||
void *data);
|
||||
@@ -1577,7 +1577,7 @@ maybe_software_singlestep (struct gdbarc
|
||||
@@ -1630,7 +1630,8 @@ user_visible_resume_ptid (int step)
|
||||
}
|
||||
else if ((scheduler_mode == schedlock_on)
|
||||
|| (scheduler_mode == schedlock_step
|
||||
- && (step || singlestep_breakpoints_inserted_p)))
|
||||
+ && (step == RESUME_STEP_USER
|
||||
+ || singlestep_breakpoints_inserted_p)))
|
||||
{
|
||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||
resume_ptid = inferior_ptid;
|
||||
@@ -1648,7 +1649,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
|
||||
@ -64,37 +74,23 @@ Index: gdb-7.2.50.20110117/gdb/infrun.c
|
||||
{
|
||||
int should_resume = 1;
|
||||
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
|
||||
@@ -1609,10 +1609,12 @@ resume (int step, enum target_signal sig
|
||||
}
|
||||
@@ -1681,9 +1682,13 @@ resume (int step, enum target_signal sig
|
||||
|
||||
if (debug_infrun)
|
||||
- fprintf_unfiltered (gdb_stdlog,
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
- "infrun: resume (step=%d, signal=%d), "
|
||||
- "trap_expected=%d\n",
|
||||
- step, sig, tp->control.trap_expected);
|
||||
+ fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d), "
|
||||
+ "trap_expected=%d\n",
|
||||
+ (step == RESUME_STEP_CONTINUE ? "RESUME_STEP_CONTINUE"
|
||||
+ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
|
||||
+ : "RESUME_STEP_NEEDED")),
|
||||
+ sig, tp->control.trap_expected);
|
||||
+ "infrun: resume (step=%s, signal=%d), "
|
||||
"trap_expected=%d, current thread [%s] at %s\n",
|
||||
- step, sig, tp->control.trap_expected,
|
||||
+ (step == RESUME_STEP_CONTINUE
|
||||
+ ? "RESUME_STEP_CONTINUE"
|
||||
+ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
|
||||
+ : "RESUME_STEP_NEEDED")),
|
||||
+ sig, tp->control.trap_expected,
|
||||
target_pid_to_str (inferior_ptid),
|
||||
paddress (gdbarch, pc));
|
||||
|
||||
/* Normally, by the time we reach `resume', the breakpoints are either
|
||||
removed or inserted, as appropriate. The exception is if we're sitting
|
||||
@@ -1730,9 +1732,10 @@ a command like `return' or `jump' to con
|
||||
individually. */
|
||||
resume_ptid = inferior_ptid;
|
||||
}
|
||||
- else if ((scheduler_mode == schedlock_on)
|
||||
+ else if (scheduler_mode == schedlock_on
|
||||
|| (scheduler_mode == schedlock_step
|
||||
- && (step || singlestep_breakpoints_inserted_p)))
|
||||
+ && (step == RESUME_STEP_USER
|
||||
+ || singlestep_breakpoints_inserted_p)))
|
||||
{
|
||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||
resume_ptid = inferior_ptid;
|
||||
@@ -1941,7 +1944,7 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
@@ -2056,7 +2061,7 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
struct thread_info *tp;
|
||||
CORE_ADDR pc;
|
||||
struct address_space *aspace;
|
||||
@ -103,7 +99,7 @@ Index: gdb-7.2.50.20110117/gdb/infrun.c
|
||||
|
||||
/* If we're stopped at a fork/vfork, follow the branch set by the
|
||||
"set follow-fork-mode" command; otherwise, we'll just proceed
|
||||
@@ -1976,13 +1979,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
@@ -2096,13 +2101,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
actually be executing the breakpoint insn anyway.
|
||||
We'll be (un-)executing the previous instruction. */
|
||||
|
||||
@ -119,7 +115,7 @@ Index: gdb-7.2.50.20110117/gdb/infrun.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2023,13 +2026,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
@@ -2133,13 +2138,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
is required it returns TRUE and sets the current thread to
|
||||
the old thread. */
|
||||
if (prepare_to_proceed (step))
|
||||
@ -135,7 +131,7 @@ Index: gdb-7.2.50.20110117/gdb/infrun.c
|
||||
{
|
||||
tp->control.trap_expected = 1;
|
||||
/* If displaced stepping is enabled, we can step over the
|
||||
@@ -2116,8 +2119,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
@@ -2226,8 +2231,13 @@ proceed (CORE_ADDR addr, enum target_sig
|
||||
/* Reset to normal state. */
|
||||
init_infwait_state ();
|
||||
|
||||
@ -150,7 +146,7 @@ Index: gdb-7.2.50.20110117/gdb/infrun.c
|
||||
|
||||
/* Wait for it to stop (if not standalone)
|
||||
and in any case decode why it stopped, and act accordingly. */
|
||||
@@ -4957,14 +4965,19 @@ process_event_stop_test:
|
||||
@@ -5123,14 +5133,19 @@ process_event_stop_test:
|
||||
|
||||
/* Is thread TP in the middle of single-stepping? */
|
||||
|
||||
@ -176,11 +172,11 @@ Index: gdb-7.2.50.20110117/gdb/infrun.c
|
||||
}
|
||||
|
||||
/* Returns true if any thread *but* the one passed in "data" is in the
|
||||
Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
Index: gdb-7.3.50.20110722/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/linux-nat.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/linux-nat.c 2011-01-17 15:48:39.000000000 +0100
|
||||
@@ -2928,7 +2928,10 @@ count_events_callback (struct lwp_info *
|
||||
--- gdb-7.3.50.20110722.orig/gdb/linux-nat.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/linux-nat.c 2011-07-22 19:10:24.000000000 +0200
|
||||
@@ -2986,7 +2986,10 @@ count_events_callback (struct lwp_info *
|
||||
static int
|
||||
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
|
||||
{
|
||||
@ -192,10 +188,10 @@ Index: gdb-7.2.50.20110117/gdb/linux-nat.c
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
Index: gdb-7.2.50.20110117/gdb/linux-nat.h
|
||||
Index: gdb-7.3.50.20110722/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/linux-nat.h 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/linux-nat.h 2011-01-17 15:48:39.000000000 +0100
|
||||
--- gdb-7.3.50.20110722.orig/gdb/linux-nat.h 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/linux-nat.h 2011-07-22 19:10:24.000000000 +0200
|
||||
@@ -55,8 +55,8 @@ struct lwp_info
|
||||
/* If non-zero, a pending wait status. */
|
||||
int status;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--- gdb-7.2.50.20110328.orig/gdb/dwarf2read.c 2011-03-30 12:52:20.395450001 +0200
|
||||
+++ gdb-7.2.50.20110328/gdb/dwarf2read.c 2011-03-30 13:41:55.485450006 +0200
|
||||
@@ -66,12 +66,14 @@
|
||||
Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/dwarf2read.c 2011-07-22 19:37:15.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/dwarf2read.c 2011-07-22 19:44:42.000000000 +0200
|
||||
@@ -67,12 +67,14 @@
|
||||
#ifdef HAVE_ZLIB_H
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
@ -15,7 +17,7 @@
|
||||
|
||||
typedef struct symbol *symbolp;
|
||||
DEF_VEC_P (symbolp);
|
||||
@@ -1563,6 +1565,7 @@
|
||||
@@ -1618,6 +1620,7 @@ dwarf2_read_section (struct objfile *obj
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +25,7 @@
|
||||
#ifdef HAVE_MMAP
|
||||
if (pagesize == 0)
|
||||
pagesize = getpagesize ();
|
||||
@@ -1589,6 +1592,7 @@
|
||||
@@ -1641,6 +1644,7 @@ dwarf2_read_section (struct objfile *obj
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -31,15 +33,15 @@
|
||||
|
||||
/* If we get here, we are a normal, not-compressed section. */
|
||||
info->buffer = buf
|
||||
@@ -15439,6 +15443,7 @@
|
||||
@@ -15983,6 +15987,7 @@ munmap_section_buffer (struct dwarf2_sec
|
||||
{
|
||||
if (info->was_mmapped)
|
||||
if (info->map_addr != NULL)
|
||||
{
|
||||
+#ifndef __sparc__
|
||||
#ifdef HAVE_MMAP
|
||||
intptr_t begin = (intptr_t) info->buffer;
|
||||
intptr_t map_begin = begin & ~(pagesize - 1);
|
||||
@@ -15449,6 +15454,7 @@
|
||||
int res;
|
||||
|
||||
@@ -15992,6 +15997,7 @@ munmap_section_buffer (struct dwarf2_sec
|
||||
/* Without HAVE_MMAP, we should never be here to begin with. */
|
||||
gdb_assert_not_reached ("no mmap support");
|
||||
#endif
|
||||
|
@ -1,11 +1,12 @@
|
||||
Index: gdb-7.2.90.20110411/gdb/breakpoint.c
|
||||
Index: gdb-7.3.50.20110722/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/breakpoint.c 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/breakpoint.c 2011-04-11 19:18:10.000000000 +0200
|
||||
@@ -11233,6 +11233,50 @@ re_set_breakpoint (struct breakpoint *b)
|
||||
do_cleanups (cleanups);
|
||||
}
|
||||
--- gdb-7.3.50.20110722.orig/gdb/breakpoint.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/breakpoint.c 2011-07-22 19:32:04.000000000 +0200
|
||||
@@ -13195,6 +13195,50 @@ iterate_over_breakpoints (int (*callback
|
||||
|
||||
return NULL;
|
||||
}
|
||||
+
|
||||
+void
|
||||
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
|
||||
+{
|
||||
@ -49,15 +50,14 @@ Index: gdb-7.2.90.20110411/gdb/breakpoint.c
|
||||
+ qsort (bp_location, bp_location_count, sizeof (*bp_location),
|
||||
+ bp_location_compare);
|
||||
+}
|
||||
+
|
||||
/* Reset a breakpoint given it's struct breakpoint * BINT.
|
||||
The value we return ends up being the return value from catch_errors.
|
||||
Unused in this case. */
|
||||
Index: gdb-7.2.90.20110411/gdb/breakpoint.h
|
||||
|
||||
void
|
||||
_initialize_breakpoint (void)
|
||||
Index: gdb-7.3.50.20110722/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/breakpoint.h 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/breakpoint.h 2011-04-11 19:17:53.000000000 +0200
|
||||
@@ -1245,4 +1245,7 @@ extern int user_breakpoint_p (struct bre
|
||||
--- gdb-7.3.50.20110722.orig/gdb/breakpoint.h 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/breakpoint.h 2011-07-22 19:31:22.000000000 +0200
|
||||
@@ -1328,4 +1328,7 @@ extern int user_breakpoint_p (struct bre
|
||||
|
||||
extern void modify_semaphore (struct bp_location *location, int set);
|
||||
|
||||
@ -65,11 +65,11 @@ Index: gdb-7.2.90.20110411/gdb/breakpoint.h
|
||||
+ struct section_offsets *delta);
|
||||
+
|
||||
#endif /* !defined (BREAKPOINT_H) */
|
||||
Index: gdb-7.2.90.20110411/gdb/objfiles.c
|
||||
Index: gdb-7.3.50.20110722/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/objfiles.c 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/objfiles.c 2011-04-11 19:17:53.000000000 +0200
|
||||
@@ -851,6 +851,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
--- gdb-7.3.50.20110722.orig/gdb/objfiles.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/objfiles.c 2011-07-22 19:31:22.000000000 +0200
|
||||
@@ -847,6 +847,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
|
||||
new_offsets, delta);
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c 2011-05-25 17:10:46.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/dwarf2read.c 2011-05-25 17:12:35.000000000 +0200
|
||||
@@ -7675,7 +7675,12 @@ read_common_block (struct die_info *die,
|
||||
--- gdb-7.3.50.20110722.orig/gdb/dwarf2read.c 2011-07-22 19:30:11.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/dwarf2read.c 2011-07-22 19:30:44.000000000 +0200
|
||||
@@ -7979,7 +7979,12 @@ read_common_block (struct die_info *die,
|
||||
{
|
||||
struct attribute *attr;
|
||||
struct symbol *sym;
|
||||
@ -16,7 +16,7 @@ Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_location, cu);
|
||||
if (attr)
|
||||
@@ -7684,6 +7689,7 @@ read_common_block (struct die_info *die,
|
||||
@@ -7988,6 +7993,7 @@ read_common_block (struct die_info *die,
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
base = decode_locdesc (DW_BLOCK (attr), cu);
|
||||
@ -24,7 +24,7 @@ Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
}
|
||||
else if (attr_form_is_section_offset (attr))
|
||||
{
|
||||
@@ -7736,12 +7742,15 @@ read_common_block (struct die_info *die,
|
||||
@@ -8040,12 +8046,15 @@ read_common_block (struct die_info *die,
|
||||
if (sym != NULL
|
||||
&& handle_data_member_location (child_die, cu, &offset))
|
||||
{
|
||||
@ -42,7 +42,7 @@ Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
else
|
||||
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
|
||||
FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
|
||||
@@ -7755,7 +7764,7 @@ read_common_block (struct die_info *die,
|
||||
@@ -8059,7 +8068,7 @@ read_common_block (struct die_info *die,
|
||||
|
||||
sym = new_symbol (die, type, cu);
|
||||
/* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
|
||||
@ -51,10 +51,10 @@ Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
|
||||
set_die_type (die, type, cu);
|
||||
}
|
||||
Index: gdb-7.2.90.20110525/gdb/gdbtypes.h
|
||||
Index: gdb-7.3.50.20110722/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/gdbtypes.h 2011-05-25 17:05:21.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/gdbtypes.h 2011-05-25 17:11:10.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/gdbtypes.h 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/gdbtypes.h 2011-07-22 19:31:08.000000000 +0200
|
||||
@@ -396,6 +396,7 @@ enum type_instance_flag_value
|
||||
enum field_loc_kind
|
||||
{
|
||||
@ -69,9 +69,9 @@ Index: gdb-7.2.90.20110525/gdb/gdbtypes.h
|
||||
|
||||
+ /* This address is unrelocated by the objfile's ANOFFSET. */
|
||||
CORE_ADDR physaddr;
|
||||
char *physname;
|
||||
const char *physname;
|
||||
}
|
||||
@@ -1106,6 +1108,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1110,6 +1112,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
|
||||
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
|
||||
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||
@ -79,7 +79,7 @@ Index: gdb-7.2.90.20110525/gdb/gdbtypes.h
|
||||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
|
||||
@@ -1113,6 +1116,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1117,6 +1120,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define SET_FIELD_PHYSNAME(thisfld, name) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
||||
FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
||||
@ -87,7 +87,7 @@ Index: gdb-7.2.90.20110525/gdb/gdbtypes.h
|
||||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
@@ -1125,6 +1129,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1129,6 +1133,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
||||
@ -95,11 +95,11 @@ Index: gdb-7.2.90.20110525/gdb/gdbtypes.h
|
||||
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
||||
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
|
||||
Index: gdb-7.2.90.20110525/gdb/jv-lang.c
|
||||
Index: gdb-7.3.50.20110722/gdb/jv-lang.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/jv-lang.c 2011-03-02 01:42:53.000000000 +0100
|
||||
+++ gdb-7.2.90.20110525/gdb/jv-lang.c 2011-05-25 17:11:10.000000000 +0200
|
||||
@@ -414,7 +414,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
--- gdb-7.3.50.20110722.orig/gdb/jv-lang.c 2011-07-01 20:28:52.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/jv-lang.c 2011-07-22 19:30:44.000000000 +0200
|
||||
@@ -430,7 +430,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
|
||||
fields = NULL;
|
||||
nfields--; /* First set up dummy "class" field. */
|
||||
@ -109,7 +109,7 @@ Index: gdb-7.2.90.20110525/gdb/jv-lang.c
|
||||
TYPE_FIELD_NAME (type, nfields) = "class";
|
||||
TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
|
||||
SET_TYPE_FIELD_PRIVATE (type, nfields);
|
||||
@@ -462,7 +463,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
@@ -478,7 +479,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
SET_TYPE_FIELD_PROTECTED (type, i);
|
||||
}
|
||||
if (accflags & 0x0008) /* ACC_STATIC */
|
||||
@ -119,11 +119,11 @@ Index: gdb-7.2.90.20110525/gdb/jv-lang.c
|
||||
else
|
||||
TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
|
||||
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
||||
Index: gdb-7.2.90.20110525/gdb/value.c
|
||||
Index: gdb-7.3.50.20110722/gdb/value.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/value.c 2011-05-25 17:05:21.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/value.c 2011-05-25 17:11:10.000000000 +0200
|
||||
@@ -2492,7 +2492,8 @@ value_static_field (struct type *type, i
|
||||
--- gdb-7.3.50.20110722.orig/gdb/value.c 2011-07-22 19:08:19.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/value.c 2011-07-22 19:30:44.000000000 +0200
|
||||
@@ -2507,7 +2507,8 @@ value_static_field (struct type *type, i
|
||||
{
|
||||
case FIELD_LOC_KIND_PHYSADDR:
|
||||
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
||||
|
1757
gdb-archer.patch
1757
gdb-archer.patch
File diff suppressed because it is too large
Load Diff
@ -68,7 +68,7 @@ Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
+
|
||||
+set testfile "omp-step"
|
||||
+set srcfile ${testfile}.f90
|
||||
+if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77 additional_flags=-fopenmp}] } {
|
||||
+if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
|
@ -1,18 +1,20 @@
|
||||
Index: gdb-7.2.50.20110117/gdb/config/i386/linux64.mh
|
||||
Index: gdb-7.3.50.20110722/gdb/config/i386/linux64.mh
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/config/i386/linux64.mh 2010-05-28 20:50:31.000000000 +0200
|
||||
+++ gdb-7.2.50.20110117/gdb/config/i386/linux64.mh 2011-01-17 16:01:48.000000000 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \
|
||||
--- gdb-7.3.50.20110722.orig/gdb/config/i386/linux64.mh 2011-07-22 01:46:10.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/config/i386/linux64.mh 2011-07-22 19:32:41.000000000 +0200
|
||||
@@ -3,7 +3,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
i386-nat.o amd64-nat.o amd64-linux-nat.o \
|
||||
linux-nat.o linux-osdata.o \
|
||||
proc-service.o linux-thread-db.o linux-fork.o
|
||||
-NAT_FILE= config/nm-linux.h
|
||||
+NAT_FILE= nm-linux64.h
|
||||
NAT_CDEPS = $(srcdir)/proc-service.list
|
||||
|
||||
# The dynamically loaded libthread_db needs access to symbols in the
|
||||
--- gdb-7.2/gdb/config/i386/linux.mh-orig 2010-06-11 14:08:51.000000000 +0200
|
||||
+++ gdb-7.2/gdb/config/i386/linux.mh 2011-03-18 12:00:32.000000000 +0100
|
||||
Index: gdb-7.3.50.20110722/gdb/config/i386/linux.mh
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/config/i386/linux.mh 2011-07-22 01:46:10.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/config/i386/linux.mh 2011-07-22 19:32:21.000000000 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
|
||||
@ -21,8 +23,10 @@ Index: gdb-7.2.50.20110117/gdb/config/i386/linux64.mh
|
||||
NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
i386-nat.o i386-linux-nat.o \
|
||||
proc-service.o linux-thread-db.o \
|
||||
Index: gdb-7.3.50.20110722/gdb/config/i386/nm-linux.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux.h 2010-07-13 19:02:28.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/config/i386/nm-linux.h 2011-07-22 19:32:21.000000000 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux i386.
|
||||
+
|
||||
@ -52,10 +56,10 @@ Index: gdb-7.2.50.20110117/gdb/config/i386/linux64.mh
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h
|
||||
Index: gdb-7.3.50.20110722/gdb/config/i386/nm-linux64.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h 2011-01-17 16:01:48.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/config/i386/nm-linux64.h 2011-07-22 19:32:21.000000000 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux amd64.
|
||||
+
|
||||
@ -85,11 +89,11 @@ Index: gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.2.50.20110117/gdb/target.h
|
||||
Index: gdb-7.3.50.20110722/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/target.h 2011-01-14 14:47:15.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/target.h 2011-01-17 16:02:08.000000000 +0100
|
||||
@@ -1318,8 +1318,10 @@ extern char *normal_pid_to_str (ptid_t p
|
||||
--- gdb-7.3.50.20110722.orig/gdb/target.h 2011-06-06 14:47:07.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/target.h 2011-07-22 19:32:21.000000000 +0200
|
||||
@@ -1349,8 +1349,10 @@ extern char *target_thread_name (struct
|
||||
bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
|
||||
(including this one?). OTHERTYPE is who knows what... */
|
||||
|
||||
@ -100,10 +104,10 @@ Index: gdb-7.2.50.20110117/gdb/target.h
|
||||
|
||||
/* Returns the number of debug registers needed to watch the given
|
||||
memory region, or zero if not supported. */
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2011-01-17 16:01:48.000000000 +0100
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2011-07-22 19:32:21.000000000 +0200
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2009, 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -46,24 +46,23 @@ gdb/
|
||||
|
||||
* utils.c (nomem): Change internal_error to error.
|
||||
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -1265,15 +1265,9 @@ void
|
||||
nomem (long size)
|
||||
Index: gdb-7.3.50.20110722/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/utils.c 2011-07-22 19:28:58.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/utils.c 2011-07-22 19:34:25.000000000 +0200
|
||||
@@ -1219,13 +1219,11 @@ malloc_failure (long size)
|
||||
{
|
||||
if (size > 0)
|
||||
- {
|
||||
{
|
||||
- internal_error (__FILE__, __LINE__,
|
||||
- _("virtual memory exhausted: can't allocate %ld bytes."),
|
||||
- size);
|
||||
- }
|
||||
+ error (_("virtual memory exhausted: can't allocate %ld bytes."), size);
|
||||
+ error (_("virtual memory exhausted: can't allocate %ld bytes."), size);
|
||||
}
|
||||
else
|
||||
- {
|
||||
{
|
||||
- internal_error (__FILE__, __LINE__, _("virtual memory exhausted."));
|
||||
- }
|
||||
+ error (_("virtual memory exhausted."));
|
||||
+ error (_("virtual memory exhausted."));
|
||||
}
|
||||
}
|
||||
|
||||
/* The xmalloc() (libiberty.h) family of memory management routines.
|
||||
|
||||
|
@ -1,84 +0,0 @@
|
||||
[patch] Code cleanup: New SYMBOL_HASH_NEXT
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00022.html
|
||||
http://sourceware.org/ml/gdb-cvs/2011-04/msg00043.html
|
||||
|
||||
### src/gdb/ChangeLog 2011/04/06 03:24:22 1.12908
|
||||
### src/gdb/ChangeLog 2011/04/06 19:50:03 1.12909
|
||||
## -1,3 +1,12 @@
|
||||
+2011-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
+
|
||||
+ Code cleanup.
|
||||
+ * dictionary.c (dict_hash): Use SYMBOL_HASH_NEXT.
|
||||
+ * dwarf2read.c (mapped_index_string_hash): Refer to SYMBOL_HASH_NEXT
|
||||
+ in the function comment, a new note on values compatibility.
|
||||
+ * minsyms.c (msymbol_hash_iw, msymbol_hash): Use SYMBOL_HASH_NEXT.
|
||||
+ * symtab.h (SYMBOL_HASH_NEXT): New.
|
||||
+
|
||||
2011-04-06 Thiago Jung Bauermann <bauerman@br.ibm.com>
|
||||
|
||||
* ppc-linux-nat.c (check_condition): Add len output parameter.
|
||||
--- src/gdb/dictionary.c 2011/01/07 19:36:15 1.21
|
||||
+++ src/gdb/dictionary.c 2011/04/06 19:50:04 1.22
|
||||
@@ -826,7 +826,7 @@
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
default:
|
||||
- hash = hash * 67 + *string - 113;
|
||||
+ hash = SYMBOL_HASH_NEXT (hash, *string);
|
||||
string += 1;
|
||||
break;
|
||||
}
|
||||
--- src/gdb/dwarf2read.c 2011/04/04 14:10:12 1.520
|
||||
+++ src/gdb/dwarf2read.c 2011/04/06 19:50:04 1.521
|
||||
@@ -1962,11 +1962,11 @@
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
|
||||
-/* The hash function for strings in the mapped index. This is the
|
||||
- same as the hashtab.c hash function, but we keep a separate copy to
|
||||
- maintain control over the implementation. This is necessary
|
||||
- because the hash function is tied to the format of the mapped index
|
||||
- file. */
|
||||
+/* The hash function for strings in the mapped index. This is the same as
|
||||
+ SYMBOL_HASH_NEXT, but we keep a separate copy to maintain control over the
|
||||
+ implementation. This is necessary because the hash function is tied to the
|
||||
+ format of the mapped index file. The hash values do not have to match with
|
||||
+ SYMBOL_HASH_NEXT. */
|
||||
|
||||
static hashval_t
|
||||
mapped_index_string_hash (const void *p)
|
||||
--- src/gdb/minsyms.c 2011/03/28 20:29:51 1.81
|
||||
+++ src/gdb/minsyms.c 2011/04/06 19:50:05 1.82
|
||||
@@ -91,7 +91,7 @@
|
||||
++string;
|
||||
if (*string && *string != '(')
|
||||
{
|
||||
- hash = hash * 67 + *string - 113;
|
||||
+ hash = SYMBOL_HASH_NEXT (hash, *string);
|
||||
++string;
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@
|
||||
unsigned int hash = 0;
|
||||
|
||||
for (; *string; ++string)
|
||||
- hash = hash * 67 + *string - 113;
|
||||
+ hash = SYMBOL_HASH_NEXT (hash, *string);
|
||||
return hash;
|
||||
}
|
||||
|
||||
--- src/gdb/symtab.h 2011/04/04 15:19:59 1.177
|
||||
+++ src/gdb/symtab.h 2011/04/06 19:50:05 1.178
|
||||
@@ -1004,6 +1004,12 @@
|
||||
|
||||
extern unsigned int msymbol_hash (const char *);
|
||||
|
||||
+/* Compute the next hash value from previous HASH and the character C. This
|
||||
+ is only a GDB in-memory computed value with no external files compatibility
|
||||
+ requirements. */
|
||||
+
|
||||
+#define SYMBOL_HASH_NEXT(hash, c) ((hash) * 67 + (c) - 113)
|
||||
+
|
||||
extern struct objfile * msymbol_objfile (struct minimal_symbol *sym);
|
||||
|
||||
extern void
|
@ -1,139 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00124.html
|
||||
Subject: [patch 1/3] case insensitive: Reformat code
|
||||
|
||||
Hi,
|
||||
|
||||
just some reformatting to make the later patch more clear. There should be no
|
||||
functionality difference by this patch. c1+c2 are a bit ugly but I found any
|
||||
other solution a bit ugly.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-04-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Format the code for the next patch.
|
||||
* dwarf2read.c (struct mapped_index): Include delimiting newlines.
|
||||
* utils.c (strcmp_iw_ordered): Reformat the code for the next patch.
|
||||
New variables c1 and c2.
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -150,14 +150,19 @@ struct mapped_index
|
||||
{
|
||||
/* The total length of the buffer. */
|
||||
off_t total_size;
|
||||
+
|
||||
/* A pointer to the address table data. */
|
||||
const gdb_byte *address_table;
|
||||
+
|
||||
/* Size of the address table data in bytes. */
|
||||
offset_type address_table_size;
|
||||
+
|
||||
/* The symbol table, implemented as a hash table. */
|
||||
const offset_type *symbol_table;
|
||||
+
|
||||
/* Size in slots, each slot is 2 offset_types. */
|
||||
offset_type symbol_table_slots;
|
||||
+
|
||||
/* A pointer to the constant pool. */
|
||||
const char *constant_pool;
|
||||
};
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -3023,48 +3023,55 @@ strcmp_iw (const char *string1, const char *string2)
|
||||
int
|
||||
strcmp_iw_ordered (const char *string1, const char *string2)
|
||||
{
|
||||
- while ((*string1 != '\0') && (*string2 != '\0'))
|
||||
+ /* Formatting stub. */
|
||||
+ if (1)
|
||||
{
|
||||
- while (isspace (*string1))
|
||||
- {
|
||||
- string1++;
|
||||
- }
|
||||
- while (isspace (*string2))
|
||||
- {
|
||||
- string2++;
|
||||
- }
|
||||
- if (*string1 != *string2)
|
||||
+ /* C1 and C2 are valid only if *string1 != '\0' && *string2 != '\0'.
|
||||
+ Provide stub characters if we are already at the end of one of the
|
||||
+ strings. */
|
||||
+ char c1 = 'X', c2 = 'X';
|
||||
+
|
||||
+ while (*string1 != '\0' && *string2 != '\0')
|
||||
{
|
||||
- break;
|
||||
+ while (isspace (*string1))
|
||||
+ string1++;
|
||||
+ while (isspace (*string2))
|
||||
+ string2++;
|
||||
+
|
||||
+ c1 = *string1;
|
||||
+ c2 = *string2;
|
||||
+ if (c1 != c2)
|
||||
+ break;
|
||||
+
|
||||
+ if (*string1 != '\0')
|
||||
+ {
|
||||
+ string1++;
|
||||
+ string2++;
|
||||
+ }
|
||||
}
|
||||
- if (*string1 != '\0')
|
||||
+
|
||||
+ switch (*string1)
|
||||
{
|
||||
- string1++;
|
||||
- string2++;
|
||||
+ /* Characters are non-equal unless they're both '\0'; we want to
|
||||
+ make sure we get the comparison right according to our
|
||||
+ comparison in the cases where one of them is '\0' or '('. */
|
||||
+ case '\0':
|
||||
+ if (*string2 == '\0')
|
||||
+ return 0;
|
||||
+ else
|
||||
+ return -1;
|
||||
+ case '(':
|
||||
+ if (*string2 == '\0')
|
||||
+ return 1;
|
||||
+ else
|
||||
+ return -1;
|
||||
+ default:
|
||||
+ if (*string2 == '\0' || *string2 == '(')
|
||||
+ return 1;
|
||||
+ else
|
||||
+ return c1 - c2;
|
||||
}
|
||||
}
|
||||
-
|
||||
- switch (*string1)
|
||||
- {
|
||||
- /* Characters are non-equal unless they're both '\0'; we want to
|
||||
- make sure we get the comparison right according to our
|
||||
- comparison in the cases where one of them is '\0' or '('. */
|
||||
- case '\0':
|
||||
- if (*string2 == '\0')
|
||||
- return 0;
|
||||
- else
|
||||
- return -1;
|
||||
- case '(':
|
||||
- if (*string2 == '\0')
|
||||
- return 1;
|
||||
- else
|
||||
- return -1;
|
||||
- default:
|
||||
- if (*string2 == '(')
|
||||
- return 1;
|
||||
- else
|
||||
- return *string1 - *string2;
|
||||
- }
|
||||
}
|
||||
|
||||
/* A simple comparison function with opposite semantics to strcmp. */
|
||||
|
@ -1,188 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00125.html
|
||||
Subject: [patch 2/3] case insensitive: re_comp->regcomp
|
||||
|
||||
Hi,
|
||||
|
||||
re_comp cannot be passed REG_ICASE. Therefore change the code. The should
|
||||
have no functionality impact.
|
||||
|
||||
The new boolean field `preg_p' could be maybe replaced by a conditional
|
||||
`preg.buffer != NULL' which would work with libiberty regcomp implementation
|
||||
but I do not see it guaranteed anywhere. GDB is always using static libiberty
|
||||
implementation which I do not see why in the case it is running on glibc.
|
||||
But if it gets fixed one day and it starts to use externally linked
|
||||
regcomp/regexec I would find the `preg.buffer != NULL' conditional dangerous.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-04-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Replace re_comp/re_exec by regcomp/regexec.
|
||||
* symtab.c (struct search_symbols_data): New fields preg, preg_p.
|
||||
(search_symbols_name_matches): Use them, use regexec.
|
||||
(search_symbols): New variable retval_chain, adjust the use of
|
||||
old_chain against it. Replace re_comp by regcomp. Use the new struct
|
||||
search_symbols_data fields, use regexec instead of re_exec.
|
||||
|
||||
Index: gdb-7.2.90.20110429/gdb/symtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/symtab.c 2011-04-29 09:43:33.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/symtab.c 2011-04-29 09:43:55.000000000 +0200
|
||||
@@ -2958,7 +2958,10 @@ struct search_symbols_data
|
||||
{
|
||||
int nfiles;
|
||||
char **files;
|
||||
- char *regexp;
|
||||
+
|
||||
+ /* It is true if PREG contains valid data, false otherwise. */
|
||||
+ unsigned preg_p : 1;
|
||||
+ regex_t preg;
|
||||
};
|
||||
|
||||
/* A callback for expand_symtabs_matching. */
|
||||
@@ -2976,7 +2979,7 @@ search_symbols_name_matches (const char
|
||||
{
|
||||
struct search_symbols_data *data = user_data;
|
||||
|
||||
- return data->regexp == NULL || re_exec (symname);
|
||||
+ return !data->preg_p || regexec (&data->preg, symname, 0, NULL, 0) == 0;
|
||||
}
|
||||
|
||||
/* Search the symbol table for matches to the regular expression REGEXP,
|
||||
@@ -3023,9 +3026,13 @@ search_symbols (char *regexp, domain_enu
|
||||
struct symbol_search *sr;
|
||||
struct symbol_search *psr;
|
||||
struct symbol_search *tail;
|
||||
- struct cleanup *old_chain = NULL;
|
||||
struct search_symbols_data datum;
|
||||
|
||||
+ /* OLD_CHAIN .. RETVAL_CHAIN is always freed, RETVAL_CHAIN .. current
|
||||
+ CLEANUP_CHAIN is freed only in the case of an error. */
|
||||
+ struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
|
||||
+ struct cleanup *retval_chain;
|
||||
+
|
||||
if (kind < VARIABLES_DOMAIN || kind >= ALL_DOMAIN)
|
||||
error (_("must search on specific domain"));
|
||||
|
||||
@@ -3036,6 +3043,7 @@ search_symbols (char *regexp, domain_enu
|
||||
|
||||
sr = *matches = NULL;
|
||||
tail = NULL;
|
||||
+ datum.preg_p = 0;
|
||||
|
||||
if (regexp != NULL)
|
||||
{
|
||||
@@ -3045,6 +3053,7 @@ search_symbols (char *regexp, domain_enu
|
||||
and <TYPENAME> or <OPERATOR>. */
|
||||
char *opend;
|
||||
char *opname = operator_chars (regexp, &opend);
|
||||
+ int errcode;
|
||||
|
||||
if (*opname)
|
||||
{
|
||||
@@ -3073,8 +3082,16 @@ search_symbols (char *regexp, domain_enu
|
||||
}
|
||||
}
|
||||
|
||||
- if (0 != (val = re_comp (regexp)))
|
||||
- error (_("Invalid regexp (%s): %s"), val, regexp);
|
||||
+ errcode = regcomp (&datum.preg, regexp, REG_NOSUB);
|
||||
+ if (errcode != 0)
|
||||
+ {
|
||||
+ char *err = get_regcomp_error (errcode, &datum.preg);
|
||||
+
|
||||
+ make_cleanup (xfree, err);
|
||||
+ error (_("Invalid regexp (%s): %s"), err, regexp);
|
||||
+ }
|
||||
+ datum.preg_p = 1;
|
||||
+ make_regfree_cleanup (&datum.preg);
|
||||
}
|
||||
|
||||
/* Search through the partial symtabs *first* for all symbols
|
||||
@@ -3083,7 +3100,6 @@ search_symbols (char *regexp, domain_enu
|
||||
|
||||
datum.nfiles = nfiles;
|
||||
datum.files = files;
|
||||
- datum.regexp = regexp;
|
||||
ALL_OBJFILES (objfile)
|
||||
{
|
||||
if (objfile->sf)
|
||||
@@ -3094,6 +3110,8 @@ search_symbols (char *regexp, domain_enu
|
||||
&datum);
|
||||
}
|
||||
|
||||
+ retval_chain = old_chain;
|
||||
+
|
||||
/* Here, we search through the minimal symbol tables for functions
|
||||
and variables that match, and force their symbols to be read.
|
||||
This is in particular necessary for demangled variable names,
|
||||
@@ -3117,8 +3135,9 @@ search_symbols (char *regexp, domain_enu
|
||||
MSYMBOL_TYPE (msymbol) == ourtype3 ||
|
||||
MSYMBOL_TYPE (msymbol) == ourtype4)
|
||||
{
|
||||
- if (regexp == NULL
|
||||
- || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0)
|
||||
+ if (!datum.preg_p
|
||||
+ || regexec (&datum.preg, SYMBOL_NATURAL_NAME (msymbol), 0,
|
||||
+ NULL, 0) == 0)
|
||||
{
|
||||
if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))
|
||||
{
|
||||
@@ -3156,8 +3175,9 @@ search_symbols (char *regexp, domain_enu
|
||||
QUIT;
|
||||
|
||||
if (file_matches (real_symtab->filename, files, nfiles)
|
||||
- && ((regexp == NULL
|
||||
- || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0)
|
||||
+ && ((!datum.preg_p
|
||||
+ || regexec (&datum.preg, SYMBOL_NATURAL_NAME (sym), 0,
|
||||
+ NULL, 0) == 0)
|
||||
&& ((kind == VARIABLES_DOMAIN
|
||||
&& SYMBOL_CLASS (sym) != LOC_TYPEDEF
|
||||
&& SYMBOL_CLASS (sym) != LOC_UNRESOLVED
|
||||
@@ -3199,7 +3219,7 @@ search_symbols (char *regexp, domain_enu
|
||||
tail = sort_search_symbols (&dummy, nfound);
|
||||
sr = dummy.next;
|
||||
|
||||
- old_chain = make_cleanup_free_search_symbols (sr);
|
||||
+ make_cleanup_free_search_symbols (sr);
|
||||
}
|
||||
else
|
||||
tail = sort_search_symbols (prevtail, nfound);
|
||||
@@ -3221,8 +3241,9 @@ search_symbols (char *regexp, domain_enu
|
||||
MSYMBOL_TYPE (msymbol) == ourtype3 ||
|
||||
MSYMBOL_TYPE (msymbol) == ourtype4)
|
||||
{
|
||||
- if (regexp == NULL
|
||||
- || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0)
|
||||
+ if (!datum.preg_p
|
||||
+ || regexec (&datum.preg, SYMBOL_NATURAL_NAME (msymbol), 0,
|
||||
+ NULL, 0) == 0)
|
||||
{
|
||||
/* Functions: Look up by address. */
|
||||
if (kind != FUNCTIONS_DOMAIN ||
|
||||
@@ -3244,7 +3265,7 @@ search_symbols (char *regexp, domain_enu
|
||||
if (tail == NULL)
|
||||
{
|
||||
sr = psr;
|
||||
- old_chain = make_cleanup_free_search_symbols (sr);
|
||||
+ make_cleanup_free_search_symbols (sr);
|
||||
}
|
||||
else
|
||||
tail->next = psr;
|
||||
@@ -3256,9 +3277,9 @@ search_symbols (char *regexp, domain_enu
|
||||
}
|
||||
}
|
||||
|
||||
+ discard_cleanups (retval_chain);
|
||||
+ do_cleanups (old_chain);
|
||||
*matches = sr;
|
||||
- if (sr != NULL)
|
||||
- discard_cleanups (old_chain);
|
||||
}
|
||||
|
||||
/* Helper function for symtab_symbol_info, this function uses
|
@ -1,669 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00418.html
|
||||
Subject: Re: [patch 3/3] case insensitive: the fix [rediff]
|
||||
|
||||
On Fri, 22 Apr 2011 21:05:07 +0200, Eli Zaretskii wrote:
|
||||
> This @table will look weird in the manual: it produces lines that
|
||||
> begin with a lower-case letter. Perhaps reorder thusly:
|
||||
|
||||
OK, thanks for the review.
|
||||
|
||||
|
||||
Regards,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/doc/
|
||||
2011-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* gdb.texinfo (Index Section Format): Change the version to 5.
|
||||
Describe the different formula.
|
||||
|
||||
gdb/
|
||||
2011-04-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf2read.c: Include ctype.h.
|
||||
(struct mapped_index): New field version.
|
||||
(mapped_index_string_hash): New parameter index_version. New comment
|
||||
for it. Call tolower appropriately.
|
||||
(find_slot_in_mapped_hash): New variable cmp, initialize it, use it.
|
||||
Choose the right index version for mapped_index_string_hash.
|
||||
(dwarf2_read_index): Support also the index version 5. Initialize the
|
||||
new struct mapped_index field version.
|
||||
(hash_strtab_entry): Pass INT_MAX for the new parameter, explain why.
|
||||
(find_slot): Explain the version needs. Pass INT_MAX for the new
|
||||
parameter.
|
||||
(write_psymtabs_to_index): Produce version 5.
|
||||
* minsyms.c (lookup_minimal_symbol): New variable cmp, initialize it,
|
||||
use it. New comment for SYMBOL_MATCHES_SEARCH_NAME.
|
||||
* psymtab.c (lookup_partial_symbol): Find the
|
||||
SYMBOL_MATCHES_SEARCH_NAME start of the found block of matching
|
||||
entries.
|
||||
* symtab.c (lookup_symbol_in_language): Remove the case_sensitive_off
|
||||
NAME lowercasing.
|
||||
(search_symbols): Pass REG_ICASE to regcomp for case_sensitive_off.
|
||||
(completion_list_add_name): New variable ncmp, initialize it, use it.
|
||||
* symtab.h (SYMBOL_HASH_NEXT): Always call tolower.
|
||||
* utils.c (strcmp_iw): Support case_sensitive_off.
|
||||
(strcmp_iw_ordered): Sort in a way compatible with case_sensitive_off.
|
||||
New function comment part. New variables saved_string1,
|
||||
saved_string2 and case_pass. Add a proper second pass.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-04-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/fortran-sym-case.c: New file.
|
||||
* gdb.base/fortran-sym-case.exp: New file.
|
||||
* gdb.dwarf2/dw2-case-insensitive-debug.S: New file.
|
||||
* gdb.dwarf2/dw2-case-insensitive.c: New file.
|
||||
* gdb.dwarf2/dw2-case-insensitive.exp: New file.
|
||||
|
||||
Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/dwarf2read.c 2011-05-25 19:12:33.000000000 +0200
|
||||
@@ -152,6 +152,9 @@ DEF_VEC_I (offset_type);
|
||||
a comment by the code that writes the index. */
|
||||
struct mapped_index
|
||||
{
|
||||
+ /* Index data format version. */
|
||||
+ int version;
|
||||
+
|
||||
/* The total length of the buffer. */
|
||||
off_t total_size;
|
||||
|
||||
@@ -1997,17 +2000,23 @@ create_addrmap_from_index (struct objfil
|
||||
SYMBOL_HASH_NEXT, but we keep a separate copy to maintain control over the
|
||||
implementation. This is necessary because the hash function is tied to the
|
||||
format of the mapped index file. The hash values do not have to match with
|
||||
- SYMBOL_HASH_NEXT. */
|
||||
+ SYMBOL_HASH_NEXT.
|
||||
+
|
||||
+ Use INT_MAX for INDEX_VERSION if you generate the current index format. */
|
||||
|
||||
static hashval_t
|
||||
-mapped_index_string_hash (const void *p)
|
||||
+mapped_index_string_hash (int index_version, const void *p)
|
||||
{
|
||||
const unsigned char *str = (const unsigned char *) p;
|
||||
hashval_t r = 0;
|
||||
unsigned char c;
|
||||
|
||||
while ((c = *str++) != 0)
|
||||
- r = r * 67 + c - 113;
|
||||
+ {
|
||||
+ if (index_version >= 5)
|
||||
+ c = tolower (c);
|
||||
+ r = r * 67 + c - 113;
|
||||
+ }
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -2023,6 +2032,7 @@ find_slot_in_mapped_hash (struct mapped_
|
||||
struct cleanup *back_to = make_cleanup (null_cleanup, 0);
|
||||
offset_type hash;
|
||||
offset_type slot, step;
|
||||
+ int (*cmp) (const char *, const char *);
|
||||
|
||||
if (current_language->la_language == language_cplus
|
||||
|| current_language->la_language == language_java
|
||||
@@ -2045,9 +2055,16 @@ find_slot_in_mapped_hash (struct mapped_
|
||||
}
|
||||
}
|
||||
|
||||
- hash = mapped_index_string_hash (name);
|
||||
+ /* Index version 4 did not support case insensitive searches. But the
|
||||
+ indexes for case insensitive languages are built in lowercase, therefore
|
||||
+ simulate our NAME being searched is also lowercased. */
|
||||
+ hash = mapped_index_string_hash ((index->version == 4
|
||||
+ && case_sensitivity == case_sensitive_off
|
||||
+ ? 5 : index->version),
|
||||
+ name);
|
||||
slot = hash & (index->symbol_table_slots - 1);
|
||||
step = ((hash * 17) & (index->symbol_table_slots - 1)) | 1;
|
||||
+ cmp = (case_sensitivity == case_sensitive_on ? strcmp : strcasecmp);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -2061,7 +2078,7 @@ find_slot_in_mapped_hash (struct mapped_
|
||||
}
|
||||
|
||||
str = index->constant_pool + MAYBE_SWAP (index->symbol_table[i]);
|
||||
- if (!strcmp (name, str))
|
||||
+ if (!cmp (name, str))
|
||||
{
|
||||
*vec_out = (offset_type *) (index->constant_pool
|
||||
+ MAYBE_SWAP (index->symbol_table[i + 1]));
|
||||
@@ -2105,15 +2122,17 @@ dwarf2_read_index (struct objfile *objfi
|
||||
/* Versions earlier than 3 emitted every copy of a psymbol. This
|
||||
causes the index to behave very poorly for certain requests. Version 3
|
||||
contained incomplete addrmap. So, it seems better to just ignore such
|
||||
- indices. */
|
||||
+ indices. Index version 4 uses a different hash function than index
|
||||
+ version 5 and later. */
|
||||
if (version < 4)
|
||||
return 0;
|
||||
/* Indexes with higher version than the one supported by GDB may be no
|
||||
longer backward compatible. */
|
||||
- if (version > 4)
|
||||
+ if (version > 5)
|
||||
return 0;
|
||||
|
||||
map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index);
|
||||
+ map->version = version;
|
||||
map->total_size = dwarf2_per_objfile->gdb_index.size;
|
||||
|
||||
metadata = (offset_type *) (addr + sizeof (offset_type));
|
||||
@@ -15692,13 +15711,16 @@ struct strtab_entry
|
||||
const char *str;
|
||||
};
|
||||
|
||||
-/* Hash function for a strtab_entry. */
|
||||
+/* Hash function for a strtab_entry.
|
||||
+
|
||||
+ Function is used only during write_hash_table so no index format backward
|
||||
+ compatibility is needed. */
|
||||
|
||||
static hashval_t
|
||||
hash_strtab_entry (const void *e)
|
||||
{
|
||||
const struct strtab_entry *entry = e;
|
||||
- return mapped_index_string_hash (entry->str);
|
||||
+ return mapped_index_string_hash (INT_MAX, entry->str);
|
||||
}
|
||||
|
||||
/* Equality function for a strtab_entry. */
|
||||
@@ -15836,12 +15858,15 @@ cleanup_mapped_symtab (void *p)
|
||||
}
|
||||
|
||||
/* Find a slot in SYMTAB for the symbol NAME. Returns a pointer to
|
||||
- the slot. */
|
||||
+ the slot.
|
||||
+
|
||||
+ Function is used only during write_hash_table so no index format backward
|
||||
+ compatibility is needed. */
|
||||
|
||||
static struct symtab_index_entry **
|
||||
find_slot (struct mapped_symtab *symtab, const char *name)
|
||||
{
|
||||
- offset_type index, step, hash = mapped_index_string_hash (name);
|
||||
+ offset_type index, step, hash = mapped_index_string_hash (INT_MAX, name);
|
||||
|
||||
index = hash & (symtab->size - 1);
|
||||
step = ((hash * 17) & (symtab->size - 1)) | 1;
|
||||
@@ -16369,7 +16394,7 @@ write_psymtabs_to_index (struct objfile
|
||||
total_len = size_of_contents;
|
||||
|
||||
/* The version number. */
|
||||
- val = MAYBE_SWAP (4);
|
||||
+ val = MAYBE_SWAP (5);
|
||||
obstack_grow (&contents, &val, sizeof (val));
|
||||
|
||||
/* The offset of the CU list from the start of the file. */
|
||||
Index: gdb-7.2.90.20110525/gdb/minsyms.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/minsyms.c 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/minsyms.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -239,11 +239,16 @@ lookup_minimal_symbol (const char *name,
|
||||
|
||||
if (pass == 1)
|
||||
{
|
||||
- match = strcmp (SYMBOL_LINKAGE_NAME (msymbol),
|
||||
- modified_name) == 0;
|
||||
+ int (*cmp) (const char *, const char *);
|
||||
+
|
||||
+ cmp = (case_sensitivity == case_sensitive_on
|
||||
+ ? strcmp : strcasecmp);
|
||||
+ match = cmp (SYMBOL_LINKAGE_NAME (msymbol),
|
||||
+ modified_name) == 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
+ /* The function respects CASE_SENSITIVITY. */
|
||||
match = SYMBOL_MATCHES_SEARCH_NAME (msymbol,
|
||||
modified_name);
|
||||
}
|
||||
Index: gdb-7.2.90.20110525/gdb/psymtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/psymtab.c 2011-04-20 22:10:29.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/psymtab.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -690,8 +690,15 @@ lookup_partial_symbol (struct partial_sy
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
|
||||
- while (top <= real_top
|
||||
- && SYMBOL_MATCHES_SEARCH_NAME (*top, search_name))
|
||||
+ /* For `case_sensitivity == case_sensitive_off' strcmp_iw_ordered will
|
||||
+ search more exactly than what matches SYMBOL_MATCHES_SEARCH_NAME. */
|
||||
+ while (top >= start && SYMBOL_MATCHES_SEARCH_NAME (*top, search_name))
|
||||
+ top--;
|
||||
+
|
||||
+ /* Fixup to have a symbol which matches SYMBOL_MATCHES_SEARCH_NAME. */
|
||||
+ top++;
|
||||
+
|
||||
+ while (top <= real_top && SYMBOL_MATCHES_SEARCH_NAME (*top, search_name))
|
||||
{
|
||||
if (symbol_matches_domain (SYMBOL_LANGUAGE (*top),
|
||||
SYMBOL_DOMAIN (*top), domain))
|
||||
Index: gdb-7.2.90.20110525/gdb/symtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/symtab.c 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/symtab.c 2011-05-25 17:13:49.000000000 +0200
|
||||
@@ -1062,19 +1062,6 @@ lookup_symbol_in_language (const char *n
|
||||
}
|
||||
}
|
||||
|
||||
- if (case_sensitivity == case_sensitive_off)
|
||||
- {
|
||||
- char *copy;
|
||||
- int len, i;
|
||||
-
|
||||
- len = strlen (name);
|
||||
- copy = (char *) alloca (len + 1);
|
||||
- for (i= 0; i < len; i++)
|
||||
- copy[i] = tolower (name[i]);
|
||||
- copy[len] = 0;
|
||||
- modified_name = copy;
|
||||
- }
|
||||
-
|
||||
returnval = lookup_symbol_aux (modified_name, block, domain, lang,
|
||||
is_a_field_of_this);
|
||||
do_cleanups (cleanup);
|
||||
@@ -3106,7 +3093,9 @@ search_symbols (char *regexp, domain_enu
|
||||
}
|
||||
}
|
||||
|
||||
- errcode = regcomp (&datum.preg, regexp, REG_NOSUB);
|
||||
+ errcode = regcomp (&datum.preg, regexp,
|
||||
+ REG_NOSUB | (case_sensitivity == case_sensitive_off
|
||||
+ ? REG_ICASE : 0));
|
||||
if (errcode != 0)
|
||||
{
|
||||
char *err = get_regcomp_error (errcode, &datum.preg);
|
||||
@@ -3546,7 +3535,11 @@ rbreak_command (char *regexp, int from_t
|
||||
static int
|
||||
compare_symbol_name (const char *name, const char *sym_text, int sym_text_len)
|
||||
{
|
||||
- if (strncmp (name, sym_text, sym_text_len) != 0)
|
||||
+ int (*ncmp) (const char *, const char *, size_t);
|
||||
+
|
||||
+ ncmp = (case_sensitivity == case_sensitive_on ? strncmp : strncasecmp);
|
||||
+
|
||||
+ if (ncmp (name, sym_text, sym_text_len) != 0)
|
||||
return 0;
|
||||
|
||||
if (sym_text[sym_text_len] == '(')
|
||||
Index: gdb-7.2.90.20110525/gdb/symtab.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/symtab.h 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/symtab.h 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -1036,7 +1036,8 @@ extern unsigned int msymbol_hash (const
|
||||
is only a GDB in-memory computed value with no external files compatibility
|
||||
requirements. */
|
||||
|
||||
-#define SYMBOL_HASH_NEXT(hash, c) ((hash) * 67 + (c) - 113)
|
||||
+#define SYMBOL_HASH_NEXT(hash, c) \
|
||||
+ ((hash) * 67 + tolower ((unsigned char) (c)) - 113)
|
||||
|
||||
extern struct objfile * msymbol_objfile (struct minimal_symbol *sym);
|
||||
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.base/fortran-sym-case.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.base/fortran-sym-case.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **aRGv)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.base/fortran-sym-case.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.base/fortran-sym-case.exp 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,27 @@
|
||||
+# Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile fortran-sym-case
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "set language fortran" {Warning: the current language does not match this frame\.}
|
||||
+
|
||||
+gdb_test "frame" ", aRGv=.*"
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,102 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+ .section .debug_info
|
||||
+.Lcu1_begin:
|
||||
+ /* CU header */
|
||||
+ .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
|
||||
+.Lcu1_start:
|
||||
+ .2byte 2 /* DWARF Version */
|
||||
+ .4byte .Labbrev1_begin /* Offset into abbrev section */
|
||||
+ .byte 4 /* Pointer size */
|
||||
+
|
||||
+ /* CU die */
|
||||
+ .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
|
||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
||||
+ .byte 8 /* DW_AT_language (DW_LANG_Fortran90) */
|
||||
+ .4byte FUNC_lang /* DW_AT_low_pc */
|
||||
+ .4byte main /* DW_AT_high_pc */
|
||||
+
|
||||
+ .uleb128 3 /* Abbrev: DW_TAG_subprogram */
|
||||
+ .byte 1 /* DW_AT_external */
|
||||
+ .ascii "FUNC_lang\0" /* DW_AT_name */
|
||||
+ .4byte FUNC_lang /* DW_AT_low_pc */
|
||||
+ .4byte main /* DW_AT_high_pc */
|
||||
+ .byte 1 /* DW_AT_prototyped */
|
||||
+ .4byte .Ltype - .Lcu1_begin /* DW_AT_type */
|
||||
+
|
||||
+.Ltype:
|
||||
+ .uleb128 0x5 /* Abbrev: DW_TAG_base_type */
|
||||
+ .byte 0x4 /* DW_AT_byte_size */
|
||||
+ .byte 0x5 /* DW_AT_encoding */
|
||||
+ .ascii "foo\0" /* DW_AT_name */
|
||||
+
|
||||
+ .byte 0 /* End of children of CU */
|
||||
+.Lcu1_end:
|
||||
+
|
||||
+/* Abbrev table */
|
||||
+ .section .debug_abbrev
|
||||
+.Labbrev1_begin:
|
||||
+ .uleb128 1 /* Abbrev code */
|
||||
+ .uleb128 0x11 /* DW_TAG_compile_unit */
|
||||
+ .byte 1 /* has_children */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x25 /* DW_AT_producer */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x13 /* DW_AT_language */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 3 /* Abbrev code */
|
||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
||||
+ .byte 0 /* has_children */
|
||||
+ .uleb128 0x3f /* DW_AT_external */
|
||||
+ .uleb128 0xc /* DW_FORM_flag */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x27 /* DW_AT_prototyped */
|
||||
+ .uleb128 0xc /* DW_FORM_flag */
|
||||
+ .uleb128 0x49 /* DW_AT_type */
|
||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 0x5 /* Abbrev code */
|
||||
+ .uleb128 0x24 /* DW_TAG_base_type */
|
||||
+ .byte 0x0 /* DW_children_no */
|
||||
+ .uleb128 0xb /* DW_AT_byte_size */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3e /* DW_AT_encoding */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,38 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* Use DW_LANG_Fortran90 for case insensitive DWARF. */
|
||||
+
|
||||
+void
|
||||
+FUNC_lang (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+/* Symbol is present only in ELF .symtab. */
|
||||
+
|
||||
+void
|
||||
+FUNC_symtab (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ FUNC_lang ();
|
||||
+ FUNC_symtab ();
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,49 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+load_lib dwarf.exp
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+if {![dwarf2_support]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "dw2-case-insensitive"
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "show case-sensitive" {Case sensitivity in name search is "auto; currently on"\.}
|
||||
+
|
||||
+gdb_test "info functions fUnC_lang" \
|
||||
+ "All functions matching regular expression \"fUnC_lang\":" \
|
||||
+ "regexp case-sensitive on"
|
||||
+
|
||||
+gdb_test "set case-sensitive off" {warning: the current case sensitivity setting does not match the language\.}
|
||||
+
|
||||
+gdb_test "info functions fUnC_lang" \
|
||||
+ "All functions matching regular expression \"fUnC_lang\":\[\r\n\]+File file1.txt:\r\nfoo FUNC_lang\\(void\\);" \
|
||||
+ "regexp case-sensitive off"
|
||||
+
|
||||
+gdb_test "p fuNC_lang" { = {foo \(void\)} 0x[0-9a-f]+ <FUNC_lang>}
|
||||
+gdb_test "p fuNC_symtab" { = {<text variable, no debug info>} 0x[0-9a-f]+ <FUNC_symtab>}
|
||||
+
|
||||
+if {[gdb_breakpoint "fuNC_lang"] == 1} {
|
||||
+ pass "setting breakpoint at fuNC_lang"
|
||||
+}
|
||||
+
|
||||
+if {[gdb_breakpoint "fuNC_symtab"] == 1} {
|
||||
+ pass "setting breakpoint at fuNC_symtab"
|
||||
+}
|
||||
Index: gdb-7.2.90.20110525/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/utils.c 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/utils.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -3003,10 +3003,12 @@ strcmp_iw (const char *string1, const ch
|
||||
{
|
||||
string2++;
|
||||
}
|
||||
- if (*string1 != *string2)
|
||||
- {
|
||||
- break;
|
||||
- }
|
||||
+ if (case_sensitivity == case_sensitive_on && *string1 != *string2)
|
||||
+ break;
|
||||
+ if (case_sensitivity == case_sensitive_off
|
||||
+ && (tolower ((unsigned char) *string1)
|
||||
+ != tolower ((unsigned char) *string2)))
|
||||
+ break;
|
||||
if (*string1 != '\0')
|
||||
{
|
||||
string1++;
|
||||
@@ -3027,6 +3029,10 @@ strcmp_iw (const char *string1, const ch
|
||||
strcmp_iw(LIST_ELT, NAME), then the place to start looking is right
|
||||
where this function would put NAME.
|
||||
|
||||
+ This function must be neutral to the CASE_SENSITIVITY setting as the user
|
||||
+ may choose it during later lookup. Therefore this function always sorts
|
||||
+ primarily case-insensitively and secondarily case-sensitively.
|
||||
+
|
||||
Here are some examples of why using strcmp to sort is a bad idea:
|
||||
|
||||
Whitespace example:
|
||||
@@ -3052,8 +3058,10 @@ strcmp_iw (const char *string1, const ch
|
||||
int
|
||||
strcmp_iw_ordered (const char *string1, const char *string2)
|
||||
{
|
||||
- /* Formatting stub. */
|
||||
- if (1)
|
||||
+ const char *saved_string1 = string1, *saved_string2 = string2;
|
||||
+ enum case_sensitivity case_pass = case_sensitive_off;
|
||||
+
|
||||
+ for (;;)
|
||||
{
|
||||
/* C1 and C2 are valid only if *string1 != '\0' && *string2 != '\0'.
|
||||
Provide stub characters if we are already at the end of one of the
|
||||
@@ -3067,8 +3075,17 @@ strcmp_iw_ordered (const char *string1,
|
||||
while (isspace (*string2))
|
||||
string2++;
|
||||
|
||||
+ switch (case_pass)
|
||||
+ {
|
||||
+ case case_sensitive_off:
|
||||
+ c1 = tolower ((unsigned char) *string1);
|
||||
+ c2 = tolower ((unsigned char) *string2);
|
||||
+ break;
|
||||
+ case case_sensitive_on:
|
||||
c1 = *string1;
|
||||
c2 = *string2;
|
||||
+ break;
|
||||
+ }
|
||||
if (c1 != c2)
|
||||
break;
|
||||
|
||||
@@ -3086,7 +3103,7 @@ strcmp_iw_ordered (const char *string1,
|
||||
comparison in the cases where one of them is '\0' or '('. */
|
||||
case '\0':
|
||||
if (*string2 == '\0')
|
||||
- return 0;
|
||||
+ break;
|
||||
else
|
||||
return -1;
|
||||
case '(':
|
||||
@@ -3097,9 +3114,22 @@ strcmp_iw_ordered (const char *string1,
|
||||
default:
|
||||
if (*string2 == '\0' || *string2 == '(')
|
||||
return 1;
|
||||
- else
|
||||
- return c1 - c2;
|
||||
+ else if (c1 > c2)
|
||||
+ return 1;
|
||||
+ else if (c1 < c2)
|
||||
+ return -1;
|
||||
+ /* PASSTHRU */
|
||||
}
|
||||
+
|
||||
+ if (case_pass == case_sensitive_on)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Otherwise the strings were equal in case insensitive way, make
|
||||
+ a more fine grained comparison in a case sensitive way. */
|
||||
+
|
||||
+ case_pass = case_sensitive_on;
|
||||
+ string1 = saved_string1;
|
||||
+ string2 = saved_string2;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,231 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-05/msg00002.html
|
||||
Subject: [patch] testsuite: Test readline-6.2 "ask" regression
|
||||
|
||||
Hi,
|
||||
|
||||
this problem does not affect default FSF GDB build as it is using bundled
|
||||
readline-5.1. But with system readline-6.2 and build using:
|
||||
--with-system-readline use installed readline library
|
||||
|
||||
GDB will no longer ask about displaying too many symbols and dumps them all
|
||||
immediately.
|
||||
PASS:
|
||||
$ gdb gdb
|
||||
(gdb) p <tab><tab>
|
||||
Display all 21482 possibilities? (y or n)_
|
||||
FAIL:
|
||||
$ gdb gdb
|
||||
(gdb) p <tab><tab>
|
||||
Display all 22129 possibilities? (y or n)
|
||||
../../bfd/aout-target.h cs_to_section
|
||||
../../bfd/aout32.c ctime
|
||||
<screens and screens of dumps without any question>
|
||||
|
||||
This regression will soon start affecting distros:
|
||||
FSF GDB HEAD - PASS - using bundled readline-5.1
|
||||
fedora-15 - FAIL - using system readline-6.2
|
||||
fedora-14 - PASS - using system readline-6.1
|
||||
debian-6.0 - PASS - using system readline-6.1
|
||||
kubuntu-10.10 - PASS - using system readline-6.1
|
||||
|
||||
I have asked about it on readline ml:
|
||||
Re: [Bug-readline] callback mode pager disable status
|
||||
https://lists.gnu.org/archive/html/bug-readline/2011-04/msg00012.html
|
||||
The suggested workaround (in fact the readline-5.1 code state) going to patch
|
||||
into the proposed FSF GDB bundled readline-6.2. Distros then can stop using
|
||||
--with-system-readline to still feature recent and system matching readline
|
||||
until readline-7.0 gets released.
|
||||
|
||||
This regression has been so far caught only with system debug infos installed:
|
||||
-PASS: gdb.base/completion.exp: complete (2) 'p no_var_named_this-'
|
||||
-PASS: gdb.base/completion.exp: complete 'p values[0].a'
|
||||
-PASS: gdb.base/completion.exp: complete 'p values[0] . a'
|
||||
-PASS: gdb.base/completion.exp: complete 'p &values[0] -> a'
|
||||
-PASS: gdb.base/completion.exp: copmletion of field in anonymous union
|
||||
+FAIL: gdb.base/completion.exp: (timeout) complete (2) 'p no_var_named_this-'
|
||||
+FAIL: gdb.base/completion.exp: (timeout) complete 'p values[0].a' 2
|
||||
+FAIL: gdb.base/completion.exp: (timeout) complete 'p values[0] . a' 2
|
||||
+FAIL: gdb.base/completion.exp: (timeout) complete 'p &values[0] -> a' 2
|
||||
+FAIL: gdb.base/completion.exp: copmletion of field in anonymous union
|
||||
|
||||
I will check it in with no comments.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/testsuite/
|
||||
2011-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/readline-ask.c: New file.
|
||||
* gdb.base/readline-ask.exp: New file.
|
||||
* gdb.base/readline-ask.inputrc: New file.
|
||||
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/readline-ask.c
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+int
|
||||
+symbol_01_length_40_____________________,
|
||||
+symbol_02_length_40_____________________,
|
||||
+symbol_03_length_40_____________________,
|
||||
+symbol_04_length_40_____________________,
|
||||
+symbol_10_length_40_____________________;
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/readline-ask.exp
|
||||
@@ -0,0 +1,118 @@
|
||||
+# Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile readline-ask
|
||||
+set executable ${testfile}.x
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${executable}
|
||||
+set inputrc ${srcdir}/${subdir}/${testfile}.inputrc
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
|
||||
+ untested ${testfile}.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# INPUTRC gets reset for the next testfile.
|
||||
+setenv INPUTRC $inputrc
|
||||
+clean_restart ${executable}
|
||||
+
|
||||
+gdb_test_no_output "set width 50"
|
||||
+gdb_test_no_output "set height 3"
|
||||
+
|
||||
+set cmd "p symbol_0"
|
||||
+send_gdb "$cmd\t"
|
||||
+set test "bell for more message"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "$cmd\007$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+send_gdb "\t"
|
||||
+set test "more message for 01 and 02"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "$gdb_prompt " {
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# There get some VT100 characters printed.
|
||||
+
|
||||
+send_gdb "\r"
|
||||
+set test "more message for 03"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "\rsymbol_03_length_40_____________________\r\n--More--$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# "$gdb_prompt $" will not match as $cmd gets output: $gdb_prompt p symbol_0
|
||||
+# And "$gdb_prompt p symbol_0" cannot be matched as the default "$gdb_prompt $"
|
||||
+# string from gdb_test_multiple could match earlier.
|
||||
+
|
||||
+send_gdb "\r"
|
||||
+set test "more finish for 04"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "\rsymbol_04_length_40_____________________\r\n$gdb_prompt " {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test "foo" {No symbol "symbol_0foo" in current context\.} "abort more message"
|
||||
+
|
||||
+set cmd "p symbol_"
|
||||
+send_gdb "$cmd\t"
|
||||
+set test "bell for ask message"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "$cmd\007$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+send_gdb "\t"
|
||||
+set test "ask message"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "^\r\nDisplay all 5 possibilities\\? \\(y or n\\)$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "$gdb_prompt " {
|
||||
+ fail $test
|
||||
+ return 0
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+send_gdb "y"
|
||||
+set test "ask message for 01 and 02"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# There get some VT100 characters printed.
|
||||
+# See the "$gdb_prompt " match like in "more finish for 04".
|
||||
+
|
||||
+send_gdb "n"
|
||||
+set test "ask message no"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "\r$gdb_prompt " {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test "foo" {No symbol "symbol_foo" in current context\.} "abort ask message"
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/readline-ask.inputrc
|
||||
@@ -0,0 +1,16 @@
|
||||
+# Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set completion-query-items 5
|
||||
|
@ -1,122 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-05/msg00010.html
|
||||
Subject: [patch 4/3] readline-6.2: Substitute inc-hist.texinfo
|
||||
|
||||
Hi,
|
||||
|
||||
forgot the patchset had a `make doc' regression:
|
||||
make: *** No rule to make target `../../../gdb/doc/../../readline/doc/inc-hist.texinfo', needed by `gdb.info'. Stop.
|
||||
|
||||
There was a copy hsuser.texi -> inc-hist.texinfo before with this diff:
|
||||
@@ -26,9 +26,9 @@ into another language, under the above c
|
||||
@node Using History Interactively
|
||||
@chapter Using History Interactively
|
||||
|
||||
-@ifclear BashFeatures
|
||||
-@defcodeindex bt
|
||||
-@end ifclear
|
||||
+@c @ifclear BashFeatures
|
||||
+@c @defcodeindex bt
|
||||
+@c @end ifclear
|
||||
|
||||
@ifset BashFeatures
|
||||
This chapter describes how to use the @sc{gnu} History Library
|
||||
@@ -39,9 +39,9 @@ see the @sc{gnu} Readline Library Manual
|
||||
@end ifset
|
||||
@ifclear BashFeatures
|
||||
This chapter describes how to use the @sc{gnu} History Library interactively,
|
||||
-from a user's standpoint. It should be considered a user's guide. For
|
||||
-information on using the @sc{gnu} History Library in your own programs,
|
||||
-@pxref{Programming with GNU History}.
|
||||
+from a user's standpoint. It should be considered a user's guide.
|
||||
+For information on using the @sc{gnu} History Library in other programs,
|
||||
+see the @sc{gnu} Readline Library Manual.
|
||||
@end ifclear
|
||||
|
||||
@ifset BashFeatures
|
||||
|
||||
Used slightly alternative one with IMO better reference and I have also kept
|
||||
hsuser.texi in place as readline/ in src/ is no longer a standalone readline
|
||||
distribution anyway.
|
||||
|
||||
|
||||
Sorry,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/doc/
|
||||
2011-05-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to
|
||||
hsuser.texi.
|
||||
* gdb.texinfo <!SYSTEM_READLINE>: Rename inc-hist.texinfo inclusion and
|
||||
comment to hsuser.texi. Change rluser.texi name in the comment.
|
||||
|
||||
readline/doc/
|
||||
2011-05-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* hsuser.texi (Using History Interactively): Disable !BashFeatures
|
||||
@defcodeindex. Make the `Programming with GNU History' reference
|
||||
external.
|
||||
|
||||
Index: gdb-7.2.90.20110525/gdb/doc/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/doc/Makefile.in 2011-01-03 14:01:05.000000000 +0100
|
||||
+++ gdb-7.2.90.20110525/gdb/doc/Makefile.in 2011-05-25 19:16:35.000000000 +0200
|
||||
@@ -117,7 +117,7 @@ GDB_DOC_SOURCE_INCLUDES = \
|
||||
$(srcdir)/gpl.texi \
|
||||
$(srcdir)/agentexpr.texi \
|
||||
$(READLINE_DIR)/rluser.texi \
|
||||
- $(READLINE_DIR)/inc-hist.texinfo
|
||||
+ $(READLINE_DIR)/hsuser.texi
|
||||
GDB_DOC_BUILD_INCLUDES = \
|
||||
gdb-cfg.texi \
|
||||
GDBvn.texi
|
||||
Index: gdb-7.2.90.20110525/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/doc/gdb.texinfo 2011-05-25 19:14:36.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/doc/gdb.texinfo 2011-05-25 19:17:01.000000000 +0200
|
||||
@@ -31095,13 +31095,13 @@ things without first using the debugger
|
||||
|
||||
@c The readline documentation is distributed with the readline code
|
||||
@c and consists of the two following files:
|
||||
-@c rluser.texinfo
|
||||
-@c inc-hist.texinfo
|
||||
+@c rluser.texi
|
||||
+@c hsuser.texi
|
||||
@c Use -I with makeinfo to point to the appropriate directory,
|
||||
@c environment var TEXINPUTS with TeX.
|
||||
@ifclear SYSTEM_READLINE
|
||||
@include rluser.texi
|
||||
-@include inc-hist.texinfo
|
||||
+@include hsuser.texi
|
||||
@end ifclear
|
||||
|
||||
@node In Memoriam
|
||||
Index: gdb-7.2.90.20110525/readline/doc/hsuser.texi
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/readline/doc/hsuser.texi 2011-05-25 19:16:17.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/readline/doc/hsuser.texi 2011-05-25 19:16:35.000000000 +0200
|
||||
@@ -26,9 +26,10 @@ into another language, under the above c
|
||||
@node Using History Interactively
|
||||
@chapter Using History Interactively
|
||||
|
||||
-@ifclear BashFeatures
|
||||
-@defcodeindex bt
|
||||
-@end ifclear
|
||||
+@c GDB bundling modification:
|
||||
+@c @ifclear BashFeatures
|
||||
+@c @defcodeindex bt
|
||||
+@c @end ifclear
|
||||
|
||||
@ifset BashFeatures
|
||||
This chapter describes how to use the @sc{gnu} History Library
|
||||
@@ -41,7 +42,8 @@ see the @sc{gnu} Readline Library Manual
|
||||
This chapter describes how to use the @sc{gnu} History Library interactively,
|
||||
from a user's standpoint. It should be considered a user's guide. For
|
||||
information on using the @sc{gnu} History Library in your own programs,
|
||||
-@pxref{Programming with GNU History}.
|
||||
+@c GDB bundling modification:
|
||||
+@pxref{Programming with GNU History, , , history, GNU History Library}.
|
||||
@end ifclear
|
||||
|
||||
@ifset BashFeatures
|
@ -33,12 +33,12 @@ gdb/
|
||||
|
||||
[ Context backport. ]
|
||||
|
||||
Index: gdb-7.1.90.20100711/gdb/solib-svr4.c
|
||||
Index: gdb-7.3.50.20110722/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/solib-svr4.c 2010-07-12 23:07:35.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/solib-svr4.c 2010-07-13 00:19:03.000000000 +0200
|
||||
@@ -1177,8 +1177,18 @@ svr4_current_sos (void)
|
||||
target_read_string (LM_NAME (new), &buffer,
|
||||
--- gdb-7.3.50.20110722.orig/gdb/solib-svr4.c 2011-07-22 19:26:46.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/solib-svr4.c 2011-07-22 19:29:36.000000000 +0200
|
||||
@@ -1197,8 +1197,18 @@ svr4_current_sos (void)
|
||||
target_read_string (lm_name (new), &buffer,
|
||||
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
|
||||
if (errcode != 0)
|
||||
- warning (_("Can't read pathname for load map: %s."),
|
||||
@ -58,11 +58,11 @@ Index: gdb-7.1.90.20100711/gdb/solib-svr4.c
|
||||
else
|
||||
{
|
||||
struct build_id *build_id;
|
||||
Index: gdb-7.1.90.20100711/gdb/solib.c
|
||||
Index: gdb-7.3.50.20110722/gdb/solib.c
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/solib.c 2010-05-17 01:49:58.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/solib.c 2010-07-13 00:21:01.000000000 +0200
|
||||
@@ -705,6 +705,7 @@ update_solib_list (int from_tty, struct
|
||||
--- gdb-7.3.50.20110722.orig/gdb/solib.c 2011-06-30 21:29:54.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/solib.c 2011-07-22 19:29:10.000000000 +0200
|
||||
@@ -706,6 +706,7 @@ update_solib_list (int from_tty, struct
|
||||
struct target_so_ops *ops = solib_ops (target_gdbarch);
|
||||
struct so_list *inferior = ops->current_sos();
|
||||
struct so_list *gdb, **gdb_link;
|
||||
@ -70,7 +70,7 @@ Index: gdb-7.1.90.20100711/gdb/solib.c
|
||||
|
||||
/* We can reach here due to changing solib-search-path or the
|
||||
sysroot, before having any inferior. */
|
||||
@@ -844,6 +845,12 @@ Error while mapping shared library secti
|
||||
@@ -846,6 +847,12 @@ update_solib_list (int from_tty, struct
|
||||
observer_notify_solib_loaded (i);
|
||||
}
|
||||
|
||||
|
@ -1,154 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-02/msg00679.html
|
||||
Subject: Re: [patch 1/3] Code cleanup: gdb.threads/gcore-thread.exp
|
||||
|
||||
On Thu, 24 Feb 2011 08:20:09 +0100, Joel Brobecker wrote:
|
||||
> Just a thought: Do we really need to worry about restoring
|
||||
> the timeout at the end of the testcase, given that this is
|
||||
> automatically done at the start of each testcase (see gdb.exp:
|
||||
> gdb_init)?
|
||||
|
||||
I see now:
|
||||
Re: [RFA/testsuite] Reset the timeout duration at the start of each testcase.
|
||||
http://sourceware.org/ml/gdb-patches/2010-02/msg00202.html
|
||||
commit 501c57da40fd27c8036a5fc995f750b0559272ad
|
||||
|
||||
Patch updated.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/testsuite/
|
||||
2011-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/gcore-thread.exp ($testfile): Match it the .exp
|
||||
filename.
|
||||
($srcfile): Preserve the original value.
|
||||
($testfile): Match it the .exp filename.
|
||||
($corefile): New variable. Substitute it around.
|
||||
Use clean_restart.
|
||||
($prev_timeout): Remove.
|
||||
(load_core): Move core loading into this proc.
|
||||
Fix restore of $timeout if load_core fails.
|
||||
|
||||
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
|
||||
@@ -21,11 +21,11 @@ if $tracelevel then {
|
||||
strace $tracelevel
|
||||
}
|
||||
|
||||
-
|
||||
# Single-threaded test case
|
||||
-set testfile "pthreads"
|
||||
-set srcfile ${testfile}.c
|
||||
-set binfile ${objdir}/${subdir}/gcore-${testfile}
|
||||
+set testfile "gcore-thread"
|
||||
+set srcfile pthreads.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+set corefile ${objdir}/${subdir}/${testfile}.test
|
||||
|
||||
if [istarget "*-*-linux"] then {
|
||||
set target_cflags "-D_MIT_POSIX_THREADS"
|
||||
@@ -41,10 +41,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
-gdb_exit
|
||||
-gdb_start
|
||||
-gdb_reinitialize_dir $srcdir/$subdir
|
||||
-gdb_load ${binfile}
|
||||
+clean_restart ${testfile}
|
||||
|
||||
# regexp for "horizontal" text (i.e. doesn't include newline or
|
||||
# carriage return)
|
||||
@@ -53,7 +50,6 @@ set horiz "\[^\n\r\]*"
|
||||
# regexp for newline
|
||||
set nl "\[\r\n\]+"
|
||||
|
||||
-set prev_timeout $timeout
|
||||
set timeout 30
|
||||
|
||||
gdb_test_multiple "help gcore" "help gcore" {
|
||||
@@ -92,10 +88,9 @@ delete_breakpoints
|
||||
gdb_breakpoint "thread2"
|
||||
gdb_test "continue" "Continuing.*Breakpoint.* thread2 .*" "thread 2 is running"
|
||||
|
||||
-set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
|
||||
+set escapedfilename [string_to_regexp $corefile]
|
||||
# Drop corefile
|
||||
-gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
|
||||
- "save a corefile" \
|
||||
+gdb_test_multiple "gcore $corefile" "save a corefile" \
|
||||
{
|
||||
-re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
||||
pass "save a corefile"
|
||||
@@ -114,31 +109,38 @@ if {!$core_supported} {
|
||||
return -1
|
||||
}
|
||||
|
||||
+
|
||||
# Now restart gdb and load the corefile.
|
||||
-gdb_exit
|
||||
-gdb_start
|
||||
-gdb_reinitialize_dir $srcdir/$subdir
|
||||
-gdb_load ${binfile}
|
||||
-
|
||||
-gdb_test_multiple "core ${objdir}/${subdir}/gcore.test" \
|
||||
- "re-load generated corefile" {
|
||||
- -re ".* is not a core dump:.*$gdb_prompt $" {
|
||||
- fail "re-load generated corefile (bad file format)"
|
||||
- # No use proceeding from here.
|
||||
- return;
|
||||
- }
|
||||
- -re ".*: No such file or directory.*$gdb_prompt $" {
|
||||
- fail "re-load generated corefile (file not found)"
|
||||
- # No use proceeding from here.
|
||||
- return;
|
||||
- }
|
||||
- -re ".*Couldn't find .* registers in core file.*$gdb_prompt $" {
|
||||
- fail "re-load generated corefile (incomplete note section)"
|
||||
- }
|
||||
- -re "Core was generated by .*$gdb_prompt $" {
|
||||
- pass "re-load generated corefile"
|
||||
+clean_restart ${testfile}
|
||||
+
|
||||
+proc load_core { corefile } {
|
||||
+ global gdb_prompt
|
||||
+
|
||||
+ gdb_test_multiple "core $corefile" \
|
||||
+ "re-load generated corefile" {
|
||||
+ -re " is not a core dump:.*\r\n$gdb_prompt $" {
|
||||
+ fail "re-load generated corefile (bad file format)"
|
||||
+ # No use proceeding from here.
|
||||
+ return 0;
|
||||
+ }
|
||||
+ -re ": No such file or directory.*\r\n$gdb_prompt $" {
|
||||
+ fail "re-load generated corefile (file not found)"
|
||||
+ # No use proceeding from here.
|
||||
+ return 0;
|
||||
+ }
|
||||
+ -re "Couldn't find .* registers in core file.*\r\n$gdb_prompt $" {
|
||||
+ fail "re-load generated corefile (incomplete note section)"
|
||||
+ }
|
||||
+ -re "Core was generated by .*\r\n$gdb_prompt $" {
|
||||
+ pass "re-load generated corefile"
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+if ![load_core $corefile] {
|
||||
+ return
|
||||
+}
|
||||
|
||||
# FIXME: now what can we test about the thread state?
|
||||
# We do not know for certain that there should be at least
|
||||
@@ -158,5 +160,3 @@ gdb_test "info threads" ".* thread2 .*" \
|
||||
|
||||
gdb_test "info threads" ".*${nl}\\* ${horiz} thread2 .*" \
|
||||
"thread2 is current thread in corefile"
|
||||
-
|
||||
-set timeout $prev_timeout
|
||||
|
@ -1,102 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-02/msg00680.html
|
||||
Subject: [patch 2/3] Fix threading internal error on corrupted memory [rediff]
|
||||
|
||||
[rediff]
|
||||
|
||||
gdb/
|
||||
2011-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* linux-thread-db.c (find_new_threads_callback): Exit on zero TI_TID
|
||||
even if !TARGET_HAS_EXECUTION.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/gcore-thread.exp ($core0file): New variable.
|
||||
(clear __stack_user.next, clear stack_used.next)
|
||||
(save a zeroed-threads corefile): New test.
|
||||
Call core_load for $core0file.
|
||||
(zeroed-threads cannot be listed): New test.
|
||||
|
||||
--- a/gdb/linux-thread-db.c
|
||||
+++ b/gdb/linux-thread-db.c
|
||||
@@ -1335,7 +1335,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
|
||||
return 0; /* A zombie -- ignore. */
|
||||
|
||||
- if (ti.ti_tid == 0 && target_has_execution)
|
||||
+ if (ti.ti_tid == 0)
|
||||
{
|
||||
/* A thread ID of zero means that this is the main thread, but
|
||||
glibc has not yet initialized thread-local storage and the
|
||||
@@ -1347,10 +1347,13 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
need this glibc bug workaround. */
|
||||
info->need_stale_parent_threads_check = 0;
|
||||
|
||||
- err = info->td_thr_event_enable_p (th_p, 1);
|
||||
- if (err != TD_OK)
|
||||
- error (_("Cannot enable thread event reporting for LWP %d: %s"),
|
||||
- (int) ti.ti_lid, thread_db_err_str (err));
|
||||
+ if (target_has_execution)
|
||||
+ {
|
||||
+ err = info->td_thr_event_enable_p (th_p, 1);
|
||||
+ if (err != TD_OK)
|
||||
+ error (_("Cannot enable thread event reporting for LWP %d: %s"),
|
||||
+ (int) ti.ti_lid, thread_db_err_str (err));
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
|
||||
@@ -26,6 +26,7 @@ set testfile "gcore-thread"
|
||||
set srcfile pthreads.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
set corefile ${objdir}/${subdir}/${testfile}.test
|
||||
+set core0file ${objdir}/${subdir}/${testfile}0.test
|
||||
|
||||
if [istarget "*-*-linux"] then {
|
||||
set target_cflags "-D_MIT_POSIX_THREADS"
|
||||
@@ -110,6 +111,29 @@ if {!$core_supported} {
|
||||
}
|
||||
|
||||
|
||||
+# Test the uninitialized thread list.
|
||||
+# Provide the case of glibc td_thr_get_info handling of:
|
||||
+# /* Special case for the main thread before initialization. */
|
||||
+
|
||||
+foreach symbol {__stack_user stack_used} {
|
||||
+ set test "clear ${symbol}.next"
|
||||
+ gdb_test_multiple "p *(void **) &${symbol} = 0" $test {
|
||||
+ -re " = \\(void \\*\\) 0x0\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "No symbol \"${symbol}\" in current context\\.\r\n$gdb_prompt $" {
|
||||
+ xfail $test
|
||||
+ # Do not do the verification.
|
||||
+ set core0file ""
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if {"$core0file" != ""} {
|
||||
+ gdb_test "gcore $core0file" "Saved corefile .*" "save a zeroed-threads corefile"
|
||||
+}
|
||||
+
|
||||
+
|
||||
# Now restart gdb and load the corefile.
|
||||
clean_restart ${testfile}
|
||||
|
||||
@@ -160,3 +184,11 @@ gdb_test "info threads" ".* thread2 .*" \
|
||||
|
||||
gdb_test "info threads" ".*${nl}\\* ${horiz} thread2 .*" \
|
||||
"thread2 is current thread in corefile"
|
||||
+
|
||||
+
|
||||
+# Test the uninitialized thread list.
|
||||
+
|
||||
+if {"$core0file" != "" && [load_core $core0file]} {
|
||||
+
|
||||
+ gdb_test "info threads" "Cannot find new threads: .*" "zeroed-threads cannot be listed"
|
||||
+}
|
||||
|
@ -1,101 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-02/msg00675.html
|
||||
Subject: [patch 3/3] Display core reasons even during thread error
|
||||
|
||||
[ rediff ]
|
||||
|
||||
Hi,
|
||||
|
||||
this is mostly unrelated. But after the patch 2/3 it will still FAIL:
|
||||
Loaded symbols for /lib64/ld-linux-x86-64.so.2
|
||||
Cannot find new threads: debugger service failed
|
||||
(gdb) FAIL: gdb.threads/gcore-thread.exp: re-load generated corefile
|
||||
|
||||
as it is a common bug I dislike for years I have fixed it here:
|
||||
Loaded symbols for /lib64/ld-linux-x86-64.so.2
|
||||
Cannot find new threads: debugger service failed
|
||||
Core was generated by `.../gdb/testsuite/gdb.threads/gcore-thread'.
|
||||
Program terminated with signal 5, Trace/breakpoint trap.
|
||||
#0 thread2 (arg=0xdeadbeef) at ./gdb.threads/pthreads.c:91
|
||||
91 int k = 0;
|
||||
(gdb) PASS: gdb.threads/gcore-thread.exp: re-load generated corefile
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* corelow.c: Include wrapper.h.
|
||||
(core_open): Call now gdb_target_find_new_threads.
|
||||
* wrapper.c: Include target.h.
|
||||
(gdb_target_find_new_threads): New.
|
||||
* wrapper.h (gdb_target_find_new_threads): New declaration.
|
||||
|
||||
--- a/gdb/corelow.c
|
||||
+++ b/gdb/corelow.c
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "auxv.h"
|
||||
#include "elf/common.h"
|
||||
#include "gdbcmd.h"
|
||||
+#include "wrapper.h"
|
||||
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
@@ -428,7 +429,7 @@ core_open (char *filename, int from_tty)
|
||||
may be a thread_stratum target loaded on top of target core by
|
||||
now. The layer above should claim threads found in the BFD
|
||||
sections. */
|
||||
- target_find_new_threads ();
|
||||
+ gdb_target_find_new_threads ();
|
||||
|
||||
p = bfd_core_file_failing_command (core_bfd);
|
||||
if (p)
|
||||
--- a/gdb/wrapper.c
|
||||
+++ b/gdb/wrapper.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "exceptions.h"
|
||||
#include "wrapper.h"
|
||||
#include "ui-out.h"
|
||||
+#include "target.h"
|
||||
|
||||
int
|
||||
gdb_parse_exp_1 (char **stringptr, struct block *block, int comma,
|
||||
@@ -161,3 +162,24 @@ gdb_value_struct_elt (struct ui_out *uiout, struct value **result,
|
||||
return GDB_RC_FAIL;
|
||||
return GDB_RC_OK;
|
||||
}
|
||||
+
|
||||
+/* Call target_find_new_threads without throwing exception. Exception is
|
||||
+ printed if it got thrown. */
|
||||
+
|
||||
+int
|
||||
+gdb_target_find_new_threads (void)
|
||||
+{
|
||||
+ volatile struct gdb_exception except;
|
||||
+
|
||||
+ TRY_CATCH (except, RETURN_MASK_ERROR)
|
||||
+ {
|
||||
+ target_find_new_threads ();
|
||||
+ }
|
||||
+
|
||||
+ if (except.reason < 0)
|
||||
+ {
|
||||
+ exception_print (gdb_stderr, except);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
--- a/gdb/wrapper.h
|
||||
+++ b/gdb/wrapper.h
|
||||
@@ -48,4 +48,6 @@ extern int gdb_value_ind (struct value *val, struct value ** rval);
|
||||
|
||||
extern int gdb_parse_and_eval_type (char *, int, struct type **);
|
||||
|
||||
+extern int gdb_target_find_new_threads (void);
|
||||
+
|
||||
#endif /* wrapper.h */
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c 2011-05-25 17:06:19.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/dwarf2read.c 2011-05-25 17:10:46.000000000 +0200
|
||||
@@ -7665,12 +7665,14 @@ read_set_type (struct die_info *die, str
|
||||
--- gdb-7.3.50.20110722.orig/gdb/dwarf2read.c 2011-07-22 20:12:05.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/dwarf2read.c 2011-07-22 20:17:22.000000000 +0200
|
||||
@@ -7969,12 +7969,14 @@ read_set_type (struct die_info *die, str
|
||||
return set_die_type (die, set_type, cu);
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
struct attribute *attr;
|
||||
struct symbol *sym;
|
||||
CORE_ADDR base = (CORE_ADDR) 0;
|
||||
@@ -7695,20 +7697,67 @@ read_common_block (struct die_info *die,
|
||||
@@ -7999,20 +8001,67 @@ read_common_block (struct die_info *die,
|
||||
}
|
||||
if (die->child != NULL)
|
||||
{
|
||||
@ -87,7 +87,7 @@ Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11376,6 +11425,13 @@ new_symbol_full (struct die_info *die, s
|
||||
@@ -11695,6 +11744,13 @@ new_symbol_full (struct die_info *die, s
|
||||
{
|
||||
var_decode_location (attr, sym, cu);
|
||||
attr2 = dwarf2_attr (die, DW_AT_external, cu);
|
||||
@ -101,7 +101,7 @@ Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
if (SYMBOL_CLASS (sym) == LOC_STATIC
|
||||
&& SYMBOL_VALUE_ADDRESS (sym) == 0
|
||||
&& !dwarf2_per_objfile->has_section_at_zero)
|
||||
@@ -11548,6 +11604,11 @@ new_symbol_full (struct die_info *die, s
|
||||
@@ -11867,6 +11923,11 @@ new_symbol_full (struct die_info *die, s
|
||||
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
||||
list_to_add = &global_symbols;
|
||||
break;
|
||||
@ -113,11 +113,11 @@ Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
default:
|
||||
/* Not a tag we recognize. Hopefully we aren't processing
|
||||
trash data, but since we must specifically ignore things
|
||||
Index: gdb-7.2.90.20110525/gdb/f-lang.c
|
||||
Index: gdb-7.3.50.20110722/gdb/f-lang.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/f-lang.c 2011-05-25 17:06:22.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/f-lang.c 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -446,27 +446,3 @@ _initialize_f_language (void)
|
||||
--- gdb-7.3.50.20110722.orig/gdb/f-lang.c 2011-07-22 20:17:16.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/f-lang.c 2011-07-22 20:17:22.000000000 +0200
|
||||
@@ -371,27 +371,3 @@ _initialize_f_language (void)
|
||||
|
||||
add_language (&f_language_defn);
|
||||
}
|
||||
@ -145,10 +145,10 @@ Index: gdb-7.2.90.20110525/gdb/f-lang.c
|
||||
- }
|
||||
- return (NULL);
|
||||
-}
|
||||
Index: gdb-7.2.90.20110525/gdb/f-lang.h
|
||||
Index: gdb-7.3.50.20110722/gdb/f-lang.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/f-lang.h 2011-05-25 17:06:22.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/f-lang.h 2011-05-25 17:07:02.000000000 +0200
|
||||
--- gdb-7.3.50.20110722.orig/gdb/f-lang.h 2011-07-22 20:17:16.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/f-lang.h 2011-07-22 20:17:22.000000000 +0200
|
||||
@@ -52,36 +52,8 @@ enum f90_range_type
|
||||
NONE_BOUND_DEFAULT /* "(low:high)" */
|
||||
};
|
||||
@ -186,11 +186,11 @@ Index: gdb-7.2.90.20110525/gdb/f-lang.h
|
||||
|
||||
/* When reasonable array bounds cannot be fetched, such as when
|
||||
you ask to 'mt print symbols' and there is no stack frame and
|
||||
Index: gdb-7.2.90.20110525/gdb/f-valprint.c
|
||||
Index: gdb-7.3.50.20110722/gdb/f-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/f-valprint.c 2011-05-25 17:06:22.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/f-valprint.c 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -34,6 +34,8 @@
|
||||
--- gdb-7.3.50.20110722.orig/gdb/f-valprint.c 2011-07-22 20:17:16.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/f-valprint.c 2011-07-22 20:18:26.000000000 +0200
|
||||
@@ -34,10 +34,11 @@
|
||||
#include "gdbcore.h"
|
||||
#include "command.h"
|
||||
#include "block.h"
|
||||
@ -199,7 +199,11 @@ Index: gdb-7.2.90.20110525/gdb/f-valprint.c
|
||||
|
||||
extern void _initialize_f_valprint (void);
|
||||
static void info_common_command (char *, int);
|
||||
@@ -501,22 +503,54 @@ f_val_print (struct type *type, const gd
|
||||
-static void list_all_visible_commons (char *);
|
||||
static void f77_create_arrayprint_offset_tbl (struct type *,
|
||||
struct ui_file *);
|
||||
static void f77_get_dynamic_length_of_aggregate (struct type *);
|
||||
@@ -515,22 +516,54 @@ f_val_print (struct type *type, const gd
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -267,7 +271,7 @@ Index: gdb-7.2.90.20110525/gdb/f-valprint.c
|
||||
}
|
||||
|
||||
/* This function is used to print out the values in a given COMMON
|
||||
@@ -526,11 +560,9 @@ list_all_visible_commons (char *funname)
|
||||
@@ -540,11 +573,9 @@ list_all_visible_commons (char *funname)
|
||||
static void
|
||||
info_common_command (char *comname, int from_tty)
|
||||
{
|
||||
@ -281,7 +285,7 @@ Index: gdb-7.2.90.20110525/gdb/f-valprint.c
|
||||
|
||||
/* We have been told to display the contents of F77 COMMON
|
||||
block supposedly visible in this function. Let us
|
||||
@@ -542,74 +574,31 @@ info_common_command (char *comname, int
|
||||
@@ -556,74 +587,31 @@ info_common_command (char *comname, int
|
||||
/* The following is generally ripped off from stack.c's routine
|
||||
print_frame_info(). */
|
||||
|
||||
@ -372,11 +376,11 @@ Index: gdb-7.2.90.20110525/gdb/f-valprint.c
|
||||
}
|
||||
|
||||
void
|
||||
Index: gdb-7.2.90.20110525/gdb/stack.c
|
||||
Index: gdb-7.3.50.20110722/gdb/stack.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/stack.c 2011-05-25 17:05:21.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/stack.c 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -1525,6 +1525,8 @@ iterate_over_block_locals (struct block
|
||||
--- gdb-7.3.50.20110722.orig/gdb/stack.c 2011-07-22 20:12:05.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/stack.c 2011-07-22 20:17:22.000000000 +0200
|
||||
@@ -1524,6 +1524,8 @@ iterate_over_block_locals (struct block
|
||||
case LOC_COMPUTED:
|
||||
if (SYMBOL_IS_ARGUMENT (sym))
|
||||
break;
|
||||
@ -385,26 +389,26 @@ Index: gdb-7.2.90.20110525/gdb/stack.c
|
||||
(*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
|
||||
break;
|
||||
|
||||
Index: gdb-7.2.90.20110525/gdb/symtab.h
|
||||
Index: gdb-7.3.50.20110722/gdb/symtab.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/symtab.h 2011-05-25 17:05:21.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/symtab.h 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -411,7 +411,10 @@ typedef enum domain_enum_tag
|
||||
TYPES_DOMAIN,
|
||||
--- gdb-7.3.50.20110722.orig/gdb/symtab.h 2011-07-22 20:12:05.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/symtab.h 2011-07-22 20:18:58.000000000 +0200
|
||||
@@ -396,7 +396,10 @@ typedef enum domain_enum_tag
|
||||
|
||||
/* Any type. */
|
||||
- ALL_DOMAIN
|
||||
+ ALL_DOMAIN,
|
||||
/* LABEL_DOMAIN may be used for names of labels (for gotos). */
|
||||
|
||||
- LABEL_DOMAIN
|
||||
+ LABEL_DOMAIN,
|
||||
+
|
||||
+ /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN. */
|
||||
+ COMMON_BLOCK_DOMAIN
|
||||
}
|
||||
domain_enum;
|
||||
} domain_enum;
|
||||
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
/* Searching domains, used for `search_symbols'. Element numbers are
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.exp 2011-05-25 17:07:02.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.fortran/common-block.exp 2011-07-22 20:17:22.000000000 +0200
|
||||
@@ -0,0 +1,101 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -428,7 +432,7 @@ Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
+set srcfile ${testfile}.f90
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
|
||||
+ untested "Couldn't compile ${srcfile}"
|
||||
+ return -1
|
||||
+}
|
||||
@ -507,10 +511,10 @@ Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
+gdb_test "p ix_x" " = 1 *" "p ix_x in"
|
||||
+gdb_test "p iy_y" " = 2 *" "p iy_y in"
|
||||
+gdb_test "p iz_z2" " = 3 *" "p iz_z2 in"
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.f90
|
||||
Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.fortran/common-block.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.f90 2011-05-25 17:07:02.000000000 +0200
|
||||
+++ gdb-7.3.50.20110722/gdb/testsuite/gdb.fortran/common-block.f90 2011-07-22 20:17:22.000000000 +0200
|
||||
@@ -0,0 +1,67 @@
|
||||
+! Copyright 2008 Free Software Foundation, Inc.
|
||||
+!
|
||||
|
@ -1,24 +1,655 @@
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 6a98d57..9fa9c3c 100644
|
||||
http://sourceware.org/ml/gdb-patches/2011-07/msg00645.html
|
||||
Subject: [patch] workaround gcc46: prologue skip skips too far (PR 12435) #2
|
||||
|
||||
Hi,
|
||||
|
||||
this is an improved patch of a former:
|
||||
[patch] workaround gcc46: prologue skip skips too far (PR 12435)
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg01108.html
|
||||
cancel/FYI: Re: [patch] workaround gcc46: prologue skip skips too far (PR 12435)
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg01123.html
|
||||
|
||||
For example `break error' does not work for debugging GDB with gcc-4.6.x.
|
||||
|
||||
As gcc-4.6.0 and now even 4.6.1 still has this bug and I have seen a user(s?)
|
||||
on non-Fedora platform asking about this bug and as there may be enough
|
||||
binaries out there (although it affects only -O0 -g compilation) coded it
|
||||
properly I have coded the workaround properly this time.
|
||||
|
||||
It does not solve overlays well, but the code just does not work for overlays,
|
||||
it has no other negative effect.
|
||||
|
||||
I will update the code after FSF gcc gets fixed to minimize the workaround.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu.
|
||||
|
||||
I would welcome a comment whether it is suitable for FSF GDB.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-07-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR breakpoints/12435
|
||||
* amd64-tdep.c (amd64_skip_prologue): New variables start_pc_sal,
|
||||
next_sal, buf, offset and xmmreg. Advance PC if it sees the PR.
|
||||
* dwarf2read.c (process_full_comp_unit): Initialize
|
||||
amd64_prologue_line_bug.
|
||||
* symtab.h (struct symtab): New field amd64_prologue_line_bug.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-07-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR breakpoints/12435
|
||||
* gdb.arch/amd64-prologue-xmm.c: New file.
|
||||
* gdb.arch/amd64-prologue-xmm.exp: New file.
|
||||
* gdb.arch/amd64-prologue-xmm.s: New file.
|
||||
|
||||
--- a/gdb/amd64-tdep.c
|
||||
+++ b/gdb/amd64-tdep.c
|
||||
@@ -1902,6 +1902,9 @@ amd64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
|
||||
{
|
||||
struct amd64_frame_cache cache;
|
||||
CORE_ADDR pc;
|
||||
+ struct symtab_and_line start_pc_sal, next_sal;
|
||||
+ gdb_byte buf[4 + 8 * 7];
|
||||
+ int offset, xmmreg;
|
||||
|
||||
amd64_init_frame_cache (&cache);
|
||||
pc = amd64_analyze_prologue (gdbarch, start_pc, 0xffffffffffffffffLL,
|
||||
@@ -1909,7 +1912,71 @@ amd64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
|
||||
if (cache.frameless_p)
|
||||
return start_pc;
|
||||
|
||||
- return pc;
|
||||
+ /* GCC PR debug/48827 produced false prologue end:
|
||||
+ 84 c0 test %al,%al
|
||||
+ 74 23 je after
|
||||
+ <-- here is 0 lines advance - the false prologue end marker.
|
||||
+ 0f 29 85 70 ff ff ff movaps %xmm0,-0x90(%rbp)
|
||||
+ 0f 29 4d 80 movaps %xmm1,-0x80(%rbp)
|
||||
+ 0f 29 55 90 movaps %xmm2,-0x70(%rbp)
|
||||
+ 0f 29 5d a0 movaps %xmm3,-0x60(%rbp)
|
||||
+ 0f 29 65 b0 movaps %xmm4,-0x50(%rbp)
|
||||
+ 0f 29 6d c0 movaps %xmm5,-0x40(%rbp)
|
||||
+ 0f 29 75 d0 movaps %xmm6,-0x30(%rbp)
|
||||
+ 0f 29 7d e0 movaps %xmm7,-0x20(%rbp)
|
||||
+ after: */
|
||||
+
|
||||
+ if (pc == start_pc)
|
||||
+ return pc;
|
||||
+
|
||||
+ start_pc_sal = find_pc_sect_line (start_pc, NULL, 0);
|
||||
+ if (start_pc_sal.symtab == NULL
|
||||
+ || !start_pc_sal.symtab->amd64_prologue_line_bug
|
||||
+ || start_pc_sal.pc != start_pc || pc >= start_pc_sal.end)
|
||||
+ return pc;
|
||||
+
|
||||
+ next_sal = find_pc_sect_line (start_pc_sal.end, NULL, 0);
|
||||
+ if (next_sal.line != start_pc_sal.line)
|
||||
+ return pc;
|
||||
+
|
||||
+ /* START_PC can be from overlayed memory, ignored here. */
|
||||
+ if (target_read_memory (next_sal.pc - 4, buf, sizeof (buf)) != 0)
|
||||
+ return pc;
|
||||
+
|
||||
+ /* test %al,%al */
|
||||
+ if (buf[0] != 0x84 || buf[1] != 0xc0)
|
||||
+ return pc;
|
||||
+ /* je AFTER */
|
||||
+ if (buf[2] != 0x74)
|
||||
+ return pc;
|
||||
+
|
||||
+ offset = 4;
|
||||
+ for (xmmreg = 0; xmmreg < 8; xmmreg++)
|
||||
+ {
|
||||
+ /* movaps %xmmreg?,-0x??(%rbp) */
|
||||
+ if (buf[offset] != 0x0f || buf[offset + 1] != 0x29
|
||||
+ || (buf[offset + 2] & 0b00111111) != (xmmreg << 3 | 0b101))
|
||||
+ return pc;
|
||||
+
|
||||
+ if ((buf[offset + 2] & 0b11000000) == 0b01000000)
|
||||
+ {
|
||||
+ /* 8-bit displacement. */
|
||||
+ offset += 4;
|
||||
+ }
|
||||
+ else if ((buf[offset + 2] & 0b11000000) == 0b10000000)
|
||||
+ {
|
||||
+ /* 32-bit displacement. */
|
||||
+ offset += 7;
|
||||
+ }
|
||||
+ else
|
||||
+ return pc;
|
||||
+ }
|
||||
+
|
||||
+ /* je AFTER */
|
||||
+ if (offset - 4 != buf[3])
|
||||
+ return pc;
|
||||
+
|
||||
+ return next_sal.end;
|
||||
}
|
||||
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -10371,6 +10371,9 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
||||
@@ -4818,6 +4818,9 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu)
|
||||
|
||||
if (op_code >= lh->opcode_base)
|
||||
{
|
||||
+ CORE_ADDR saved_address = address;
|
||||
+ unsigned int saved_line = line;
|
||||
if (gcc_4_minor >= 5)
|
||||
symtab->epilogue_unwind_valid = 1;
|
||||
+
|
||||
/* Special operand. */
|
||||
adj_opcode = op_code - lh->opcode_base;
|
||||
address += (((op_index + (adj_opcode / lh->line_range))
|
||||
@@ -10383,7 +10386,8 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
||||
dwarf2_debug_line_missing_file_complaint ();
|
||||
/* For now we ignore lines not starting on an
|
||||
instruction boundary. */
|
||||
- else if (op_index == 0)
|
||||
+ else if (op_index == 0
|
||||
+ && (address != saved_address || line != saved_line))
|
||||
{
|
||||
lh->file_names[file - 1].included_p = 1;
|
||||
if (!decode_for_pst_p && is_stmt)
|
||||
+ if (gcc_4_minor >= 6)
|
||||
+ symtab->amd64_prologue_line_bug = 1;
|
||||
}
|
||||
|
||||
if (dwarf2_per_objfile->using_index)
|
||||
--- a/gdb/symtab.h
|
||||
+++ b/gdb/symtab.h
|
||||
@@ -784,6 +784,11 @@ struct symtab
|
||||
|
||||
unsigned int epilogue_unwind_valid : 1;
|
||||
|
||||
+ /* At least GCC 4.6.0 and 4.6.1 can produce invalid false prologue and marker
|
||||
+ on amd64. This flag is set independently of the symtab arch. */
|
||||
+
|
||||
+ unsigned amd64_prologue_line_bug : 1;
|
||||
+
|
||||
/* The macro table for this symtab. Like the blockvector, this
|
||||
may be shared between different symtabs --- and normally is for
|
||||
all the symtabs in a given compilation unit. */
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.c
|
||||
@@ -0,0 +1,38 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+static volatile int v, fail;
|
||||
+
|
||||
+static void
|
||||
+func (int i, ...)
|
||||
+{
|
||||
+ v = i;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+marker (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ func (1);
|
||||
+ fail = 1;
|
||||
+ marker ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
|
||||
@@ -0,0 +1,46 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# Test GCC PR debug/48827 workaround in GDB.
|
||||
+
|
||||
+set testfile "amd64-prologue-xmm"
|
||||
+set srcfile ${testfile}.s
|
||||
+set csrcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}.x
|
||||
+set opts {}
|
||||
+
|
||||
+if [info exists COMPILE] {
|
||||
+ # make check RUNTESTFLAGS='gdb.arch/amd64-prologue-xmm.exp COMPILE=1'
|
||||
+ set srcfile ${csrcfile}
|
||||
+ lappend opts debug optimize=-O0
|
||||
+} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
||||
+ verbose "Skipping amd64-prologue-xmm test."
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint "func"
|
||||
+gdb_breakpoint "marker"
|
||||
+
|
||||
+gdb_continue_to_breakpoint "func"
|
||||
+
|
||||
+gdb_test "p fail" " = 0" "stopped at func"
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.s
|
||||
@@ -0,0 +1,400 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* This file is compiled from gdb.arch/amd64-prologue-xmm.c
|
||||
+ using -g -dA -S. */
|
||||
+
|
||||
+ .file "amd64-prologue-xmm.c"
|
||||
+ .text
|
||||
+.Ltext0:
|
||||
+ .local v
|
||||
+ .comm v,4,4
|
||||
+ .local fail
|
||||
+ .comm fail,4,4
|
||||
+ .type func, @function
|
||||
+func:
|
||||
+.LFB0:
|
||||
+ .file 1 "gdb.arch/amd64-prologue-xmm.c"
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:22
|
||||
+ .loc 1 22 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ subq $72, %rsp
|
||||
+ movq %rsi, -168(%rbp)
|
||||
+ movq %rdx, -160(%rbp)
|
||||
+ movq %rcx, -152(%rbp)
|
||||
+ movq %r8, -144(%rbp)
|
||||
+ movq %r9, -136(%rbp)
|
||||
+ testb %al, %al
|
||||
+ je .L2
|
||||
+ # basic block 3
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:22
|
||||
+ .loc 1 22 0
|
||||
+ movaps %xmm0, -128(%rbp)
|
||||
+ movaps %xmm1, -112(%rbp)
|
||||
+ movaps %xmm2, -96(%rbp)
|
||||
+ movaps %xmm3, -80(%rbp)
|
||||
+ movaps %xmm4, -64(%rbp)
|
||||
+ movaps %xmm5, -48(%rbp)
|
||||
+ movaps %xmm6, -32(%rbp)
|
||||
+ movaps %xmm7, -16(%rbp)
|
||||
+.L2:
|
||||
+ # basic block 4
|
||||
+ movl %edi, -180(%rbp)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:23
|
||||
+ .loc 1 23 0
|
||||
+ movl -180(%rbp), %eax
|
||||
+ movl %eax, v(%rip)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:24
|
||||
+ .loc 1 24 0
|
||||
+ leave
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE0:
|
||||
+ .size func, .-func
|
||||
+ .type marker, @function
|
||||
+marker:
|
||||
+.LFB1:
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:28
|
||||
+ .loc 1 28 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:29
|
||||
+ .loc 1 29 0
|
||||
+ popq %rbp
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE1:
|
||||
+ .size marker, .-marker
|
||||
+ .globl main
|
||||
+ .type main, @function
|
||||
+main:
|
||||
+.LFB2:
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:33
|
||||
+ .loc 1 33 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:34
|
||||
+ .loc 1 34 0
|
||||
+ movl $1, %edi
|
||||
+ movl $0, %eax
|
||||
+ call func
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:35
|
||||
+ .loc 1 35 0
|
||||
+ movl $1, fail(%rip)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:36
|
||||
+ .loc 1 36 0
|
||||
+ call marker
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:37
|
||||
+ .loc 1 37 0
|
||||
+ movl $0, %eax
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:38
|
||||
+ .loc 1 38 0
|
||||
+ popq %rbp
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE2:
|
||||
+ .size main, .-main
|
||||
+.Letext0:
|
||||
+ .section .debug_info,"",@progbits
|
||||
+.Ldebug_info0:
|
||||
+ .long 0xc0 # Length of Compilation Unit Info
|
||||
+ .value 0x4 # DWARF version number
|
||||
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
|
||||
+ .byte 0x8 # Pointer Size (in bytes)
|
||||
+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
|
||||
+ .long .LASF1 # DW_AT_producer: "GNU C 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+ .byte 0x1 # DW_AT_language
|
||||
+ .long .LASF2 # DW_AT_name: "gdb.arch/amd64-prologue-xmm.c"
|
||||
+ .long .LASF3 # DW_AT_comp_dir: ""
|
||||
+ .quad .Ltext0 # DW_AT_low_pc
|
||||
+ .quad .Letext0 # DW_AT_high_pc
|
||||
+ .long .Ldebug_line0 # DW_AT_stmt_list
|
||||
+ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
|
||||
+ .long .LASF4 # DW_AT_name: "func"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .quad .LFB0 # DW_AT_low_pc
|
||||
+ .quad .LFE0 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .long 0x59 # DW_AT_sibling
|
||||
+ .uleb128 0x3 # (DIE (0x4a) DW_TAG_formal_parameter)
|
||||
+ .ascii "i\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .uleb128 0x3 # DW_AT_location
|
||||
+ .byte 0x91 # DW_OP_fbreg
|
||||
+ .sleb128 -196
|
||||
+ .uleb128 0x4 # (DIE (0x57) DW_TAG_unspecified_parameters)
|
||||
+ .byte 0 # end of children of DIE 0x2d
|
||||
+ .uleb128 0x5 # (DIE (0x59) DW_TAG_base_type)
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+ .byte 0x5 # DW_AT_encoding
|
||||
+ .ascii "int\0" # DW_AT_name
|
||||
+ .uleb128 0x6 # (DIE (0x60) DW_TAG_subprogram)
|
||||
+ .long .LASF5 # DW_AT_name: "marker"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x1b # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .quad .LFB1 # DW_AT_low_pc
|
||||
+ .quad .LFE1 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .uleb128 0x7 # (DIE (0x79) DW_TAG_subprogram)
|
||||
+ # DW_AT_external
|
||||
+ .long .LASF6 # DW_AT_name: "main"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x20 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .quad .LFB2 # DW_AT_low_pc
|
||||
+ .quad .LFE2 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_tail_call_sites
|
||||
+ .uleb128 0x8 # (DIE (0x96) DW_TAG_variable)
|
||||
+ .ascii "v\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x12 # DW_AT_decl_line
|
||||
+ .long 0xa9 # DW_AT_type
|
||||
+ .uleb128 0x9 # DW_AT_location
|
||||
+ .byte 0x3 # DW_OP_addr
|
||||
+ .quad v
|
||||
+ .uleb128 0x9 # (DIE (0xa9) DW_TAG_volatile_type)
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .uleb128 0xa # (DIE (0xae) DW_TAG_variable)
|
||||
+ .long .LASF0 # DW_AT_name: "fail"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x12 # DW_AT_decl_line
|
||||
+ .long 0xa9 # DW_AT_type
|
||||
+ .uleb128 0x9 # DW_AT_location
|
||||
+ .byte 0x3 # DW_OP_addr
|
||||
+ .quad fail
|
||||
+ .byte 0 # end of children of DIE 0xb
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
+.Ldebug_abbrev0:
|
||||
+ .uleb128 0x1 # (abbrev code)
|
||||
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x25 # (DW_AT_producer)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x13 # (DW_AT_language)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x1b # (DW_AT_comp_dir)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x10 # (DW_AT_stmt_list)
|
||||
+ .uleb128 0x17 # (DW_FORM_sec_offset)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x2 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x1 # (DW_AT_sibling)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x3 # (abbrev code)
|
||||
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x4 # (abbrev code)
|
||||
+ .uleb128 0x18 # (TAG: DW_TAG_unspecified_parameters)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x5 # (abbrev code)
|
||||
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0xb # (DW_AT_byte_size)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3e # (DW_AT_encoding)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x6 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x7 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3f # (DW_AT_external)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2116 # (DW_AT_GNU_all_tail_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x8 # (abbrev code)
|
||||
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x9 # (abbrev code)
|
||||
+ .uleb128 0x35 # (TAG: DW_TAG_volatile_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xa # (abbrev code)
|
||||
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .section .debug_aranges,"",@progbits
|
||||
+ .long 0x2c # Length of Address Ranges Info
|
||||
+ .value 0x2 # DWARF Version
|
||||
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
|
||||
+ .byte 0x8 # Size of Address
|
||||
+ .byte 0 # Size of Segment Descriptor
|
||||
+ .value 0 # Pad to 16 byte boundary
|
||||
+ .value 0
|
||||
+ .quad .Ltext0 # Address
|
||||
+ .quad .Letext0-.Ltext0 # Length
|
||||
+ .quad 0
|
||||
+ .quad 0
|
||||
+ .section .debug_line,"",@progbits
|
||||
+.Ldebug_line0:
|
||||
+ .section .debug_str,"MS",@progbits,1
|
||||
+.LASF3:
|
||||
+ .string ""
|
||||
+.LASF0:
|
||||
+ .string "fail"
|
||||
+.LASF4:
|
||||
+ .string "func"
|
||||
+.LASF1:
|
||||
+ .string "GNU C 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+.LASF2:
|
||||
+ .string "gdb.arch/amd64-prologue-xmm.c"
|
||||
+.LASF5:
|
||||
+ .string "marker"
|
||||
+.LASF6:
|
||||
+ .string "main"
|
||||
+ .ident "GCC: (GNU) 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
|
||||
|
@ -1,218 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00154.html
|
||||
Subject: [patch] Workaround buggy GCC PR 47510 produced code
|
||||
|
||||
Hi,
|
||||
|
||||
GCC PR debug/47510 is already fixed and GDB has the proper support for it:
|
||||
RFC: update for GCC PR 47510
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg00916.html
|
||||
|
||||
Still FSF GDB HEAD will crash on a binary produced by older/buggy GCC:
|
||||
Reading symbols from .../gcc46.o...dwarf2read.c:9329: internal-error: could not find partial DIE 0x9a in cache [from module .../gcc46.o]
|
||||
|
||||
Which may not give much clue to the user.
|
||||
|
||||
The proposed patch could make false warnings if any code out there has
|
||||
DW_TAG_typedef with children, it does not check for specific GCC versions.
|
||||
Still such DWARF is invalid, although in such case complaint() would be more
|
||||
appropriate than warning(). Does it make sense to differentiate it?
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf2read.c (struct dwarf2_per_objfile): New field
|
||||
typedef_children_warning_printed.
|
||||
(load_partial_dies): Read in any children of DW_TAG_typedef with
|
||||
a warning in such case.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.dwarf2/dw2-typedef-children.S: New file.
|
||||
* gdb.dwarf2/dw2-typedef-children.exp: New file.
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -209,6 +209,9 @@ struct dwarf2_per_objfile
|
||||
or we are faking it for OBJF_READNOW's sake. */
|
||||
unsigned char using_index;
|
||||
|
||||
+ /* Print the GCC PR debug/47510 warning only once per objfile. */
|
||||
+ unsigned typedef_children_warning_printed : 1;
|
||||
+
|
||||
/* The mapped index, or NULL if .gdb_index is missing or not being used. */
|
||||
struct mapped_index *index_table;
|
||||
|
||||
@@ -8951,7 +8954,7 @@ load_partial_dies (bfd *abfd, gdb_byte *buffer, gdb_byte *info_ptr,
|
||||
if (parent_die == NULL
|
||||
&& part_die->has_specification == 0
|
||||
&& part_die->is_declaration == 0
|
||||
- && (part_die->tag == DW_TAG_typedef
|
||||
+ && ((part_die->tag == DW_TAG_typedef && !part_die->has_children)
|
||||
|| part_die->tag == DW_TAG_base_type
|
||||
|| part_die->tag == DW_TAG_subrange_type))
|
||||
{
|
||||
@@ -8964,6 +8967,20 @@ load_partial_dies (bfd *abfd, gdb_byte *buffer, gdb_byte *info_ptr,
|
||||
continue;
|
||||
}
|
||||
|
||||
+ /* The exception for DW_TAG_typedef with has_children above is
|
||||
+ a workaround of GCC PR debug/47510. GDB crashed on broken GCC output
|
||||
+ as it skipped children of DW_TAG_typedef by the shortcut above and
|
||||
+ then it could not find the child DIEs referenced later. */
|
||||
+
|
||||
+ if (!dwarf2_per_objfile->typedef_children_warning_printed
|
||||
+ && part_die->tag == DW_TAG_typedef && part_die->has_children)
|
||||
+ {
|
||||
+ warning (_("DW_TAG_typedef has childen - GCC PR debug/47510 bug "
|
||||
+ "- DIE at 0x%x [in module %s]"),
|
||||
+ part_die->offset, cu->objfile->name);
|
||||
+ dwarf2_per_objfile->typedef_children_warning_printed = 1;
|
||||
+ }
|
||||
+
|
||||
/* If we're at the second level, and we're an enumerator, and
|
||||
our parent has no specification (meaning possibly lives in a
|
||||
namespace elsewhere), then we can add the partial symbol now
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-typedef-children.S
|
||||
@@ -0,0 +1,92 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* Debug information */
|
||||
+
|
||||
+ .section .debug_info
|
||||
+.Lcu1_begin:
|
||||
+ /* CU header */
|
||||
+ .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
|
||||
+.Lcu1_start:
|
||||
+ .2byte 2 /* DWARF Version */
|
||||
+ .4byte .Labbrev1_begin /* Offset into abbrev section */
|
||||
+ .byte 4 /* Pointer size */
|
||||
+
|
||||
+ /* CU die */
|
||||
+ .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
|
||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
||||
+ .byte 1 /* DW_AT_language (C) */
|
||||
+
|
||||
+.Ltype_int:
|
||||
+ .uleb128 2 /* Abbrev: DW_TAG_base_type */
|
||||
+ .ascii "int\0" /* DW_AT_name */
|
||||
+ .byte 4 /* DW_AT_byte_size */
|
||||
+ .byte 5 /* DW_AT_encoding */
|
||||
+
|
||||
+ .uleb128 0x3 /* (DIE (0x38) DW_TAG_typedef) */
|
||||
+ .ascii "new\0" /* DW_AT_name */
|
||||
+ .long .Ltype_int - .Lcu1_begin /* DW_AT_type */
|
||||
+
|
||||
+ .uleb128 2 /* Abbrev: DW_TAG_base_type */
|
||||
+ .ascii "int\0" /* DW_AT_name */
|
||||
+ .byte 4 /* DW_AT_byte_size */
|
||||
+ .byte 5 /* DW_AT_encoding */
|
||||
+
|
||||
+ .uleb128 0 /* End of DW_TAG_typedef */
|
||||
+ .uleb128 0 /* End of DW_TAG_compile_unit */
|
||||
+.Lcu1_end:
|
||||
+
|
||||
+/* Abbrev table */
|
||||
+ .section .debug_abbrev
|
||||
+.Labbrev1_begin:
|
||||
+ .uleb128 1 /* Abbrev code */
|
||||
+ .uleb128 0x11 /* DW_TAG_compile_unit */
|
||||
+ .byte 1 /* has_children */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x25 /* DW_AT_producer */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x13 /* DW_AT_language */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 2 /* Abbrev code */
|
||||
+ .uleb128 0x24 /* DW_TAG_base_type */
|
||||
+ .byte 0 /* has_children */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0xb /* DW_AT_byte_size */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3e /* DW_AT_encoding */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 0x3 /* (abbrev code) */
|
||||
+ .uleb128 0x16 /* (TAG: DW_TAG_typedef) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-typedef-children.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+load_lib dwarf.exp
|
||||
+
|
||||
+# Note: Inspired from dw2-basic.exp.
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+if {![dwarf2_support]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "dw2-typedef-children"
|
||||
+set srcfile ${testfile}.S
|
||||
+set binfile ${objdir}/${subdir}/${testfile}.x
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+
|
||||
+gdb_test "file $binfile" \
|
||||
+ "warning: DW_TAG_typedef has childen - GCC PR debug/47510 bug - DIE at .*" \
|
||||
+ "warning message"
|
||||
|
@ -1,141 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-02/msg00630.html
|
||||
Subject: [patch] [i386] Fix {,un}prelinked libraries for attach/core-load
|
||||
|
||||
Hi,
|
||||
|
||||
please see comments in the patch. The adjusted testcase FAILs on i386.
|
||||
|
||||
"Prelink", March 4, 2004 - by Jakub Jelinek:
|
||||
http://people.redhat.com/jakub/prelink.pdf
|
||||
primarily section 7 - REL to RELA conversion
|
||||
|
||||
An example of unprelinked -> prelinked library change:
|
||||
Program Headers:
|
||||
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
|
||||
- LOAD 0x000000 0x00000000 0x00000000 0x00538 0x00538 R E 0x1000
|
||||
- LOAD 0x000538 0x00001538 0x00001538 0x00100 0x00110 RW 0x1000
|
||||
- DYNAMIC 0x000550 0x00001550 0x00001550 0x000c8 0x000c8 RW 0x4
|
||||
- NOTE 0x0000f4 0x000000f4 0x000000f4 0x00024 0x00024 R 0x4
|
||||
- GNU_EH_FRAME 0x0004e8 0x000004e8 0x000004e8 0x00014 0x00014 R 0x4
|
||||
+ LOAD 0x000000 0x411b3000 0x411b3000 0x00558 0x00558 R E 0x1000
|
||||
+ LOAD 0x000558 0x411b4558 0x411b4558 0x00100 0x00110 RW 0x1000
|
||||
+ DYNAMIC 0x000570 0x411b4570 0x411b4570 0x000c8 0x000c8 RW 0x4
|
||||
+ NOTE 0x0000f4 0x411b30f4 0x411b30f4 0x00024 0x00024 R 0x4
|
||||
+ GNU_EH_FRAME 0x000508 0x411b3508 0x411b3508 0x00014 0x00014 R 0x4
|
||||
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
|
||||
|
||||
So far GDB expected all such displacements will be always PAGE_SIZE aligned.
|
||||
This applies for example for re-prelinking of an already prelinked file.
|
||||
But it does not apply for prelinking of an unprelinked file or unprelinking of
|
||||
a prelinked file, there can be arbitrary displacement.
|
||||
|
||||
It affects i386 (=i686, prelink doc reports also ARM and MIPS) which uses REL.
|
||||
x86_64 always uses RELA, therefore I have not noticed it so far. i386 still
|
||||
has to be supported.
|
||||
|
||||
This affects both attachment to a PID and core file loads.
|
||||
|
||||
This applies in real world if you transfer a core file between hosts and try to
|
||||
backtrace them, libraries of both hosts may differ whether they are / are not
|
||||
prelinked.
|
||||
|
||||
I could implement some (displacement-forgiving and prelink-modifications
|
||||
forgiving) comparison of both DYNAMIC segments found. But I do not think it is
|
||||
useful, if the DYNAMIC address from linkmap vs. bfd do not match it is still a
|
||||
better chance to try a displacement to make them match. Keeping the file
|
||||
relocation cannot work anyway when the DYNAMIC address is verified as wrong.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.
|
||||
|
||||
Mostly do you agree the DYNAMIC content does not have to be verifed?
|
||||
Do you have any comments on the in-code long comments?
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix libraries displacement if they change whether they were prelinked.
|
||||
* solib-svr4.c (LM_ADDR_CHECK): Set L_ADDR even if the DYNAMIC pointer
|
||||
does not match. Comment why.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/break-interp-lib.c (v, vptr): New variables.
|
||||
* gdb.base/break-interp.exp (test_attach): New comment.
|
||||
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -237,11 +237,11 @@ LM_ADDR_CHECK (struct so_list *so, bfd *abfd)
|
||||
|
||||
Even on PPC it must be zero-aligned at least for MINPAGESIZE. */
|
||||
|
||||
+ l_addr = l_dynaddr - dynaddr;
|
||||
+
|
||||
if ((l_addr & (minpagesize - 1)) == 0
|
||||
&& (l_addr & align) == ((l_dynaddr - dynaddr) & align))
|
||||
{
|
||||
- l_addr = l_dynaddr - dynaddr;
|
||||
-
|
||||
if (info_verbose)
|
||||
printf_unfiltered (_("Using PIC (Position Independent Code) "
|
||||
"prelink displacement %s for \"%s\".\n"),
|
||||
@@ -249,9 +249,20 @@ LM_ADDR_CHECK (struct so_list *so, bfd *abfd)
|
||||
so->so_name);
|
||||
}
|
||||
else
|
||||
- warning (_(".dynamic section for \"%s\" "
|
||||
- "is not at the expected address "
|
||||
- "(wrong library or version mismatch?)"), so->so_name);
|
||||
+ {
|
||||
+ /* There is no way to verify the library file matches. prelink
|
||||
+ can during prelinking of an unprelinked file (or unprelinking
|
||||
+ of a prelinked file) shift the DYNAMIC segment by arbitrary
|
||||
+ offset without any page size alignment. There is no way to
|
||||
+ find out the ELF header and/or Program Headers for a limited
|
||||
+ verification if it they match. One could do a verification
|
||||
+ of the DYNAMIC segment. Still the found address is the best
|
||||
+ one GDB could find. */
|
||||
+
|
||||
+ warning (_(".dynamic section for \"%s\" "
|
||||
+ "is not at the expected address "
|
||||
+ "(wrong library or version mismatch?)"), so->so_name);
|
||||
+ }
|
||||
}
|
||||
|
||||
set_addr:
|
||||
--- a/gdb/testsuite/gdb.base/break-interp-lib.c
|
||||
+++ b/gdb/testsuite/gdb.base/break-interp-lib.c
|
||||
@@ -20,6 +20,10 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
+/* Force REL->RELA conversion on i386, see "Prelink", March 4, 2004. */
|
||||
+volatile int v[2];
|
||||
+volatile int *vptr = &v[1];
|
||||
+
|
||||
void
|
||||
libfunc (const char *action)
|
||||
{
|
||||
--- a/gdb/testsuite/gdb.base/break-interp.exp
|
||||
+++ b/gdb/testsuite/gdb.base/break-interp.exp
|
||||
@@ -352,6 +352,14 @@ proc test_attach {file displacement {relink_args ""}} {
|
||||
# test simplicity, we merged this test and the test above by not
|
||||
# restoring $INTERP after $EXEC prelink. $INTERP gets restored
|
||||
# later below.
|
||||
+ #
|
||||
+ # `(wrong library or version mismatch?)' messages are printed for
|
||||
+ # $binfile_lib on platforms converting REL->RELA relocations by
|
||||
+ # prelink (such as on i386). There is no reliable way to verify
|
||||
+ # the library file matches the running library in such case but
|
||||
+ # GDB at least attempts to set the right displacement. We test
|
||||
+ # `libfunc' is present in the backtrace and therefore the
|
||||
+ # displacement has been guessed right.
|
||||
|
||||
if [prelink$relink $relink_args [file tail $exec]] {
|
||||
# /proc/PID/exe cannot be loaded as it is "EXECNAME (deleted)".
|
||||
|
@ -75,23 +75,23 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
@ -106,23 +106,23 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
set testfile dwarf-stride
|
||||
set srcfile ${testfile}.f90
|
||||
|
||||
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}] } {
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}]
|
||||
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if $err {
|
||||
@ -137,23 +137,23 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
@ -168,31 +168,31 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}] != "" } {
|
||||
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f90}] != "" } {
|
||||
- untested "Couldn't compile ${srclibfile}"
|
||||
- return -1
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
|
||||
# prepare_for_testing cannot be used as linking with $libfile cannot be passed
|
||||
# just for the linking phase (and not the source compilation phase). And any
|
||||
# warnings on ignored $libfile abort the process.
|
||||
|
||||
-if { [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}] != "" } {
|
||||
+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}]
|
||||
+set err2 [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}]
|
||||
-if { [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f90}] != "" } {
|
||||
+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f90}]
|
||||
+set err2 [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f90}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err1 != "" } {
|
||||
@ -211,23 +211,23 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/module.exp
|
||||
set testfile "module"
|
||||
set srcfile ${testfile}.f90
|
||||
|
||||
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] } {
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } {
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}]
|
||||
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if $err {
|
||||
@ -242,23 +242,23 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/string.exp
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
@ -273,24 +273,24 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
|
||||
set testfile "omp-step"
|
||||
set srcfile ${testfile}.f90
|
||||
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77 additional_flags=-fopenmp}] } {
|
||||
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
|
||||
+
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77 additional_flags=-fopenmp}]
|
||||
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90 additional_flags=-fopenmp}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if $err {
|
||||
@ -306,24 +306,24 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/derived-type.exp
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
- executable {debug f77}] != ""} {
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
- executable {debug f90}] != ""} {
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
+ executable {debug f77}]
|
||||
+ executable {debug f90}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
@ -339,24 +339,24 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/subarray.exp
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
- executable {debug f77}] != ""} {
|
||||
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
|
||||
- executable {debug f90}] != ""} {
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists f77compiler] {
|
||||
+ set old_f77compiler [board_info $board f77compiler]
|
||||
+ unset_board_info f77compiler
|
||||
+} elseif [info exists old_f77compiler] {
|
||||
+ unset old_f77compiler
|
||||
+if [board_info $board exists f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f77compiler gfortran44
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
+ executable {debug f77}]
|
||||
+ executable {debug f90}]
|
||||
+
|
||||
+unset_board_info f77compiler
|
||||
+if [info exists old_f77compiler] {
|
||||
+ set_board_info f77compiler $old_f77compiler
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
|
@ -1,57 +0,0 @@
|
||||
--- a/gdb/stap-probe.c
|
||||
+++ b/gdb/stap-probe.c
|
||||
@@ -355,9 +355,7 @@ stap_free_args_info (void *args_info_ptr)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < a->n_args; i++)
|
||||
- {
|
||||
- xfree (a->arg[i].arg_str);
|
||||
- }
|
||||
+ xfree (a->arg[i].arg_str);
|
||||
|
||||
xfree (a->arg);
|
||||
xfree (a);
|
||||
@@ -401,6 +399,7 @@ stap_parse_probe_arguments (struct stap_probe *probe)
|
||||
return;
|
||||
|
||||
args_info = xmalloc (sizeof (struct stap_args_info));
|
||||
+ args_info->n_args = 0;
|
||||
back_to = make_cleanup (stap_free_args_info, args_info);
|
||||
args_info->arg = xcalloc (STAP_MAX_ARGS, sizeof (struct stap_probe_arg));
|
||||
|
||||
@@ -493,6 +492,7 @@ stap_parse_probe_arguments (struct stap_probe *probe)
|
||||
|
||||
args_info->arg[current_arg].arg_str
|
||||
= savestring (start, cur - start);
|
||||
+ ++args_info->n_args;
|
||||
/* Start it over again. */
|
||||
cur = skip_spaces ((char *) cur);
|
||||
current_state = NEW_ARG;
|
||||
@@ -513,7 +513,6 @@ stap_parse_probe_arguments (struct stap_probe *probe)
|
||||
}
|
||||
}
|
||||
|
||||
- args_info->n_args = current_arg + 1;
|
||||
args_info->arg = xrealloc (args_info->arg,
|
||||
args_info->n_args
|
||||
* sizeof (struct stap_probe_arg));
|
||||
@@ -1526,8 +1525,9 @@ stap_free_parsed_args (struct stap_args_info *parsed_args)
|
||||
return;
|
||||
|
||||
for (i = 0; i < parsed_args->n_args; i++)
|
||||
- xfree (parsed_args->arg);
|
||||
+ xfree (parsed_args->arg[i].arg_str);
|
||||
|
||||
+ xfree (parsed_args->arg);
|
||||
xfree (parsed_args);
|
||||
}
|
||||
|
||||
@@ -1859,7 +1859,7 @@ parse_stap_probe (char **argptr, struct linespec_result *canonical)
|
||||
if (canonical)
|
||||
{
|
||||
canonical->canonical = xrealloc (canonical->canonical,
|
||||
- result.nelts * sizeof (char **));
|
||||
+ result.nelts * sizeof (char *));
|
||||
canonical->canonical[result.nelts - 1] = xstrdup (full_arg);
|
||||
}
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-01/msg00016.html
|
||||
Subject: [patch] New testcase: py-prettyprint.exp: print hint_error
|
||||
|
||||
Hi,
|
||||
|
||||
PASS: gdb.python/py-prettyprint.exp: print hint_error
|
||||
for
|
||||
FYI: fix buglet in gdbpy_get_display_hint
|
||||
http://sourceware.org/ml/gdb-patches/2010-07/msg00190.html
|
||||
http://sourceware.org/ml/gdb-cvs/2010-07/msg00061.html
|
||||
|
||||
I would check it in as obvious but the 2011 ChangeLog move process has to be
|
||||
done first. So to be checked in later.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/testsuite/
|
||||
2011-01-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.python/py-prettyprint.c (struct hint_error): New.
|
||||
(main): New variable hint_error.
|
||||
* gdb.python/py-prettyprint.exp (run_lang_tests): New testcase
|
||||
"print hint_error".
|
||||
* gdb.python/py-prettyprint.py (class pp_hint_error): New.
|
||||
(register_pretty_printers): Register it.
|
||||
|
||||
Index: gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/testsuite/gdb.python/py-prettyprint.c 2011-03-31 21:59:26.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.c 2011-04-11 19:42:10.000000000 +0200
|
||||
@@ -44,6 +44,10 @@ struct lazystring {
|
||||
const char *lazy_str;
|
||||
};
|
||||
|
||||
+struct hint_error {
|
||||
+ int x;
|
||||
+};
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
struct S : public s {
|
||||
int zs;
|
||||
@@ -215,6 +219,7 @@ main ()
|
||||
nostring_type nstype, nstype2;
|
||||
struct ns ns, ns2;
|
||||
struct lazystring estring, estring2;
|
||||
+ struct hint_error hint_error;
|
||||
|
||||
nstype.elements = narray;
|
||||
nstype.len = 0;
|
||||
Index: gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/testsuite/gdb.python/py-prettyprint.exp 2011-03-07 17:03:03.000000000 +0100
|
||||
+++ gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.exp 2011-04-11 19:41:56.000000000 +0200
|
||||
@@ -97,6 +97,8 @@ proc run_lang_tests {lang} {
|
||||
gdb_test_no_output "python pp_ls_encoding = 'UTF-8'"
|
||||
gdb_test "print estring2" "\"embedded \", <incomplete sequence \\\\302>"
|
||||
|
||||
+ gdb_test "print hint_error" "Exception: hint failed\r\nhint_error_val"
|
||||
+
|
||||
gdb_test "print c" " = container \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}"
|
||||
|
||||
gdb_test "print nstype" " = {$nl *.0. = 7,$nl *.1. = 42$nl}"
|
||||
Index: gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.py
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110411.orig/gdb/testsuite/gdb.python/py-prettyprint.py 2011-03-31 21:59:26.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.py 2011-04-11 19:41:56.000000000 +0200
|
||||
@@ -161,6 +161,18 @@ class pp_ls:
|
||||
def display_hint (self):
|
||||
return 'string'
|
||||
|
||||
+class pp_hint_error:
|
||||
+ "Throw error from display_hint"
|
||||
+
|
||||
+ def __init__(self, val):
|
||||
+ self.val = val
|
||||
+
|
||||
+ def to_string(self):
|
||||
+ return 'hint_error_val'
|
||||
+
|
||||
+ def display_hint (self):
|
||||
+ raise Exception("hint failed")
|
||||
+
|
||||
class pp_outer:
|
||||
"Print struct outer"
|
||||
|
||||
@@ -246,6 +258,9 @@ def register_pretty_printers ():
|
||||
pretty_printers_dict[re.compile ('^struct outerstruct$')] = pp_outer
|
||||
pretty_printers_dict[re.compile ('^outerstruct$')] = pp_outer
|
||||
|
||||
+ pretty_printers_dict[re.compile ('^struct hint_error$')] = pp_hint_error
|
||||
+ pretty_printers_dict[re.compile ('^hint_error$')] = pp_hint_error
|
||||
+
|
||||
pretty_printers_dict = {}
|
||||
|
||||
register_pretty_printers ()
|
58
gdb.spec
58
gdb.spec
@ -23,7 +23,7 @@ Name: gdb%{?_with_debug:-debug}
|
||||
# Set version to contents of gdb/version.in.
|
||||
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
|
||||
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
|
||||
Version: 7.2.90.20110703
|
||||
Version: 7.3.50.20110722
|
||||
|
||||
# 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.
|
||||
@ -290,12 +290,6 @@ Patch258: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
#=fedoratest
|
||||
Patch263: gdb-6.3-attach-see-vdso-test.patch
|
||||
|
||||
# Do not hang on exit of a thread group leader (BZ 247354).
|
||||
#=push
|
||||
Patch265: gdb-6.6-bz247354-leader-exit-fix.patch
|
||||
#=push
|
||||
Patch266: gdb-6.6-bz247354-leader-exit-test.patch
|
||||
|
||||
# Test leftover zombie process (BZ 243845).
|
||||
#=fedoratest
|
||||
Patch271: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
@ -507,10 +501,6 @@ Patch511: gdb-bz592031-siginfo-lost-5of5.patch
|
||||
#=fedoratest
|
||||
Patch526: gdb-bz634108-solib_address.patch
|
||||
|
||||
# New testcase py-prettyprint.exp:print hint_error (for BZ 611569, BZ 629236).
|
||||
#=fedoratest
|
||||
Patch541: gdb-test-pp-hint-error.patch
|
||||
|
||||
# New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
|
||||
#=fedoratest
|
||||
Patch542: gdb-test-pid0-core.patch
|
||||
@ -523,22 +513,10 @@ Patch547: gdb-test-dw2-aranges.patch
|
||||
# =fedoratest
|
||||
Patch548: gdb-test-expr-cumulative-archer.patch
|
||||
|
||||
# Temporary fix of F15 gcc-4.6 child DIEs of DW_TAG_typedef (BZ 672230).
|
||||
# =push
|
||||
Patch555: gdb-gcc46-typedef.patch
|
||||
|
||||
# Workaround gcc-4.6 stdarg false prologue end (GDB PR 12435 + GCC PR 47471).
|
||||
# =push
|
||||
Patch556: gdb-gcc46-stdarg-prologue.patch
|
||||
|
||||
# Fix attach/core-load of {,un}prelinked i386 libs (bugreport by Michal Toman).
|
||||
Patch571: gdb-prelink-rela.patch
|
||||
|
||||
# Fix threading internal error on corrupted memory (BZ 677654).
|
||||
Patch572: gdb-core-thread-internalerr-1of3.patch
|
||||
Patch573: gdb-core-thread-internalerr-2of3.patch
|
||||
Patch574: gdb-core-thread-internalerr-3of3.patch
|
||||
|
||||
# Toolchain on sparc is slightly broken and debuginfo files are generated
|
||||
# with non 64bit aligned tables/offsets.
|
||||
# See for example readelf -S ../Xvnc.debug.
|
||||
@ -552,20 +530,6 @@ Patch574: gdb-core-thread-internalerr-3of3.patch
|
||||
# rebuild to fix it, we need to be able to use gdb :)
|
||||
Patch579: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
|
||||
# Fix case insensitive symbols for Fortran by iFort (BZ 645773).
|
||||
Patch580: gdb-bz645773-case-insensitive-1of5.patch
|
||||
Patch581: gdb-bz645773-case-insensitive-2of5.patch
|
||||
Patch582: gdb-bz645773-case-insensitive-3of5.patch
|
||||
Patch583: gdb-bz645773-case-insensitive-4of5.patch
|
||||
|
||||
# Bundle readline-6.2 with a workaround of skipped "ask" (BZ 701131).
|
||||
Patch591: gdb-bz701131-readline62-1of3.patch
|
||||
Patch592: gdb-bz701131-readline62-2of3.patch
|
||||
Patch593: gdb-bz701131-readline62-3of3.patch
|
||||
|
||||
# [stap] Fix double free.
|
||||
Patch594: gdb-stap-double-free.patch
|
||||
|
||||
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
|
||||
# --without-system-readline
|
||||
# Requires: readline%{?_isa}
|
||||
@ -771,8 +735,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch258 -p1
|
||||
%patch260 -p1
|
||||
%patch263 -p1
|
||||
%patch265 -p1
|
||||
%patch266 -p1
|
||||
%patch271 -p1
|
||||
%patch274 -p1
|
||||
%patch353 -p1
|
||||
@ -824,25 +786,11 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch510 -p1
|
||||
%patch511 -p1
|
||||
%patch526 -p1
|
||||
%patch541 -p1
|
||||
%patch542 -p1
|
||||
%patch547 -p1
|
||||
%patch548 -p1
|
||||
%patch555 -p1
|
||||
%patch556 -p1
|
||||
%patch571 -p1
|
||||
%patch572 -p1
|
||||
%patch573 -p1
|
||||
%patch574 -p1
|
||||
%patch579 -p1
|
||||
%patch580 -p1
|
||||
%patch581 -p1
|
||||
%patch582 -p1
|
||||
%patch583 -p1
|
||||
%patch591 -p1
|
||||
%patch592 -p1
|
||||
%patch593 -p1
|
||||
%patch594 -p1
|
||||
|
||||
%patch393 -p1
|
||||
%patch335 -p1
|
||||
@ -1265,6 +1213,10 @@ fi
|
||||
%{_infodir}/gdb.info*
|
||||
|
||||
%changelog
|
||||
* Sat Jul 23 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3.50.20110722-1.fc16
|
||||
- Rebase to FSF GDB 7.3.50.20110722.
|
||||
- Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471).
|
||||
|
||||
* Sun Jul 3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110703-40.fc15
|
||||
- Rebase to FSF GDB 7.2.90.20110703 (which is a 7.3 pre-release).
|
||||
- Adjust the `print errno' patch due to the DW_AT_linkage_name following again.
|
||||
|
Loading…
Reference in New Issue
Block a user