Accepting request 181855 from devel:gcc
- Enable multi-target support - gdb-ia64-tdep.patch: build fixes - Use --build when configuring - Don't remove %buildroot in %install - Set pkgversion and bugurl (forwarded request 181773 from Andreas_Schwab) OBS-URL: https://build.opensuse.org/request/show/181855 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=92
This commit is contained in:
parent
16b5661a6f
commit
9cdd33a15c
@ -1,25 +1,29 @@
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
|
||||
|
||||
|
||||
Index: gdb-7.4.50.20111218/gdb/symmisc.c
|
||||
Index: gdb-7.5.50.20130118/gdb/symmisc.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20111218.orig/gdb/symmisc.c 2011-04-04 17:19:59.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/gdb/symmisc.c 2011-12-19 00:28:18.189232014 +0100
|
||||
@@ -147,8 +147,8 @@ print_objfile_statistics (void)
|
||||
--- gdb-7.5.50.20130118.orig/gdb/symmisc.c 2013-01-18 23:54:57.478974289 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/symmisc.c 2013-01-18 23:55:41.650930254 +0100
|
||||
@@ -148,10 +148,10 @@ print_objfile_statistics (void)
|
||||
if (OBJSTAT (objfile, sz_strtab) > 0)
|
||||
printf_filtered (_(" Space used by a.out string tables: %d\n"),
|
||||
OBJSTAT (objfile, sz_strtab));
|
||||
- printf_filtered (_(" Total memory used for objfile obstack: %d\n"),
|
||||
- obstack_memory_used (&objfile->objfile_obstack));
|
||||
- printf_filtered (_(" Total memory used for BFD obstack: %d\n"),
|
||||
- obstack_memory_used (&objfile->per_bfd->storage_obstack));
|
||||
+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"),
|
||||
+ (long) obstack_memory_used (&objfile->objfile_obstack));
|
||||
+ printf_filtered (_(" Total memory used for BFD obstack: %ld\n"),
|
||||
+ (long) obstack_memory_used (&objfile->per_bfd->storage_obstack));
|
||||
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
|
||||
bcache_memory_used (psymbol_bcache_get_bcache
|
||||
(objfile->psymbol_cache)));
|
||||
Index: gdb-7.4.50.20111218/include/obstack.h
|
||||
Index: gdb-7.5.50.20130118/include/obstack.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20111218.orig/include/obstack.h 2011-10-22 03:35:29.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/include/obstack.h 2011-12-19 00:28:18.189232014 +0100
|
||||
--- gdb-7.5.50.20130118.orig/include/obstack.h 2013-01-18 23:54:57.478974289 +0100
|
||||
+++ gdb-7.5.50.20130118/include/obstack.h 2013-01-18 23:55:10.256999188 +0100
|
||||
@@ -188,31 +188,31 @@ struct obstack /* control current objec
|
||||
|
||||
/* Declare the external functions we use; they are in obstack.c. */
|
||||
@ -125,10 +129,10 @@ Index: gdb-7.4.50.20111218/include/obstack.h
|
||||
if (__o->chunk_limit - __o->next_free < __len) \
|
||||
_obstack_newchunk (__o, __len); \
|
||||
obstack_blank_fast (__o, __len); \
|
||||
Index: gdb-7.4.50.20111218/libiberty/obstack.c
|
||||
Index: gdb-7.5.50.20130118/libiberty/obstack.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20111218.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
|
||||
+++ gdb-7.4.50.20111218/libiberty/obstack.c 2011-12-19 00:28:18.191232006 +0100
|
||||
--- gdb-7.5.50.20130118.orig/libiberty/obstack.c 2013-01-18 23:54:57.478974289 +0100
|
||||
+++ gdb-7.5.50.20130118/libiberty/obstack.c 2013-01-18 23:55:10.256999188 +0100
|
||||
@@ -44,9 +44,11 @@
|
||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#include <gnu-versions.h>
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.2.50.20110107/gdb/gcore.c
|
||||
Index: gdb-7.5.50.20130118/gdb/gcore.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110107.orig/gdb/gcore.c 2011-01-05 23:22:49.000000000 +0100
|
||||
+++ gdb-7.2.50.20110107/gdb/gcore.c 2011-01-07 09:04:28.000000000 +0100
|
||||
@@ -534,8 +534,14 @@ gcore_copy_callback (bfd *obfd, asection
|
||||
--- gdb-7.5.50.20130118.orig/gdb/gcore.c 2013-01-18 23:50:56.698573186 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/gcore.c 2013-01-18 23:52:29.636705040 +0100
|
||||
@@ -549,8 +549,14 @@ gcore_copy_callback (bfd *obfd, asection
|
||||
if (size > total_size)
|
||||
size = total_size;
|
||||
|
||||
@ -12,7 +12,7 @@ Index: gdb-7.2.50.20110107/gdb/gcore.c
|
||||
if (target_read_memory (bfd_section_vma (obfd, osec) + offset,
|
||||
- memhunk, size) != 0)
|
||||
+ memhunk, size) != 0
|
||||
+ && (strcmp (gdbarch_bfd_arch_info (target_gdbarch)->arch_name,
|
||||
+ && (strcmp (gdbarch_bfd_arch_info (target_gdbarch ())->arch_name,
|
||||
+ "ia64")
|
||||
+ || bfd_section_vma (obfd, osec) != 0))
|
||||
{
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-7.4.50.20120703/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/doc/gdb.texinfo 2012-07-03 17:30:07.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/doc/gdb.texinfo 2012-07-03 17:31:40.695642449 +0200
|
||||
@@ -1023,6 +1023,12 @@ Read each symbol file's entire symbol ta
|
||||
--- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo 2013-02-15 22:34:22.381165443 +0100
|
||||
@@ -1026,6 +1026,12 @@ Read each symbol file's entire symbol ta
|
||||
the default, which is to read it incrementally as it is needed.
|
||||
This makes startup slower, but makes future operations faster.
|
||||
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.4.50.20120703/gdb/doc/gdb.texinfo
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-7.4.50.20120703/gdb/main.c
|
||||
Index: gdb-7.5.50.20130215/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/main.c 2012-07-03 17:30:07.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/main.c 2012-07-03 17:31:40.696642448 +0200
|
||||
@@ -414,6 +414,7 @@ captured_main (void *data)
|
||||
--- gdb-7.5.50.20130215.orig/gdb/main.c 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/main.c 2013-02-15 22:34:22.382165445 +0100
|
||||
@@ -447,6 +447,7 @@ captured_main (void *data)
|
||||
{"xdb", no_argument, &xdb_commands, 1},
|
||||
{"dbx", no_argument, &dbx_commands, 1},
|
||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.4.50.20120703/gdb/main.c
|
||||
{"r", no_argument, &readnow_symbol_files, 1},
|
||||
{"quiet", no_argument, &quiet, 1},
|
||||
{"q", no_argument, &quiet, 1},
|
||||
@@ -1131,6 +1132,7 @@ Options:\n\n\
|
||||
@@ -1165,6 +1166,7 @@ Options:\n\n\
|
||||
fputs_unfiltered (_("\
|
||||
--quiet Do not print version number on startup.\n\
|
||||
--readnow Fully read symbol files on first access.\n\
|
||||
@ -48,31 +48,31 @@ Index: gdb-7.4.50.20120703/gdb/main.c
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||
Index: gdb-7.4.50.20120703/gdb/symfile.c
|
||||
Index: gdb-7.5.50.20130215/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/symfile.c 2012-07-03 17:30:07.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/symfile.c 2012-07-03 17:31:40.697642447 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/symfile.c 2013-02-01 20:39:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/symfile.c 2013-02-15 22:34:22.383165447 +0100
|
||||
@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup (
|
||||
|
||||
/* Global variables owned by this file. */
|
||||
int readnow_symbol_files; /* Read full symbols immediately. */
|
||||
+int readnever_symbol_files; /* Never read full symbols. */
|
||||
|
||||
/* External variables and functions referenced. */
|
||||
/* Functions this file defines. */
|
||||
|
||||
Index: gdb-7.4.50.20120703/gdb/dwarf2read.c
|
||||
Index: gdb-7.5.50.20130215/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/dwarf2read.c 2012-07-03 17:30:07.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/dwarf2read.c 2012-07-03 17:31:53.421627153 +0200
|
||||
@@ -65,6 +65,7 @@
|
||||
#include "gdb/gdb-index.h"
|
||||
#include <ctype.h>
|
||||
--- gdb-7.5.50.20130215.orig/gdb/dwarf2read.c 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/dwarf2read.c 2013-02-15 22:34:34.479181584 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "f-lang.h"
|
||||
#include "source.h"
|
||||
+#include "top.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "gdb_string.h"
|
||||
@@ -1587,8 +1588,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
@@ -1793,8 +1794,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
(void *) names);
|
||||
dwarf2_per_objfile->objfile = objfile;
|
||||
}
|
||||
@ -84,11 +84,11 @@ Index: gdb-7.4.50.20120703/gdb/dwarf2read.c
|
||||
}
|
||||
|
||||
/* When loading sections, we look either for uncompressed section or for
|
||||
Index: gdb-7.4.50.20120703/gdb/top.h
|
||||
Index: gdb-7.5.50.20130215/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/top.h 2012-01-23 18:12:30.000000000 +0100
|
||||
+++ gdb-7.4.50.20120703/gdb/top.h 2012-07-03 17:31:40.700642444 +0200
|
||||
@@ -60,6 +60,7 @@ extern void set_prompt (const char *s);
|
||||
--- gdb-7.5.50.20130215.orig/gdb/top.h 2013-01-07 17:40:36.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/top.h 2013-02-15 22:34:22.389165459 +0100
|
||||
@@ -58,6 +58,7 @@ extern void set_prompt (const char *s);
|
||||
|
||||
/* From random places. */
|
||||
extern int readnow_symbol_files;
|
||||
|
@ -1,11 +1,11 @@
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/symtab.c
|
||||
Index: gdb-7.5.50.20130118/gdb/symtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/symtab.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/symtab.c 2011-01-17 15:51:48.000000000 +0100
|
||||
@@ -2015,6 +2015,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
|
||||
--- gdb-7.5.50.20130118.orig/gdb/symtab.c 2013-01-18 23:53:22.009797788 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/symtab.c 2013-01-18 23:53:51.044846777 +0100
|
||||
@@ -2356,6 +2356,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
|
||||
SYMBOL_LINKAGE_NAME (msymbol)); */
|
||||
;
|
||||
/* fall through */
|
||||
@ -14,7 +14,7 @@ Index: gdb-7.2.50.20110117/gdb/symtab.c
|
||||
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
|
||||
+ Red Hat Bug 218379. */
|
||||
+ else if (SYMBOL_VALUE (mfunsym) == pc)
|
||||
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol), paddress (target_gdbarch, pc));
|
||||
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol), paddress (target_gdbarch (), pc));
|
||||
+ /* fall through */
|
||||
else
|
||||
return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
|
||||
|
196
gdb-6.6-buildid-locate-core-as-arg.patch
Normal file
196
gdb-6.6-buildid-locate-core-as-arg.patch
Normal file
@ -0,0 +1,196 @@
|
||||
http://sourceware.org/ml/gdb-patches/2010-01/msg00558.html
|
||||
Subject: Re: [patch] print a more useful error message for "gdb core"
|
||||
|
||||
[ Fixed up since the mail. ]
|
||||
|
||||
On Thu, 21 Jan 2010 18:17:15 +0100, Doug Evans wrote:
|
||||
> Not an exhaustive list, but if we go down the path of converting "gdb
|
||||
> corefile" to "gdb -c corefile", then we also need to think about "file
|
||||
> corefile" being converted to "core corefile" [or "target core
|
||||
> corefile", "core" is apparently deprecated in favor of "target core"]
|
||||
> and "target exec corefile" -> "target core corefile". Presumably
|
||||
> "file corefile" (and "target exec corefile") would discard the
|
||||
> currently selected executable. But maybe not. Will that be confusing
|
||||
> for users? I don't know.
|
||||
|
||||
While thinking about it overriding some GDB _commands_ was not my intention.
|
||||
|
||||
There is a general assumption if I have a shell COMMAND and some FILE I can do
|
||||
$ COMMAND FILE
|
||||
and COMMAND will appropriately load the FILE.
|
||||
|
||||
FSF GDB currently needs to specify also the executable file for core files
|
||||
which already inhibits this intuitive expectation. OTOH with the build-id
|
||||
locating patch which could allow such intuitive start notneeding the
|
||||
executable file. Still it currently did not work due to the required "-c":
|
||||
$ COMMAND -c COREFILE
|
||||
|
||||
Entering "file", "core-file" or "attach" commands is already explicit enough
|
||||
so that it IMO should do what the command name says without any
|
||||
autodetections. The second command line argument
|
||||
(captured_main->pid_or_core_arg) is also autodetected (for PID or CORE) but
|
||||
neither "attach" accepts a core file nor "core-file" accepts a PID.
|
||||
|
||||
|
||||
The patch makes sense only with the build-id patchset so this is not submit
|
||||
for FSF GDB inclusion yet. I am fine with your patch (+/- Hui Zhu's pending
|
||||
bfd_check_format_matches) as the patch below is its natural extension.
|
||||
|
||||
|
||||
Sorry for the delay,
|
||||
Jan
|
||||
|
||||
|
||||
2010-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* exceptions.h (enum errors <IS_CORE_ERROR>): New.
|
||||
* exec.c: Include exceptions.h.
|
||||
(exec_file_attach <bfd_core>): Call throw_error (IS_CORE_ERROR, ...).
|
||||
* main.c (exec_or_core_file_attach): New.
|
||||
(captured_main <optind < argc>): Set also corearg.
|
||||
(captured_main <strcmp (execarg, symarg) == 0>): New variable func.
|
||||
Call exec_or_core_file_attach if COREARG matches EXECARG. Call
|
||||
symbol_file_add_main only if CORE_BFD remained NULL.
|
||||
|
||||
Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
|
||||
2010-01-20 Doug Evans <dje@google.com>
|
||||
|
||||
* exec.c (exec_file_attach): Print a more useful error message if the
|
||||
user did "gdb core".
|
||||
|
||||
Index: gdb-7.4.91.20120801/gdb/exceptions.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/exceptions.h 2012-01-04 09:17:01.000000000 +0100
|
||||
+++ gdb-7.4.91.20120801/gdb/exceptions.h 2012-08-01 18:43:39.806959992 +0200
|
||||
@@ -86,6 +86,9 @@ enum errors {
|
||||
/* DW_OP_GNU_entry_value resolving failed. */
|
||||
NO_ENTRY_VALUE_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
Index: gdb-7.4.91.20120801/gdb/exec.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/exec.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/exec.c 2012-08-01 18:44:39.928627287 +0200
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "gdbthread.h"
|
||||
#include "progspace.h"
|
||||
#include "gdb_bfd.h"
|
||||
+#include "exceptions.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "readline/readline.h"
|
||||
@@ -242,12 +243,27 @@ exec_file_attach (char *filename, int fr
|
||||
|
||||
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||
{
|
||||
+ int is_core;
|
||||
+
|
||||
+ /* If the user accidentally did "gdb core", print a useful
|
||||
+ error message. Check it only after bfd_object has been checked as
|
||||
+ a valid executable may get recognized for example also as
|
||||
+ "trad-core". */
|
||||
+ is_core = bfd_check_format (exec_bfd, bfd_core);
|
||||
+
|
||||
/* Make sure to close exec_bfd, or else "run" might try to use
|
||||
it. */
|
||||
exec_close ();
|
||||
- error (_("\"%s\": not in executable format: %s"),
|
||||
- scratch_pathname,
|
||||
- gdb_bfd_errmsg (bfd_get_error (), matching));
|
||||
+
|
||||
+ if (is_core != 0)
|
||||
+ throw_error (IS_CORE_ERROR,
|
||||
+ _("\"%s\" is a core file.\n"
|
||||
+ "Please specify an executable to debug."),
|
||||
+ scratch_pathname);
|
||||
+ else
|
||||
+ error (_("\"%s\": not in executable format: %s"),
|
||||
+ scratch_pathname,
|
||||
+ gdb_bfd_errmsg (bfd_get_error (), matching));
|
||||
}
|
||||
|
||||
/* FIXME - This should only be run for RS6000, but the ifdef is a poor
|
||||
Index: gdb-7.4.91.20120801/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/main.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/main.c 2012-08-01 18:43:39.810959970 +0200
|
||||
@@ -266,6 +266,36 @@ typedef struct cmdarg {
|
||||
/* Define type VEC (cmdarg_s). */
|
||||
DEF_VEC_O (cmdarg_s);
|
||||
|
||||
+/* Call exec_file_attach. If it detected FILENAME is a core file call
|
||||
+ core_file_command. Print the original exec_file_attach error only if
|
||||
+ core_file_command failed to find a matching executable. */
|
||||
+
|
||||
+static void
|
||||
+exec_or_core_file_attach (char *filename, int from_tty)
|
||||
+{
|
||||
+ volatile struct gdb_exception e;
|
||||
+
|
||||
+ gdb_assert (exec_bfd == NULL);
|
||||
+
|
||||
+ TRY_CATCH (e, RETURN_MASK_ALL)
|
||||
+ {
|
||||
+ exec_file_attach (filename, from_tty);
|
||||
+ }
|
||||
+ if (e.reason < 0)
|
||||
+ {
|
||||
+ if (e.error == IS_CORE_ERROR)
|
||||
+ {
|
||||
+ core_file_command (filename, from_tty);
|
||||
+
|
||||
+ /* Iff the core file found its executable suppress the error message
|
||||
+ from exec_file_attach. */
|
||||
+ if (exec_bfd != NULL)
|
||||
+ return;
|
||||
+ }
|
||||
+ throw_exception (e);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int
|
||||
captured_main (void *data)
|
||||
{
|
||||
@@ -762,6 +792,8 @@ captured_main (void *data)
|
||||
{
|
||||
symarg = argv[optind];
|
||||
execarg = argv[optind];
|
||||
+ if (optind + 1 == argc && corearg == NULL)
|
||||
+ corearg = argv[optind];
|
||||
optind++;
|
||||
}
|
||||
|
||||
@@ -917,11 +949,25 @@ captured_main (void *data)
|
||||
&& symarg != NULL
|
||||
&& strcmp (execarg, symarg) == 0)
|
||||
{
|
||||
+ catch_command_errors_ftype *func;
|
||||
+
|
||||
+ /* Call exec_or_core_file_attach only if the file was specified as
|
||||
+ a command line argument (and not an a command line option). */
|
||||
+ if (corearg != NULL && strcmp (corearg, execarg) == 0)
|
||||
+ {
|
||||
+ func = exec_or_core_file_attach;
|
||||
+ corearg = NULL;
|
||||
+ }
|
||||
+ else
|
||||
+ func = exec_file_attach;
|
||||
+
|
||||
/* The exec file and the symbol-file are the same. If we can't
|
||||
open it, better only print one error message.
|
||||
- catch_command_errors returns non-zero on success! */
|
||||
- if (catch_command_errors (exec_file_attach, execarg,
|
||||
- !batch_flag, RETURN_MASK_ALL))
|
||||
+ catch_command_errors returns non-zero on success!
|
||||
+ Do not load EXECARG as a symbol file if it has been already processed
|
||||
+ as a core file. */
|
||||
+ if (catch_command_errors (func, execarg, !batch_flag, RETURN_MASK_ALL)
|
||||
+ && core_bfd == NULL)
|
||||
catch_command_errors (symbol_file_add_main, symarg,
|
||||
!batch_flag, RETURN_MASK_ALL);
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
Index: gdb-7.4.50.20120602/gdb/event-top.c
|
||||
Index: gdb-7.5.50.20130215/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/event-top.c 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/event-top.c 2012-06-02 21:08:23.479221885 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/event-top.c 2013-01-31 19:37:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/event-top.c 2013-02-15 22:36:11.217308539 +0100
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "observer.h"
|
||||
#include "continuations.h"
|
||||
#include "gdbcmd.h" /* for dont_repeat() */
|
||||
#include "annotate.h"
|
||||
+#include "symfile.h"
|
||||
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -176,6 +177,8 @@ rl_callback_read_char_wrapper (gdb_clien
|
||||
@@ -170,6 +171,8 @@ rl_callback_read_char_wrapper (gdb_clien
|
||||
void
|
||||
cli_command_loop (void)
|
||||
{
|
||||
@ -19,7 +19,7 @@ Index: gdb-7.4.50.20120602/gdb/event-top.c
|
||||
display_gdb_prompt (0);
|
||||
|
||||
/* Now it's time to start the event loop. */
|
||||
@@ -241,6 +244,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
@@ -237,6 +240,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.4.50.20120602/gdb/event-top.c
|
||||
/* Each interpreter has its own rules on displaying the command
|
||||
prompt. */
|
||||
if (!current_interp_display_prompt_p ())
|
||||
Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
Index: gdb-7.5.50.20130215/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/elfread.c 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/elfread.c 2012-06-02 21:08:23.482221882 +0200
|
||||
@@ -48,6 +48,7 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/elfread.c 2013-02-15 22:35:36.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/elfread.c 2013-02-15 22:35:59.414292874 +0100
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "gdbcore.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "observer.h"
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
@@ -1647,8 +1648,361 @@ build_id_to_filename (struct build_id *b
|
||||
@@ -1649,8 +1650,361 @@ build_id_to_filename (struct build_id *b
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -1702,11 +2056,17 @@ missing_filepair_change (void)
|
||||
@@ -1704,11 +2058,17 @@ missing_filepair_change (void)
|
||||
/* All their memory came just from missing_filepair_OBSTACK. */
|
||||
missing_filepair_hash = NULL;
|
||||
}
|
||||
@ -421,7 +421,7 @@ Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -1773,14 +2133,35 @@ debug_print_missing (const char *binary,
|
||||
@@ -1775,14 +2135,35 @@ debug_print_missing (const char *binary,
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
@ -464,11 +464,11 @@ Index: gdb-7.4.50.20120602/gdb/elfread.c
|
||||
}
|
||||
|
||||
static char *
|
||||
Index: gdb-7.4.50.20120602/gdb/symfile.h
|
||||
Index: gdb-7.5.50.20130215/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/symfile.h 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/symfile.h 2012-06-02 21:08:23.499221877 +0200
|
||||
@@ -621,6 +621,8 @@ extern struct build_id *build_id_addr_ge
|
||||
--- gdb-7.5.50.20130215.orig/gdb/symfile.h 2013-02-15 22:35:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/symfile.h 2013-02-15 22:35:59.414292874 +0100
|
||||
@@ -599,6 +599,8 @@ extern struct build_id *build_id_addr_ge
|
||||
extern char *build_id_to_filename (struct build_id *build_id,
|
||||
char **link_return, int add_debug_suffix);
|
||||
extern void debug_print_missing (const char *binary, const char *debug);
|
||||
@ -477,11 +477,11 @@ Index: gdb-7.4.50.20120602/gdb/symfile.h
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
Index: gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/gdb.exp 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp 2012-06-02 21:08:23.510221873 +0200
|
||||
@@ -1388,7 +1388,7 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:59.415292878 +0100
|
||||
@@ -1482,7 +1482,7 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -490,11 +490,11 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp
|
||||
send_gdb "set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re "$gdb_prompt $" {
|
||||
Index: gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/mi-support.exp 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp 2012-06-02 21:08:23.523221869 +0200
|
||||
@@ -213,7 +213,7 @@ proc default_mi_gdb_start { args } {
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:59.416292881 +0100
|
||||
@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -503,10 +503,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp
|
||||
send_gdb "190-gdb-set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
|
||||
Index: gdb-7.4.50.20120602/gdb/tui/tui-interp.c
|
||||
Index: gdb-7.5.50.20130215/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/tui/tui-interp.c 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/tui/tui-interp.c 2012-06-02 21:08:23.524221869 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/tui/tui-interp.c 2013-01-01 07:41:30.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/tui/tui-interp.c 2013-02-15 22:35:59.416292881 +0100
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
@ -515,10 +515,10 @@ Index: gdb-7.4.50.20120602/gdb/tui/tui-interp.c
|
||||
|
||||
/* Set to 1 when the TUI mode must be activated when we first start
|
||||
gdb. */
|
||||
Index: gdb-7.4.50.20120602/gdb/aclocal.m4
|
||||
Index: gdb-7.5.50.20130215/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/aclocal.m4 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/aclocal.m4 2012-06-02 21:08:23.545221858 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/aclocal.m4 2013-01-17 12:06:26.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/aclocal.m4 2013-02-15 22:35:59.417292883 +0100
|
||||
@@ -11,6 +11,164 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
@ -684,11 +684,11 @@ Index: gdb-7.4.50.20120602/gdb/aclocal.m4
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
|
||||
Index: gdb-7.4.50.20120602/gdb/config.in
|
||||
Index: gdb-7.5.50.20130215/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/config.in 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/config.in 2012-06-02 21:08:23.546221859 +0200
|
||||
@@ -36,6 +36,9 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/config.in 2012-12-09 19:39:58.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/config.in 2013-02-15 22:35:59.417292883 +0100
|
||||
@@ -33,6 +33,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
|
||||
@ -698,7 +698,7 @@ Index: gdb-7.4.50.20120602/gdb/config.in
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
@@ -216,6 +219,9 @@
|
||||
@@ -210,6 +213,9 @@
|
||||
/* Define if Python 2.7 is being used. */
|
||||
#undef HAVE_LIBPYTHON2_7
|
||||
|
||||
@ -708,11 +708,11 @@ Index: gdb-7.4.50.20120602/gdb/config.in
|
||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
Index: gdb-7.4.50.20120602/gdb/configure
|
||||
Index: gdb-7.5.50.20130215/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/configure 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/configure 2012-06-02 21:20:53.245838121 +0200
|
||||
@@ -680,6 +680,11 @@ REPORT_BUGS_TO
|
||||
--- gdb-7.5.50.20130215.orig/gdb/configure 2013-01-09 18:21:33.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/configure 2013-02-15 22:35:59.422292893 +0100
|
||||
@@ -683,6 +683,11 @@ REPORT_BUGS_TO
|
||||
PKGVERSION
|
||||
TARGET_OBS
|
||||
subdirs
|
||||
@ -724,7 +724,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
GDB_DATADIR
|
||||
DEBUGDIR
|
||||
MAKEINFO_EXTRA_FLAGS
|
||||
@@ -780,6 +785,7 @@ with_gdb_datadir
|
||||
@@ -783,6 +788,7 @@ with_gdb_datadir
|
||||
with_relocated_sources
|
||||
with_auto_load_dir
|
||||
with_auto_load_safe_path
|
||||
@ -732,7 +732,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbcli
|
||||
@@ -825,6 +831,11 @@ CPPFLAGS
|
||||
@@ -831,6 +837,11 @@ CPPFLAGS
|
||||
CPP
|
||||
MAKEINFO
|
||||
MAKEINFOFLAGS
|
||||
@ -744,7 +744,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1494,6 +1505,8 @@ Optional Packages:
|
||||
@@ -1501,6 +1512,8 @@ Optional Packages:
|
||||
[--with-auto-load-dir]
|
||||
--without-auto-load-safe-path
|
||||
do not restrict auto-loaded files locations
|
||||
@ -753,7 +753,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1535,6 +1548,13 @@ Some influential environment variables:
|
||||
@@ -1545,6 +1558,13 @@ Some influential environment variables:
|
||||
MAKEINFO Parent configure detects if it is of sufficient version.
|
||||
MAKEINFOFLAGS
|
||||
Parameters for MAKEINFO.
|
||||
@ -767,7 +767,7 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
YACC The `Yet Another C Compiler' implementation to use. Defaults to
|
||||
the first program found out of: `bison -y', `byacc', `yacc'.
|
||||
YFLAGS The list of arguments that will be passed by default to $YACC.
|
||||
@@ -5015,6 +5035,491 @@ _ACEOF
|
||||
@@ -5030,6 +5050,491 @@ _ACEOF
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
||||
$as_echo "$with_auto_load_safe_path" >&6; }
|
||||
|
||||
@ -1259,10 +1259,10 @@ Index: gdb-7.4.50.20120602/gdb/configure
|
||||
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
Index: gdb-7.4.50.20120602/gdb/configure.ac
|
||||
Index: gdb-7.5.50.20130215/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/configure.ac 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/configure.ac 2012-06-02 21:08:23.560221855 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-01-09 18:21:35.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:35:59.423292895 +0100
|
||||
@@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
|
||||
[Directories safe to hold auto-loaded files.])
|
||||
AC_MSG_RESULT([$with_auto_load_safe_path])
|
||||
@ -1463,11 +1463,11 @@ Index: gdb-7.4.50.20120602/gdb/configure.ac
|
||||
AC_CONFIG_SUBDIRS(testsuite)
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
Index: gdb-7.4.50.20120602/gdb/corelow.c
|
||||
Index: gdb-7.5.50.20130215/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/corelow.c 2012-06-02 21:08:08.651227347 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/corelow.c 2012-06-02 21:08:23.561221855 +0200
|
||||
@@ -317,7 +317,7 @@ build_id_locate_exec (int from_tty)
|
||||
--- gdb-7.5.50.20130215.orig/gdb/corelow.c 2013-02-15 22:35:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/corelow.c 2013-02-15 22:35:59.423292895 +0100
|
||||
@@ -313,7 +313,7 @@ build_id_locate_exec (int from_tty)
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
else
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
Index: gdb-7.5.50.20130215/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/corelow.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/corelow.c 2012-08-01 18:37:44.584925750 +0200
|
||||
@@ -47,6 +47,9 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/corelow.c 2013-01-31 19:37:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/corelow.c 2013-02-15 22:35:03.278219844 +0100
|
||||
@@ -46,6 +46,9 @@
|
||||
#include "progspace.h"
|
||||
#include "objfiles.h"
|
||||
#include "gdb_bfd.h"
|
||||
@ -12,7 +12,7 @@ Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
@@ -274,6 +277,52 @@ add_to_thread_list (bfd *abfd, asection
|
||||
@@ -271,6 +274,52 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
/* This routine opens and sets up the core file bfd. */
|
||||
|
||||
static void
|
||||
@@ -418,6 +467,14 @@ core_open (char *filename, int from_tty)
|
||||
@@ -409,6 +458,14 @@ core_open (char *filename, int from_tty)
|
||||
switch_to_thread (thread->ptid);
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
post_create_inferior (&core_ops, from_tty);
|
||||
|
||||
/* Now go through the target stack looking for threads since there
|
||||
@@ -939,4 +996,11 @@ _initialize_corelow (void)
|
||||
@@ -978,4 +1035,11 @@ _initialize_corelow (void)
|
||||
init_core_ops ();
|
||||
|
||||
add_target (&core_ops);
|
||||
@ -92,11 +92,11 @@ Index: gdb-7.4.91.20120801/gdb/corelow.c
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-7.4.91.20120801/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/doc/gdb.texinfo 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/doc/gdb.texinfo 2012-08-01 18:37:44.598925672 +0200
|
||||
@@ -16530,6 +16530,27 @@ information files.
|
||||
--- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo 2013-02-15 22:34:22.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo 2013-02-15 22:35:03.287219863 +0100
|
||||
@@ -16662,6 +16662,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -124,11 +124,11 @@ Index: gdb-7.4.91.20120801/gdb/doc/gdb.texinfo
|
||||
@cindex @code{.gnu_debuglink} sections
|
||||
@cindex debug link sections
|
||||
A debug link is a special section of the executable file named
|
||||
Index: gdb-7.4.91.20120801/gdb/solib-svr4.c
|
||||
Index: gdb-7.5.50.20130215/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/solib-svr4.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/solib-svr4.c 2012-08-01 18:37:44.599925667 +0200
|
||||
@@ -1228,9 +1228,52 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solib-svr4.c 2013-01-31 14:52:52.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solib-svr4.c 2013-02-15 22:35:03.287219863 +0100
|
||||
@@ -1224,9 +1224,52 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -184,10 +184,10 @@ Index: gdb-7.4.91.20120801/gdb/solib-svr4.c
|
||||
xfree (buffer);
|
||||
|
||||
/* If this entry has no name, or its name matches the name
|
||||
Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
Index: gdb-7.5.50.20130215/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/elfread.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/elfread.c 2012-08-01 18:38:08.956790879 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/elfread.c 2013-02-01 20:39:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/elfread.c 2013-02-15 22:35:36.826263354 +0100
|
||||
@@ -45,6 +45,11 @@
|
||||
#include "regcache.h"
|
||||
#include "bcache.h"
|
||||
@ -919,9 +919,9 @@ Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1436,9 +2038,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
`.note.gnu.build-id'. */
|
||||
else if (!objfile_has_partial_symbols (objfile))
|
||||
@@ -1444,9 +2046,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
&& objfile->separate_debug_objfile == NULL
|
||||
&& objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
- char *debugfile;
|
||||
+ char *debugfile, *build_id_filename;
|
||||
@ -932,7 +932,7 @@ Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
@@ -1452,6 +2055,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1460,6 +2063,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
symbol_file_add_separate (abfd, symfile_flags, objfile);
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
@ -945,7 +945,7 @@ Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
}
|
||||
|
||||
if (symtab_create_debug)
|
||||
@@ -1784,4 +2393,16 @@ _initialize_elfread (void)
|
||||
@@ -1782,4 +2391,16 @@ _initialize_elfread (void)
|
||||
|
||||
elf_objfile_gnu_ifunc_cache_data = register_objfile_data ();
|
||||
gnu_ifunc_fns_p = &elf_gnu_ifunc_fns;
|
||||
@ -962,11 +962,11 @@ Index: gdb-7.4.91.20120801/gdb/elfread.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
}
|
||||
Index: gdb-7.4.91.20120801/gdb/symfile.h
|
||||
Index: gdb-7.5.50.20130215/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/symfile.h 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/symfile.h 2012-08-01 18:37:44.600925662 +0200
|
||||
@@ -615,6 +615,13 @@ void free_symfile_segment_data (struct s
|
||||
--- gdb-7.5.50.20130215.orig/gdb/symfile.h 2013-02-03 17:20:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/symfile.h 2013-02-15 22:35:03.288219867 +0100
|
||||
@@ -593,6 +593,13 @@ void free_symfile_segment_data (struct s
|
||||
|
||||
extern struct cleanup *increment_reading_symtab (void);
|
||||
|
||||
@ -980,11 +980,11 @@ Index: gdb-7.4.91.20120801/gdb/symfile.h
|
||||
/* From dwarf2read.c */
|
||||
|
||||
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
|
||||
Index: gdb-7.4.91.20120801/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/testsuite/lib/gdb.exp 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/testsuite/lib/gdb.exp 2012-08-01 18:37:44.601925656 +0200
|
||||
@@ -1388,6 +1388,16 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/gdb.exp 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:03.289219870 +0100
|
||||
@@ -1482,6 +1482,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -1001,11 +1001,11 @@ Index: gdb-7.4.91.20120801/gdb/testsuite/lib/gdb.exp
|
||||
return 0;
|
||||
}
|
||||
|
||||
Index: gdb-7.4.91.20120801/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/testsuite/lib/mi-support.exp 2012-07-25 22:35:30.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/testsuite/lib/mi-support.exp 2012-08-01 18:37:44.601925656 +0200
|
||||
@@ -213,6 +213,16 @@ proc default_mi_gdb_start { args } {
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/mi-support.exp 2013-01-22 00:57:59.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:03.289219870 +0100
|
||||
@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -1022,10 +1022,10 @@ Index: gdb-7.4.91.20120801/gdb/testsuite/lib/mi-support.exp
|
||||
# If allowing the inferior to have its own PTY then assign the inferior
|
||||
# its own terminal device here.
|
||||
if { $separate_inferior_pty } {
|
||||
Index: gdb-7.4.91.20120801/gdb/objfiles.h
|
||||
Index: gdb-7.5.50.20130215/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/objfiles.h 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/objfiles.h 2012-08-01 18:37:44.601925656 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/objfiles.h 2013-01-01 07:32:47.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/objfiles.h 2013-02-15 22:35:03.290219872 +0100
|
||||
@@ -432,6 +432,10 @@ struct objfile
|
||||
|
||||
#define OBJF_MAINLINE (1 << 5)
|
||||
@ -1037,10 +1037,10 @@ Index: gdb-7.4.91.20120801/gdb/objfiles.h
|
||||
/* The object file that contains the runtime common minimal symbols
|
||||
for SunOS4. Note that this objfile has no associated BFD. */
|
||||
|
||||
Index: gdb-7.4.91.20120801/gdb/testsuite/gdb.base/corefile.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/corefile.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/testsuite/gdb.base/corefile.exp 2012-06-21 22:46:21.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/testsuite/gdb.base/corefile.exp 2012-08-01 18:37:44.602925650 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.base/corefile.exp 2013-01-01 07:33:25.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/corefile.exp 2013-02-15 22:35:03.290219872 +0100
|
||||
@@ -256,3 +256,33 @@ if ![is_remote target] {
|
||||
|
||||
gdb_exit
|
||||
|
@ -5,8 +5,10 @@ The original testcase
|
||||
requires too recent GCC.
|
||||
|
||||
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.exp 25 Feb 2007 18:27:39 -0000
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.exp 2013-02-25 14:31:06.658827177 +0100
|
||||
@@ -0,0 +1,54 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -53,17 +55,19 @@ requires too recent GCC.
|
||||
+gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl"
|
||||
+gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes"
|
||||
+gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd"
|
||||
+gdb_test "disass func" ":\tdaddq *f1,f2,f1\r\n.*" "Power6 disassembly daddq"
|
||||
+gdb_test "disass func" ":\tdaddq *f0,f2,f0\r\n.*" "Power6 disassembly daddq"
|
||||
+gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub"
|
||||
+gdb_test "disass func" ":\tdsubq *f1,f2,f1\r\n.*" "Power6 disassembly dsubq"
|
||||
+gdb_test "disass func" ":\tdsubq *f0,f2,f0\r\n.*" "Power6 disassembly dsubq"
|
||||
+gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul"
|
||||
+gdb_test "disass func" ":\tdmulq *f1,f2,f1\r\n.*" "Power6 disassembly dmulq"
|
||||
+gdb_test "disass func" ":\tdmulq *f0,f2,f0\r\n.*" "Power6 disassembly dmulq"
|
||||
+gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv"
|
||||
+gdb_test "disass func" ":\tddivq *f1,f2,f1\r\n.*" "Power6 disassembly ddivq"
|
||||
+gdb_test "disass func" ":\tddivq *f0,f2,f0\r\n.*" "Power6 disassembly ddivq"
|
||||
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
|
||||
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpuq"
|
||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.s 25 Feb 2007 18:27:39 -0000
|
||||
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq"
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.s 2013-02-25 14:31:06.659827178 +0100
|
||||
@@ -0,0 +1,16 @@
|
||||
+ .text
|
||||
+ .globl func
|
||||
@ -72,12 +76,12 @@ requires too recent GCC.
|
||||
+ .long 0x7c284fec /* dcbzl r8,r9 */
|
||||
+ .long 0xed405834 /* frsqrtes f10,f11 */
|
||||
+ .long 0xec220804 /* dadd f1,f2,f1 */
|
||||
+ .long 0xfc220804 /* daddq f1,f2,f1 */
|
||||
+ .long 0xfc020004 /* daddq f0,f2,f0 */
|
||||
+ .long 0xec220c04 /* dsub f1,f2,f1 */
|
||||
+ .long 0xfc220c04 /* dsubq f1,f2,f1 */
|
||||
+ .long 0xfc020404 /* dsubq f0,f2,f0 */
|
||||
+ .long 0xec220844 /* dmul f1,f2,f1 */
|
||||
+ .long 0xfc220844 /* dmulq f1,f2,f1 */
|
||||
+ .long 0xfc020044 /* dmulq f0,f2,f0 */
|
||||
+ .long 0xec220c44 /* ddiv f1,f2,f1 */
|
||||
+ .long 0xfc220c44 /* ddivq f1,f2,f1 */
|
||||
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
|
||||
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
|
||||
+ .long 0xfc820d04 /* dcmpuq cr1,f2,f1 */
|
||||
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.4.50.20120703/gdb/infrun.c
|
||||
Index: gdb-7.5.50.20130118/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/infrun.c 2012-07-03 20:26:25.060940765 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/infrun.c 2012-07-03 20:26:32.808929860 +0200
|
||||
@@ -1591,7 +1591,7 @@ static const char *const scheduler_enums
|
||||
--- gdb-7.5.50.20130118.orig/gdb/infrun.c 2013-01-19 20:56:34.142917416 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/infrun.c 2013-01-19 20:56:34.662918474 +0100
|
||||
@@ -1628,7 +1628,7 @@ static const char *const scheduler_enums
|
||||
schedlock_step,
|
||||
NULL
|
||||
};
|
||||
@ -11,11 +11,46 @@ Index: gdb-7.4.50.20120703/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.4.50.20120703/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.mi/mi-console.exp 2012-07-03 20:26:25.060940765 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.mi/mi-console.exp 2012-07-03 20:26:32.809929858 +0200
|
||||
@@ -46,6 +46,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2013-01-01 07:41:24.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-cli.exp 2013-01-19 20:56:34.662918474 +0100
|
||||
@@ -163,7 +163,7 @@ mi_execute_to "exec-continue" "breakpoin
|
||||
# Test that the token is output even for CLI commands
|
||||
# Also test that *stopped includes frame information.
|
||||
mi_gdb_test "34 next" \
|
||||
- ".*34\\\^running.*\\*running,thread-id=\"all\"" \
|
||||
+ ".*34\\\^running.*\\*running,thread-id=\"1\"" \
|
||||
"34 next: run"
|
||||
|
||||
if {!$async} {
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-logging.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2013-01-01 07:41:24.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-logging.exp 2013-01-19 20:56:34.662918474 +0100
|
||||
@@ -53,7 +53,7 @@ close $chan
|
||||
|
||||
set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
|
||||
|
||||
-if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
+if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
pass "Log file contents"
|
||||
} else {
|
||||
fail "Log file contents"
|
||||
@@ -76,7 +76,7 @@ set chan [open $milogfile]
|
||||
set logcontent [read $chan]
|
||||
close $chan
|
||||
|
||||
-if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
+if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
pass "Redirect log file contents"
|
||||
} else {
|
||||
fail "Redirect log file contents"
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-console.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.mi/mi-console.exp 2013-01-01 07:41:24.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.mi/mi-console.exp 2013-01-19 20:56:55.783961145 +0100
|
||||
@@ -45,6 +45,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
|
||||
mi_run_to_main
|
||||
|
||||
@ -25,52 +60,3 @@ Index: gdb-7.4.50.20120703/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.4.50.20120703/gdb/testsuite/gdb.mi/mi2-console.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2012-07-03 20:26:25.060940765 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.mi/mi2-console.exp 2012-07-03 20:26:32.809929858 +0200
|
||||
@@ -46,6 +46,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||
|
||||
mi_run_to_main
|
||||
|
||||
+# thread-id=\"all\" vs. thread-id=\"1\" below:
|
||||
+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
|
||||
mi_gdb_test "220-exec-next" "220\\^running(\r\n)?(\\*running,thread-id=\"all\")?" \
|
||||
"Started step over hello"
|
||||
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2012-07-03 20:26:25.060940765 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.mi/mi-cli.exp 2012-07-03 20:26:32.810929856 +0200
|
||||
@@ -175,7 +175,7 @@ mi_execute_to "exec-continue" "breakpoin
|
||||
# Test that the token is output even for CLI commands
|
||||
# Also test that *stopped includes frame information.
|
||||
mi_gdb_test "34 next" \
|
||||
- ".*34\\\^running.*\\*running,thread-id=\"all\"" \
|
||||
+ ".*34\\\^running.*\\*running,thread-id=\"1\"" \
|
||||
"34 next: run"
|
||||
|
||||
if {!$async} {
|
||||
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.mi/mi-logging.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2012-06-29 00:11:23.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.mi/mi-logging.exp 2012-07-03 20:29:03.573717651 +0200
|
||||
@@ -56,7 +56,7 @@ close $chan
|
||||
|
||||
set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
|
||||
|
||||
-if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
+if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
pass "Log file contents"
|
||||
} else {
|
||||
fail "Log file contents"
|
||||
@@ -79,7 +79,7 @@ set chan [open $milogfile]
|
||||
set logcontent [read $chan]
|
||||
close $chan
|
||||
|
||||
-if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
+if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
|
||||
pass "Redirect log file contents"
|
||||
} else {
|
||||
fail "Redirect log file contents"
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-7.4.50.20120714/gdb/inferior.h
|
||||
Index: gdb-7.5.50.20130215/gdb/inferior.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120714.orig/gdb/inferior.h 2012-06-13 20:15:05.000000000 +0200
|
||||
+++ gdb-7.4.50.20120714/gdb/inferior.h 2012-07-14 23:21:01.795161794 +0200
|
||||
@@ -159,7 +159,15 @@ extern void reopen_exec_file (void);
|
||||
--- gdb-7.5.50.20130215.orig/gdb/inferior.h 2013-01-16 18:31:38.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/inferior.h 2013-02-15 22:31:42.993944957 +0100
|
||||
@@ -160,7 +160,15 @@ extern void reopen_exec_file (void);
|
||||
/* The `resume' routine should only be called in special circumstances.
|
||||
Normally, use `proceed', which handles a lot of bookkeeping. */
|
||||
|
||||
@ -42,11 +42,11 @@ Index: gdb-7.4.50.20120714/gdb/inferior.h
|
||||
|
||||
extern ptid_t user_visible_resume_ptid (int step);
|
||||
|
||||
Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
Index: gdb-7.5.50.20130215/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120714.orig/gdb/infrun.c 2012-07-01 12:37:04.000000000 +0200
|
||||
+++ gdb-7.4.50.20120714/gdb/infrun.c 2012-07-14 23:21:01.800161767 +0200
|
||||
@@ -79,7 +79,7 @@ static int follow_fork (void);
|
||||
--- gdb-7.5.50.20130215.orig/gdb/infrun.c 2013-01-31 20:18:58.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/infrun.c 2013-02-15 22:34:07.132144519 +0100
|
||||
@@ -81,7 +81,7 @@ static int follow_fork (void);
|
||||
static void set_schedlock_func (char *args, int from_tty,
|
||||
struct cmd_list_element *c);
|
||||
|
||||
@ -55,7 +55,7 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
|
||||
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
|
||||
void *data);
|
||||
@@ -1672,7 +1672,8 @@ user_visible_resume_ptid (int step)
|
||||
@@ -1709,7 +1709,8 @@ user_visible_resume_ptid (int step)
|
||||
}
|
||||
else if ((scheduler_mode == schedlock_on)
|
||||
|| (scheduler_mode == schedlock_step
|
||||
@ -65,7 +65,7 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
{
|
||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||
resume_ptid = inferior_ptid;
|
||||
@@ -1690,7 +1691,7 @@ user_visible_resume_ptid (int step)
|
||||
@@ -1727,7 +1728,7 @@ user_visible_resume_ptid (int step)
|
||||
STEP nonzero if we should step (zero to continue instead).
|
||||
SIG is the signal to give the inferior (zero for none). */
|
||||
void
|
||||
@ -74,7 +74,7 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
{
|
||||
int should_resume = 1;
|
||||
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
|
||||
@@ -1723,9 +1724,13 @@ resume (int step, enum gdb_signal sig)
|
||||
@@ -1760,9 +1761,13 @@ resume (int step, enum gdb_signal sig)
|
||||
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -90,48 +90,48 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
target_pid_to_str (inferior_ptid),
|
||||
paddress (gdbarch, pc));
|
||||
|
||||
@@ -2102,7 +2107,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
struct thread_info *tp;
|
||||
@@ -2140,7 +2145,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
CORE_ADDR pc;
|
||||
struct address_space *aspace;
|
||||
- int oneproc = 0;
|
||||
/* GDB may force the inferior to step due to various reasons. */
|
||||
- int force_step = 0;
|
||||
+ enum resume_step resume_step = RESUME_STEP_CONTINUE;
|
||||
|
||||
/* If we're stopped at a fork/vfork, follow the branch set by the
|
||||
"set follow-fork-mode" command; otherwise, we'll just proceed
|
||||
@@ -2142,13 +2147,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2180,13 +2185,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
actually be executing the breakpoint insn anyway.
|
||||
We'll be (un-)executing the previous instruction. */
|
||||
|
||||
- oneproc = 1;
|
||||
- force_step = 1;
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
else if (gdbarch_single_step_through_delay_p (gdbarch)
|
||||
&& gdbarch_single_step_through_delay (gdbarch,
|
||||
get_current_frame ()))
|
||||
/* We stepped onto an instruction that needs to be stepped
|
||||
again before re-inserting the breakpoint, do so. */
|
||||
- oneproc = 1;
|
||||
- force_step = 1;
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2179,13 +2184,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2217,13 +2222,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
is required it returns TRUE and sets the current thread to
|
||||
the old thread. */
|
||||
if (prepare_to_proceed (step))
|
||||
- oneproc = 1;
|
||||
- force_step = 1;
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
}
|
||||
|
||||
/* prepare_to_proceed may change the current thread. */
|
||||
tp = inferior_thread ();
|
||||
|
||||
- if (oneproc)
|
||||
- if (force_step)
|
||||
+ if (resume_step == RESUME_STEP_USER)
|
||||
{
|
||||
tp->control.trap_expected = 1;
|
||||
/* If displaced stepping is enabled, we can step over the
|
||||
@@ -2272,8 +2277,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2310,9 +2315,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
/* Reset to normal state. */
|
||||
init_infwait_state ();
|
||||
|
||||
@ -141,12 +141,13 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
+ resume_step = RESUME_STEP_NEEDED;
|
||||
+
|
||||
/* Resume inferior. */
|
||||
- resume (oneproc || step || bpstat_should_step (), tp->suspend.stop_signal);
|
||||
- resume (force_step || step || bpstat_should_step (),
|
||||
- tp->suspend.stop_signal);
|
||||
+ resume (resume_step, tp->suspend.stop_signal);
|
||||
|
||||
/* Wait for it to stop (if not standalone)
|
||||
and in any case decode why it stopped, and act accordingly. */
|
||||
@@ -5205,13 +5215,18 @@ process_event_stop_test:
|
||||
@@ -5247,13 +5256,18 @@ process_event_stop_test:
|
||||
|
||||
/* Is thread TP in the middle of single-stepping? */
|
||||
|
||||
@ -170,11 +171,11 @@ Index: gdb-7.4.50.20120714/gdb/infrun.c
|
||||
}
|
||||
|
||||
/* Returns true if any thread *but* the one passed in "data" is in the
|
||||
Index: gdb-7.4.50.20120714/gdb/linux-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120714.orig/gdb/linux-nat.c 2012-07-07 14:13:56.000000000 +0200
|
||||
+++ gdb-7.4.50.20120714/gdb/linux-nat.c 2012-07-14 23:21:01.803161750 +0200
|
||||
@@ -2982,7 +2982,11 @@ static int
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-13 15:59:49.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:31:42.997944967 +0100
|
||||
@@ -2971,7 +2971,11 @@ static int
|
||||
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
|
||||
{
|
||||
if (lp->last_resume_kind == resume_step
|
||||
@ -187,10 +188,10 @@ Index: gdb-7.4.50.20120714/gdb/linux-nat.c
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
Index: gdb-7.4.50.20120714/gdb/linux-nat.h
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120714.orig/gdb/linux-nat.h 2012-07-06 18:52:20.000000000 +0200
|
||||
+++ gdb-7.4.50.20120714/gdb/linux-nat.h 2012-07-14 23:21:17.414075355 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.h 2013-02-13 15:59:49.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.h 2013-02-15 22:31:42.998944969 +0100
|
||||
@@ -73,8 +73,8 @@ struct lwp_info
|
||||
/* If non-zero, a pending wait status. */
|
||||
int status;
|
||||
|
152
gdb-6.8-attach-signalled-detach-stopped.patch
Normal file
152
gdb-6.8-attach-signalled-detach-stopped.patch
Normal file
@ -0,0 +1,152 @@
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-15 22:38:05.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:44:59.638985719 +0100
|
||||
@@ -181,6 +181,9 @@ blocked. */
|
||||
static struct target_ops *linux_ops;
|
||||
static struct target_ops linux_ops_saved;
|
||||
|
||||
+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */
|
||||
+static pid_t pid_was_stopped;
|
||||
+
|
||||
/* The method to call, if any, when a new thread is attached. */
|
||||
static void (*linux_nat_new_thread) (struct lwp_info *);
|
||||
|
||||
@@ -914,7 +917,14 @@ holding the child stopped. Try \"set de
|
||||
parent_inf->waiting_for_vfork_done = 0;
|
||||
}
|
||||
else if (detach_fork)
|
||||
- target_detach (NULL, 0);
|
||||
+ {
|
||||
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
|
||||
+ In this point of code it cannot be 1 as we would not get FORK
|
||||
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
|
||||
+ We would have to first TARGET_STOP and WAITPID it as with running
|
||||
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
|
||||
+ target_detach (NULL, 0);
|
||||
+ }
|
||||
|
||||
/* Note that the detach above makes PARENT_INF dangling. */
|
||||
|
||||
@@ -1362,6 +1372,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNPAW: Attaching to a stopped process\n");
|
||||
+ pid_was_stopped = GET_PID (ptid);
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1790,6 +1801,9 @@ get_pending_status (struct lwp_info *lp,
|
||||
gdb_signal_to_string (signo));
|
||||
}
|
||||
|
||||
+ if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
|
||||
+ *status = W_STOPCODE (SIGSTOP);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1900,6 +1914,8 @@ linux_nat_detach (struct target_ops *ops
|
||||
}
|
||||
else
|
||||
linux_ops->to_detach (ops, args, from_tty);
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
}
|
||||
|
||||
/* Resume LP. */
|
||||
@@ -2086,6 +2102,14 @@ linux_nat_resume (struct target_ops *ops
|
||||
linux_nat_resume_callback. */
|
||||
lp->stopped = 0;
|
||||
|
||||
+ /* At this point, we are going to resume the inferior and if we
|
||||
+ have attached to a stopped process, we no longer should leave
|
||||
+ it as stopped if the user detaches. PTID variable has PID set to LWP
|
||||
+ while we need to check the real PID here. */
|
||||
+
|
||||
+ if (!step && lp && pid_was_stopped == GET_PID (lp->ptid))
|
||||
+ pid_was_stopped = 0;
|
||||
+
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, linux_nat_resume_callback, NULL);
|
||||
|
||||
@@ -4137,6 +4161,8 @@ linux_nat_mourn_inferior (struct target_
|
||||
|
||||
/* Let the arch-specific native code know this process is gone. */
|
||||
linux_nat_forget_process (pid);
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
}
|
||||
|
||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2013-01-01 07:41:27.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.threads/attach-stopped.exp 2013-02-15 22:44:23.262930312 +0100
|
||||
@@ -61,7 +61,65 @@ proc corefunc { threadtype } {
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
- # Verify that we can attach to the stopped process.
|
||||
+ # Verify that we can attach to the process by first giving its
|
||||
+ # executable name via the file command, and using attach with the
|
||||
+ # process ID.
|
||||
+
|
||||
+ set test "$threadtype: set file, before attach1 to stopped process"
|
||||
+ gdb_test_multiple "file $binfile" "$test" {
|
||||
+ -re "Load new symbol table from.*y or n. $" {
|
||||
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
|
||||
+ "$test (re-read)"
|
||||
+ }
|
||||
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ set test "$threadtype: attach1 to stopped, after setting file"
|
||||
+ gdb_test_multiple "attach $testpid" "$test" {
|
||||
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there.
|
||||
+ if {[string equal $threadtype threaded]} {
|
||||
+ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt"
|
||||
+ } else {
|
||||
+ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt"
|
||||
+ }
|
||||
+
|
||||
+ # Exit and detach the process.
|
||||
+
|
||||
+ gdb_exit
|
||||
+
|
||||
+ # Avoid some race:
|
||||
+ sleep 2
|
||||
+
|
||||
+ if [catch {open /proc/${testpid}/status r} fileid] {
|
||||
+ set line2 "NOTFOUND"
|
||||
+ } else {
|
||||
+ gets $fileid line1;
|
||||
+ gets $fileid line2;
|
||||
+ close $fileid;
|
||||
+ }
|
||||
+
|
||||
+ set test "$threadtype: attach1, exit leaves process stopped"
|
||||
+ if {[string match "*(stopped)*" $line2]} {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ fail $test
|
||||
+ }
|
||||
+
|
||||
+ # At this point, the process should still be stopped
|
||||
+
|
||||
+ gdb_start
|
||||
+ gdb_reinitialize_dir $srcdir/$subdir
|
||||
+ gdb_load ${binfile}
|
||||
+
|
||||
+ # Verify that we can attach to the process just by giving the
|
||||
+ # process ID.
|
||||
|
||||
set test "$threadtype: attach2 to stopped, after setting file"
|
||||
gdb_test_multiple "attach $testpid" "$test" {
|
@ -1,280 +0,0 @@
|
||||
Index: gdb-7.4.50.20120602/bfd/elf-bfd.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/bfd/elf-bfd.h 2012-06-02 21:26:09.928717069 +0200
|
||||
+++ gdb-7.4.50.20120602/bfd/elf-bfd.h 2012-06-02 21:27:21.727689625 +0200
|
||||
@@ -2221,8 +2221,10 @@ extern Elf_Internal_Phdr * _bfd_elf_find
|
||||
/* Exported interface for writing elf corefile notes. */
|
||||
extern char *elfcore_write_note
|
||||
(bfd *, char *, int *, const char *, int, const void *, int);
|
||||
+struct elf_prpsinfo;
|
||||
+typedef struct elf_prpsinfo prpsinfo_t;
|
||||
extern char *elfcore_write_prpsinfo
|
||||
- (bfd *, char *, int *, const char *, const char *);
|
||||
+ (bfd *, char *, int *, const prpsinfo_t *);
|
||||
extern char *elfcore_write_prstatus
|
||||
(bfd *, char *, int *, long, int, const void *);
|
||||
extern char * elfcore_write_pstatus
|
||||
Index: gdb-7.4.50.20120602/bfd/elf.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/bfd/elf.c 2012-06-02 21:26:09.928717069 +0200
|
||||
+++ gdb-7.4.50.20120602/bfd/elf.c 2012-06-02 21:27:21.732689623 +0200
|
||||
@@ -8917,56 +8917,61 @@ char *
|
||||
elfcore_write_prpsinfo (bfd *abfd,
|
||||
char *buf,
|
||||
int *bufsiz,
|
||||
- const char *fname,
|
||||
- const char *psargs)
|
||||
+ const prpsinfo_t *input)
|
||||
{
|
||||
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
||||
|
||||
if (bed->elf_backend_write_core_note != NULL)
|
||||
{
|
||||
char *ret;
|
||||
+ char fname[sizeof (input->pr_fname) + 1];
|
||||
+ char psargs[sizeof (input->pr_psargs) + 1];
|
||||
+
|
||||
+ strncpy (fname, input->pr_fname, sizeof (input->pr_fname));
|
||||
+ fname[sizeof (input->pr_fname)] = 0;
|
||||
+ strncpy (psargs, input->pr_psargs, sizeof (input->pr_psargs));
|
||||
+ psargs[sizeof (input->pr_psargs)] = 0;
|
||||
+
|
||||
ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz,
|
||||
NT_PRPSINFO, fname, psargs);
|
||||
if (ret != NULL)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
|
||||
-#if defined (HAVE_PRPSINFO32_T) || defined (HAVE_PSINFO32_T)
|
||||
+#if defined (HAVE_PRPSINFO_T)
|
||||
+#if defined (HAVE_PRPSINFO32_T)
|
||||
if (bed->s->elfclass == ELFCLASS32)
|
||||
{
|
||||
-#if defined (HAVE_PSINFO32_T)
|
||||
- psinfo32_t data;
|
||||
- int note_type = NT_PSINFO;
|
||||
-#else
|
||||
prpsinfo32_t data;
|
||||
int note_type = NT_PRPSINFO;
|
||||
-#endif
|
||||
|
||||
- memset (&data, 0, sizeof (data));
|
||||
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
|
||||
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
|
||||
+ data.pr_state = input->pr_state;
|
||||
+ data.pr_sname = input->pr_sname;
|
||||
+ data.pr_zomb = input->pr_zomb;
|
||||
+ data.pr_nice = input->pr_nice;
|
||||
+ data.pr_flag = input->pr_flag;
|
||||
+ data.pr_uid = input->pr_uid;
|
||||
+ data.pr_gid = input->pr_gid;
|
||||
+ data.pr_pid = input->pr_pid;
|
||||
+ data.pr_ppid = input->pr_ppid;
|
||||
+ data.pr_pgrp = input->pr_pgrp;
|
||||
+ data.pr_sid = input->pr_sid;
|
||||
+ BFD_ASSERT (sizeof (data.pr_fname) == sizeof (input->pr_fname));
|
||||
+ memcpy (data.pr_fname, input->pr_fname, sizeof (data.pr_fname));
|
||||
+ BFD_ASSERT (sizeof (data.pr_psargs) == sizeof (input->pr_psargs));
|
||||
+ memcpy (data.pr_psargs, input->pr_psargs, sizeof (data.pr_psargs));
|
||||
return elfcore_write_note (abfd, buf, bufsiz,
|
||||
"CORE", note_type, &data, sizeof (data));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
-#if defined (HAVE_PSINFO_T)
|
||||
- psinfo_t data;
|
||||
- int note_type = NT_PSINFO;
|
||||
-#else
|
||||
- prpsinfo_t data;
|
||||
int note_type = NT_PRPSINFO;
|
||||
-#endif
|
||||
|
||||
- memset (&data, 0, sizeof (data));
|
||||
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
|
||||
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
|
||||
return elfcore_write_note (abfd, buf, bufsiz,
|
||||
- "CORE", note_type, &data, sizeof (data));
|
||||
+ "CORE", note_type, input, sizeof (*input));
|
||||
}
|
||||
-#endif /* PSINFO_T or PRPSINFO_T */
|
||||
+#endif /* PRPSINFO_T */
|
||||
|
||||
free (buf);
|
||||
return NULL;
|
||||
Index: gdb-7.4.50.20120602/gdb/procfs.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/procfs.c 2012-06-02 21:26:09.928717069 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/procfs.c 2012-06-02 21:27:21.745689618 +0200
|
||||
@@ -5541,6 +5541,7 @@ procfs_make_note_section (bfd *obfd, int
|
||||
note_data = (char *) elfcore_write_prpsinfo (obfd,
|
||||
note_data,
|
||||
note_size,
|
||||
+ NULL,
|
||||
fname,
|
||||
psargs);
|
||||
|
||||
Index: gdb-7.4.50.20120602/gdb/linux-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/linux-tdep.c 2012-06-02 21:26:09.928717069 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/linux-tdep.c 2012-06-02 21:31:12.051601510 +0200
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "elf-bfd.h" /* for elfcore_write_* */
|
||||
#include "inferior.h"
|
||||
#include "cli/cli-utils.h"
|
||||
+#include <sys/procfs.h>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -769,6 +770,131 @@ linux_corefile_thread_callback (struct t
|
||||
return !args->note_data;
|
||||
}
|
||||
|
||||
+/* Should be always true for Linux */
|
||||
+#define HAVE_PRPSINFO_T 1
|
||||
+
|
||||
+#if defined (HAVE_PRPSINFO_T)
|
||||
+
|
||||
+/* Fills struct elf_prpsinfo{32,64} as much as possible, imitate Linux kernel
|
||||
+ binfmt_elf.c. Unknown values are filled with zeroes. The structure is
|
||||
+ malloced. */
|
||||
+
|
||||
+static const prpsinfo_t *
|
||||
+fill_prpsinfo (void)
|
||||
+{
|
||||
+ struct stat sb;
|
||||
+ char filename[sizeof ("/proc//cmdline") + sizeof (int) * 3 + 2];
|
||||
+ char buf[1024];
|
||||
+ char proc_state[5];
|
||||
+ char proc_cmdline[sizeof (((struct elf_prpsinfo*)0)->pr_psargs) + 1];
|
||||
+ unsigned flags;
|
||||
+ long proc_nice;
|
||||
+ unsigned proc_ppid;
|
||||
+ unsigned proc_pgid;
|
||||
+ unsigned proc_sid;
|
||||
+ pid_t pid;
|
||||
+ int fd, n;
|
||||
+ char *cp, *proc_comm, *state_s;
|
||||
+ /* String comes from Linux kernel binfmt_elf.c FILL_PSINFO but it is already
|
||||
+ obsolete there to <linux/sched.h> TASK_* constants. */
|
||||
+ const char state_string[] = "RSDTZW";
|
||||
+ int state_num;
|
||||
+ static prpsinfo_t retval;
|
||||
+
|
||||
+ /* Get /proc/$PID/stat. */
|
||||
+ pid = ptid_get_pid (inferior_ptid);
|
||||
+ sprintf (filename, "/proc/%u/stat", (unsigned)pid);
|
||||
+ fd = open (filename, O_RDONLY);
|
||||
+ if (fd < 0)
|
||||
+ return NULL;
|
||||
+ fstat (fd, &sb); /* No error checking (can it ever happen?). */
|
||||
+ n = read (fd, buf, sizeof (buf) - 1);
|
||||
+ close (fd);
|
||||
+ if (n < 0)
|
||||
+ return NULL;
|
||||
+ buf[n] = 0;
|
||||
+
|
||||
+ cp = strrchr (buf, ')'); /* Split into "PID (COMM" and "<rest>". */
|
||||
+ if (!cp)
|
||||
+ return NULL;
|
||||
+ *cp = 0;
|
||||
+
|
||||
+ /* Grab COMM. */
|
||||
+ proc_comm = strchr (buf, '(');
|
||||
+ if (!proc_comm)
|
||||
+ return NULL;
|
||||
+ proc_comm++;
|
||||
+
|
||||
+ /* Read /proc/$PID/cmdline. */
|
||||
+ proc_cmdline[0] = 0;
|
||||
+ strcpy (strrchr (filename, '/'), "/cmdline");
|
||||
+ fd = open (filename, O_RDONLY);
|
||||
+ if (fd >= 0)
|
||||
+ {
|
||||
+ int n;
|
||||
+
|
||||
+ n = read (fd, proc_cmdline, sizeof (proc_cmdline) - 1);
|
||||
+ if (n < 0)
|
||||
+ n = 0;
|
||||
+ proc_cmdline[n] = 0;
|
||||
+ while (n--) /* Replace NULs with spaces. */
|
||||
+ if (proc_cmdline[n] == 0)
|
||||
+ proc_cmdline[n] = ' ';
|
||||
+ close (fd);
|
||||
+ }
|
||||
+
|
||||
+ /* Parse /proc/$PID/stat. */
|
||||
+ n = sscanf (cp + 2, /* skip ") " */
|
||||
+ "%4s %u " /* state, ppid */
|
||||
+ "%u %u %*s %*s " /* pgid, sid, tty, tpgid */
|
||||
+ "%u %*s %*s %*s " /* flags, min_flt, cmin_flt, maj_flt */
|
||||
+ "%*s " /* cmaj_flt */
|
||||
+ "%*s %*s " /* utime, stime */
|
||||
+ "%*s %*s %*s " /* cutime, cstime, priority */
|
||||
+ "%ld " /* nice */
|
||||
+ /*"%*s %*s " timeout, it_real_value */
|
||||
+ /*"%lu " start_time */
|
||||
+ /*"%lu " vsize */
|
||||
+ /*"%lu " rss */
|
||||
+ /*"%lu %lu %lu " rss_rlim, start_code, end_code */
|
||||
+ /*"%lu %lu %lu " start_stack, kstk_esp, kstk_eip */
|
||||
+ /*"%u %u %u %u " signal, blocked, sigignore, sigcatch */
|
||||
+ /*"%lu %lu %lu" wchan, nswap, cnswap */
|
||||
+ , proc_state, &proc_ppid,
|
||||
+ &proc_pgid, &proc_sid,
|
||||
+ &flags,
|
||||
+ &proc_nice);
|
||||
+ if (n != 6)
|
||||
+ return NULL;
|
||||
+
|
||||
+ state_s = strchr (state_string, proc_state[0]);
|
||||
+ if (state_s != NULL)
|
||||
+ state_num = state_s - state_string;
|
||||
+ else
|
||||
+ {
|
||||
+ /* 0 means Running, some more unusal state would be better. */
|
||||
+ state_num = 0;
|
||||
+ }
|
||||
+
|
||||
+ memset (&retval, 0, sizeof (retval));
|
||||
+ retval.pr_state = state_num;
|
||||
+ retval.pr_sname = proc_state[0];
|
||||
+ retval.pr_zomb = (proc_state[0] == 'Z');
|
||||
+ retval.pr_nice = proc_nice;
|
||||
+ retval.pr_flag = flags;
|
||||
+ retval.pr_uid = sb.st_uid;
|
||||
+ retval.pr_gid = sb.st_gid;
|
||||
+ retval.pr_pid = pid;
|
||||
+ retval.pr_ppid = proc_ppid;
|
||||
+ retval.pr_pgrp = proc_pgid;
|
||||
+ retval.pr_sid = proc_sid;
|
||||
+ strncpy (retval.pr_fname, proc_comm, sizeof (retval.pr_fname));
|
||||
+ strncpy (retval.pr_psargs, proc_cmdline, sizeof (retval.pr_psargs));
|
||||
+
|
||||
+ return &retval;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* Fills the "to_make_corefile_note" target vector. Builds the note
|
||||
section for a corefile, and returns it in a malloc buffer. */
|
||||
|
||||
@@ -784,16 +910,9 @@ linux_make_corefile_notes (struct gdbarc
|
||||
/* Process information. */
|
||||
if (get_exec_file (0))
|
||||
{
|
||||
- const char *fname = lbasename (get_exec_file (0));
|
||||
- char *psargs = xstrdup (fname);
|
||||
+ const prpsinfo_t *data = fill_prpsinfo ();
|
||||
|
||||
- if (get_inferior_args ())
|
||||
- psargs = reconcat (psargs, psargs, " ", get_inferior_args (),
|
||||
- (char *) NULL);
|
||||
-
|
||||
- note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
|
||||
- fname, psargs);
|
||||
- xfree (psargs);
|
||||
+ note_data = elfcore_write_prpsinfo (obfd, note_data, note_size, data);
|
||||
|
||||
if (!note_data)
|
||||
return NULL;
|
@ -5,45 +5,23 @@ Some of the threads may not be properly PTRACE_DETACHed which hurts if they
|
||||
should have been detached with SIGSTOP (as they are accidentally left running
|
||||
on the debugger termination).
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/defs.h
|
||||
Index: gdb-7.5.50.20130118/gdb/defs.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/defs.h 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/defs.h 2011-01-17 15:53:05.000000000 +0100
|
||||
@@ -165,6 +165,7 @@ extern char *python_libdir;
|
||||
extern char *debug_file_directory;
|
||||
--- gdb-7.5.50.20130118.orig/gdb/defs.h 2013-01-01 07:32:41.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/defs.h 2013-01-21 16:40:29.889256633 +0100
|
||||
@@ -176,6 +176,7 @@ extern int check_quit_flag (void);
|
||||
/* Set the quit flag. */
|
||||
extern void set_quit_flag (void);
|
||||
|
||||
extern int quit_flag;
|
||||
+extern int quit_flag_cleanup;
|
||||
extern int immediate_quit;
|
||||
extern int sevenbit_strings;
|
||||
|
||||
@@ -178,7 +179,7 @@ extern void quit (void);
|
||||
needed. */
|
||||
|
||||
#define QUIT { \
|
||||
- if (quit_flag) quit (); \
|
||||
+ if (quit_flag && !quit_flag_cleanup) quit (); \
|
||||
if (deprecated_interactive_hook) deprecated_interactive_hook (); \
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/event-top.c
|
||||
extern void quit (void);
|
||||
Index: gdb-7.5.50.20130118/gdb/top.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/event-top.c 2011-01-17 15:52:39.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/event-top.c 2011-01-17 15:52:49.000000000 +0100
|
||||
@@ -904,7 +904,7 @@ async_request_quit (gdb_client_data arg)
|
||||
is no reason to call quit again here, unless immediate_quit is
|
||||
set. */
|
||||
|
||||
- if (quit_flag || immediate_quit)
|
||||
+ if ((quit_flag || immediate_quit) && !quit_flag_cleanup)
|
||||
quit ();
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/top.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/top.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/top.c 2011-01-17 15:52:49.000000000 +0100
|
||||
@@ -1257,7 +1257,9 @@ quit_force (char *args, int from_tty)
|
||||
--- gdb-7.5.50.20130118.orig/gdb/top.c 2013-01-21 14:56:12.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/top.c 2013-01-21 14:56:16.385710056 +0100
|
||||
@@ -1329,7 +1329,9 @@ quit_force (char *args, int from_tty)
|
||||
qt.args = args;
|
||||
qt.from_tty = from_tty;
|
||||
|
||||
@ -54,19 +32,43 @@ Index: gdb-7.2.50.20110117/gdb/top.c
|
||||
catch_errors (quit_target, &qt,
|
||||
"Quitting: ", RETURN_MASK_ALL);
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/utils.c
|
||||
Index: gdb-7.5.50.20130118/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/utils.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/utils.c 2011-01-17 15:52:49.000000000 +0100
|
||||
@@ -121,6 +121,11 @@ int job_control;
|
||||
--- gdb-7.5.50.20130118.orig/gdb/utils.c 2013-01-21 14:56:12.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/utils.c 2013-01-21 16:41:02.225233493 +0100
|
||||
@@ -141,6 +141,11 @@ int quit_flag;
|
||||
|
||||
int quit_flag;
|
||||
int immediate_quit;
|
||||
|
||||
+/* Nonzero means we are already processing the quitting cleanups and we should
|
||||
+ no longer get aborted. */
|
||||
+
|
||||
+int quit_flag_cleanup;
|
||||
+
|
||||
/* Nonzero means quit immediately if Control-C is typed now, rather
|
||||
than waiting until QUIT is executed. Be careful in setting this;
|
||||
code which executes with immediate_quit set has to be very careful
|
||||
#ifndef HAVE_PYTHON
|
||||
|
||||
/* Clear the quit flag. */
|
||||
@@ -164,6 +169,9 @@ set_quit_flag (void)
|
||||
int
|
||||
check_quit_flag (void)
|
||||
{
|
||||
+ if (quit_flag_cleanup)
|
||||
+ return 0;
|
||||
+
|
||||
/* This is written in a particular way to avoid races. */
|
||||
if (quit_flag)
|
||||
{
|
||||
Index: gdb-7.5.50.20130118/gdb/python/python.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/python/python.c 2013-01-21 16:39:03.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/python/python.c 2013-01-21 16:39:30.698299142 +0100
|
||||
@@ -181,6 +181,9 @@ set_quit_flag (void)
|
||||
int
|
||||
check_quit_flag (void)
|
||||
{
|
||||
+ if (quit_flag_cleanup)
|
||||
+ return 0;
|
||||
+
|
||||
return PyOS_InterruptOccurred ();
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.4.50.20120703/gdb/gdb_bfd.c
|
||||
Index: gdb-7.5.50.20130118/gdb/gdb_bfd.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/gdb_bfd.c 2012-07-03 17:30:07.356754655 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/gdb_bfd.c 2012-07-03 17:43:52.565762454 +0200
|
||||
@@ -26,12 +26,14 @@
|
||||
--- gdb-7.5.50.20130118.orig/gdb/gdb_bfd.c 2013-01-18 23:11:18.158718709 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/gdb_bfd.c 2013-01-18 23:12:06.841787893 +0100
|
||||
@@ -27,12 +27,14 @@
|
||||
#ifdef HAVE_ZLIB_H
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
@ -17,7 +17,7 @@ Index: gdb-7.4.50.20120703/gdb/gdb_bfd.c
|
||||
|
||||
/* An object of this type is stored in the section's user data when
|
||||
mapping a section. */
|
||||
@@ -181,6 +183,7 @@ free_one_bfd_section (bfd *abfd, asectio
|
||||
@@ -205,6 +207,7 @@ free_one_bfd_section (bfd *abfd, asectio
|
||||
|
||||
if (sect != NULL && sect->data != NULL)
|
||||
{
|
||||
@ -25,7 +25,7 @@ Index: gdb-7.4.50.20120703/gdb/gdb_bfd.c
|
||||
#ifdef HAVE_MMAP
|
||||
if (sect->map_addr != NULL)
|
||||
{
|
||||
@@ -191,6 +194,7 @@ free_one_bfd_section (bfd *abfd, asectio
|
||||
@@ -215,6 +218,7 @@ free_one_bfd_section (bfd *abfd, asectio
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -33,19 +33,19 @@ Index: gdb-7.4.50.20120703/gdb/gdb_bfd.c
|
||||
xfree (sect->data);
|
||||
}
|
||||
}
|
||||
@@ -425,6 +429,7 @@ gdb_bfd_map_section (asection *sectp, bf
|
||||
}
|
||||
}
|
||||
@@ -360,6 +364,7 @@ gdb_bfd_map_section (asection *sectp, bf
|
||||
if (descriptor->data != NULL)
|
||||
goto done;
|
||||
|
||||
+#ifndef __sparc__
|
||||
#ifdef HAVE_MMAP
|
||||
{
|
||||
/* The page size, used when mmapping. */
|
||||
@@ -458,6 +463,7 @@ gdb_bfd_map_section (asection *sectp, bf
|
||||
}
|
||||
}
|
||||
if (!bfd_is_section_compressed (abfd, sectp))
|
||||
{
|
||||
@@ -394,6 +399,7 @@ gdb_bfd_map_section (asection *sectp, bf
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_MMAP */
|
||||
+#endif
|
||||
|
||||
/* If we get here, we are a normal, not-compressed section. */
|
||||
|
||||
/* Handle compressed sections, or ordinary uncompressed sections in
|
||||
the no-mmap case. */
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:070b808d289fa8f0291738eeaccc0cd7700d476998781f572856155240d29d20
|
||||
size 21349391
|
3
gdb-7.5.50.20130215.tar.bz2
Normal file
3
gdb-7.5.50.20130215.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f1d77fa5fdc14f4f933010dfadfb4895d84a92dd038a1c1425cf9d75e147afe9
|
||||
size 24229281
|
@ -1,9 +1,9 @@
|
||||
Index: gdb-7.4.50.20120602/gdb/breakpoint.c
|
||||
Index: gdb-7.5.50.20130215/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/breakpoint.c 2012-06-02 19:11:54.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/breakpoint.c 2012-06-02 19:52:58.161226506 +0200
|
||||
@@ -15495,6 +15495,50 @@ initialize_breakpoint_ops (void)
|
||||
}
|
||||
--- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:31:37.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:37:08.216381988 +0100
|
||||
@@ -16020,6 +16020,50 @@ initialize_breakpoint_ops (void)
|
||||
static struct cmd_list_element *enablebreaklist = NULL;
|
||||
|
||||
void
|
||||
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
|
||||
@ -53,23 +53,23 @@ Index: gdb-7.4.50.20120602/gdb/breakpoint.c
|
||||
_initialize_breakpoint (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
Index: gdb-7.4.50.20120602/gdb/breakpoint.h
|
||||
Index: gdb-7.5.50.20130215/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/breakpoint.h 2012-05-16 16:35:03.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/breakpoint.h 2012-06-02 19:53:09.268223263 +0200
|
||||
@@ -1503,4 +1503,7 @@ extern struct gdbarch *get_sal_arch (str
|
||||
--- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-03 16:57:06.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:37:19.025395693 +0100
|
||||
@@ -1556,4 +1556,7 @@ extern void handle_solib_event (void);
|
||||
|
||||
extern void handle_solib_event (void);
|
||||
extern void breakpoint_free_objfile (struct objfile *objfile);
|
||||
|
||||
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||
+ struct section_offsets *delta);
|
||||
+
|
||||
#endif /* !defined (BREAKPOINT_H) */
|
||||
Index: gdb-7.4.50.20120602/gdb/objfiles.c
|
||||
Index: gdb-7.5.50.20130215/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/objfiles.c 2012-05-10 21:50:08.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/objfiles.c 2012-06-02 19:52:58.202226502 +0200
|
||||
@@ -802,6 +802,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
--- gdb-7.5.50.20130215.orig/gdb/objfiles.c 2013-02-03 16:57:07.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/objfiles.c 2013-02-15 22:37:08.217381990 +0100
|
||||
@@ -831,6 +831,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
|
||||
new_offsets, delta);
|
||||
|
||||
|
@ -1,61 +1,8 @@
|
||||
Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
|
||||
Index: gdb-7.5.50.20130118/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/dwarf2read.c 2012-06-02 19:14:38.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/dwarf2read.c 2012-06-02 19:51:29.977252338 +0200
|
||||
@@ -9746,7 +9746,12 @@ read_common_block (struct die_info *die,
|
||||
{
|
||||
struct attribute *attr;
|
||||
struct symbol *sym;
|
||||
- CORE_ADDR base = (CORE_ADDR) 0;
|
||||
+ struct objfile *objfile = cu->objfile;
|
||||
+ CORE_ADDR baseaddr = ANOFFSET (objfile->section_offsets,
|
||||
+ SECT_OFF_TEXT (objfile));
|
||||
+ /* This is used only for DW_AT_data_member_location entries. */
|
||||
+ CORE_ADDR base = 0;
|
||||
+ int base_p = 0;
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_location, cu);
|
||||
if (attr)
|
||||
@@ -9755,6 +9760,7 @@ read_common_block (struct die_info *die,
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
base = decode_locdesc (DW_BLOCK (attr), cu);
|
||||
+ base_p = 1;
|
||||
}
|
||||
else if (attr_form_is_section_offset (attr))
|
||||
{
|
||||
@@ -9807,12 +9813,15 @@ read_common_block (struct die_info *die,
|
||||
if (sym != NULL
|
||||
&& handle_data_member_location (child_die, cu, &offset))
|
||||
{
|
||||
- SYMBOL_VALUE_ADDRESS (sym) = base + offset;
|
||||
+ if (!base_p)
|
||||
+ dwarf2_invalid_attrib_class_complaint
|
||||
+ ("DW_AT_data_member_location", "common block member");
|
||||
+ SYMBOL_VALUE_ADDRESS (sym) = base + offset + baseaddr;
|
||||
add_symbol_to_list (sym, &global_symbols);
|
||||
}
|
||||
|
||||
if (SYMBOL_CLASS (sym) == LOC_STATIC)
|
||||
- SET_FIELD_PHYSADDR (*field, SYMBOL_VALUE_ADDRESS (sym));
|
||||
+ SET_FIELD_PHYSADDR (*field, SYMBOL_VALUE_ADDRESS (sym) - baseaddr);
|
||||
else
|
||||
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
|
||||
FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
|
||||
@@ -9826,7 +9835,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. */
|
||||
- SYMBOL_VALUE_ADDRESS (sym) = base;
|
||||
+ SYMBOL_VALUE_ADDRESS (sym) = base + baseaddr;
|
||||
|
||||
set_die_type (die, type, cu);
|
||||
}
|
||||
Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/gdbtypes.h 2012-06-02 19:11:54.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/gdbtypes.h 2012-06-02 19:52:44.990230200 +0200
|
||||
@@ -401,6 +401,7 @@ enum field_loc_kind
|
||||
--- gdb-7.5.50.20130118.orig/gdb/gdbtypes.h 2013-01-18 23:07:03.488358315 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/gdbtypes.h 2013-01-18 23:08:10.286451570 +0100
|
||||
@@ -420,6 +420,7 @@ enum field_loc_kind
|
||||
{
|
||||
FIELD_LOC_KIND_BITPOS, /* bitpos */
|
||||
FIELD_LOC_KIND_ENUMVAL, /* enumval */
|
||||
@ -63,7 +10,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
|
||||
FIELD_LOC_KIND_PHYSNAME, /* physname */
|
||||
FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */
|
||||
@@ -595,6 +596,7 @@ struct main_type
|
||||
@@ -614,6 +615,7 @@ struct main_type
|
||||
is the location (in the target) of the static field.
|
||||
Otherwise, physname is the mangled label of the static field. */
|
||||
|
||||
@ -71,7 +18,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
CORE_ADDR physaddr;
|
||||
const char *physname;
|
||||
|
||||
@@ -1200,6 +1202,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1237,6 +1239,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
|
||||
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
|
||||
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||
@ -79,7 +26,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
|
||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
@@ -1211,6 +1214,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1248,6 +1251,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 +34,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
@@ -1227,6 +1231,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1264,6 +1268,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
||||
@ -95,11 +42,11 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
||||
Index: gdb-7.4.50.20120602/gdb/jv-lang.c
|
||||
Index: gdb-7.5.50.20130118/gdb/jv-lang.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/jv-lang.c 2012-05-10 21:59:12.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/jv-lang.c 2012-06-02 19:51:53.286245280 +0200
|
||||
@@ -431,7 +431,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
--- gdb-7.5.50.20130118.orig/gdb/jv-lang.c 2013-01-18 23:07:03.488358315 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/jv-lang.c 2013-01-18 23:08:10.286451570 +0100
|
||||
@@ -430,7 +430,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
|
||||
fields = NULL;
|
||||
nfields--; /* First set up dummy "class" field. */
|
||||
@ -109,7 +56,7 @@ Index: gdb-7.4.50.20120602/gdb/jv-lang.c
|
||||
TYPE_FIELD_NAME (type, nfields) = "class";
|
||||
TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
|
||||
SET_TYPE_FIELD_PRIVATE (type, nfields);
|
||||
@@ -479,7 +480,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 +66,11 @@ Index: gdb-7.4.50.20120602/gdb/jv-lang.c
|
||||
else
|
||||
SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
|
||||
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
||||
Index: gdb-7.4.50.20120602/gdb/value.c
|
||||
Index: gdb-7.5.50.20130118/gdb/value.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/value.c 2012-06-02 19:11:55.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/value.c 2012-06-02 19:51:30.031252317 +0200
|
||||
@@ -2592,7 +2592,8 @@ value_static_field (struct type *type, i
|
||||
--- gdb-7.5.50.20130118.orig/gdb/value.c 2013-01-18 23:07:03.490358319 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/value.c 2013-01-18 23:08:10.287451543 +0100
|
||||
@@ -2624,7 +2624,8 @@ value_static_field (struct type *type, i
|
||||
{
|
||||
case FIELD_LOC_KIND_PHYSADDR:
|
||||
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
||||
|
5649
gdb-archer.patch
5649
gdb-archer.patch
File diff suppressed because it is too large
Load Diff
@ -37,13 +37,13 @@ gdb/gdbserver/
|
||||
(linux_create_inferior, linux_tracefork_child): Call it instead of
|
||||
direct ptrace.
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/common/linux-ptrace.c
|
||||
Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/common/linux-ptrace.c 2012-09-17 20:28:14.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/common/linux-ptrace.c 2012-09-26 19:13:53.508780239 +0200
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "buffer.h"
|
||||
--- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.c 2013-01-08 20:38:51.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.c 2013-02-15 22:38:05.782456279 +0100
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "gdb_assert.h"
|
||||
#include "gdb_wait.h"
|
||||
|
||||
+#ifdef HAVE_SELINUX_SELINUX_H
|
||||
+# include <selinux/selinux.h>
|
||||
@ -52,7 +52,7 @@ Index: gdb-7.5.0.20120926/gdb/common/linux-ptrace.c
|
||||
/* Find all possible reasons we could fail to attach PID and append these
|
||||
newline terminated reason strings to initialized BUFFER. '\0' termination
|
||||
of BUFFER must be done by the caller. */
|
||||
@@ -47,6 +51,8 @@ linux_ptrace_attach_warnings (pid_t pid,
|
||||
@@ -48,6 +52,8 @@ linux_ptrace_attach_warnings (pid_t pid,
|
||||
buffer_xml_printf (buffer, _("warning: process %d is a zombie "
|
||||
"- the process has already terminated\n"),
|
||||
(int) pid);
|
||||
@ -61,7 +61,7 @@ Index: gdb-7.5.0.20120926/gdb/common/linux-ptrace.c
|
||||
}
|
||||
|
||||
#if defined __i386__ || defined __x86_64__
|
||||
@@ -242,3 +248,19 @@ linux_ptrace_init_warnings (void)
|
||||
@@ -243,3 +249,19 @@ linux_ptrace_init_warnings (void)
|
||||
|
||||
linux_ptrace_test_ret_to_nx ();
|
||||
}
|
||||
@ -81,10 +81,10 @@ Index: gdb-7.5.0.20120926/gdb/common/linux-ptrace.c
|
||||
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
|
||||
+#endif /* HAVE_LIBSELINUX */
|
||||
+}
|
||||
Index: gdb-7.5.0.20120926/gdb/common/linux-ptrace.h
|
||||
Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.h
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/common/linux-ptrace.h 2012-07-07 14:13:56.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/common/linux-ptrace.h 2012-09-26 19:13:28.358765406 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.h 2013-01-01 07:32:54.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.h 2013-02-15 22:38:05.782456279 +0100
|
||||
@@ -69,5 +69,6 @@ struct buffer;
|
||||
|
||||
extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
|
||||
@ -92,11 +92,11 @@ Index: gdb-7.5.0.20120926/gdb/common/linux-ptrace.h
|
||||
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
|
||||
|
||||
#endif /* COMMON_LINUX_PTRACE_H */
|
||||
Index: gdb-7.5.0.20120926/gdb/configure.ac
|
||||
Index: gdb-7.5.50.20130215/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/configure.ac 2012-09-26 19:13:24.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/configure.ac 2012-09-26 19:13:28.410765451 +0200
|
||||
@@ -2008,6 +2008,10 @@ then
|
||||
--- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-02-15 22:37:57.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:38:05.783456281 +0100
|
||||
@@ -2068,6 +2068,10 @@ then
|
||||
[Define if you support the personality syscall.])
|
||||
fi
|
||||
|
||||
@ -107,11 +107,11 @@ Index: gdb-7.5.0.20120926/gdb/configure.ac
|
||||
dnl Handle optional features that can be enabled.
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
Index: gdb-7.5.0.20120926/gdb/gdbserver/configure.ac
|
||||
Index: gdb-7.5.50.20130215/gdb/gdbserver/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/gdbserver/configure.ac 2012-04-19 21:34:51.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/gdbserver/configure.ac 2012-09-26 19:13:28.446765428 +0200
|
||||
@@ -438,6 +438,10 @@ if $want_ipa ; then
|
||||
--- gdb-7.5.50.20130215.orig/gdb/gdbserver/configure.ac 2013-01-01 07:33:00.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/gdbserver/configure.ac 2013-02-15 22:38:05.783456281 +0100
|
||||
@@ -451,6 +451,10 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -122,11 +122,11 @@ Index: gdb-7.5.0.20120926/gdb/gdbserver/configure.ac
|
||||
AC_SUBST(GDBSERVER_DEPFILES)
|
||||
AC_SUBST(GDBSERVER_LIBS)
|
||||
AC_SUBST(USE_THREAD_DB)
|
||||
Index: gdb-7.5.0.20120926/gdb/gdbserver/linux-low.c
|
||||
Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/gdbserver/linux-low.c 2012-07-07 14:13:57.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/gdbserver/linux-low.c 2012-09-26 19:13:28.453765471 +0200
|
||||
@@ -601,6 +601,28 @@ add_lwp (ptid_t ptid)
|
||||
--- gdb-7.5.50.20130215.orig/gdb/gdbserver/linux-low.c 2013-02-04 18:47:00.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c 2013-02-15 22:39:54.256591069 +0100
|
||||
@@ -602,6 +602,29 @@ add_lwp (ptid_t ptid)
|
||||
return lwp;
|
||||
}
|
||||
|
||||
@ -139,7 +139,8 @@ Index: gdb-7.5.0.20120926/gdb/gdbserver/linux-low.c
|
||||
+ struct buffer buffer;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ if (ptrace (PTRACE_TRACEME, 0, NULL, NULL) == 0)
|
||||
+ if (ptrace (PTRACE_TRACEME, 0,
|
||||
+ (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0) == 0)
|
||||
+ return;
|
||||
+
|
||||
+ save_errno = errno;
|
||||
@ -155,29 +156,29 @@ Index: gdb-7.5.0.20120926/gdb/gdbserver/linux-low.c
|
||||
/* Start an inferior process and returns its pid.
|
||||
ALLARGS is a vector of program-name and args. */
|
||||
|
||||
@@ -641,7 +663,7 @@ linux_create_inferior (char *program, ch
|
||||
@@ -642,7 +665,7 @@ linux_create_inferior (char *program, ch
|
||||
|
||||
if (pid == 0)
|
||||
{
|
||||
- ptrace (PTRACE_TRACEME, 0, 0, 0);
|
||||
- ptrace (PTRACE_TRACEME, 0, (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0);
|
||||
+ linux_traceme (program);
|
||||
|
||||
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
|
||||
signal (__SIGRTMIN + 1, SIG_DFL);
|
||||
@@ -4572,7 +4594,7 @@ linux_tracefork_grandchild (void *arg)
|
||||
@@ -4587,7 +4610,7 @@ linux_tracefork_grandchild (void *arg)
|
||||
static int
|
||||
linux_tracefork_child (void *arg)
|
||||
{
|
||||
- ptrace (PTRACE_TRACEME, 0, 0, 0);
|
||||
- ptrace (PTRACE_TRACEME, 0, (PTRACE_ARG3_TYPE) 0, (PTRACE_ARG4_TYPE) 0);
|
||||
+ linux_traceme ("PTRACE_O_TRACEFORK test");
|
||||
kill (getpid (), SIGSTOP);
|
||||
|
||||
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
|
||||
Index: gdb-7.5.0.20120926/gdb/inf-ptrace.c
|
||||
Index: gdb-7.5.50.20130215/gdb/inf-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/inf-ptrace.c 2012-05-24 18:51:34.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/inf-ptrace.c 2012-09-26 19:13:28.458765461 +0200
|
||||
@@ -105,7 +105,15 @@ static void
|
||||
--- gdb-7.5.50.20130215.orig/gdb/inf-ptrace.c 2013-01-01 07:32:45.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/inf-ptrace.c 2013-02-15 22:38:05.786456289 +0100
|
||||
@@ -104,7 +104,15 @@ static void
|
||||
inf_ptrace_me (void)
|
||||
{
|
||||
/* "Trace me, Dr. Memory!" */
|
||||
@ -193,11 +194,11 @@ Index: gdb-7.5.0.20120926/gdb/inf-ptrace.c
|
||||
}
|
||||
|
||||
/* Start a new inferior Unix child process. EXEC_FILE is the file to
|
||||
Index: gdb-7.5.0.20120926/gdb/linux-nat.c
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/linux-nat.c 2012-09-26 19:13:22.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/linux-nat.c 2012-09-26 19:13:28.468765469 +0200
|
||||
@@ -1574,6 +1574,7 @@ linux_nat_create_inferior (struct target
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-15 22:34:44.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:38:05.787456291 +0100
|
||||
@@ -1557,6 +1557,7 @@ linux_nat_create_inferior (struct target
|
||||
#ifdef HAVE_PERSONALITY
|
||||
int personality_orig = 0, personality_set = 0;
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
@ -205,7 +206,7 @@ Index: gdb-7.5.0.20120926/gdb/linux-nat.c
|
||||
|
||||
/* The fork_child mechanism is synchronous and calls target_wait, so
|
||||
we have to mask the async mode. */
|
||||
@@ -1598,7 +1599,10 @@ linux_nat_create_inferior (struct target
|
||||
@@ -1581,7 +1582,10 @@ linux_nat_create_inferior (struct target
|
||||
/* Make sure we report all signals during startup. */
|
||||
linux_nat_pass_signals (0, NULL);
|
||||
|
||||
@ -217,7 +218,7 @@ Index: gdb-7.5.0.20120926/gdb/linux-nat.c
|
||||
|
||||
#ifdef HAVE_PERSONALITY
|
||||
if (personality_set)
|
||||
@@ -1610,6 +1614,24 @@ linux_nat_create_inferior (struct target
|
||||
@@ -1593,6 +1597,24 @@ linux_nat_create_inferior (struct target
|
||||
safe_strerror (errno));
|
||||
}
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
|
@ -21,24 +21,28 @@ debugging problem of GOMP outside of the scope of this Bug.
|
||||
|
||||
|
||||
|
||||
Index: gdb-7.2.50.20101231/gdb/infrun.c
|
||||
Index: gdb-7.5.50.20130118/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/infrun.c 2011-01-01 01:02:45.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/infrun.c 2011-01-01 01:10:22.000000000 +0100
|
||||
@@ -4585,6 +4585,12 @@ infrun: not switching back to stepped th
|
||||
--- gdb-7.5.50.20130118.orig/gdb/infrun.c 2013-01-19 23:38:22.329371410 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/infrun.c 2013-01-19 23:39:03.322429041 +0100
|
||||
@@ -4918,6 +4918,16 @@ process_event_stop_test:
|
||||
|
||||
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
|
||||
{
|
||||
+ struct symbol *stop_fn = find_pc_function (stop_pc);
|
||||
+ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc);
|
||||
+
|
||||
+ if (stop_fn == NULL
|
||||
+ || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL)
|
||||
+ if ((stop_fn == NULL
|
||||
+ || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL)
|
||||
+ /* gcc-4.7.2-9.fc19.x86_64 uses a new format. */
|
||||
+ && (stopf == NULL
|
||||
+ || strstr (SYMBOL_LINKAGE_NAME (stopf), "._omp_fn.") == NULL))
|
||||
+{ /* ".omp_fn." */
|
||||
+
|
||||
/* We're doing a "next".
|
||||
|
||||
Normal (forward) execution: set a breakpoint at the
|
||||
@@ -4612,6 +4618,7 @@ infrun: not switching back to stepped th
|
||||
@@ -4953,6 +4963,7 @@ process_event_stop_test:
|
||||
|
||||
keep_going (ecs);
|
||||
return;
|
||||
@ -46,10 +50,10 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
|
||||
}
|
||||
|
||||
/* If we are in a function call trampoline (a stub between the
|
||||
Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101231/gdb/testsuite/gdb.fortran/omp-step.exp 2011-01-01 01:09:58.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp 2013-01-19 23:38:23.213372622 +0100
|
||||
@@ -0,0 +1,31 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -82,10 +86,10 @@ Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "success"]
|
||||
+gdb_continue_to_breakpoint "success" ".*success.*"
|
||||
Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101231/gdb/testsuite/gdb.fortran/omp-step.f90 2011-01-01 01:09:58.000000000 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.f90 2013-01-19 23:38:23.213372622 +0100
|
||||
@@ -0,0 +1,32 @@
|
||||
+! Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -1,169 +0,0 @@
|
||||
gdb:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=623749
|
||||
kernel:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=636937
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-09/msg00395.html
|
||||
Subject: Re: [patch] Fix gcore writer for -Wl,-z,relro (PR corefiles/11804)
|
||||
|
||||
gdb/testsuite/
|
||||
2010-09-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix gcore writer for -Wl,-z,relro.
|
||||
* gdb.base/gcore-relro.exp: New file.
|
||||
* gdb.base/gcore-relro-main.c: New file.
|
||||
* gdb.base/gcore-relro-lib.c: New file.
|
||||
|
||||
--- ./gdb/gcore.c 2010-09-23 20:14:56.000000000 +0200
|
||||
+++ ./gdb/gcore.c 2010-09-23 20:37:56.000000000 +0200
|
||||
@@ -401,6 +401,7 @@ gcore_create_callback (CORE_ADDR vaddr,
|
||||
|
||||
if (write == 0 && !solib_keep_data_in_core (vaddr, size))
|
||||
{
|
||||
+#if 0 /* https://bugzilla.redhat.com/show_bug.cgi?id=636937 */
|
||||
/* See if this region of memory lies inside a known file on disk.
|
||||
If so, we can avoid copying its contents by clearing SEC_LOAD. */
|
||||
struct objfile *objfile;
|
||||
@@ -433,6 +434,7 @@ gcore_create_callback (CORE_ADDR vaddr,
|
||||
}
|
||||
|
||||
keep:
|
||||
+#endif
|
||||
flags |= SEC_READONLY;
|
||||
}
|
||||
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-relro-lib.c
|
||||
@@ -0,0 +1,21 @@
|
||||
+/* Copyright 2010 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 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+void
|
||||
+lib (void)
|
||||
+{
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-relro-main.c
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* Copyright 2010 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 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/>. */
|
||||
+
|
||||
+extern void lib (void);
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ lib ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-relro.exp
|
||||
@@ -0,0 +1,80 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if {[skip_shlib_tests]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "gcore-relro"
|
||||
+set srcmainfile ${testfile}-main.c
|
||||
+set srclibfile ${testfile}-lib.c
|
||||
+set libfile ${objdir}/${subdir}/${testfile}-lib.so
|
||||
+set objfile ${objdir}/${subdir}/${testfile}-main.o
|
||||
+set executable ${testfile}-main
|
||||
+set binfile ${objdir}/${subdir}/${executable}
|
||||
+set gcorefile ${objdir}/${subdir}/${executable}.gcore
|
||||
+
|
||||
+if { [gdb_compile_shlib ${srcdir}/${subdir}/${srclibfile} ${libfile} {debug}] != ""
|
||||
+ || [gdb_compile ${srcdir}/${subdir}/${srcmainfile} ${objfile} object {debug}] != "" } {
|
||||
+ untested ${testfile}.exp
|
||||
+ return -1
|
||||
+}
|
||||
+set opts [list debug shlib=${libfile} additional_flags=-Wl,-z,relro]
|
||||
+if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
|
||||
+ unsupported "-Wl,-z,relro compilation failed"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+clean_restart $executable
|
||||
+gdb_load_shlibs $libfile
|
||||
+
|
||||
+# Does this gdb support gcore?
|
||||
+set test "help gcore"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "Undefined command: .gcore.*\r\n$gdb_prompt $" {
|
||||
+ # gcore command not supported -- nothing to test here.
|
||||
+ unsupported "gdb does not support gcore on this target"
|
||||
+ return -1;
|
||||
+ }
|
||||
+ -re "Save a core file .*\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if { ![runto lib] } then {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+set escapedfilename [string_to_regexp ${gcorefile}]
|
||||
+
|
||||
+set test "save a corefile"
|
||||
+gdb_test_multiple "gcore ${gcorefile}" $test {
|
||||
+ -re "Saved corefile ${escapedfilename}\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "Can't create a corefile\r\n$gdb_prompt $" {
|
||||
+ unsupported $test
|
||||
+ return -1
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Now restart gdb and load the corefile.
|
||||
+
|
||||
+clean_restart $executable
|
||||
+gdb_load_shlibs $libfile
|
||||
+
|
||||
+gdb_test "core ${gcorefile}" "Core was generated by .*" "re-load generated corefile"
|
||||
+
|
||||
+gdb_test "frame" "#0 \[^\r\n\]* lib .*" "library got loaded"
|
1002
gdb-check-type.patch
1002
gdb-check-type.patch
File diff suppressed because it is too large
Load Diff
@ -3,10 +3,10 @@ Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Inp
|
||||
|
||||
[ New patch variant. ]
|
||||
|
||||
Index: gdb-7.4.50.20120703/gdb/solib-svr4.c
|
||||
Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/solib-svr4.c 2012-07-06 15:39:57.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/solib-svr4.c 2012-07-06 15:40:01.124816148 +0200
|
||||
--- gdb-7.5.50.20130118.orig/gdb/solib-svr4.c 2013-01-18 23:05:19.414210015 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/solib-svr4.c 2013-01-18 23:05:34.813231664 +0100
|
||||
@@ -1221,8 +1221,17 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
|
||||
if (errcode != 0)
|
||||
@ -27,20 +27,20 @@ Index: gdb-7.4.50.20120703/gdb/solib-svr4.c
|
||||
do_cleanups (old_chain);
|
||||
continue;
|
||||
}
|
||||
Index: gdb-7.4.50.20120703/gdb/solib.c
|
||||
Index: gdb-7.5.50.20130118/gdb/solib.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/solib.c 2012-07-06 15:38:39.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/solib.c 2012-07-06 15:40:01.125816147 +0200
|
||||
@@ -672,7 +672,7 @@ solib_used (const struct so_list *const
|
||||
--- gdb-7.5.50.20130118.orig/gdb/solib.c 2013-01-18 23:05:19.415210017 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/solib.c 2013-01-18 23:05:57.421263173 +0100
|
||||
@@ -666,7 +666,7 @@ solib_used (const struct so_list *const
|
||||
processes we've just attached to, so that's okay. */
|
||||
|
||||
static void
|
||||
-update_solib_list (int from_tty, struct target_ops *target)
|
||||
+update_solib_list_1 (int from_tty, struct target_ops *target)
|
||||
{
|
||||
struct target_so_ops *ops = solib_ops (target_gdbarch);
|
||||
struct target_so_ops *ops = solib_ops (target_gdbarch ());
|
||||
struct so_list *inferior = ops->current_sos();
|
||||
@@ -843,6 +843,21 @@ Do you need \"set solib-search-path\" or
|
||||
@@ -837,6 +837,21 @@ Do you need \"set solib-search-path\" or
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,10 +62,10 @@ Index: gdb-7.4.50.20120703/gdb/solib.c
|
||||
|
||||
/* Return non-zero if NAME is the libpthread shared library.
|
||||
|
||||
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/corefile.exp
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/corefile.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.base/corefile.exp 2012-07-06 15:39:41.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.base/corefile.exp 2012-07-06 15:40:10.322805539 +0200
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/corefile.exp 2013-01-18 23:05:19.416210020 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/corefile.exp 2013-01-18 23:05:34.814231667 +0100
|
||||
@@ -286,3 +286,19 @@ if {$buildid == ""} {
|
||||
gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*"
|
||||
pass $wholetest
|
||||
@ -86,10 +86,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/corefile.exp
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.base/solib-symbol.exp 2012-07-06 15:38:39.000000000 +0200
|
||||
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.base/solib-symbol.exp 2012-07-06 15:40:01.127816145 +0200
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/solib-symbol.exp 2013-01-18 23:05:19.416210020 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/solib-symbol.exp 2013-01-18 23:05:34.814231667 +0100
|
||||
@@ -27,7 +27,8 @@ set lib_flags [list debug ldflags=-Wl,-B
|
||||
# Binary file.
|
||||
set testfile "solib-symbol-main"
|
||||
|
@ -1,795 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-07/msg00123.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/07/18 04:36:15 1.14473
|
||||
### src/gdb/ChangeLog 2012/07/18 16:12:15 1.14474
|
||||
## -1,3 +1,37 @@
|
||||
+2012-07-18 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
+
|
||||
+ * elfread.c (elf_get_probe_argument_count): Remove `objfile' argument.
|
||||
+ (elf_compile_to_ax): Likewise.
|
||||
+ * infrun.c (insert_exception_resume_from_probe): Likewise.
|
||||
+ (check_exception_resume): Remove `objfile' variable.
|
||||
+ * probe.c (find_probe_by_pc): Remove `objfile' argument.
|
||||
+ (struct probe_and_objfile, probe_and_objfile_s): Delete.
|
||||
+ (collect_probes): Adjust return value to `VEC (probe_p) *'.
|
||||
+ (compare_entries): Rename to...
|
||||
+ (compare_probes): ...this. Adjust function to work with
|
||||
+ `struct probe *'. Rename variables `ea' and `eb' to `pa' and `pb'
|
||||
+ respectively.
|
||||
+ (gen_ui_out_table_header_info): Adjust `probes' argument to be
|
||||
+ `VEC (probe_p) *'.
|
||||
+ (print_ui_out_info): Adjust argument to be `struct probe *'.
|
||||
+ (info_probes_for_ops): Adjust internal computations to use
|
||||
+ `VEC (probe_p) *'.
|
||||
+ (probe_safe_evaluate_at_pc): Refactor to not pass `objfile' anymore.
|
||||
+ * probe.h (struct probe_ops) <get_probe_argument_count, compile_to_ax,
|
||||
+ gen_info_probes_table_values>: Remove `objfile' argument.
|
||||
+ (struct probe) <objfile>: New field.
|
||||
+ (find_probe_by_pc): Remove `objfile' argument.
|
||||
+ * stap-probe.c (stap_parse_probe_arguments): Likewise.
|
||||
+ (stap_get_probe_argument_count): Likewise.
|
||||
+ (stap_get_arg): Likewise.
|
||||
+ (stap_evaluate_probe_argument): Likewise.
|
||||
+ (stap_compile_to_ax): Likewise.
|
||||
+ (compile_probe_arg): Refactor not to pass `objfile' anymore.
|
||||
+ (handle_stap_probe): Fill `objfile' field from `struct probe'.
|
||||
+ (stap_gen_info_probes_table_header): Remove `objfile' argument.
|
||||
+ * symfile.h (struct sym_probe_fns) <sym_evaluate_probe_argument,
|
||||
+ sym_compile_to_ax>: Likewise.
|
||||
+
|
||||
2012-07-18 Terry Guo <terry.guo@arm.com>
|
||||
|
||||
PR 14329
|
||||
--- src/gdb/elfread.c 2012/06/26 20:14:01 1.133
|
||||
+++ src/gdb/elfread.c 2012/07/18 16:12:15 1.134
|
||||
@@ -1635,33 +1635,29 @@
|
||||
symfile.h. */
|
||||
|
||||
static unsigned
|
||||
-elf_get_probe_argument_count (struct objfile *objfile,
|
||||
- struct probe *probe)
|
||||
+elf_get_probe_argument_count (struct probe *probe)
|
||||
{
|
||||
- return probe->pops->get_probe_argument_count (probe, objfile);
|
||||
+ return probe->pops->get_probe_argument_count (probe);
|
||||
}
|
||||
|
||||
/* Implementation of `sym_evaluate_probe_argument', as documented in
|
||||
symfile.h. */
|
||||
|
||||
static struct value *
|
||||
-elf_evaluate_probe_argument (struct objfile *objfile,
|
||||
- struct probe *probe,
|
||||
- unsigned n)
|
||||
+elf_evaluate_probe_argument (struct probe *probe, unsigned n)
|
||||
{
|
||||
- return probe->pops->evaluate_probe_argument (probe, objfile, n);
|
||||
+ return probe->pops->evaluate_probe_argument (probe, n);
|
||||
}
|
||||
|
||||
/* Implementation of `sym_compile_to_ax', as documented in symfile.h. */
|
||||
|
||||
static void
|
||||
-elf_compile_to_ax (struct objfile *objfile,
|
||||
- struct probe *probe,
|
||||
+elf_compile_to_ax (struct probe *probe,
|
||||
struct agent_expr *expr,
|
||||
struct axs_value *value,
|
||||
unsigned n)
|
||||
{
|
||||
- probe->pops->compile_to_ax (probe, objfile, expr, value, n);
|
||||
+ probe->pops->compile_to_ax (probe, expr, value, n);
|
||||
}
|
||||
|
||||
/* Implementation of `sym_relocate_probe', as documented in symfile.h. */
|
||||
--- src/gdb/infrun.c 2012/07/01 10:37:04 1.549
|
||||
+++ src/gdb/infrun.c 2012/07/18 16:12:16 1.550
|
||||
@@ -5518,7 +5518,6 @@
|
||||
static void
|
||||
insert_exception_resume_from_probe (struct thread_info *tp,
|
||||
const struct probe *probe,
|
||||
- struct objfile *objfile,
|
||||
struct frame_info *frame)
|
||||
{
|
||||
struct value *arg_value;
|
||||
@@ -5534,7 +5533,7 @@
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: exception resume at %s\n",
|
||||
- paddress (get_objfile_arch (objfile),
|
||||
+ paddress (get_objfile_arch (probe->objfile),
|
||||
handler));
|
||||
|
||||
bp = set_momentary_breakpoint_at_pc (get_frame_arch (frame),
|
||||
@@ -5552,7 +5551,6 @@
|
||||
struct frame_info *frame)
|
||||
{
|
||||
volatile struct gdb_exception e;
|
||||
- struct objfile *objfile;
|
||||
const struct probe *probe;
|
||||
struct symbol *func;
|
||||
|
||||
@@ -5560,11 +5558,10 @@
|
||||
SystemTap probe point. If so, the probe has two arguments: the
|
||||
CFA and the HANDLER. We ignore the CFA, extract the handler, and
|
||||
set a breakpoint there. */
|
||||
- probe = find_probe_by_pc (get_frame_pc (frame), &objfile);
|
||||
+ probe = find_probe_by_pc (get_frame_pc (frame));
|
||||
if (probe)
|
||||
{
|
||||
- insert_exception_resume_from_probe (ecs->event_thread, probe,
|
||||
- objfile, frame);
|
||||
+ insert_exception_resume_from_probe (ecs->event_thread, probe, frame);
|
||||
return;
|
||||
}
|
||||
|
||||
--- src/gdb/probe.c 2012/05/08 01:35:34 1.3
|
||||
+++ src/gdb/probe.c 2012/07/18 16:12:17 1.4
|
||||
@@ -204,7 +204,7 @@
|
||||
/* See definition in probe.h. */
|
||||
|
||||
struct probe *
|
||||
-find_probe_by_pc (CORE_ADDR pc, struct objfile **objfile_out)
|
||||
+find_probe_by_pc (CORE_ADDR pc)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
@@ -221,10 +221,7 @@
|
||||
probes = objfile->sf->sym_probe_fns->sym_get_probes (objfile);
|
||||
for (ix = 0; VEC_iterate (probe_p, probes, ix, probe); ix++)
|
||||
if (probe->address == pc)
|
||||
- {
|
||||
- *objfile_out = objfile;
|
||||
- return probe;
|
||||
- }
|
||||
+ return probe;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -232,21 +229,6 @@
|
||||
|
||||
|
||||
|
||||
-/* A utility structure. A VEC of these is built when handling "info
|
||||
- probes". */
|
||||
-
|
||||
-struct probe_and_objfile
|
||||
-{
|
||||
- /* The probe. */
|
||||
- struct probe *probe;
|
||||
-
|
||||
- /* The probe's objfile. */
|
||||
- struct objfile *objfile;
|
||||
-};
|
||||
-
|
||||
-typedef struct probe_and_objfile probe_and_objfile_s;
|
||||
-DEF_VEC_O (probe_and_objfile_s);
|
||||
-
|
||||
/* A helper function for collect_probes that compiles a regexp and
|
||||
throws an exception on error. This installs a cleanup to free the
|
||||
resulting pattern on success. If RX is NULL, this does nothing. */
|
||||
@@ -275,16 +257,16 @@
|
||||
If POPS is not NULL, only probes of this certain probe_ops will match.
|
||||
Each argument is a regexp, or NULL, which matches anything. */
|
||||
|
||||
-static VEC (probe_and_objfile_s) *
|
||||
+static VEC (probe_p) *
|
||||
collect_probes (char *objname, char *provider, char *probe_name,
|
||||
const struct probe_ops *pops)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
- VEC (probe_and_objfile_s) *result = NULL;
|
||||
+ VEC (probe_p) *result = NULL;
|
||||
struct cleanup *cleanup, *cleanup_temps;
|
||||
regex_t obj_pat, prov_pat, probe_pat;
|
||||
|
||||
- cleanup = make_cleanup (VEC_cleanup (probe_and_objfile_s), &result);
|
||||
+ cleanup = make_cleanup (VEC_cleanup (probe_p), &result);
|
||||
|
||||
cleanup_temps = make_cleanup (null_cleanup, NULL);
|
||||
compile_rx_or_error (&prov_pat, provider, _("Invalid provider regexp"));
|
||||
@@ -310,8 +292,6 @@
|
||||
|
||||
for (ix = 0; VEC_iterate (probe_p, probes, ix, probe); ix++)
|
||||
{
|
||||
- probe_and_objfile_s entry;
|
||||
-
|
||||
if (pops != NULL && probe->pops != pops)
|
||||
continue;
|
||||
|
||||
@@ -323,9 +303,7 @@
|
||||
&& regexec (&probe_pat, probe->name, 0, NULL, 0) != 0)
|
||||
continue;
|
||||
|
||||
- entry.probe = probe;
|
||||
- entry.objfile = objfile;
|
||||
- VEC_safe_push (probe_and_objfile_s, result, &entry);
|
||||
+ VEC_safe_push (probe_p, result, probe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,36 +312,36 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
-/* A qsort comparison function for probe_and_objfile_s objects. */
|
||||
+/* A qsort comparison function for probe_p objects. */
|
||||
|
||||
static int
|
||||
-compare_entries (const void *a, const void *b)
|
||||
+compare_probes (const void *a, const void *b)
|
||||
{
|
||||
- const probe_and_objfile_s *ea = a;
|
||||
- const probe_and_objfile_s *eb = b;
|
||||
+ const struct probe *pa = *((const struct probe **) a);
|
||||
+ const struct probe *pb = *((const struct probe **) b);
|
||||
int v;
|
||||
|
||||
- v = strcmp (ea->probe->provider, eb->probe->provider);
|
||||
+ v = strcmp (pa->provider, pb->provider);
|
||||
if (v)
|
||||
return v;
|
||||
|
||||
- v = strcmp (ea->probe->name, eb->probe->name);
|
||||
+ v = strcmp (pa->name, pb->name);
|
||||
if (v)
|
||||
return v;
|
||||
|
||||
- if (ea->probe->address < eb->probe->address)
|
||||
+ if (pa->address < pb->address)
|
||||
return -1;
|
||||
- if (ea->probe->address > eb->probe->address)
|
||||
+ if (pa->address > pb->address)
|
||||
return 1;
|
||||
|
||||
- return strcmp (ea->objfile->name, eb->objfile->name);
|
||||
+ return strcmp (pa->objfile->name, pb->objfile->name);
|
||||
}
|
||||
|
||||
/* Helper function that generate entries in the ui_out table being
|
||||
crafted by `info_probes_for_ops'. */
|
||||
|
||||
static void
|
||||
-gen_ui_out_table_header_info (VEC (probe_and_objfile_s) *probes,
|
||||
+gen_ui_out_table_header_info (VEC (probe_p) *probes,
|
||||
const struct probe_ops *p)
|
||||
{
|
||||
/* `headings' refers to the names of the columns when printing `info
|
||||
@@ -392,11 +370,11 @@
|
||||
VEC_iterate (info_probe_column_s, headings, ix, column);
|
||||
++ix)
|
||||
{
|
||||
- probe_and_objfile_s *entry;
|
||||
+ struct probe *probe;
|
||||
int jx;
|
||||
size_t size_max = strlen (column->print_name);
|
||||
|
||||
- for (jx = 0; VEC_iterate (probe_and_objfile_s, probes, jx, entry); ++jx)
|
||||
+ for (jx = 0; VEC_iterate (probe_p, probes, jx, probe); ++jx)
|
||||
{
|
||||
/* `probe_fields' refers to the values of each new field that this
|
||||
probe will display. */
|
||||
@@ -405,12 +383,11 @@
|
||||
const char *val;
|
||||
int kx;
|
||||
|
||||
- if (entry->probe->pops != p)
|
||||
+ if (probe->pops != p)
|
||||
continue;
|
||||
|
||||
c2 = make_cleanup (VEC_cleanup (const_char_ptr), &probe_fields);
|
||||
- p->gen_info_probes_table_values (entry->probe, entry->objfile,
|
||||
- &probe_fields);
|
||||
+ p->gen_info_probes_table_values (probe, &probe_fields);
|
||||
|
||||
gdb_assert (VEC_length (const_char_ptr, probe_fields)
|
||||
== headings_size);
|
||||
@@ -437,10 +414,10 @@
|
||||
}
|
||||
|
||||
/* Helper function to print extra information about a probe and an objfile
|
||||
- represented by ENTRY. */
|
||||
+ represented by PROBE. */
|
||||
|
||||
static void
|
||||
-print_ui_out_info (probe_and_objfile_s *entry)
|
||||
+print_ui_out_info (struct probe *probe)
|
||||
{
|
||||
int ix;
|
||||
int j = 0;
|
||||
@@ -451,23 +428,21 @@
|
||||
info_probe_column_s *column;
|
||||
struct cleanup *c;
|
||||
|
||||
- gdb_assert (entry != NULL);
|
||||
- gdb_assert (entry->probe != NULL);
|
||||
- gdb_assert (entry->probe->pops != NULL);
|
||||
+ gdb_assert (probe != NULL);
|
||||
+ gdb_assert (probe->pops != NULL);
|
||||
|
||||
- if (entry->probe->pops->gen_info_probes_table_header == NULL
|
||||
- && entry->probe->pops->gen_info_probes_table_values == NULL)
|
||||
+ if (probe->pops->gen_info_probes_table_header == NULL
|
||||
+ && probe->pops->gen_info_probes_table_values == NULL)
|
||||
return;
|
||||
|
||||
- gdb_assert (entry->probe->pops->gen_info_probes_table_header != NULL
|
||||
- && entry->probe->pops->gen_info_probes_table_values != NULL);
|
||||
+ gdb_assert (probe->pops->gen_info_probes_table_header != NULL
|
||||
+ && probe->pops->gen_info_probes_table_values != NULL);
|
||||
|
||||
c = make_cleanup (VEC_cleanup (info_probe_column_s), &headings);
|
||||
make_cleanup (VEC_cleanup (const_char_ptr), &values);
|
||||
|
||||
- entry->probe->pops->gen_info_probes_table_header (&headings);
|
||||
- entry->probe->pops->gen_info_probes_table_values (entry->probe,
|
||||
- entry->objfile, &values);
|
||||
+ probe->pops->gen_info_probes_table_header (&headings);
|
||||
+ probe->pops->gen_info_probes_table_values (probe, &values);
|
||||
|
||||
gdb_assert (VEC_length (info_probe_column_s, headings)
|
||||
== VEC_length (const_char_ptr, values));
|
||||
@@ -515,16 +490,16 @@
|
||||
void
|
||||
info_probes_for_ops (char *arg, int from_tty, const struct probe_ops *pops)
|
||||
{
|
||||
- char *provider, *probe = NULL, *objname = NULL;
|
||||
+ char *provider, *probe_name = NULL, *objname = NULL;
|
||||
struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
|
||||
- VEC (probe_and_objfile_s) *items;
|
||||
+ VEC (probe_p) *probes;
|
||||
int i, any_found;
|
||||
int ui_out_extra_fields = 0;
|
||||
size_t size_addr;
|
||||
size_t size_name = strlen ("Name");
|
||||
size_t size_objname = strlen ("Object");
|
||||
size_t size_provider = strlen ("Provider");
|
||||
- probe_and_objfile_s *entry;
|
||||
+ struct probe *probe;
|
||||
struct gdbarch *gdbarch = get_current_arch ();
|
||||
|
||||
/* Do we have a `provider:probe:objfile' style of linespec? */
|
||||
@@ -533,10 +508,10 @@
|
||||
{
|
||||
make_cleanup (xfree, provider);
|
||||
|
||||
- probe = extract_arg (&arg);
|
||||
- if (probe)
|
||||
+ probe_name = extract_arg (&arg);
|
||||
+ if (probe_name)
|
||||
{
|
||||
- make_cleanup (xfree, probe);
|
||||
+ make_cleanup (xfree, probe_name);
|
||||
|
||||
objname = extract_arg (&arg);
|
||||
if (objname)
|
||||
@@ -564,28 +539,27 @@
|
||||
else
|
||||
ui_out_extra_fields = get_number_extra_fields (pops);
|
||||
|
||||
- items = collect_probes (objname, provider, probe, pops);
|
||||
- make_cleanup (VEC_cleanup (probe_and_objfile_s), &items);
|
||||
+ probes = collect_probes (objname, provider, probe_name, pops);
|
||||
+ make_cleanup (VEC_cleanup (probe_p), &probes);
|
||||
make_cleanup_ui_out_table_begin_end (current_uiout,
|
||||
4 + ui_out_extra_fields,
|
||||
- VEC_length (probe_and_objfile_s, items),
|
||||
+ VEC_length (probe_p, probes),
|
||||
"StaticProbes");
|
||||
|
||||
- if (!VEC_empty (probe_and_objfile_s, items))
|
||||
- qsort (VEC_address (probe_and_objfile_s, items),
|
||||
- VEC_length (probe_and_objfile_s, items),
|
||||
- sizeof (probe_and_objfile_s), compare_entries);
|
||||
+ if (!VEC_empty (probe_p, probes))
|
||||
+ qsort (VEC_address (probe_p, probes), VEC_length (probe_p, probes),
|
||||
+ sizeof (probe_p), compare_probes);
|
||||
|
||||
/* What's the size of an address in our architecture? */
|
||||
size_addr = gdbarch_addr_bit (gdbarch) == 64 ? 18 : 10;
|
||||
|
||||
/* Determining the maximum size of each field (`provider', `name' and
|
||||
`objname'). */
|
||||
- for (i = 0; VEC_iterate (probe_and_objfile_s, items, i, entry); ++i)
|
||||
+ for (i = 0; VEC_iterate (probe_p, probes, i, probe); ++i)
|
||||
{
|
||||
- size_name = max (strlen (entry->probe->name), size_name);
|
||||
- size_provider = max (strlen (entry->probe->provider), size_provider);
|
||||
- size_objname = max (strlen (entry->objfile->name), size_objname);
|
||||
+ size_name = max (strlen (probe->name), size_name);
|
||||
+ size_provider = max (strlen (probe->provider), size_provider);
|
||||
+ size_objname = max (strlen (probe->objfile->name), size_objname);
|
||||
}
|
||||
|
||||
ui_out_table_header (current_uiout, size_provider, ui_left, "provider",
|
||||
@@ -601,26 +575,26 @@
|
||||
/* We have to generate the table header for each new probe type that we
|
||||
will print. */
|
||||
for (ix = 0; VEC_iterate (probe_ops_cp, all_probe_ops, ix, po); ++ix)
|
||||
- gen_ui_out_table_header_info (items, po);
|
||||
+ gen_ui_out_table_header_info (probes, po);
|
||||
}
|
||||
else
|
||||
- gen_ui_out_table_header_info (items, pops);
|
||||
+ gen_ui_out_table_header_info (probes, pops);
|
||||
|
||||
ui_out_table_header (current_uiout, size_objname, ui_left, "object",
|
||||
_("Object"));
|
||||
ui_out_table_body (current_uiout);
|
||||
|
||||
- for (i = 0; VEC_iterate (probe_and_objfile_s, items, i, entry); ++i)
|
||||
+ for (i = 0; VEC_iterate (probe_p, probes, i, probe); ++i)
|
||||
{
|
||||
struct cleanup *inner;
|
||||
|
||||
inner = make_cleanup_ui_out_tuple_begin_end (current_uiout, "probe");
|
||||
|
||||
- ui_out_field_string (current_uiout, "provider", entry->probe->provider);
|
||||
- ui_out_field_string (current_uiout, "name", entry->probe->name);
|
||||
+ ui_out_field_string (current_uiout, "provider", probe->provider);
|
||||
+ ui_out_field_string (current_uiout, "name", probe->name);
|
||||
ui_out_field_core_addr (current_uiout, "addr",
|
||||
- get_objfile_arch (entry->objfile),
|
||||
- entry->probe->address);
|
||||
+ get_objfile_arch (probe->objfile),
|
||||
+ probe->address);
|
||||
|
||||
if (pops == NULL)
|
||||
{
|
||||
@@ -629,19 +603,19 @@
|
||||
|
||||
for (ix = 0; VEC_iterate (probe_ops_cp, all_probe_ops, ix, po);
|
||||
++ix)
|
||||
- if (entry->probe->pops == po)
|
||||
- print_ui_out_info (entry);
|
||||
+ if (probe->pops == po)
|
||||
+ print_ui_out_info (probe);
|
||||
}
|
||||
else
|
||||
- print_ui_out_info (entry);
|
||||
+ print_ui_out_info (probe);
|
||||
|
||||
- ui_out_field_string (current_uiout, "object", entry->objfile->name);
|
||||
+ ui_out_field_string (current_uiout, "object", probe->objfile->name);
|
||||
ui_out_text (current_uiout, "\n");
|
||||
|
||||
do_cleanups (inner);
|
||||
}
|
||||
|
||||
- any_found = !VEC_empty (probe_and_objfile_s, items);
|
||||
+ any_found = !VEC_empty (probe_p, probes);
|
||||
do_cleanups (cleanup);
|
||||
|
||||
if (!any_found)
|
||||
@@ -662,23 +636,24 @@
|
||||
probe_safe_evaluate_at_pc (struct frame_info *frame, unsigned n)
|
||||
{
|
||||
struct probe *probe;
|
||||
- struct objfile *objfile;
|
||||
+ const struct sym_probe_fns *probe_fns;
|
||||
unsigned n_probes;
|
||||
|
||||
- probe = find_probe_by_pc (get_frame_pc (frame), &objfile);
|
||||
+ probe = find_probe_by_pc (get_frame_pc (frame));
|
||||
if (!probe)
|
||||
return NULL;
|
||||
- gdb_assert (objfile->sf && objfile->sf->sym_probe_fns);
|
||||
|
||||
- n_probes
|
||||
- = objfile->sf->sym_probe_fns->sym_get_probe_argument_count (objfile,
|
||||
- probe);
|
||||
+ gdb_assert (probe->objfile != NULL);
|
||||
+ gdb_assert (probe->objfile->sf != NULL);
|
||||
+ gdb_assert (probe->objfile->sf->sym_probe_fns != NULL);
|
||||
+
|
||||
+ probe_fns = probe->objfile->sf->sym_probe_fns;
|
||||
+ n_probes = probe_fns->sym_get_probe_argument_count (probe);
|
||||
+
|
||||
if (n >= n_probes)
|
||||
return NULL;
|
||||
|
||||
- return objfile->sf->sym_probe_fns->sym_evaluate_probe_argument (objfile,
|
||||
- probe,
|
||||
- n);
|
||||
+ return probe_fns->sym_evaluate_probe_argument (probe, n);
|
||||
}
|
||||
|
||||
/* See comment in probe.h. */
|
||||
--- src/gdb/probe.h 2012/04/27 20:47:55 1.1
|
||||
+++ src/gdb/probe.h 2012/07/18 16:12:17 1.2
|
||||
@@ -66,21 +66,18 @@
|
||||
|
||||
/* Return the number of arguments of PROBE. */
|
||||
|
||||
- unsigned (*get_probe_argument_count) (struct probe *probe,
|
||||
- struct objfile *objfile);
|
||||
+ unsigned (*get_probe_argument_count) (struct probe *probe);
|
||||
|
||||
/* Evaluate the Nth argument from the PROBE, returning a value
|
||||
corresponding to it. The argument number is represented N. */
|
||||
|
||||
struct value *(*evaluate_probe_argument) (struct probe *probe,
|
||||
- struct objfile *objfile,
|
||||
unsigned n);
|
||||
|
||||
/* Compile the Nth argument of the PROBE to an agent expression.
|
||||
The argument number is represented by N. */
|
||||
|
||||
- void (*compile_to_ax) (struct probe *probe, struct objfile *objfile,
|
||||
- struct agent_expr *aexpr,
|
||||
+ void (*compile_to_ax) (struct probe *probe, struct agent_expr *aexpr,
|
||||
struct axs_value *axs_value, unsigned n);
|
||||
|
||||
/* Set the semaphore associated with the PROBE. This function only makes
|
||||
@@ -108,8 +105,8 @@
|
||||
void (*gen_info_probes_table_header) (VEC (info_probe_column_s) **heads);
|
||||
|
||||
/* Function that will fill VALUES with the values of the extra fields
|
||||
- to be printed for PROBE and OBJFILE. If the backend implements
|
||||
- the `gen_ui_out_table_header' method, then it should implement
|
||||
+ to be printed for PROBE. If the backend implements the
|
||||
+ `gen_ui_out_table_header' method, then it should implement
|
||||
this method as well. The backend should also guarantee that the
|
||||
order and the number of values in the vector is exactly the same
|
||||
as the order of the extra fields provided in the method
|
||||
@@ -118,7 +115,6 @@
|
||||
position in the vector. */
|
||||
|
||||
void (*gen_info_probes_table_values) (struct probe *probe,
|
||||
- struct objfile *objfile,
|
||||
VEC (const_char_ptr) **values);
|
||||
};
|
||||
|
||||
@@ -157,6 +153,11 @@
|
||||
/* The operations associated with this probe. */
|
||||
const struct probe_ops *pops;
|
||||
|
||||
+ /* The objfile which contains this probe. Even if the probe is also
|
||||
+ present in a separate debug objfile, this variable always points to
|
||||
+ the non-separate debug objfile. */
|
||||
+ struct objfile *objfile;
|
||||
+
|
||||
/* The name of the probe. */
|
||||
const char *name;
|
||||
|
||||
@@ -181,11 +182,9 @@
|
||||
extern void register_probe_ops (struct probe *probe);
|
||||
|
||||
/* Given a PC, find an associated probe with type PTYPE. If a probe is
|
||||
- found, set *OBJFILE_OUT to the probe's objfile, and return the
|
||||
- probe. If no probe is found, return NULL. */
|
||||
+ found, return it. If no probe is found, return NULL. */
|
||||
|
||||
-extern struct probe *find_probe_by_pc (CORE_ADDR pc,
|
||||
- struct objfile **objfile_out);
|
||||
+extern struct probe *find_probe_by_pc (CORE_ADDR pc);
|
||||
|
||||
/* Search OBJFILE for a probe with the given PROVIDER, NAME and PTYPE.
|
||||
Return a VEC of all probes that were found. If no matching probe
|
||||
--- src/gdb/stap-probe.c 2012/05/08 01:35:35 1.4
|
||||
+++ src/gdb/stap-probe.c 2012/07/18 16:12:17 1.5
|
||||
@@ -903,10 +903,10 @@
|
||||
this information. */
|
||||
|
||||
static void
|
||||
-stap_parse_probe_arguments (struct stap_probe *probe, struct objfile *objfile)
|
||||
+stap_parse_probe_arguments (struct stap_probe *probe)
|
||||
{
|
||||
const char *cur;
|
||||
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
+ struct gdbarch *gdbarch = get_objfile_arch (probe->p.objfile);
|
||||
|
||||
gdb_assert (!probe->args_parsed);
|
||||
cur = probe->args_u.text;
|
||||
@@ -991,15 +991,14 @@
|
||||
argument string. */
|
||||
|
||||
static unsigned
|
||||
-stap_get_probe_argument_count (struct probe *probe_generic,
|
||||
- struct objfile *objfile)
|
||||
+stap_get_probe_argument_count (struct probe *probe_generic)
|
||||
{
|
||||
struct stap_probe *probe = (struct stap_probe *) probe_generic;
|
||||
|
||||
gdb_assert (probe_generic->pops == &stap_probe_ops);
|
||||
|
||||
if (!probe->args_parsed)
|
||||
- stap_parse_probe_arguments (probe, objfile);
|
||||
+ stap_parse_probe_arguments (probe);
|
||||
|
||||
gdb_assert (probe->args_parsed);
|
||||
return VEC_length (stap_probe_arg_s, probe->args_u.vec);
|
||||
@@ -1042,10 +1041,10 @@
|
||||
}
|
||||
|
||||
static struct stap_probe_arg *
|
||||
-stap_get_arg (struct stap_probe *probe, struct objfile *objfile, unsigned n)
|
||||
+stap_get_arg (struct stap_probe *probe, unsigned n)
|
||||
{
|
||||
if (!probe->args_parsed)
|
||||
- stap_parse_probe_arguments (probe, objfile);
|
||||
+ stap_parse_probe_arguments (probe);
|
||||
|
||||
return VEC_index (stap_probe_arg_s, probe->args_u.vec, n);
|
||||
}
|
||||
@@ -1054,8 +1053,7 @@
|
||||
corresponding to it. Assertion is thrown if N does not exist. */
|
||||
|
||||
static struct value *
|
||||
-stap_evaluate_probe_argument (struct probe *probe_generic,
|
||||
- struct objfile *objfile, unsigned n)
|
||||
+stap_evaluate_probe_argument (struct probe *probe_generic, unsigned n)
|
||||
{
|
||||
struct stap_probe *stap_probe = (struct stap_probe *) probe_generic;
|
||||
struct stap_probe_arg *arg;
|
||||
@@ -1063,7 +1061,7 @@
|
||||
|
||||
gdb_assert (probe_generic->pops == &stap_probe_ops);
|
||||
|
||||
- arg = stap_get_arg (stap_probe, objfile, n);
|
||||
+ arg = stap_get_arg (stap_probe, n);
|
||||
return evaluate_subexp_standard (arg->atype, arg->aexpr, &pos, EVAL_NORMAL);
|
||||
}
|
||||
|
||||
@@ -1071,9 +1069,8 @@
|
||||
Assertion is thrown if N does not exist. */
|
||||
|
||||
static void
|
||||
-stap_compile_to_ax (struct probe *probe_generic, struct objfile *objfile,
|
||||
- struct agent_expr *expr, struct axs_value *value,
|
||||
- unsigned n)
|
||||
+stap_compile_to_ax (struct probe *probe_generic, struct agent_expr *expr,
|
||||
+ struct axs_value *value, unsigned n)
|
||||
{
|
||||
struct stap_probe *stap_probe = (struct stap_probe *) probe_generic;
|
||||
struct stap_probe_arg *arg;
|
||||
@@ -1081,7 +1078,7 @@
|
||||
|
||||
gdb_assert (probe_generic->pops == &stap_probe_ops);
|
||||
|
||||
- arg = stap_get_arg (stap_probe, objfile, n);
|
||||
+ arg = stap_get_arg (stap_probe, n);
|
||||
|
||||
pc = arg->aexpr->elts;
|
||||
gen_expr (arg->aexpr, &pc, expr, value);
|
||||
@@ -1124,20 +1121,24 @@
|
||||
struct frame_info *frame = get_selected_frame (_("No frame selected"));
|
||||
CORE_ADDR pc = get_frame_pc (frame);
|
||||
int sel = (int) (uintptr_t) data;
|
||||
- struct objfile *objfile;
|
||||
struct probe *pc_probe;
|
||||
+ const struct sym_probe_fns *pc_probe_fns;
|
||||
unsigned n_args;
|
||||
|
||||
/* SEL == -1 means "_probe_argc". */
|
||||
gdb_assert (sel >= -1);
|
||||
|
||||
- pc_probe = find_probe_by_pc (pc, &objfile);
|
||||
+ pc_probe = find_probe_by_pc (pc);
|
||||
if (pc_probe == NULL)
|
||||
error (_("No SystemTap probe at PC %s"), core_addr_to_string (pc));
|
||||
|
||||
- n_args
|
||||
- = objfile->sf->sym_probe_fns->sym_get_probe_argument_count (objfile,
|
||||
- pc_probe);
|
||||
+ gdb_assert (pc_probe->objfile != NULL);
|
||||
+ gdb_assert (pc_probe->objfile->sf != NULL);
|
||||
+ gdb_assert (pc_probe->objfile->sf->sym_probe_fns != NULL);
|
||||
+
|
||||
+ pc_probe_fns = pc_probe->objfile->sf->sym_probe_fns;
|
||||
+
|
||||
+ n_args = pc_probe_fns->sym_get_probe_argument_count (pc_probe);
|
||||
if (sel == -1)
|
||||
return value_from_longest (builtin_type (arch)->builtin_int, n_args);
|
||||
|
||||
@@ -1145,9 +1146,7 @@
|
||||
error (_("Invalid probe argument %d -- probe has %u arguments available"),
|
||||
sel, n_args);
|
||||
|
||||
- return objfile->sf->sym_probe_fns->sym_evaluate_probe_argument (objfile,
|
||||
- pc_probe,
|
||||
- sel);
|
||||
+ return pc_probe_fns->sym_evaluate_probe_argument (pc_probe, sel);
|
||||
}
|
||||
|
||||
/* This is called to compile one of the $_probe_arg* convenience
|
||||
@@ -1159,20 +1158,25 @@
|
||||
{
|
||||
CORE_ADDR pc = expr->scope;
|
||||
int sel = (int) (uintptr_t) data;
|
||||
- struct objfile *objfile;
|
||||
struct probe *pc_probe;
|
||||
+ const struct sym_probe_fns *pc_probe_fns;
|
||||
int n_probes;
|
||||
|
||||
/* SEL == -1 means "_probe_argc". */
|
||||
gdb_assert (sel >= -1);
|
||||
|
||||
- pc_probe = find_probe_by_pc (pc, &objfile);
|
||||
+ pc_probe = find_probe_by_pc (pc);
|
||||
if (pc_probe == NULL)
|
||||
error (_("No SystemTap probe at PC %s"), core_addr_to_string (pc));
|
||||
|
||||
- n_probes
|
||||
- = objfile->sf->sym_probe_fns->sym_get_probe_argument_count (objfile,
|
||||
- pc_probe);
|
||||
+ gdb_assert (pc_probe->objfile != NULL);
|
||||
+ gdb_assert (pc_probe->objfile->sf != NULL);
|
||||
+ gdb_assert (pc_probe->objfile->sf->sym_probe_fns != NULL);
|
||||
+
|
||||
+ pc_probe_fns = pc_probe->objfile->sf->sym_probe_fns;
|
||||
+
|
||||
+ n_probes = pc_probe_fns->sym_get_probe_argument_count (pc_probe);
|
||||
+
|
||||
if (sel == -1)
|
||||
{
|
||||
value->kind = axs_rvalue;
|
||||
@@ -1186,8 +1190,7 @@
|
||||
error (_("Invalid probe argument %d -- probe has %d arguments available"),
|
||||
sel, n_probes);
|
||||
|
||||
- objfile->sf->sym_probe_fns->sym_compile_to_ax (objfile, pc_probe,
|
||||
- expr, value, sel);
|
||||
+ pc_probe_fns->sym_compile_to_ax (pc_probe, expr, value, sel);
|
||||
}
|
||||
|
||||
|
||||
@@ -1297,6 +1300,7 @@
|
||||
|
||||
ret = obstack_alloc (&objfile->objfile_obstack, sizeof (*ret));
|
||||
ret->p.pops = &stap_probe_ops;
|
||||
+ ret->p.objfile = objfile;
|
||||
|
||||
/* Provider and the name of the probe. */
|
||||
ret->p.provider = &el->data[3 * size];
|
||||
@@ -1481,15 +1485,16 @@
|
||||
|
||||
static void
|
||||
stap_gen_info_probes_table_values (struct probe *probe_generic,
|
||||
- struct objfile *objfile,
|
||||
VEC (const_char_ptr) **ret)
|
||||
{
|
||||
struct stap_probe *probe = (struct stap_probe *) probe_generic;
|
||||
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
+ struct gdbarch *gdbarch;
|
||||
const char *val = NULL;
|
||||
|
||||
gdb_assert (probe_generic->pops == &stap_probe_ops);
|
||||
|
||||
+ gdbarch = get_objfile_arch (probe->p.objfile);
|
||||
+
|
||||
if (probe->sem_addr)
|
||||
val = print_core_address (gdbarch, probe->sem_addr);
|
||||
|
||||
--- src/gdb/symfile.h 2012/05/24 22:14:35 1.109
|
||||
+++ src/gdb/symfile.h 2012/07/18 16:12:17 1.110
|
||||
@@ -320,8 +320,7 @@
|
||||
have come from a call to this objfile's sym_get_probes method.
|
||||
If you provide an implementation of sym_get_probes, you must
|
||||
implement this method as well. */
|
||||
- unsigned (*sym_get_probe_argument_count) (struct objfile *objfile,
|
||||
- struct probe *probe);
|
||||
+ unsigned (*sym_get_probe_argument_count) (struct probe *probe);
|
||||
|
||||
/* Evaluate the Nth argument available to PROBE. PROBE will have
|
||||
come from a call to this objfile's sym_get_probes method. N will
|
||||
@@ -330,8 +329,7 @@
|
||||
PC will match the address of the probe. If you provide an
|
||||
implementation of sym_get_probes, you must implement this method
|
||||
as well. */
|
||||
- struct value *(*sym_evaluate_probe_argument) (struct objfile *objfile,
|
||||
- struct probe *probe,
|
||||
+ struct value *(*sym_evaluate_probe_argument) (struct probe *probe,
|
||||
unsigned n);
|
||||
|
||||
/* Compile the Nth probe argument to an agent expression. PROBE
|
||||
@@ -339,8 +337,7 @@
|
||||
method. N will be between 0 and the number of arguments
|
||||
available to this probe. EXPR and VALUE are the agent expression
|
||||
that is being updated. */
|
||||
- void (*sym_compile_to_ax) (struct objfile *objfile,
|
||||
- struct probe *probe,
|
||||
+ void (*sym_compile_to_ax) (struct probe *probe,
|
||||
struct agent_expr *expr,
|
||||
struct axs_value *value,
|
||||
unsigned n);
|
@ -1,74 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-07/msg00124.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/07/18 16:12:15 1.14474
|
||||
### src/gdb/ChangeLog 2012/07/18 16:20:36 1.14475
|
||||
## -1,5 +1,10 @@
|
||||
2012-07-18 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
+ * probe.c (probe_safe_evaluate_at_pc): Rename variable `n_probes'.
|
||||
+ * stap-probe.c (compile_probe_arg): Likewise.
|
||||
+
|
||||
+2012-07-18 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
+
|
||||
* elfread.c (elf_get_probe_argument_count): Remove `objfile' argument.
|
||||
(elf_compile_to_ax): Likewise.
|
||||
* infrun.c (insert_exception_resume_from_probe): Likewise.
|
||||
--- src/gdb/probe.c 2012/07/18 16:12:17 1.4
|
||||
+++ src/gdb/probe.c 2012/07/18 16:20:43 1.5
|
||||
@@ -637,7 +637,7 @@
|
||||
{
|
||||
struct probe *probe;
|
||||
const struct sym_probe_fns *probe_fns;
|
||||
- unsigned n_probes;
|
||||
+ unsigned n_args;
|
||||
|
||||
probe = find_probe_by_pc (get_frame_pc (frame));
|
||||
if (!probe)
|
||||
@@ -648,9 +648,9 @@
|
||||
gdb_assert (probe->objfile->sf->sym_probe_fns != NULL);
|
||||
|
||||
probe_fns = probe->objfile->sf->sym_probe_fns;
|
||||
- n_probes = probe_fns->sym_get_probe_argument_count (probe);
|
||||
+ n_args = probe_fns->sym_get_probe_argument_count (probe);
|
||||
|
||||
- if (n >= n_probes)
|
||||
+ if (n >= n_args)
|
||||
return NULL;
|
||||
|
||||
return probe_fns->sym_evaluate_probe_argument (probe, n);
|
||||
--- src/gdb/stap-probe.c 2012/07/18 16:12:17 1.5
|
||||
+++ src/gdb/stap-probe.c 2012/07/18 16:20:43 1.6
|
||||
@@ -1160,7 +1160,7 @@
|
||||
int sel = (int) (uintptr_t) data;
|
||||
struct probe *pc_probe;
|
||||
const struct sym_probe_fns *pc_probe_fns;
|
||||
- int n_probes;
|
||||
+ int n_args;
|
||||
|
||||
/* SEL == -1 means "_probe_argc". */
|
||||
gdb_assert (sel >= -1);
|
||||
@@ -1175,20 +1175,20 @@
|
||||
|
||||
pc_probe_fns = pc_probe->objfile->sf->sym_probe_fns;
|
||||
|
||||
- n_probes = pc_probe_fns->sym_get_probe_argument_count (pc_probe);
|
||||
+ n_args = pc_probe_fns->sym_get_probe_argument_count (pc_probe);
|
||||
|
||||
if (sel == -1)
|
||||
{
|
||||
value->kind = axs_rvalue;
|
||||
value->type = builtin_type (expr->gdbarch)->builtin_int;
|
||||
- ax_const_l (expr, n_probes);
|
||||
+ ax_const_l (expr, n_args);
|
||||
return;
|
||||
}
|
||||
|
||||
gdb_assert (sel >= 0);
|
||||
- if (sel >= n_probes)
|
||||
+ if (sel >= n_args)
|
||||
error (_("Invalid probe argument %d -- probe has %d arguments available"),
|
||||
- sel, n_probes);
|
||||
+ sel, n_args);
|
||||
|
||||
pc_probe_fns->sym_compile_to_ax (pc_probe, expr, value, sel);
|
||||
}
|
@ -81,24 +81,24 @@ gdb/testsuite
|
||||
* gdb.base/break-dlmopen.c: Likewise.
|
||||
* gdb.base/break-dlmopen-solib.c: Likewise.
|
||||
|
||||
Index: gdb-7.4.91.20120814/gdb/breakpoint.h
|
||||
Index: gdb-7.5.50.20130215/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/breakpoint.h 2012-08-14 17:31:37.050984427 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/breakpoint.h 2012-08-14 17:34:44.203746601 +0200
|
||||
@@ -1515,8 +1515,6 @@ extern int user_breakpoint_p (struct bre
|
||||
--- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-15 22:37:19.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:37:47.185432296 +0100
|
||||
@@ -1552,8 +1552,6 @@ extern int user_breakpoint_p (struct bre
|
||||
/* Attempt to determine architecture of location identified by SAL. */
|
||||
extern struct gdbarch *get_sal_arch (struct symtab_and_line sal);
|
||||
|
||||
-extern void handle_solib_event (void);
|
||||
-
|
||||
extern void breakpoints_relocate (struct objfile *objfile,
|
||||
struct section_offsets *delta);
|
||||
extern void breakpoint_free_objfile (struct objfile *objfile);
|
||||
|
||||
Index: gdb-7.4.91.20120814/gdb/breakpoint.c
|
||||
extern void breakpoints_relocate (struct objfile *objfile,
|
||||
Index: gdb-7.5.50.20130215/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/breakpoint.c 2012-08-14 17:31:37.128984404 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/breakpoint.c 2012-08-14 17:34:44.211746597 +0200
|
||||
@@ -5205,7 +5205,7 @@ bpstat_stop_status (struct address_space
|
||||
--- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:37:30.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:37:35.755417584 +0100
|
||||
@@ -5250,7 +5250,7 @@ bpstat_stop_status (struct address_space
|
||||
{
|
||||
if (bs->breakpoint_at && bs->breakpoint_at->type == bp_shlib_event)
|
||||
{
|
||||
@ -107,7 +107,7 @@ Index: gdb-7.4.91.20120814/gdb/breakpoint.c
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5301,25 +5301,6 @@ handle_jit_event (void)
|
||||
@@ -5346,25 +5346,6 @@ handle_jit_event (void)
|
||||
target_terminal_inferior ();
|
||||
}
|
||||
|
||||
@ -133,11 +133,11 @@ Index: gdb-7.4.91.20120814/gdb/breakpoint.c
|
||||
/* Prepare WHAT final decision for infrun. */
|
||||
|
||||
/* Decide what infrun needs to do with this bpstat. */
|
||||
Index: gdb-7.4.91.20120814/gdb/solib.h
|
||||
Index: gdb-7.5.50.20130215/gdb/solib.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/solib.h 2012-02-03 16:19:37.000000000 +0100
|
||||
+++ gdb-7.4.91.20120814/gdb/solib.h 2012-08-14 17:34:44.257746587 +0200
|
||||
@@ -21,6 +21,9 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solib.h 2013-01-01 07:32:51.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solib.h 2013-02-15 22:37:35.757417588 +0100
|
||||
@@ -20,6 +20,9 @@
|
||||
#ifndef SOLIB_H
|
||||
#define SOLIB_H
|
||||
|
||||
@ -147,7 +147,7 @@ Index: gdb-7.4.91.20120814/gdb/solib.h
|
||||
/* Forward decl's for prototypes */
|
||||
struct so_list;
|
||||
struct target_ops;
|
||||
@@ -91,4 +94,15 @@ extern CORE_ADDR gdb_bfd_lookup_symbol_f
|
||||
@@ -90,4 +93,15 @@ extern CORE_ADDR gdb_bfd_lookup_symbol_f
|
||||
void *),
|
||||
void *data);
|
||||
|
||||
@ -163,11 +163,11 @@ Index: gdb-7.4.91.20120814/gdb/solib.h
|
||||
+extern void update_solib_breakpoints (void);
|
||||
+
|
||||
#endif /* SOLIB_H */
|
||||
Index: gdb-7.4.91.20120814/gdb/solib.c
|
||||
Index: gdb-7.5.50.20130215/gdb/solib.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/solib.c 2012-08-14 17:31:36.832984492 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/solib.c 2012-08-14 17:34:44.272746583 +0200
|
||||
@@ -1226,6 +1226,42 @@ no_shared_libraries (char *ignored, int
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solib.c 2013-02-15 22:37:04.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solib.c 2013-02-15 22:37:35.757417588 +0100
|
||||
@@ -1221,6 +1221,42 @@ no_shared_libraries (char *ignored, int
|
||||
objfile_purge_solibs ();
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ Index: gdb-7.4.91.20120814/gdb/solib.c
|
||||
+void
|
||||
+handle_solib_event (bpstat bs)
|
||||
+{
|
||||
+ struct target_so_ops *ops = solib_ops (target_gdbarch);
|
||||
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
|
||||
+
|
||||
+ if (ops->handle_solib_event != NULL)
|
||||
+ ops->handle_solib_event (bs);
|
||||
@ -200,7 +200,7 @@ Index: gdb-7.4.91.20120814/gdb/solib.c
|
||||
+void
|
||||
+update_solib_breakpoints (void)
|
||||
+{
|
||||
+ struct target_so_ops *ops = solib_ops (target_gdbarch);
|
||||
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
|
||||
+
|
||||
+ if (ops->update_breakpoints != NULL)
|
||||
+ ops->update_breakpoints ();
|
||||
@ -210,11 +210,11 @@ Index: gdb-7.4.91.20120814/gdb/solib.c
|
||||
/* Reload shared libraries, but avoid reloading the same symbol file
|
||||
we already have loaded. */
|
||||
|
||||
Index: gdb-7.4.91.20120814/gdb/solist.h
|
||||
Index: gdb-7.5.50.20130215/gdb/solist.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/solist.h 2012-01-04 09:17:11.000000000 +0100
|
||||
+++ gdb-7.4.91.20120814/gdb/solist.h 2012-08-14 17:34:44.273746584 +0200
|
||||
@@ -23,6 +23,8 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solist.h 2013-01-01 07:32:51.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solist.h 2013-02-15 22:37:35.758417590 +0100
|
||||
@@ -22,6 +22,8 @@
|
||||
#define SO_NAME_MAX_PATH_SIZE 512 /* FIXME: Should be dynamic */
|
||||
/* For domain_enum domain. */
|
||||
#include "symtab.h"
|
||||
@ -223,7 +223,7 @@ Index: gdb-7.4.91.20120814/gdb/solist.h
|
||||
|
||||
/* Forward declaration for target specific link map information. This
|
||||
struct is opaque to all but the target specific file. */
|
||||
@@ -149,6 +151,20 @@ struct target_so_ops
|
||||
@@ -148,6 +150,20 @@ struct target_so_ops
|
||||
core file (in particular, for readonly sections). */
|
||||
int (*keep_data_in_core) (CORE_ADDR vaddr,
|
||||
unsigned long size);
|
||||
@ -244,11 +244,11 @@ Index: gdb-7.4.91.20120814/gdb/solist.h
|
||||
};
|
||||
|
||||
/* Free the memory associated with a (so_list *). */
|
||||
Index: gdb-7.4.91.20120814/gdb/infrun.c
|
||||
Index: gdb-7.5.50.20130215/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/infrun.c 2012-08-14 17:33:16.249955007 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/infrun.c 2012-08-14 17:34:44.276746583 +0200
|
||||
@@ -361,6 +361,16 @@ static struct symbol *step_start_functio
|
||||
--- gdb-7.5.50.20130215.orig/gdb/infrun.c 2013-02-15 22:37:04.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/infrun.c 2013-02-15 22:37:35.760417594 +0100
|
||||
@@ -369,6 +369,16 @@ static struct symbol *step_start_functio
|
||||
/* Nonzero if we want to give control to the user when we're notified
|
||||
of shared library events by the dynamic linker. */
|
||||
int stop_on_solib_events;
|
||||
@ -265,7 +265,7 @@ Index: gdb-7.4.91.20120814/gdb/infrun.c
|
||||
static void
|
||||
show_stop_on_solib_events (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
@@ -3321,7 +3331,7 @@ handle_inferior_event (struct execution_
|
||||
@@ -3346,7 +3356,7 @@ handle_inferior_event (struct execution_
|
||||
context_switch (ecs->ptid);
|
||||
regcache = get_thread_regcache (ecs->ptid);
|
||||
|
||||
@ -274,7 +274,7 @@ Index: gdb-7.4.91.20120814/gdb/infrun.c
|
||||
|
||||
ecs->event_thread->control.stop_bpstat
|
||||
= bpstat_stop_status (get_regcache_aspace (regcache),
|
||||
@@ -7226,7 +7236,7 @@ Show stopping for shared library events.
|
||||
@@ -7334,7 +7344,7 @@ Show stopping for shared library events.
|
||||
If nonzero, gdb will give control to the user when the dynamic linker\n\
|
||||
notifies gdb of shared library events. The most common event of interest\n\
|
||||
to the user would be loading/unloading of a new library."),
|
||||
@ -283,11 +283,11 @@ Index: gdb-7.4.91.20120814/gdb/infrun.c
|
||||
show_stop_on_solib_events,
|
||||
&setlist, &showlist);
|
||||
|
||||
Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
Index: gdb-7.5.50.20130215/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/solib-svr4.c 2012-08-14 17:34:39.346752840 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/solib-svr4.c 2012-08-14 17:35:42.635732596 +0200
|
||||
@@ -47,10 +47,12 @@
|
||||
--- gdb-7.5.50.20130215.orig/gdb/solib-svr4.c 2013-02-15 22:37:30.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/solib-svr4.c 2013-02-15 22:37:35.761417596 +0100
|
||||
@@ -46,10 +46,12 @@
|
||||
#include "auxv.h"
|
||||
#include "exceptions.h"
|
||||
#include "gdb_bfd.h"
|
||||
@ -300,7 +300,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
|
||||
/* Link map info to include in an allocated so_list entry. */
|
||||
|
||||
@@ -71,6 +73,16 @@ struct lm_info
|
||||
@@ -70,6 +72,16 @@ struct lm_info
|
||||
|
||||
/* Values read in from inferior's fields of the same name. */
|
||||
CORE_ADDR l_ld, l_next, l_prev, l_name;
|
||||
@ -317,7 +317,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
};
|
||||
|
||||
/* On SVR4 systems, a list of symbols in the dynamic linker where
|
||||
@@ -107,6 +119,53 @@ static const char * const main_name_lis
|
||||
@@ -106,6 +118,53 @@ static const char * const main_name_lis
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -371,7 +371,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
/* Per pspace SVR4 specific data. */
|
||||
|
||||
struct svr4_info
|
||||
@@ -129,17 +188,58 @@ struct svr4_info
|
||||
@@ -128,17 +187,58 @@ struct svr4_info
|
||||
CORE_ADDR interp_text_sect_high;
|
||||
CORE_ADDR interp_plt_sect_low;
|
||||
CORE_ADDR interp_plt_sect_high;
|
||||
@ -430,7 +430,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
xfree (info);
|
||||
}
|
||||
|
||||
@@ -188,10 +288,21 @@ svr4_same_1 (const char *gdb_so_name, co
|
||||
@@ -187,10 +287,21 @@ svr4_same_1 (const char *gdb_so_name, co
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -453,7 +453,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
}
|
||||
|
||||
static struct lm_info *
|
||||
@@ -322,18 +433,26 @@ lm_addr_check (struct so_list *so, bfd *
|
||||
@@ -321,18 +432,26 @@ lm_addr_check (struct so_list *so, bfd *
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -492,7 +492,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -775,16 +894,10 @@ locate_base (struct svr4_info *info)
|
||||
@@ -774,16 +893,10 @@ locate_base (struct svr4_info *info)
|
||||
return info->debug_base;
|
||||
}
|
||||
|
||||
@ -510,8 +510,8 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
+r_map_from_debug_base (CORE_ADDR debug_base)
|
||||
{
|
||||
struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
|
||||
struct type *ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
|
||||
@@ -793,13 +906,27 @@ solib_svr4_r_map (struct svr4_info *info
|
||||
struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
|
||||
@@ -792,13 +905,27 @@ solib_svr4_r_map (struct svr4_info *info
|
||||
|
||||
TRY_CATCH (ex, RETURN_MASK_ERROR)
|
||||
{
|
||||
@ -540,7 +540,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
/* Find r_brk from the inferior's debug base. */
|
||||
|
||||
static CORE_ADDR
|
||||
@@ -1164,15 +1291,17 @@ svr4_default_sos (void)
|
||||
@@ -1161,15 +1288,17 @@ svr4_default_sos (void)
|
||||
return new;
|
||||
}
|
||||
|
||||
@ -565,7 +565,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
|
||||
for (; lm != 0; prev_lm = lm, lm = next_lm)
|
||||
{
|
||||
@@ -1189,7 +1318,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
@@ -1185,7 +1314,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
if (new->lm_info == NULL)
|
||||
{
|
||||
do_cleanups (old_chain);
|
||||
@ -574,16 +574,16 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
}
|
||||
|
||||
next_lm = new->lm_info->l_next;
|
||||
@@ -1200,7 +1329,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
paddress (target_gdbarch, prev_lm),
|
||||
paddress (target_gdbarch, new->lm_info->l_prev));
|
||||
@@ -1196,7 +1325,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
paddress (target_gdbarch (), prev_lm),
|
||||
paddress (target_gdbarch (), new->lm_info->l_prev));
|
||||
do_cleanups (old_chain);
|
||||
- break;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* For SVR4 versions, the first entry in the link map is for the
|
||||
@@ -1295,20 +1424,61 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
@@ -1291,20 +1420,61 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
||||
**link_ptr_ptr = new;
|
||||
*link_ptr_ptr = &new->next;
|
||||
}
|
||||
@ -648,7 +648,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
|
||||
/* Fall back to manual examination of the target if the packet is not
|
||||
supported or gdbserver failed to find DT_DEBUG. gdb.server/solib-list.exp
|
||||
@@ -1331,6 +1501,10 @@ svr4_current_sos (void)
|
||||
@@ -1327,6 +1497,10 @@ svr4_current_sos (void)
|
||||
|
||||
info = get_svr4_info ();
|
||||
|
||||
@ -659,7 +659,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
/* Always locate the debug struct, in case it has moved. */
|
||||
info->debug_base = 0;
|
||||
locate_base (info);
|
||||
@@ -1340,35 +1514,12 @@ svr4_current_sos (void)
|
||||
@@ -1336,35 +1510,12 @@ svr4_current_sos (void)
|
||||
if (! info->debug_base)
|
||||
return svr4_default_sos ();
|
||||
|
||||
@ -698,8 +698,8 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
}
|
||||
|
||||
/* Get the address of the link_map for a given OBJFILE. */
|
||||
@@ -1450,6 +1601,498 @@ exec_entry_point (struct bfd *abfd, stru
|
||||
targ);
|
||||
@@ -1449,6 +1600,498 @@ exec_entry_point (struct bfd *abfd, stru
|
||||
return gdbarch_addr_bits_remove (target_gdbarch (), addr);
|
||||
}
|
||||
|
||||
+/* A probe and its associated information structure. */
|
||||
@ -1197,7 +1197,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
/* Helper function for gdb_bfd_lookup_symbol. */
|
||||
|
||||
static int
|
||||
@@ -1502,6 +2145,9 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1501,6 +2144,9 @@ enable_break (struct svr4_info *info, in
|
||||
info->interp_text_sect_low = info->interp_text_sect_high = 0;
|
||||
info->interp_plt_sect_low = info->interp_plt_sect_high = 0;
|
||||
|
||||
@ -1207,7 +1207,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
/* If we already have a shared library list in the target, and
|
||||
r_debug contains r_brk, set the breakpoint there - this should
|
||||
mean r_brk has already been relocated. Assume the dynamic linker
|
||||
@@ -1533,7 +2179,7 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1532,7 +2178,7 @@ enable_break (struct svr4_info *info, in
|
||||
That knowledge is encoded in the address, if it's Thumb the low bit
|
||||
is 1. However, we've stripped that info above and it's not clear
|
||||
what all the consequences are of passing a non-addr_bits_remove'd
|
||||
@ -1216,44 +1216,44 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
find_pc_section verifies we know about the address and have some
|
||||
hope of computing the right kind of breakpoint to use (via
|
||||
symbol info). It does mean that GDB needs to be pointed at a
|
||||
@@ -1571,7 +2217,7 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1570,7 +2216,7 @@ enable_break (struct svr4_info *info, in
|
||||
+ bfd_section_size (tmp_bfd, interp_sect);
|
||||
}
|
||||
|
||||
- create_solib_event_breakpoint (target_gdbarch, sym_addr);
|
||||
+ svr4_create_solib_event_breakpoints (target_gdbarch, sym_addr);
|
||||
- create_solib_event_breakpoint (target_gdbarch (), sym_addr);
|
||||
+ svr4_create_solib_event_breakpoints (target_gdbarch (), sym_addr);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1729,7 +2375,8 @@ enable_break (struct svr4_info *info, in
|
||||
@@ -1728,7 +2374,8 @@ enable_break (struct svr4_info *info, in
|
||||
|
||||
if (sym_addr != 0)
|
||||
{
|
||||
- create_solib_event_breakpoint (target_gdbarch, load_addr + sym_addr);
|
||||
+ svr4_create_solib_event_breakpoints (target_gdbarch,
|
||||
- create_solib_event_breakpoint (target_gdbarch (), load_addr + sym_addr);
|
||||
+ svr4_create_solib_event_breakpoints (target_gdbarch (),
|
||||
+ load_addr + sym_addr);
|
||||
xfree (interp_name);
|
||||
return 1;
|
||||
}
|
||||
@@ -1755,7 +2402,7 @@ enable_break (struct svr4_info *info, in
|
||||
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
|
||||
@@ -1754,7 +2401,7 @@ enable_break (struct svr4_info *info, in
|
||||
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (),
|
||||
sym_addr,
|
||||
¤t_target);
|
||||
- create_solib_event_breakpoint (target_gdbarch, sym_addr);
|
||||
+ svr4_create_solib_event_breakpoints (target_gdbarch, sym_addr);
|
||||
- create_solib_event_breakpoint (target_gdbarch (), sym_addr);
|
||||
+ svr4_create_solib_event_breakpoints (target_gdbarch (), sym_addr);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1771,7 +2418,7 @@ enable_break (struct svr4_info *info, in
|
||||
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
|
||||
@@ -1770,7 +2417,7 @@ enable_break (struct svr4_info *info, in
|
||||
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (),
|
||||
sym_addr,
|
||||
¤t_target);
|
||||
- create_solib_event_breakpoint (target_gdbarch, sym_addr);
|
||||
+ svr4_create_solib_event_breakpoints (target_gdbarch, sym_addr);
|
||||
- create_solib_event_breakpoint (target_gdbarch (), sym_addr);
|
||||
+ svr4_create_solib_event_breakpoints (target_gdbarch (), sym_addr);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -2281,6 +2928,9 @@ svr4_solib_create_inferior_hook (int fro
|
||||
@@ -2266,6 +2913,9 @@ svr4_solib_create_inferior_hook (int fro
|
||||
|
||||
info = get_svr4_info ();
|
||||
|
||||
@ -1263,17 +1263,17 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
/* Relocate the main executable if necessary. */
|
||||
svr4_relocate_main_executable ();
|
||||
|
||||
@@ -2547,4 +3197,6 @@ _initialize_svr4_solib (void)
|
||||
@@ -2507,4 +3157,6 @@ _initialize_svr4_solib (void)
|
||||
svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol;
|
||||
svr4_so_ops.same = svr4_same;
|
||||
svr4_so_ops.keep_data_in_core = svr4_keep_data_in_core;
|
||||
+ svr4_so_ops.handle_solib_event = svr4_handle_solib_event;
|
||||
+ svr4_so_ops.update_breakpoints = svr4_update_solib_event_breakpoints;
|
||||
}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen-solib.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen-solib.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen-solib.c 2012-08-14 17:34:44.330746591 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen-solib.c 2013-02-15 22:37:35.761417596 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1299,10 +1299,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen-solib.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen.c 2012-08-14 17:34:44.339746576 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.c 2013-02-15 22:37:35.762417598 +0100
|
||||
@@ -0,0 +1,58 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1362,10 +1362,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen.exp 2012-08-14 17:34:44.343746563 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-dlmopen.exp 2013-02-15 22:37:35.762417598 +0100
|
||||
@@ -0,0 +1,125 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1492,10 +1492,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-dlmopen.exp
|
||||
+ gdb_test "c" {Breakpoint [0-9]+, .* in stop \(\)}
|
||||
+ check_info_shared "info sharedlibrary #7" 0
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-interp.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-interp.exp
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/testsuite/gdb.base/break-interp.exp 2012-06-21 22:46:21.000000000 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-interp.exp 2012-08-14 17:34:44.344746565 +0200
|
||||
--- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.base/break-interp.exp 2013-01-01 07:33:25.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-interp.exp 2013-02-15 22:37:35.762417598 +0100
|
||||
@@ -109,12 +109,19 @@ proc strip_debug {dest} {
|
||||
}
|
||||
}
|
||||
@ -1591,10 +1591,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-interp.exp
|
||||
|
||||
# Use two separate gdb_test_multiple statements to avoid timeouts due
|
||||
# to slow processing of wildcard capturing long output
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes-solib.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes-solib.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes-solib.c 2012-08-14 17:34:44.355746561 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes-solib.c 2013-02-15 22:37:35.762417598 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1620,10 +1620,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes-solib.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes.c 2012-08-14 17:34:44.362746561 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.c 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1651,10 +1651,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes.exp 2012-08-14 17:34:44.363746561 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/break-probes.exp 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,76 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1732,10 +1732,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/break-probes.exp
|
||||
+ # Call something to ensure that relocation occurred
|
||||
+ gdb_test "call foo(23)" "foo 23.*\\\$.* = .*"
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared-solib1.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib1.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared-solib1.c 2012-08-14 17:34:44.365746561 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib1.c 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1761,10 +1761,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared-solib1.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared-solib2.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared-solib2.c 2012-08-14 17:34:44.365746561 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared-solib2.c 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1790,10 +1790,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared-solib2.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared.c
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared.c 2012-08-14 17:34:44.366746561 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.c 2013-02-15 22:37:35.763417600 +0100
|
||||
@@ -0,0 +1,48 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1843,10 +1843,10 @@ Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared.exp
|
||||
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120814/gdb/testsuite/gdb.base/info-shared.exp 2012-08-14 17:34:44.367746561 +0200
|
||||
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/info-shared.exp 2013-02-15 22:37:35.764417602 +0100
|
||||
@@ -0,0 +1,139 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -13,13 +13,13 @@
|
||||
* solib-svr4.c (svr4_handle_solib_event): Inhibit section map
|
||||
updates for calls to evaluate_probe_argument.
|
||||
|
||||
Index: gdb-7.4.91.20120814/gdb/objfiles.h
|
||||
Index: gdb-7.5.50.20130118/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/objfiles.h 2012-08-14 17:16:54.000000000 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/objfiles.h 2012-08-14 17:20:55.913174609 +0200
|
||||
@@ -526,6 +526,22 @@ extern void set_objfile_data (struct obj
|
||||
extern void *objfile_data (struct objfile *objfile,
|
||||
const struct objfile_data *data);
|
||||
--- gdb-7.5.50.20130118.orig/gdb/objfiles.h 2013-01-18 23:18:16.862315673 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/objfiles.h 2013-01-18 23:18:36.702343482 +0100
|
||||
@@ -508,6 +508,22 @@ extern int in_plt_section (CORE_ADDR, ch
|
||||
modules. */
|
||||
DECLARE_REGISTRY(objfile);
|
||||
|
||||
+/* In normal use, the section map will be rebuilt by FIND_PC_SECTION
|
||||
+ if objfiles have been added, removed or relocated since it was last
|
||||
@ -40,11 +40,11 @@ Index: gdb-7.4.91.20120814/gdb/objfiles.h
|
||||
extern void default_iterate_over_objfiles_in_search_order
|
||||
(struct gdbarch *gdbarch,
|
||||
iterate_over_objfiles_in_search_order_cb_ftype *cb,
|
||||
Index: gdb-7.4.91.20120814/gdb/objfiles.c
|
||||
Index: gdb-7.5.50.20130118/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/objfiles.c 2012-08-14 17:16:55.000000000 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/objfiles.c 2012-08-14 17:20:55.915174609 +0200
|
||||
@@ -70,6 +70,9 @@ struct objfile_pspace_info
|
||||
--- gdb-7.5.50.20130118.orig/gdb/objfiles.c 2013-01-18 23:18:13.647311006 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/objfiles.c 2013-01-18 23:18:16.862315673 +0100
|
||||
@@ -69,6 +69,9 @@ struct objfile_pspace_info
|
||||
int objfiles_changed_p;
|
||||
struct obj_section **sections;
|
||||
int num_sections;
|
||||
@ -54,7 +54,7 @@ Index: gdb-7.4.91.20120814/gdb/objfiles.c
|
||||
};
|
||||
|
||||
/* Per-program-space data key. */
|
||||
@@ -1295,7 +1298,7 @@ find_pc_section (CORE_ADDR pc)
|
||||
@@ -1356,7 +1359,7 @@ find_pc_section (CORE_ADDR pc)
|
||||
return s;
|
||||
|
||||
pspace_info = get_objfile_pspace_data (current_program_space);
|
||||
@ -63,7 +63,7 @@ Index: gdb-7.4.91.20120814/gdb/objfiles.c
|
||||
{
|
||||
update_section_map (current_program_space,
|
||||
&pspace_info->sections,
|
||||
@@ -1463,6 +1466,30 @@ objfiles_changed (void)
|
||||
@@ -1415,6 +1418,30 @@ objfiles_changed (void)
|
||||
get_objfile_pspace_data (current_program_space)->objfiles_changed_p = 1;
|
||||
}
|
||||
|
||||
@ -94,11 +94,11 @@ Index: gdb-7.4.91.20120814/gdb/objfiles.c
|
||||
/* The default implementation for the "iterate_over_objfiles_in_search_order"
|
||||
gdbarch method. It is equivalent to use the ALL_OBJFILES macro,
|
||||
searching the objfiles in the order they are stored internally,
|
||||
Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
Index: gdb-7.5.50.20130118/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120814.orig/gdb/solib-svr4.c 2012-08-14 17:20:42.000000000 +0200
|
||||
+++ gdb-7.4.91.20120814/gdb/solib-svr4.c 2012-08-14 17:21:14.090169216 +0200
|
||||
@@ -1847,6 +1847,7 @@ svr4_handle_solib_event (bpstat bs)
|
||||
--- gdb-7.5.50.20130118.orig/gdb/solib-svr4.c 2013-01-18 23:18:13.649311010 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/solib-svr4.c 2013-01-18 23:18:16.863315675 +0100
|
||||
@@ -1849,6 +1849,7 @@ svr4_handle_solib_event (bpstat bs)
|
||||
struct svr4_info *info = get_svr4_info ();
|
||||
struct probe_and_info buf, *pi = &buf;
|
||||
enum probe_action action;
|
||||
@ -106,7 +106,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
struct value *val;
|
||||
LONGEST lmid;
|
||||
CORE_ADDR debug_base, lm = 0;
|
||||
@@ -1870,6 +1871,19 @@ svr4_handle_solib_event (bpstat bs)
|
||||
@@ -1872,6 +1873,19 @@ svr4_handle_solib_event (bpstat bs)
|
||||
if (action == NAMESPACE_NO_ACTION)
|
||||
return;
|
||||
|
||||
@ -126,7 +126,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
val = evaluate_probe_argument (pi->probe, 0);
|
||||
if (val == NULL)
|
||||
goto error;
|
||||
@@ -1901,6 +1915,9 @@ svr4_handle_solib_event (bpstat bs)
|
||||
@@ -1903,6 +1917,9 @@ svr4_handle_solib_event (bpstat bs)
|
||||
action = NAMESPACE_RELOAD;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ Index: gdb-7.4.91.20120814/gdb/solib-svr4.c
|
||||
if (action == NAMESPACE_UPDATE_OR_RELOAD)
|
||||
{
|
||||
if (namespace_update_incremental (info, lmid, lm, is_initial_ns))
|
||||
@@ -1923,6 +1940,8 @@ svr4_handle_solib_event (bpstat bs)
|
||||
@@ -1925,6 +1942,8 @@ svr4_handle_solib_event (bpstat bs)
|
||||
warning (_("Probes-based dynamic linker interface failed.\n"
|
||||
"Reverting to original interface.\n"));
|
||||
|
||||
|
30
gdb-dlopen-stap-probe-mapfailed.patch
Normal file
30
gdb-dlopen-stap-probe-mapfailed.patch
Normal file
@ -0,0 +1,30 @@
|
||||
commit 21fd080d18f280c19fdc5489726dcd6c66eb5fbf
|
||||
Author: Gary Benson <gbenson@redhat.com>
|
||||
Date: Tue Jan 8 12:12:14 2013 +0000
|
||||
|
||||
Also stop on "map_failed" where appropriate
|
||||
|
||||
Removed a comment patch hunk.
|
||||
|
||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
index 5eb84ba..a46fd74 100644
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -160,6 +160,7 @@ static const struct probe_info probe_info[] =
|
||||
{ "init_start", NAMESPACE_NO_ACTION },
|
||||
{ "init_complete", NAMESPACE_RELOAD },
|
||||
{ "map_start", NAMESPACE_NO_ACTION },
|
||||
+ { "map_failed", NAMESPACE_NO_ACTION },
|
||||
{ "reloc_complete", NAMESPACE_UPDATE_OR_RELOAD },
|
||||
{ "unmap_start", NAMESPACE_NO_ACTION },
|
||||
{ "unmap_complete", NAMESPACE_RELOAD },
|
||||
@@ -2056,6 +2058,9 @@ svr4_create_solib_event_breakpoints (struct gdbarch *gdbarch,
|
||||
info->probes[i] = find_probes_in_objfile (os->objfile, "rtld",
|
||||
name);
|
||||
|
||||
+ if (!strcmp (name, "rtld_map_failed"))
|
||||
+ continue;
|
||||
+
|
||||
if (!VEC_length (probe_p, info->probes[i]))
|
||||
{
|
||||
free_probes (info);
|
@ -1,888 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2012-10/msg00095.html
|
||||
Subject: [patch] entry values: Fix resolving in inlined frames
|
||||
|
||||
Hi,
|
||||
|
||||
Breakpoint 1, fn2 (y=<optimized out>, x=6) at gdb.arch/amd64-entry-value-inline.c:32
|
||||
32 y = -2 + x; /* break-here */
|
||||
(gdb) info addr y
|
||||
(gdb) bt
|
||||
#0 fn2 (y=<optimized out>, x=6) at gdb.arch/amd64-entry-value-inline.c:32
|
||||
#1 fn3 (x=x@entry=6, y=y@entry=25) at gdb.arch/amd64-entry-value-inline.c:42
|
||||
#2 0x00000000004004af in main () at gdb.arch/amd64-entry-value-inline.c:48
|
||||
(gdb) info frame
|
||||
Stack level 0, frame at 0x7fffffffdb68:
|
||||
rip = 0x4005bc in fn2 (gdb.arch/amd64-entry-value-inline.c:32); saved rip 0x4004af
|
||||
inlined into frame 1
|
||||
[...]
|
||||
(gdb) set debug entry-values 1
|
||||
(gdb) p y
|
||||
DW_OP_GNU_entry_value resolving expects callee fn1 at 0x4005a0 but the called frame is for fn3 at 0x4005b0
|
||||
|
||||
FAIL:
|
||||
-----
|
||||
$1 = <optimized out>
|
||||
PASS:
|
||||
-----
|
||||
$1 = 25
|
||||
|
||||
(gdb) p/x $pc
|
||||
$2 = 0x4005bc
|
||||
(gdb) up
|
||||
#1 fn3 (x=x@entry=6, y=y@entry=25) at gdb.arch/amd64-entry-value-inline.c:42
|
||||
(gdb) p/x $pc
|
||||
$3 = 0x4005bc
|
||||
|
||||
The problem is that DW_TAG_GNU_call_site <-> DW_OP_GNU_entry_value binding
|
||||
exists between DW_TAG_subprogram, nor DW_TAG_inlined_subroutine as described
|
||||
by Jakub Jelinek. This makes sense, when we look at DW_TAG_GNU_call_site and
|
||||
we just unwind the current inlined frame we get the same PC - this is no new
|
||||
information.
|
||||
|
||||
TAILCALL_FRAME is a different case, while also an artificial frame the
|
||||
sequence cannot be determined at compile time and the binding
|
||||
DW_TAG_GNU_call_site <-> DW_OP_GNU_entry_value exists also for
|
||||
TAILCALL_FRAMEs.
|
||||
|
||||
I will check it in.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora18-linux-gnu.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2012-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix entry values resolving in inlined frames.
|
||||
* dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Move func_addr,
|
||||
gdbarch and caller_frame initialization later. Skip INLINE_FRAME
|
||||
entries of FRAME.
|
||||
|
||||
gdb/testsuite/
|
||||
2012-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix entry values resolving in inlined frames.
|
||||
* gdb.arch/amd64-entry-value-inline.S: New file.
|
||||
* gdb.arch/amd64-entry-value-inline.c: New file.
|
||||
* gdb.arch/amd64-entry-value-inline.exp: New file.
|
||||
|
||||
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
|
||||
index e8d39fe..0bdc042 100644
|
||||
--- a/gdb/dwarf2loc.c
|
||||
+++ b/gdb/dwarf2loc.c
|
||||
@@ -980,16 +980,27 @@ dwarf_expr_reg_to_entry_parameter (struct frame_info *frame,
|
||||
union call_site_parameter_u kind_u,
|
||||
struct dwarf2_per_cu_data **per_cu_return)
|
||||
{
|
||||
- CORE_ADDR func_addr = get_frame_func (frame);
|
||||
- CORE_ADDR caller_pc;
|
||||
- struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
- struct frame_info *caller_frame = get_prev_frame (frame);
|
||||
+ CORE_ADDR func_addr, caller_pc;
|
||||
+ struct gdbarch *gdbarch;
|
||||
+ struct frame_info *caller_frame;
|
||||
struct call_site *call_site;
|
||||
int iparams;
|
||||
/* Initialize it just to avoid a GCC false warning. */
|
||||
struct call_site_parameter *parameter = NULL;
|
||||
CORE_ADDR target_addr;
|
||||
|
||||
+ /* Skip any inlined frames, entry value call sites work between real
|
||||
+ functions. They do not make sense between inline functions as even PC
|
||||
+ does not change there. */
|
||||
+ while (get_frame_type (frame) == INLINE_FRAME)
|
||||
+ {
|
||||
+ frame = get_prev_frame (frame);
|
||||
+ gdb_assert (frame != NULL);
|
||||
+ }
|
||||
+
|
||||
+ func_addr = get_frame_func (frame);
|
||||
+ gdbarch = get_frame_arch (frame);
|
||||
+ caller_frame = get_prev_frame (frame);
|
||||
if (gdbarch != frame_unwind_arch (frame))
|
||||
{
|
||||
struct minimal_symbol *msym = lookup_minimal_symbol_by_pc (func_addr);
|
||||
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.S b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.S
|
||||
new file mode 100644
|
||||
index 0000000..5f353f5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.S
|
||||
@@ -0,0 +1,672 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2012 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-entry-value-inline.c
|
||||
+ using -g -dA -S -O2. */
|
||||
+
|
||||
+ .file "amd64-entry-value-inline.c"
|
||||
+ .text
|
||||
+.Ltext0:
|
||||
+ .p2align 4,,15
|
||||
+ .type fn1, @function
|
||||
+fn1:
|
||||
+.LFB0:
|
||||
+ .file 1 "gdb.arch/amd64-entry-value-inline.c"
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:22
|
||||
+ .loc 1 22 0
|
||||
+ .cfi_startproc
|
||||
+.LVL0:
|
||||
+# BLOCK 2 freq:10000 seq:0
|
||||
+# PRED: ENTRY [100.0%] (FALLTHRU)
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:23
|
||||
+ .loc 1 23 0
|
||||
+ movl v(%rip), %eax
|
||||
+ addl $1, %eax
|
||||
+ movl %eax, v(%rip)
|
||||
+# SUCC: EXIT [100.0%]
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE0:
|
||||
+ .size fn1, .-fn1
|
||||
+ .p2align 4,,15
|
||||
+ .globl fn3
|
||||
+ .type fn3, @function
|
||||
+fn3:
|
||||
+.LFB2:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:41
|
||||
+ .loc 1 41 0
|
||||
+ .cfi_startproc
|
||||
+.LVL1:
|
||||
+# BLOCK 2 freq:10000 seq:0
|
||||
+# PRED: ENTRY [100.0%] (FALLTHRU)
|
||||
+.LBB4:
|
||||
+.LBB5:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:29
|
||||
+ .loc 1 29 0
|
||||
+ testl %esi, %esi
|
||||
+.LBE5:
|
||||
+.LBE4:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:41
|
||||
+ .loc 1 41 0
|
||||
+ pushq %rbx
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 3, -16
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:41
|
||||
+ .loc 1 41 0
|
||||
+ movl %edi, %ebx
|
||||
+.LBB7:
|
||||
+.LBB6:
|
||||
+# SUCC: 3 [39.0%] (FALLTHRU,CAN_FALLTHRU) 4 [61.0%] (CAN_FALLTHRU)
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:29
|
||||
+ .loc 1 29 0
|
||||
+ je .L3
|
||||
+# BLOCK 3 freq:3898 seq:1
|
||||
+# PRED: 2 [39.0%] (FALLTHRU,CAN_FALLTHRU)
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:31
|
||||
+ .loc 1 31 0
|
||||
+ call fn1
|
||||
+.LVL2:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:32
|
||||
+ .loc 1 32 0
|
||||
+ leal -2(%rbx), %eax
|
||||
+.LVL3:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:33
|
||||
+ .loc 1 33 0
|
||||
+ movl %eax, %edi
|
||||
+ imull %eax, %edi
|
||||
+ addl $1, %edi
|
||||
+.LVL4:
|
||||
+ imull %edi, %eax
|
||||
+.LVL5:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:34
|
||||
+ .loc 1 34 0
|
||||
+ leal (%rbx,%rax), %edi
|
||||
+ call fn1
|
||||
+.LVL6:
|
||||
+# SUCC: 4 [100.0%] (FALLTHRU,CAN_FALLTHRU)
|
||||
+# BLOCK 4 freq:10000 seq:2
|
||||
+# PRED: 2 [61.0%] (CAN_FALLTHRU) 3 [100.0%] (FALLTHRU,CAN_FALLTHRU)
|
||||
+.L3:
|
||||
+.LBE6:
|
||||
+.LBE7:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:43
|
||||
+ .loc 1 43 0
|
||||
+ movl %ebx, %eax
|
||||
+ popq %rbx
|
||||
+ .cfi_def_cfa_offset 8
|
||||
+.LVL7:
|
||||
+# SUCC: EXIT [100.0%]
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE2:
|
||||
+ .size fn3, .-fn3
|
||||
+ .section .text.startup,"ax",@progbits
|
||||
+ .p2align 4,,15
|
||||
+ .globl main
|
||||
+ .type main, @function
|
||||
+main:
|
||||
+.LFB3:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:47
|
||||
+ .loc 1 47 0
|
||||
+ .cfi_startproc
|
||||
+# BLOCK 2 freq:10000 seq:0
|
||||
+# PRED: ENTRY [100.0%] (FALLTHRU)
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:48
|
||||
+ .loc 1 48 0
|
||||
+ movl $25, %esi
|
||||
+ movl $6, %edi
|
||||
+ call fn3
|
||||
+.LVL8:
|
||||
+ # gdb.arch/amd64-entry-value-inline.c:50
|
||||
+ .loc 1 50 0
|
||||
+ xorl %eax, %eax
|
||||
+# SUCC: EXIT [100.0%]
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE3:
|
||||
+ .size main, .-main
|
||||
+ .local v
|
||||
+ .comm v,4,4
|
||||
+ .text
|
||||
+.Letext0:
|
||||
+ .section .debug_info,"",@progbits
|
||||
+.Ldebug_info0:
|
||||
+ .long 0x164 # 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 .LASF0 # DW_AT_producer: "GNU C 4.8.0 20121005 (experimental) -mtune=generic -march=x86-64 -g -O2"
|
||||
+ .byte 0x1 # DW_AT_language
|
||||
+ .long .LASF1 # DW_AT_name: "gdb.arch/amd64-entry-value-inline.c"
|
||||
+ .long .LASF2 # DW_AT_comp_dir: ""
|
||||
+ .long .Ldebug_ranges0+0x30 # DW_AT_ranges
|
||||
+ .quad 0 # DW_AT_low_pc
|
||||
+ .long .Ldebug_line0 # DW_AT_stmt_list
|
||||
+ .uleb128 0x2 # (DIE (0x29) DW_TAG_subprogram)
|
||||
+ .ascii "fn1\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .quad .LFB0 # DW_AT_low_pc
|
||||
+ .quad .LFE0-.LFB0 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .long 0x52 # DW_AT_sibling
|
||||
+ .uleb128 0x3 # (DIE (0x46) DW_TAG_formal_parameter)
|
||||
+ .ascii "x\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .uleb128 0x1 # DW_AT_location
|
||||
+ .byte 0x55 # DW_OP_reg5
|
||||
+ .byte 0 # end of children of DIE 0x29
|
||||
+ .uleb128 0x4 # (DIE (0x52) DW_TAG_base_type)
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+ .byte 0x5 # DW_AT_encoding
|
||||
+ .ascii "int\0" # DW_AT_name
|
||||
+ .uleb128 0x5 # (DIE (0x59) DW_TAG_subprogram)
|
||||
+ .ascii "fn2\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x1b # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .byte 0x1 # DW_AT_inline
|
||||
+ .long 0x7c # DW_AT_sibling
|
||||
+ .uleb128 0x6 # (DIE (0x69) DW_TAG_formal_parameter)
|
||||
+ .ascii "x\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x1b # DW_AT_decl_line
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .uleb128 0x6 # (DIE (0x72) DW_TAG_formal_parameter)
|
||||
+ .ascii "y\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x1b # DW_AT_decl_line
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .byte 0 # end of children of DIE 0x59
|
||||
+ .uleb128 0x7 # (DIE (0x7c) DW_TAG_subprogram)
|
||||
+ # DW_AT_external
|
||||
+ .ascii "fn3\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x28 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .quad .LFB2 # DW_AT_low_pc
|
||||
+ .quad .LFE2-.LFB2 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .long 0x115 # DW_AT_sibling
|
||||
+ .uleb128 0x8 # (DIE (0x9d) DW_TAG_formal_parameter)
|
||||
+ .ascii "x\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x28 # DW_AT_decl_line
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .long .LLST0 # DW_AT_location
|
||||
+ .uleb128 0x8 # (DIE (0xaa) DW_TAG_formal_parameter)
|
||||
+ .ascii "y\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x28 # DW_AT_decl_line
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .long .LLST1 # DW_AT_location
|
||||
+ .uleb128 0x9 # (DIE (0xb7) DW_TAG_inlined_subroutine)
|
||||
+ .long 0x59 # DW_AT_abstract_origin
|
||||
+ .quad .LBB4 # DW_AT_entry_pc
|
||||
+ .long .Ldebug_ranges0+0 # DW_AT_ranges
|
||||
+ .byte 0x1 # DW_AT_call_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x2a # DW_AT_call_line
|
||||
+ .uleb128 0xa # (DIE (0xca) DW_TAG_formal_parameter)
|
||||
+ .long 0x72 # DW_AT_abstract_origin
|
||||
+ .long .LLST2 # DW_AT_location
|
||||
+ .uleb128 0xa # (DIE (0xd3) DW_TAG_formal_parameter)
|
||||
+ .long 0x69 # DW_AT_abstract_origin
|
||||
+ .long .LLST0 # DW_AT_location
|
||||
+ .uleb128 0xb # (DIE (0xdc) DW_TAG_GNU_call_site)
|
||||
+ .quad .LVL2 # DW_AT_low_pc
|
||||
+ .long 0x29 # DW_AT_abstract_origin
|
||||
+ .long 0xf4 # DW_AT_sibling
|
||||
+ .uleb128 0xc # (DIE (0xed) DW_TAG_GNU_call_site_parameter)
|
||||
+ .uleb128 0x1 # DW_AT_location
|
||||
+ .byte 0x55 # DW_OP_reg5
|
||||
+ .uleb128 0x2 # DW_AT_GNU_call_site_value
|
||||
+ .byte 0x73 # DW_OP_breg3
|
||||
+ .sleb128 0
|
||||
+ .byte 0 # end of children of DIE 0xdc
|
||||
+ .uleb128 0xd # (DIE (0xf4) DW_TAG_GNU_call_site)
|
||||
+ .quad .LVL6 # DW_AT_low_pc
|
||||
+ .long 0x29 # DW_AT_abstract_origin
|
||||
+ .uleb128 0xc # (DIE (0x101) DW_TAG_GNU_call_site_parameter)
|
||||
+ .uleb128 0x1 # DW_AT_location
|
||||
+ .byte 0x55 # DW_OP_reg5
|
||||
+ .uleb128 0xd # DW_AT_GNU_call_site_value
|
||||
+ .byte 0x73 # DW_OP_breg3
|
||||
+ .sleb128 -2
|
||||
+ .byte 0x73 # DW_OP_breg3
|
||||
+ .sleb128 -2
|
||||
+ .byte 0x73 # DW_OP_breg3
|
||||
+ .sleb128 -2
|
||||
+ .byte 0x1e # DW_OP_mul
|
||||
+ .byte 0x23 # DW_OP_plus_uconst
|
||||
+ .uleb128 0x1
|
||||
+ .byte 0x1e # DW_OP_mul
|
||||
+ .byte 0x73 # DW_OP_breg3
|
||||
+ .sleb128 0
|
||||
+ .byte 0x22 # DW_OP_plus
|
||||
+ .byte 0 # end of children of DIE 0xf4
|
||||
+ .byte 0 # end of children of DIE 0xb7
|
||||
+ .byte 0 # end of children of DIE 0x7c
|
||||
+ .uleb128 0xe # (DIE (0x115) DW_TAG_subprogram)
|
||||
+ # DW_AT_external
|
||||
+ .long .LASF3 # DW_AT_name: "main"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x2e # DW_AT_decl_line
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .quad .LFB3 # DW_AT_low_pc
|
||||
+ .quad .LFE3-.LFB3 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .long 0x14f # DW_AT_sibling
|
||||
+ .uleb128 0xd # (DIE (0x136) DW_TAG_GNU_call_site)
|
||||
+ .quad .LVL8 # DW_AT_low_pc
|
||||
+ .long 0x7c # DW_AT_abstract_origin
|
||||
+ .uleb128 0xc # (DIE (0x143) DW_TAG_GNU_call_site_parameter)
|
||||
+ .uleb128 0x1 # DW_AT_location
|
||||
+ .byte 0x55 # DW_OP_reg5
|
||||
+ .uleb128 0x1 # DW_AT_GNU_call_site_value
|
||||
+ .byte 0x36 # DW_OP_lit6
|
||||
+ .uleb128 0xc # (DIE (0x148) DW_TAG_GNU_call_site_parameter)
|
||||
+ .uleb128 0x1 # DW_AT_location
|
||||
+ .byte 0x54 # DW_OP_reg4
|
||||
+ .uleb128 0x1 # DW_AT_GNU_call_site_value
|
||||
+ .byte 0x49 # DW_OP_lit25
|
||||
+ .byte 0 # end of children of DIE 0x136
|
||||
+ .byte 0 # end of children of DIE 0x115
|
||||
+ .uleb128 0xf # (DIE (0x14f) DW_TAG_variable)
|
||||
+ .ascii "v\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-inline.c)
|
||||
+ .byte 0x12 # DW_AT_decl_line
|
||||
+ .long 0x162 # DW_AT_type
|
||||
+ .uleb128 0x9 # DW_AT_location
|
||||
+ .byte 0x3 # DW_OP_addr
|
||||
+ .quad v
|
||||
+ .uleb128 0x10 # (DIE (0x162) DW_TAG_volatile_type)
|
||||
+ .long 0x52 # DW_AT_type
|
||||
+ .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 0x55 # (DW_AT_ranges)
|
||||
+ .uleb128 0x17 # (DW_FORM_sec_offset)
|
||||
+ .uleb128 0x11 # (DW_AT_low_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 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 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 0x7 # (DW_FORM_data8)
|
||||
+ .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 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 0x5 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .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 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x20 # (DW_AT_inline)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x1 # (DW_AT_sibling)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x6 # (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)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x7 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x3f # (DW_AT_external)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .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 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 0x7 # (DW_FORM_data8)
|
||||
+ .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 0x8 # (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 0x17 # (DW_FORM_sec_offset)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x9 # (abbrev code)
|
||||
+ .uleb128 0x1d # (TAG: DW_TAG_inlined_subroutine)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x31 # (DW_AT_abstract_origin)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x52 # (DW_AT_entry_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x55 # (DW_AT_ranges)
|
||||
+ .uleb128 0x17 # (DW_FORM_sec_offset)
|
||||
+ .uleb128 0x58 # (DW_AT_call_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x59 # (DW_AT_call_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xa # (abbrev code)
|
||||
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x31 # (DW_AT_abstract_origin)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x17 # (DW_FORM_sec_offset)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xb # (abbrev code)
|
||||
+ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x31 # (DW_AT_abstract_origin)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x1 # (DW_AT_sibling)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xc # (abbrev code)
|
||||
+ .uleb128 0x410a # (TAG: DW_TAG_GNU_call_site_parameter)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2111 # (DW_AT_GNU_call_site_value)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xd # (abbrev code)
|
||||
+ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x31 # (DW_AT_abstract_origin)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xe # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .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 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 0x7 # (DW_FORM_data8)
|
||||
+ .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 0xf # (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 0x10 # (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
|
||||
+ .byte 0
|
||||
+ .section .debug_loc,"",@progbits
|
||||
+.Ldebug_loc0:
|
||||
+.LLST0:
|
||||
+ .quad .LVL1 # Location list begin address (*.LLST0)
|
||||
+ .quad .LVL2-1 # Location list end address (*.LLST0)
|
||||
+ .value 0x1 # Location expression size
|
||||
+ .byte 0x55 # DW_OP_reg5
|
||||
+ .quad .LVL2-1 # Location list begin address (*.LLST0)
|
||||
+ .quad .LVL7 # Location list end address (*.LLST0)
|
||||
+ .value 0x1 # Location expression size
|
||||
+ .byte 0x53 # DW_OP_reg3
|
||||
+ .quad .LVL7 # Location list begin address (*.LLST0)
|
||||
+ .quad .LFE2 # Location list end address (*.LLST0)
|
||||
+ .value 0x1 # Location expression size
|
||||
+ .byte 0x50 # DW_OP_reg0
|
||||
+ .quad 0 # Location list terminator begin (*.LLST0)
|
||||
+ .quad 0 # Location list terminator end (*.LLST0)
|
||||
+.LLST1:
|
||||
+ .quad .LVL1 # Location list begin address (*.LLST1)
|
||||
+ .quad .LVL2-1 # Location list end address (*.LLST1)
|
||||
+ .value 0x1 # Location expression size
|
||||
+ .byte 0x54 # DW_OP_reg4
|
||||
+ .quad .LVL2-1 # Location list begin address (*.LLST1)
|
||||
+ .quad .LFE2 # Location list end address (*.LLST1)
|
||||
+ .value 0x4 # Location expression size
|
||||
+ .byte 0xf3 # DW_OP_GNU_entry_value
|
||||
+ .uleb128 0x1
|
||||
+ .byte 0x54 # DW_OP_reg4
|
||||
+ .byte 0x9f # DW_OP_stack_value
|
||||
+ .quad 0 # Location list terminator begin (*.LLST1)
|
||||
+ .quad 0 # Location list terminator end (*.LLST1)
|
||||
+.LLST2:
|
||||
+ .quad .LVL1 # Location list begin address (*.LLST2)
|
||||
+ .quad .LVL2-1 # Location list end address (*.LLST2)
|
||||
+ .value 0x1 # Location expression size
|
||||
+ .byte 0x54 # DW_OP_reg4
|
||||
+ .quad .LVL2-1 # Location list begin address (*.LLST2)
|
||||
+ .quad .LVL3 # Location list end address (*.LLST2)
|
||||
+ .value 0x4 # Location expression size
|
||||
+ .byte 0xf3 # DW_OP_GNU_entry_value
|
||||
+ .uleb128 0x1
|
||||
+ .byte 0x54 # DW_OP_reg4
|
||||
+ .byte 0x9f # DW_OP_stack_value
|
||||
+ .quad .LVL3 # Location list begin address (*.LLST2)
|
||||
+ .quad .LVL4 # Location list end address (*.LLST2)
|
||||
+ .value 0x1 # Location expression size
|
||||
+ .byte 0x50 # DW_OP_reg0
|
||||
+ .quad .LVL4 # Location list begin address (*.LLST2)
|
||||
+ .quad .LVL5 # Location list end address (*.LLST2)
|
||||
+ .value 0x6 # Location expression size
|
||||
+ .byte 0x70 # DW_OP_breg0
|
||||
+ .sleb128 0
|
||||
+ .byte 0x75 # DW_OP_breg5
|
||||
+ .sleb128 0
|
||||
+ .byte 0x1e # DW_OP_mul
|
||||
+ .byte 0x9f # DW_OP_stack_value
|
||||
+ .quad .LVL5 # Location list begin address (*.LLST2)
|
||||
+ .quad .LVL6-1 # Location list end address (*.LLST2)
|
||||
+ .value 0x1 # Location expression size
|
||||
+ .byte 0x50 # DW_OP_reg0
|
||||
+ .quad .LVL6-1 # Location list begin address (*.LLST2)
|
||||
+ .quad .LVL6 # Location list end address (*.LLST2)
|
||||
+ .value 0xb # Location expression size
|
||||
+ .byte 0x73 # DW_OP_breg3
|
||||
+ .sleb128 -2
|
||||
+ .byte 0x73 # DW_OP_breg3
|
||||
+ .sleb128 -2
|
||||
+ .byte 0x73 # DW_OP_breg3
|
||||
+ .sleb128 -2
|
||||
+ .byte 0x1e # DW_OP_mul
|
||||
+ .byte 0x23 # DW_OP_plus_uconst
|
||||
+ .uleb128 0x1
|
||||
+ .byte 0x1e # DW_OP_mul
|
||||
+ .byte 0x9f # DW_OP_stack_value
|
||||
+ .quad 0 # Location list terminator begin (*.LLST2)
|
||||
+ .quad 0 # Location list terminator end (*.LLST2)
|
||||
+ .section .debug_aranges,"",@progbits
|
||||
+ .long 0x3c # 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 .LFB3 # Address
|
||||
+ .quad .LFE3-.LFB3 # Length
|
||||
+ .quad 0
|
||||
+ .quad 0
|
||||
+ .section .debug_ranges,"",@progbits
|
||||
+.Ldebug_ranges0:
|
||||
+ .quad .LBB4 # Offset 0
|
||||
+ .quad .LBE4
|
||||
+ .quad .LBB7
|
||||
+ .quad .LBE7
|
||||
+ .quad 0
|
||||
+ .quad 0
|
||||
+ .quad .Ltext0 # Offset 0x30
|
||||
+ .quad .Letext0
|
||||
+ .quad .LFB3 # Offset 0x40
|
||||
+ .quad .LFE3
|
||||
+ .quad 0
|
||||
+ .quad 0
|
||||
+ .section .debug_line,"",@progbits
|
||||
+.Ldebug_line0:
|
||||
+ .section .debug_str,"MS",@progbits,1
|
||||
+.LASF0:
|
||||
+ .string "GNU C 4.8.0 20121005+patches (experimental) -mtune=generic -march=x86-64 -g -O2"
|
||||
+.LASF1:
|
||||
+ .string "gdb.arch/amd64-entry-value-inline.c"
|
||||
+.LASF2:
|
||||
+ .string ""
|
||||
+.LASF3:
|
||||
+ .string "main"
|
||||
+ .ident "GCC: (GNU) 4.8.0 20121005 (experimental)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.c b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.c
|
||||
new file mode 100644
|
||||
index 0000000..f7fefb8
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.c
|
||||
@@ -0,0 +1,50 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2012 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;
|
||||
+
|
||||
+static __attribute__((noinline, noclone)) void
|
||||
+fn1 (int x)
|
||||
+{
|
||||
+ v++;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+fn2 (int x, int y)
|
||||
+{
|
||||
+ if (y)
|
||||
+ {
|
||||
+ fn1 (x);
|
||||
+ y = -2 + x; /* break-here */
|
||||
+ y = y * y * y + y;
|
||||
+ fn1 (x + y);
|
||||
+ }
|
||||
+ return x;
|
||||
+}
|
||||
+
|
||||
+__attribute__((noinline, noclone)) int
|
||||
+fn3 (int x, int y)
|
||||
+{
|
||||
+ return fn2 (x, y);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ fn3 (6, 25);
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
|
||||
new file mode 100644
|
||||
index 0000000..6aa92c1
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright (C) 2012 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 opts {}
|
||||
+standard_testfile .S
|
||||
+
|
||||
+if [info exists COMPILE] {
|
||||
+ # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-inline.exp COMPILE=1"
|
||||
+ standard_testfile
|
||||
+ lappend opts debug optimize=-O2
|
||||
+} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
||||
+ verbose "Skipping ${testfile}."
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+set srcfile $testfile.c
|
||||
+gdb_breakpoint [gdb_get_line_number "break-here"]
|
||||
+
|
||||
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
|
||||
+gdb_test "p y" " = 25"
|
||||
|
@ -1,508 +0,0 @@
|
||||
Index: gdb-7.4.50.20120602/gdb/f-lang.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/f-lang.c 2012-03-02 20:29:00.000000000 +0100
|
||||
+++ gdb-7.4.50.20120602/gdb/f-lang.c 2012-06-02 19:13:31.520050654 +0200
|
||||
@@ -59,20 +59,6 @@ typedef struct saved_bf_symnum SAVED_BF,
|
||||
/* Local functions */
|
||||
|
||||
extern void _initialize_f_language (void);
|
||||
-#if 0
|
||||
-static void clear_function_list (void);
|
||||
-static long get_bf_for_fcn (long);
|
||||
-static void clear_bf_list (void);
|
||||
-static void patch_all_commons_by_name (char *, CORE_ADDR, int);
|
||||
-static SAVED_F77_COMMON_PTR find_first_common_named (char *);
|
||||
-static void add_common_entry (struct symbol *);
|
||||
-static void add_common_block (char *, CORE_ADDR, int, char *);
|
||||
-static SAVED_FUNCTION *allocate_saved_function_node (void);
|
||||
-static SAVED_BF_PTR allocate_saved_bf_node (void);
|
||||
-static COMMON_ENTRY_PTR allocate_common_entry_node (void);
|
||||
-static SAVED_F77_COMMON_PTR allocate_saved_f77_common_node (void);
|
||||
-static void patch_common_entries (SAVED_F77_COMMON_PTR, CORE_ADDR, int);
|
||||
-#endif
|
||||
|
||||
static void f_printchar (int c, struct type *type, struct ui_file * stream);
|
||||
static void f_emit_char (int c, struct type *type,
|
||||
@@ -385,185 +371,7 @@ _initialize_f_language (void)
|
||||
add_language (&f_language_defn);
|
||||
}
|
||||
|
||||
-#if 0
|
||||
-static SAVED_BF_PTR
|
||||
-allocate_saved_bf_node (void)
|
||||
-{
|
||||
- SAVED_BF_PTR new;
|
||||
-
|
||||
- new = (SAVED_BF_PTR) xmalloc (sizeof (SAVED_BF));
|
||||
- return (new);
|
||||
-}
|
||||
-
|
||||
-static SAVED_FUNCTION *
|
||||
-allocate_saved_function_node (void)
|
||||
-{
|
||||
- SAVED_FUNCTION *new;
|
||||
-
|
||||
- new = (SAVED_FUNCTION *) xmalloc (sizeof (SAVED_FUNCTION));
|
||||
- return (new);
|
||||
-}
|
||||
-
|
||||
-static SAVED_F77_COMMON_PTR
|
||||
-allocate_saved_f77_common_node (void)
|
||||
-{
|
||||
- SAVED_F77_COMMON_PTR new;
|
||||
-
|
||||
- new = (SAVED_F77_COMMON_PTR) xmalloc (sizeof (SAVED_F77_COMMON));
|
||||
- return (new);
|
||||
-}
|
||||
-
|
||||
-static COMMON_ENTRY_PTR
|
||||
-allocate_common_entry_node (void)
|
||||
-{
|
||||
- COMMON_ENTRY_PTR new;
|
||||
-
|
||||
- new = (COMMON_ENTRY_PTR) xmalloc (sizeof (COMMON_ENTRY));
|
||||
- return (new);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
SAVED_F77_COMMON_PTR head_common_list = NULL; /* Ptr to 1st saved COMMON */
|
||||
-SAVED_F77_COMMON_PTR tail_common_list = NULL; /* Ptr to last saved COMMON */
|
||||
-SAVED_F77_COMMON_PTR current_common = NULL; /* Ptr to current COMMON */
|
||||
-
|
||||
-#if 0
|
||||
-static SAVED_BF_PTR saved_bf_list = NULL; /* Ptr to (.bf,function)
|
||||
- list */
|
||||
-static SAVED_BF_PTR saved_bf_list_end = NULL; /* Ptr to above list's end */
|
||||
-static SAVED_BF_PTR current_head_bf_list = NULL; /* Current head of
|
||||
- above list. */
|
||||
-
|
||||
-static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
|
||||
- in macros. */
|
||||
-
|
||||
-/* The following function simply enters a given common block onto
|
||||
- the global common block chain. */
|
||||
-
|
||||
-static void
|
||||
-add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
|
||||
-{
|
||||
- SAVED_F77_COMMON_PTR tmp;
|
||||
- char *c, *local_copy_func_stab;
|
||||
-
|
||||
- /* If the COMMON block we are trying to add has a blank
|
||||
- name (i.e. "#BLNK_COM") then we set it to __BLANK
|
||||
- because the darn "#" character makes GDB's input
|
||||
- parser have fits. */
|
||||
-
|
||||
-
|
||||
- if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
|
||||
- || strcmp (name, BLANK_COMMON_NAME_MF77) == 0)
|
||||
- {
|
||||
-
|
||||
- xfree (name);
|
||||
- name = alloca (strlen (BLANK_COMMON_NAME_LOCAL) + 1);
|
||||
- strcpy (name, BLANK_COMMON_NAME_LOCAL);
|
||||
- }
|
||||
-
|
||||
- tmp = allocate_saved_f77_common_node ();
|
||||
-
|
||||
- local_copy_func_stab = xmalloc (strlen (func_stab) + 1);
|
||||
- strcpy (local_copy_func_stab, func_stab);
|
||||
-
|
||||
- tmp->name = xmalloc (strlen (name) + 1);
|
||||
-
|
||||
- /* local_copy_func_stab is a stabstring, let us first extract the
|
||||
- function name from the stab by NULLing out the ':' character. */
|
||||
-
|
||||
-
|
||||
- c = NULL;
|
||||
- c = strchr (local_copy_func_stab, ':');
|
||||
-
|
||||
- if (c)
|
||||
- *c = '\0';
|
||||
- else
|
||||
- error (_("Malformed function STAB found in add_common_block()"));
|
||||
-
|
||||
-
|
||||
- tmp->owning_function = xmalloc (strlen (local_copy_func_stab) + 1);
|
||||
-
|
||||
- strcpy (tmp->owning_function, local_copy_func_stab);
|
||||
-
|
||||
- strcpy (tmp->name, name);
|
||||
- tmp->offset = offset;
|
||||
- tmp->next = NULL;
|
||||
- tmp->entries = NULL;
|
||||
- tmp->secnum = secnum;
|
||||
-
|
||||
- current_common = tmp;
|
||||
-
|
||||
- if (head_common_list == NULL)
|
||||
- {
|
||||
- head_common_list = tail_common_list = tmp;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- tail_common_list->next = tmp;
|
||||
- tail_common_list = tmp;
|
||||
- }
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-/* The following function simply enters a given common entry onto
|
||||
- the "current_common" block that has been saved away. */
|
||||
-
|
||||
-#if 0
|
||||
-static void
|
||||
-add_common_entry (struct symbol *entry_sym_ptr)
|
||||
-{
|
||||
- COMMON_ENTRY_PTR tmp;
|
||||
-
|
||||
-
|
||||
-
|
||||
- /* The order of this list is important, since
|
||||
- we expect the entries to appear in decl.
|
||||
- order when we later issue "info common" calls. */
|
||||
-
|
||||
- tmp = allocate_common_entry_node ();
|
||||
-
|
||||
- tmp->next = NULL;
|
||||
- tmp->symbol = entry_sym_ptr;
|
||||
-
|
||||
- if (current_common == NULL)
|
||||
- error (_("Attempt to add COMMON entry with no block open!"));
|
||||
- else
|
||||
- {
|
||||
- if (current_common->entries == NULL)
|
||||
- {
|
||||
- current_common->entries = tmp;
|
||||
- current_common->end_of_entries = tmp;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- current_common->end_of_entries->next = tmp;
|
||||
- current_common->end_of_entries = tmp;
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-/* This routine finds the first encountred COMMON block named "name". */
|
||||
-
|
||||
-#if 0
|
||||
-static SAVED_F77_COMMON_PTR
|
||||
-find_first_common_named (char *name)
|
||||
-{
|
||||
-
|
||||
- SAVED_F77_COMMON_PTR tmp;
|
||||
-
|
||||
- tmp = head_common_list;
|
||||
-
|
||||
- while (tmp != NULL)
|
||||
- {
|
||||
- if (strcmp (tmp->name, name) == 0)
|
||||
- return (tmp);
|
||||
- else
|
||||
- tmp = tmp->next;
|
||||
- }
|
||||
- return (NULL);
|
||||
-}
|
||||
-#endif
|
||||
|
||||
/* This routine finds the first encountred COMMON block named "name"
|
||||
that belongs to function funcname. */
|
||||
@@ -586,193 +394,3 @@ find_common_for_function (const char *na
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
-
|
||||
-
|
||||
-#if 0
|
||||
-
|
||||
-/* The following function is called to patch up the offsets
|
||||
- for the statics contained in the COMMON block named
|
||||
- "name." */
|
||||
-
|
||||
-static void
|
||||
-patch_common_entries (SAVED_F77_COMMON_PTR blk, CORE_ADDR offset, int secnum)
|
||||
-{
|
||||
- COMMON_ENTRY_PTR entry;
|
||||
-
|
||||
- blk->offset = offset; /* Keep this around for future use. */
|
||||
-
|
||||
- entry = blk->entries;
|
||||
-
|
||||
- while (entry != NULL)
|
||||
- {
|
||||
- SYMBOL_VALUE (entry->symbol) += offset;
|
||||
- SYMBOL_SECTION (entry->symbol) = secnum;
|
||||
-
|
||||
- entry = entry->next;
|
||||
- }
|
||||
- blk->secnum = secnum;
|
||||
-}
|
||||
-
|
||||
-/* Patch all commons named "name" that need patching.Since COMMON
|
||||
- blocks occur with relative infrequency, we simply do a linear scan on
|
||||
- the name. Eventually, the best way to do this will be a
|
||||
- hashed-lookup. Secnum is the section number for the .bss section
|
||||
- (which is where common data lives). */
|
||||
-
|
||||
-static void
|
||||
-patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
|
||||
-{
|
||||
-
|
||||
- SAVED_F77_COMMON_PTR tmp;
|
||||
-
|
||||
- /* For blank common blocks, change the canonical reprsentation
|
||||
- of a blank name */
|
||||
-
|
||||
- if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
|
||||
- || strcmp (name, BLANK_COMMON_NAME_MF77) == 0)
|
||||
- {
|
||||
- xfree (name);
|
||||
- name = alloca (strlen (BLANK_COMMON_NAME_LOCAL) + 1);
|
||||
- strcpy (name, BLANK_COMMON_NAME_LOCAL);
|
||||
- }
|
||||
-
|
||||
- tmp = head_common_list;
|
||||
-
|
||||
- while (tmp != NULL)
|
||||
- {
|
||||
- if (COMMON_NEEDS_PATCHING (tmp))
|
||||
- if (strcmp (tmp->name, name) == 0)
|
||||
- patch_common_entries (tmp, offset, secnum);
|
||||
-
|
||||
- tmp = tmp->next;
|
||||
- }
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-/* This macro adds the symbol-number for the start of the function
|
||||
- (the symbol number of the .bf) referenced by symnum_fcn to a
|
||||
- list. This list, in reality should be a FIFO queue but since
|
||||
- #line pragmas sometimes cause line ranges to get messed up
|
||||
- we simply create a linear list. This list can then be searched
|
||||
- first by a queueing algorithm and upon failure fall back to
|
||||
- a linear scan. */
|
||||
-
|
||||
-#if 0
|
||||
-#define ADD_BF_SYMNUM(bf_sym,fcn_sym) \
|
||||
- \
|
||||
- if (saved_bf_list == NULL) \
|
||||
-{ \
|
||||
- tmp_bf_ptr = allocate_saved_bf_node(); \
|
||||
- \
|
||||
- tmp_bf_ptr->symnum_bf = (bf_sym); \
|
||||
- tmp_bf_ptr->symnum_fcn = (fcn_sym); \
|
||||
- tmp_bf_ptr->next = NULL; \
|
||||
- \
|
||||
- current_head_bf_list = saved_bf_list = tmp_bf_ptr; \
|
||||
- saved_bf_list_end = tmp_bf_ptr; \
|
||||
- } \
|
||||
-else \
|
||||
-{ \
|
||||
- tmp_bf_ptr = allocate_saved_bf_node(); \
|
||||
- \
|
||||
- tmp_bf_ptr->symnum_bf = (bf_sym); \
|
||||
- tmp_bf_ptr->symnum_fcn = (fcn_sym); \
|
||||
- tmp_bf_ptr->next = NULL; \
|
||||
- \
|
||||
- saved_bf_list_end->next = tmp_bf_ptr; \
|
||||
- saved_bf_list_end = tmp_bf_ptr; \
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
-/* This function frees the entire (.bf,function) list. */
|
||||
-
|
||||
-#if 0
|
||||
-static void
|
||||
-clear_bf_list (void)
|
||||
-{
|
||||
-
|
||||
- SAVED_BF_PTR tmp = saved_bf_list;
|
||||
- SAVED_BF_PTR next = NULL;
|
||||
-
|
||||
- while (tmp != NULL)
|
||||
- {
|
||||
- next = tmp->next;
|
||||
- xfree (tmp);
|
||||
- tmp = next;
|
||||
- }
|
||||
- saved_bf_list = NULL;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-int global_remote_debug;
|
||||
-
|
||||
-#if 0
|
||||
-
|
||||
-static long
|
||||
-get_bf_for_fcn (long the_function)
|
||||
-{
|
||||
- SAVED_BF_PTR tmp;
|
||||
- int nprobes = 0;
|
||||
-
|
||||
- /* First use a simple queuing algorithm (i.e. look and see if the
|
||||
- item at the head of the queue is the one you want). */
|
||||
-
|
||||
- if (saved_bf_list == NULL)
|
||||
- internal_error (__FILE__, __LINE__,
|
||||
- _("cannot get .bf node off empty list"));
|
||||
-
|
||||
- if (current_head_bf_list != NULL)
|
||||
- if (current_head_bf_list->symnum_fcn == the_function)
|
||||
- {
|
||||
- if (global_remote_debug)
|
||||
- fprintf_unfiltered (gdb_stderr, "*");
|
||||
-
|
||||
- tmp = current_head_bf_list;
|
||||
- current_head_bf_list = current_head_bf_list->next;
|
||||
- return (tmp->symnum_bf);
|
||||
- }
|
||||
-
|
||||
- /* If the above did not work (probably because #line directives were
|
||||
- used in the sourcefile and they messed up our internal tables) we now do
|
||||
- the ugly linear scan. */
|
||||
-
|
||||
- if (global_remote_debug)
|
||||
- fprintf_unfiltered (gdb_stderr, "\ndefaulting to linear scan\n");
|
||||
-
|
||||
- nprobes = 0;
|
||||
- tmp = saved_bf_list;
|
||||
- while (tmp != NULL)
|
||||
- {
|
||||
- nprobes++;
|
||||
- if (tmp->symnum_fcn == the_function)
|
||||
- {
|
||||
- if (global_remote_debug)
|
||||
- fprintf_unfiltered (gdb_stderr, "Found in %d probes\n", nprobes);
|
||||
- current_head_bf_list = tmp->next;
|
||||
- return (tmp->symnum_bf);
|
||||
- }
|
||||
- tmp = tmp->next;
|
||||
- }
|
||||
-
|
||||
- return (-1);
|
||||
-}
|
||||
-
|
||||
-static SAVED_FUNCTION_PTR saved_function_list = NULL;
|
||||
-static SAVED_FUNCTION_PTR saved_function_list_end = NULL;
|
||||
-
|
||||
-static void
|
||||
-clear_function_list (void)
|
||||
-{
|
||||
- SAVED_FUNCTION_PTR tmp = saved_function_list;
|
||||
- SAVED_FUNCTION_PTR next = NULL;
|
||||
-
|
||||
- while (tmp != NULL)
|
||||
- {
|
||||
- next = tmp->next;
|
||||
- xfree (tmp);
|
||||
- tmp = next;
|
||||
- }
|
||||
-
|
||||
- saved_function_list = NULL;
|
||||
-}
|
||||
-#endif
|
||||
Index: gdb-7.4.50.20120602/gdb/f-lang.h
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/f-lang.h 2012-06-02 19:11:54.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/f-lang.h 2012-06-02 19:13:55.345317970 +0200
|
||||
@@ -76,15 +76,10 @@ typedef struct saved_f77_common SAVED_F7
|
||||
typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
|
||||
|
||||
extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
|
||||
-extern SAVED_F77_COMMON_PTR tail_common_list; /* Ptr to last saved COMMON */
|
||||
-extern SAVED_F77_COMMON_PTR current_common; /* Ptr to current COMMON */
|
||||
|
||||
extern SAVED_F77_COMMON_PTR find_common_for_function (const char *,
|
||||
const char *);
|
||||
|
||||
-#define UNINITIALIZED_SECNUM -1
|
||||
-#define COMMON_NEEDS_PATCHING(blk) ((blk)->secnum == UNINITIALIZED_SECNUM)
|
||||
-
|
||||
#define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */
|
||||
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
|
||||
#define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
|
||||
Index: gdb-7.4.50.20120602/gdb/f-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/f-valprint.c 2012-06-02 19:11:54.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/f-valprint.c 2012-06-02 19:14:11.625313432 +0200
|
||||
@@ -35,10 +35,6 @@
|
||||
#include "command.h"
|
||||
#include "block.h"
|
||||
|
||||
-#if 0
|
||||
-static int there_is_a_visible_common_named (char *);
|
||||
-#endif
|
||||
-
|
||||
extern void _initialize_f_valprint (void);
|
||||
static void info_common_command (char *, int);
|
||||
static void list_all_visible_commons (const char *);
|
||||
@@ -535,67 +531,6 @@ info_common_command (char *comname, int
|
||||
comname, funname);
|
||||
}
|
||||
|
||||
-/* This function is used to determine whether there is a
|
||||
- F77 common block visible at the current scope called 'comname'. */
|
||||
-
|
||||
-#if 0
|
||||
-static int
|
||||
-there_is_a_visible_common_named (char *comname)
|
||||
-{
|
||||
- SAVED_F77_COMMON_PTR the_common;
|
||||
- struct frame_info *fi;
|
||||
- char *funname = 0;
|
||||
- struct symbol *func;
|
||||
-
|
||||
- if (comname == NULL)
|
||||
- error (_("Cannot deal with NULL common name!"));
|
||||
-
|
||||
- fi = get_selected_frame (_("No frame selected"));
|
||||
-
|
||||
- /* The following is generally ripped off from stack.c's routine
|
||||
- print_frame_info(). */
|
||||
-
|
||||
- func = find_pc_function (fi->pc);
|
||||
- if (func)
|
||||
- {
|
||||
- /* In certain pathological cases, the symtabs give the wrong
|
||||
- function (when we are in the first function in a file which
|
||||
- is compiled without debugging symbols, the previous function
|
||||
- is compiled with debugging symbols, and the "foo.o" symbol
|
||||
- that is supposed to tell us where the file with debugging symbols
|
||||
- ends has been truncated by ar because it is longer than 15
|
||||
- characters).
|
||||
-
|
||||
- So look in the minimal symbol tables as well, and if it comes
|
||||
- up with a larger address for the function use that instead.
|
||||
- I don't think this can ever cause any problems; there shouldn't
|
||||
- be any minimal symbols in the middle of a function.
|
||||
- FIXME: (Not necessarily true. What about text labels?) */
|
||||
-
|
||||
- struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (fi->pc);
|
||||
-
|
||||
- if (msymbol != NULL
|
||||
- && (SYMBOL_VALUE_ADDRESS (msymbol)
|
||||
- > BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
|
||||
- funname = SYMBOL_LINKAGE_NAME (msymbol);
|
||||
- else
|
||||
- funname = SYMBOL_LINKAGE_NAME (func);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- struct minimal_symbol *msymbol =
|
||||
- lookup_minimal_symbol_by_pc (fi->pc);
|
||||
-
|
||||
- if (msymbol != NULL)
|
||||
- funname = SYMBOL_LINKAGE_NAME (msymbol);
|
||||
- }
|
||||
-
|
||||
- the_common = find_common_for_function (comname, funname);
|
||||
-
|
||||
- return (the_common ? 1 : 0);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
void
|
||||
_initialize_f_valprint (void)
|
||||
{
|
@ -1,598 +0,0 @@
|
||||
Index: gdb-7.4.91.20120801/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/dwarf2read.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/dwarf2read.c 2012-08-01 18:38:54.201540500 +0200
|
||||
@@ -11073,12 +11073,14 @@ read_set_type (struct die_info *die, str
|
||||
return set_die_type (die, set_type, cu);
|
||||
}
|
||||
|
||||
-/* First cut: install each common block member as a global variable. */
|
||||
+/* Create appropriate locally-scoped variables for all the DW_TAG_common_block
|
||||
+ entries. Create also TYPE_CODE_STRUCT listing all such variables to be
|
||||
+ available for `info common'. COMMON_BLOCK_DOMAIN is used to sepate the
|
||||
+ common blocks name namespace from regular variable names. */
|
||||
|
||||
static void
|
||||
read_common_block (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
- struct die_info *child_die;
|
||||
struct attribute *attr;
|
||||
struct symbol *sym;
|
||||
CORE_ADDR base = (CORE_ADDR) 0;
|
||||
@@ -11103,20 +11105,67 @@ read_common_block (struct die_info *die,
|
||||
}
|
||||
if (die->child != NULL)
|
||||
{
|
||||
+ struct objfile *objfile = cu->objfile;
|
||||
+ struct die_info *child_die;
|
||||
+ struct type *type;
|
||||
+ struct field *field;
|
||||
+ char *name;
|
||||
+ struct symbol *sym;
|
||||
+
|
||||
+ type = alloc_type (objfile);
|
||||
+ TYPE_CODE (type) = TYPE_CODE_STRUCT;
|
||||
+ /* Artificial type to be used only by `info common'. */
|
||||
+ TYPE_NAME (type) = "<common>";
|
||||
+
|
||||
+ child_die = die->child;
|
||||
+ while (child_die && child_die->tag)
|
||||
+ {
|
||||
+ TYPE_NFIELDS (type)++;
|
||||
+ child_die = sibling_die (child_die);
|
||||
+ }
|
||||
+
|
||||
+ TYPE_FIELDS (type) = obstack_alloc (&objfile->objfile_obstack,
|
||||
+ sizeof (*TYPE_FIELDS (type))
|
||||
+ * TYPE_NFIELDS (type));
|
||||
+ memset (TYPE_FIELDS (type), 0, sizeof (*TYPE_FIELDS (type))
|
||||
+ * TYPE_NFIELDS (type));
|
||||
+
|
||||
+ field = TYPE_FIELDS (type);
|
||||
child_die = die->child;
|
||||
while (child_die && child_die->tag)
|
||||
{
|
||||
LONGEST offset;
|
||||
|
||||
+ /* Create the symbol in the DW_TAG_common_block block in the current
|
||||
+ symbol scope. */
|
||||
sym = new_symbol (child_die, NULL, cu);
|
||||
+
|
||||
+ /* Undocumented in DWARF3, when it can be present? */
|
||||
if (sym != NULL
|
||||
&& handle_data_member_location (child_die, cu, &offset))
|
||||
{
|
||||
SYMBOL_VALUE_ADDRESS (sym) = base + offset;
|
||||
add_symbol_to_list (sym, &global_symbols);
|
||||
}
|
||||
+
|
||||
+ if (SYMBOL_CLASS (sym) == LOC_STATIC)
|
||||
+ SET_FIELD_PHYSADDR (*field, SYMBOL_VALUE_ADDRESS (sym));
|
||||
+ else
|
||||
+ SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
|
||||
+ FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
|
||||
+ FIELD_NAME (*field) = SYMBOL_NATURAL_NAME (sym);
|
||||
+ field++;
|
||||
child_die = sibling_die (child_die);
|
||||
}
|
||||
+
|
||||
+ /* TYPE_LENGTH (type) is left 0 - it is only a virtual structure even
|
||||
+ with no consecutive address space. */
|
||||
+
|
||||
+ sym = new_symbol (die, type, cu);
|
||||
+ /* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
|
||||
+ SYMBOL_VALUE_ADDRESS (sym) = base;
|
||||
+
|
||||
+ set_die_type (die, type, cu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15155,6 +15204,13 @@ new_symbol_full (struct die_info *die, s
|
||||
{
|
||||
var_decode_location (attr, sym, cu);
|
||||
attr2 = dwarf2_attr (die, DW_AT_external, cu);
|
||||
+
|
||||
+ /* Fortran explicitly imports any global symbols to the local
|
||||
+ scope by DW_TAG_common_block. */
|
||||
+ if (cu->language == language_fortran && die->parent
|
||||
+ && die->parent->tag == DW_TAG_common_block)
|
||||
+ attr2 = NULL;
|
||||
+
|
||||
if (SYMBOL_CLASS (sym) == LOC_STATIC
|
||||
&& SYMBOL_VALUE_ADDRESS (sym) == 0
|
||||
&& !dwarf2_per_objfile->has_section_at_zero)
|
||||
@@ -15319,6 +15375,11 @@ new_symbol_full (struct die_info *die, s
|
||||
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
||||
list_to_add = &global_symbols;
|
||||
break;
|
||||
+ case DW_TAG_common_block:
|
||||
+ SYMBOL_CLASS (sym) = LOC_STATIC;
|
||||
+ SYMBOL_DOMAIN (sym) = COMMON_BLOCK_DOMAIN;
|
||||
+ add_symbol_to_list (sym, cu->list_in_scope);
|
||||
+ break;
|
||||
default:
|
||||
/* Not a tag we recognize. Hopefully we aren't processing
|
||||
trash data, but since we must specifically ignore things
|
||||
Index: gdb-7.4.91.20120801/gdb/f-lang.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/f-lang.c 2012-08-01 18:38:24.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/f-lang.c 2012-08-01 18:38:54.202540495 +0200
|
||||
@@ -370,27 +370,3 @@ _initialize_f_language (void)
|
||||
|
||||
add_language (&f_language_defn);
|
||||
}
|
||||
-
|
||||
-SAVED_F77_COMMON_PTR head_common_list = NULL; /* Ptr to 1st saved COMMON */
|
||||
-
|
||||
-/* This routine finds the first encountred COMMON block named "name"
|
||||
- that belongs to function funcname. */
|
||||
-
|
||||
-SAVED_F77_COMMON_PTR
|
||||
-find_common_for_function (const char *name, const char *funcname)
|
||||
-{
|
||||
-
|
||||
- SAVED_F77_COMMON_PTR tmp;
|
||||
-
|
||||
- tmp = head_common_list;
|
||||
-
|
||||
- while (tmp != NULL)
|
||||
- {
|
||||
- if (strcmp (tmp->name, name) == 0
|
||||
- && strcmp (tmp->owning_function, funcname) == 0)
|
||||
- return (tmp);
|
||||
- else
|
||||
- tmp = tmp->next;
|
||||
- }
|
||||
- return (NULL);
|
||||
-}
|
||||
Index: gdb-7.4.91.20120801/gdb/f-lang.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/f-lang.h 2012-08-01 18:38:24.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/f-lang.h 2012-08-01 18:38:54.203540489 +0200
|
||||
@@ -52,37 +52,8 @@ enum f90_range_type
|
||||
NONE_BOUND_DEFAULT /* "(low:high)" */
|
||||
};
|
||||
|
||||
-struct common_entry
|
||||
- {
|
||||
- struct symbol *symbol; /* The symbol node corresponding
|
||||
- to this component */
|
||||
- struct common_entry *next; /* The next component */
|
||||
- };
|
||||
-
|
||||
-struct saved_f77_common
|
||||
- {
|
||||
- char *name; /* Name of COMMON */
|
||||
- char *owning_function; /* Name of parent function */
|
||||
- int secnum; /* Section # of .bss */
|
||||
- CORE_ADDR offset; /* Offset from .bss for
|
||||
- this block */
|
||||
- struct common_entry *entries; /* List of block's components */
|
||||
- struct common_entry *end_of_entries; /* ptr. to end of components */
|
||||
- struct saved_f77_common *next; /* Next saved COMMON block */
|
||||
- };
|
||||
-
|
||||
-typedef struct saved_f77_common SAVED_F77_COMMON, *SAVED_F77_COMMON_PTR;
|
||||
-
|
||||
-typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
|
||||
-
|
||||
-extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
|
||||
-
|
||||
-extern SAVED_F77_COMMON_PTR find_common_for_function (const char *,
|
||||
- const char *);
|
||||
-
|
||||
#define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */
|
||||
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
|
||||
-#define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
|
||||
|
||||
/* 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.4.91.20120801/gdb/f-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/f-valprint.c 2012-08-01 18:38:24.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/f-valprint.c 2012-08-01 18:41:26.411698186 +0200
|
||||
@@ -34,10 +34,11 @@
|
||||
#include "gdbcore.h"
|
||||
#include "command.h"
|
||||
#include "block.h"
|
||||
+#include "dictionary.h"
|
||||
+#include "gdb_assert.h"
|
||||
|
||||
extern void _initialize_f_valprint (void);
|
||||
static void info_common_command (char *, int);
|
||||
-static void list_all_visible_commons (const char *);
|
||||
static void f77_create_arrayprint_offset_tbl (struct type *,
|
||||
struct ui_file *);
|
||||
static void f77_get_dynamic_length_of_aggregate (struct type *);
|
||||
@@ -420,22 +421,53 @@ f_val_print (struct type *type, const gd
|
||||
gdb_flush (stream);
|
||||
}
|
||||
|
||||
-static void
|
||||
-list_all_visible_commons (const char *funname)
|
||||
+static int
|
||||
+info_common_command_for_block (struct block *block, const char *comname)
|
||||
{
|
||||
- SAVED_F77_COMMON_PTR tmp;
|
||||
-
|
||||
- tmp = head_common_list;
|
||||
+ struct block_iterator iter;
|
||||
+ struct symbol *sym;
|
||||
+ int values_printed = 0;
|
||||
+ const char *name;
|
||||
+ struct value_print_options opts;
|
||||
+
|
||||
+ get_user_print_options (&opts);
|
||||
+
|
||||
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
|
||||
+ if (SYMBOL_DOMAIN (sym) == COMMON_BLOCK_DOMAIN)
|
||||
+ {
|
||||
+ struct type *type = SYMBOL_TYPE (sym);
|
||||
+ int index;
|
||||
+
|
||||
+ gdb_assert (SYMBOL_CLASS (sym) == LOC_STATIC);
|
||||
+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT);
|
||||
+
|
||||
+ if (comname && (!SYMBOL_LINKAGE_NAME (sym)
|
||||
+ || strcmp (comname, SYMBOL_LINKAGE_NAME (sym)) != 0))
|
||||
+ continue;
|
||||
+
|
||||
+ values_printed = 1;
|
||||
+ if (SYMBOL_PRINT_NAME (sym))
|
||||
+ printf_filtered (_("Contents of F77 COMMON block '%s':\n"),
|
||||
+ SYMBOL_PRINT_NAME (sym));
|
||||
+ else
|
||||
+ printf_filtered (_("Contents of blank COMMON block:\n"));
|
||||
+
|
||||
+ for (index = 0; index < TYPE_NFIELDS (type); index++)
|
||||
+ {
|
||||
+ struct value *val;
|
||||
+
|
||||
+ gdb_assert (field_is_static (&TYPE_FIELD (type, index)));
|
||||
+ val = value_static_field (type, index);
|
||||
+
|
||||
+ printf_filtered ("%s = ", TYPE_FIELD_NAME (type, index));
|
||||
+ value_print (val, gdb_stdout, &opts);
|
||||
+ putchar_filtered ('\n');
|
||||
+ }
|
||||
|
||||
- printf_filtered (_("All COMMON blocks visible at this level:\n\n"));
|
||||
-
|
||||
- while (tmp != NULL)
|
||||
- {
|
||||
- if (strcmp (tmp->owning_function, funname) == 0)
|
||||
- printf_filtered ("%s\n", tmp->name);
|
||||
+ putchar_filtered ('\n');
|
||||
+ }
|
||||
|
||||
- tmp = tmp->next;
|
||||
- }
|
||||
+ return values_printed;
|
||||
}
|
||||
|
||||
/* This function is used to print out the values in a given COMMON
|
||||
@@ -445,11 +477,9 @@ list_all_visible_commons (const char *fu
|
||||
static void
|
||||
info_common_command (char *comname, int from_tty)
|
||||
{
|
||||
- SAVED_F77_COMMON_PTR the_common;
|
||||
- COMMON_ENTRY_PTR entry;
|
||||
struct frame_info *fi;
|
||||
- const char *funname = 0;
|
||||
- struct symbol *func;
|
||||
+ struct block *block;
|
||||
+ int values_printed = 0;
|
||||
|
||||
/* We have been told to display the contents of F77 COMMON
|
||||
block supposedly visible in this function. Let us
|
||||
@@ -461,87 +491,31 @@ info_common_command (char *comname, int
|
||||
/* The following is generally ripped off from stack.c's routine
|
||||
print_frame_info(). */
|
||||
|
||||
- func = find_pc_function (get_frame_pc (fi));
|
||||
- if (func)
|
||||
+ block = get_frame_block (fi, 0);
|
||||
+ if (block == NULL)
|
||||
{
|
||||
- /* In certain pathological cases, the symtabs give the wrong
|
||||
- function (when we are in the first function in a file which
|
||||
- is compiled without debugging symbols, the previous function
|
||||
- is compiled with debugging symbols, and the "foo.o" symbol
|
||||
- that is supposed to tell us where the file with debugging symbols
|
||||
- ends has been truncated by ar because it is longer than 15
|
||||
- characters).
|
||||
-
|
||||
- So look in the minimal symbol tables as well, and if it comes
|
||||
- up with a larger address for the function use that instead.
|
||||
- I don't think this can ever cause any problems; there shouldn't
|
||||
- be any minimal symbols in the middle of a function.
|
||||
- FIXME: (Not necessarily true. What about text labels?) */
|
||||
-
|
||||
- struct minimal_symbol *msymbol =
|
||||
- lookup_minimal_symbol_by_pc (get_frame_pc (fi));
|
||||
-
|
||||
- if (msymbol != NULL
|
||||
- && (SYMBOL_VALUE_ADDRESS (msymbol)
|
||||
- > BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
|
||||
- funname = SYMBOL_LINKAGE_NAME (msymbol);
|
||||
- else
|
||||
- funname = SYMBOL_LINKAGE_NAME (func);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- struct minimal_symbol *msymbol =
|
||||
- lookup_minimal_symbol_by_pc (get_frame_pc (fi));
|
||||
-
|
||||
- if (msymbol != NULL)
|
||||
- funname = SYMBOL_LINKAGE_NAME (msymbol);
|
||||
- else /* Got no 'funname', code below will fail. */
|
||||
- error (_("No function found for frame."));
|
||||
+ printf_filtered (_("No symbol table info available.\n"));
|
||||
+ return;
|
||||
}
|
||||
|
||||
- /* If comname is NULL, we assume the user wishes to see the
|
||||
- which COMMON blocks are visible here and then return. */
|
||||
-
|
||||
- if (comname == 0)
|
||||
+ while (block)
|
||||
{
|
||||
- list_all_visible_commons (funname);
|
||||
- return;
|
||||
+ if (info_common_command_for_block (block, comname))
|
||||
+ values_printed = 1;
|
||||
+ /* After handling the function's top-level block, stop. Don't
|
||||
+ continue to its superblock, the block of per-file symbols. */
|
||||
+ if (BLOCK_FUNCTION (block))
|
||||
+ break;
|
||||
+ block = BLOCK_SUPERBLOCK (block);
|
||||
}
|
||||
|
||||
- the_common = find_common_for_function (comname, funname);
|
||||
-
|
||||
- if (the_common)
|
||||
+ if (!values_printed)
|
||||
{
|
||||
- struct frame_id frame_id = get_frame_id (fi);
|
||||
-
|
||||
- if (strcmp (comname, BLANK_COMMON_NAME_LOCAL) == 0)
|
||||
- printf_filtered (_("Contents of blank COMMON block:\n"));
|
||||
+ if (comname)
|
||||
+ printf_filtered (_("No common block '%s'.\n"), comname);
|
||||
else
|
||||
- printf_filtered (_("Contents of F77 COMMON block '%s':\n"), comname);
|
||||
-
|
||||
- printf_filtered ("\n");
|
||||
- entry = the_common->entries;
|
||||
-
|
||||
- while (entry != NULL)
|
||||
- {
|
||||
- fi = frame_find_by_id (frame_id);
|
||||
- if (fi == NULL)
|
||||
- {
|
||||
- warning (_("Unable to restore previously selected frame."));
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- print_variable_and_value (NULL, entry->symbol, fi, gdb_stdout, 0);
|
||||
-
|
||||
- /* print_variable_and_value invalidates FI. */
|
||||
- fi = NULL;
|
||||
-
|
||||
- entry = entry->next;
|
||||
- }
|
||||
+ printf_filtered (_("No common blocks.\n"));
|
||||
}
|
||||
- else
|
||||
- printf_filtered (_("Cannot locate the common block %s in function '%s'\n"),
|
||||
- comname, funname);
|
||||
}
|
||||
|
||||
void
|
||||
Index: gdb-7.4.91.20120801/gdb/stack.c
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/stack.c 2012-08-01 18:36:51.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/stack.c 2012-08-01 18:38:54.206540471 +0200
|
||||
@@ -1851,6 +1851,8 @@ iterate_over_block_locals (struct block
|
||||
case LOC_COMPUTED:
|
||||
if (SYMBOL_IS_ARGUMENT (sym))
|
||||
break;
|
||||
+ if (SYMBOL_DOMAIN (sym) == COMMON_BLOCK_DOMAIN)
|
||||
+ break;
|
||||
(*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
|
||||
break;
|
||||
|
||||
Index: gdb-7.4.91.20120801/gdb/symtab.h
|
||||
===================================================================
|
||||
--- gdb-7.4.91.20120801.orig/gdb/symtab.h 2012-06-30 00:46:46.000000000 +0200
|
||||
+++ gdb-7.4.91.20120801/gdb/symtab.h 2012-08-01 18:38:54.206540471 +0200
|
||||
@@ -394,7 +394,10 @@ typedef enum domain_enum_tag
|
||||
|
||||
/* 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;
|
||||
|
||||
/* Searching domains, used for `search_symbols'. Element numbers are
|
||||
Index: gdb-7.4.91.20120801/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120801/gdb/testsuite/gdb.fortran/common-block.exp 2012-08-01 18:38:54.207540465 +0200
|
||||
@@ -0,0 +1,101 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 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.
|
||||
+
|
||||
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
||||
+
|
||||
+set testfile "common-block"
|
||||
+set srcfile ${testfile}.f90
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
|
||||
+ untested "Couldn't compile ${srcfile}"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+if ![runto MAIN__] then {
|
||||
+ perror "couldn't run to breakpoint MAIN__"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "stop-here-out"]
|
||||
+gdb_continue_to_breakpoint "stop-here-out"
|
||||
+
|
||||
+# Common block naming with source name /foo/:
|
||||
+# .symtab DW_TAG_common_block's DW_AT_name
|
||||
+# Intel Fortran foo_ foo_
|
||||
+# GNU Fortran foo_ foo
|
||||
+#set suffix "_"
|
||||
+set suffix ""
|
||||
+
|
||||
+set int4 {(integer\(kind=4\)|INTEGER\(4\))}
|
||||
+set real4 {(real\(kind=4\)|REAL\(4\))}
|
||||
+set real8 {(real\(kind=8\)|REAL\(8\))}
|
||||
+
|
||||
+gdb_test "whatis foo$suffix" "No symbol \"foo$suffix\" in current context."
|
||||
+gdb_test "ptype foo$suffix" "No symbol \"foo$suffix\" in current context."
|
||||
+gdb_test "p foo$suffix" "No symbol \"foo$suffix\" in current context."
|
||||
+gdb_test "whatis fo_o$suffix" "No symbol \"fo_o$suffix\" in current context."
|
||||
+gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current context."
|
||||
+gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context."
|
||||
+
|
||||
+gdb_test "info locals" "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3" "info locals out"
|
||||
+gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix = 1\r\niy = 2\r\niz = 3" "info common out"
|
||||
+
|
||||
+gdb_test "ptype ix" "type = $int4" "ptype ix out"
|
||||
+gdb_test "ptype iy" "type = $real4" "ptype iy out"
|
||||
+gdb_test "ptype iz" "type = $real8" "ptype iz out"
|
||||
+gdb_test "ptype ix_x" "type = $int4" "ptype ix_x out"
|
||||
+gdb_test "ptype iy_y" "type = $real4" "ptype iy_y out"
|
||||
+gdb_test "ptype iz_z" "type = $real8" "ptype iz_z out"
|
||||
+
|
||||
+gdb_test "p ix" " = 1 *" "p ix out"
|
||||
+gdb_test "p iy" " = 2 *" "p iy out"
|
||||
+gdb_test "p iz" " = 3 *" "p iz out"
|
||||
+gdb_test "p ix_x" " = 11 *" "p ix_x out"
|
||||
+gdb_test "p iy_y" " = 22 *" "p iy_y out"
|
||||
+gdb_test "p iz_z" " = 33 *" "p iz_z out"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "stop-here-in"]
|
||||
+gdb_continue_to_breakpoint "stop-here-in"
|
||||
+
|
||||
+gdb_test "whatis foo$suffix" "No symbol \"foo$suffix\" in current context." "whatis foo$suffix in"
|
||||
+gdb_test "ptype foo$suffix" "No symbol \"foo$suffix\" in current context." "ptype foo$suffix in"
|
||||
+gdb_test "p foo$suffix" "No symbol \"foo$suffix\" in current context." "p foo$suffix in"
|
||||
+gdb_test "whatis fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "whatis fo_o$suffix in"
|
||||
+gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "ptype fo_o$suffix in"
|
||||
+gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "p fo_o$suffix in"
|
||||
+
|
||||
+gdb_test "info locals" "ix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3\r\niy = 5\r\niz_z = 55" "info locals in"
|
||||
+gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix = 11\r\niy2 = 22\r\niz = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3" "info common in"
|
||||
+
|
||||
+gdb_test "ptype ix" "type = $int4" "ptype ix in"
|
||||
+gdb_test "ptype iy2" "type = $real4" "ptype iy2 in"
|
||||
+gdb_test "ptype iz" "type = $real8" "ptype iz in"
|
||||
+gdb_test "ptype ix_x" "type = $int4" "ptype ix_x in"
|
||||
+gdb_test "ptype iy_y" "type = $real4" "ptype iy_y in"
|
||||
+gdb_test "ptype iz_z2" "type = $real8" "ptype iz_z2 in"
|
||||
+
|
||||
+gdb_test "p ix" " = 11 *" "p ix in"
|
||||
+gdb_test "p iy2" " = 22 *" "p iy2 in"
|
||||
+gdb_test "p iz" " = 33 *" "p iz in"
|
||||
+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.4.91.20120801/gdb/testsuite/gdb.fortran/common-block.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.4.91.20120801/gdb/testsuite/gdb.fortran/common-block.f90 2012-08-01 18:38:54.207540465 +0200
|
||||
@@ -0,0 +1,67 @@
|
||||
+! Copyright 2008 Free Software Foundation, Inc.
|
||||
+!
|
||||
+! This program is free software; you can redistribute it and/or modify
|
||||
+! it under the terms of the GNU General Public License as published by
|
||||
+! the Free Software Foundation; either version 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.
|
||||
+!
|
||||
+! Ihis file is the Fortran source file for dynamic.exp.
|
||||
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
|
||||
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
||||
+
|
||||
+subroutine in
|
||||
+
|
||||
+ INTEGER*4 ix
|
||||
+ REAL*4 iy2
|
||||
+ REAL*8 iz
|
||||
+
|
||||
+ INTEGER*4 ix_x
|
||||
+ REAL*4 iy_y
|
||||
+ REAL*8 iz_z2
|
||||
+
|
||||
+ common /fo_o/ix,iy2,iz
|
||||
+ common /foo/ix_x,iy_y,iz_z2
|
||||
+
|
||||
+ iy = 5
|
||||
+ iz_z = 55
|
||||
+
|
||||
+ if (ix .ne. 11 .or. iy2 .ne. 22.0 .or. iz .ne. 33.0) call abort
|
||||
+ if (ix_x .ne. 1 .or. iy_y .ne. 2.0 .or. iz_z2 .ne. 3.0) call abort
|
||||
+
|
||||
+ ix = 0 ! stop-here-in
|
||||
+
|
||||
+end subroutine in
|
||||
+
|
||||
+program common_test
|
||||
+
|
||||
+ INTEGER*4 ix
|
||||
+ REAL*4 iy
|
||||
+ REAL*8 iz
|
||||
+
|
||||
+ INTEGER*4 ix_x
|
||||
+ REAL*4 iy_y
|
||||
+ REAL*8 iz_z
|
||||
+
|
||||
+ common /foo/ix,iy,iz
|
||||
+ common /fo_o/ix_x,iy_y,iz_z
|
||||
+
|
||||
+ ix = 1
|
||||
+ iy = 2.0
|
||||
+ iz = 3.0
|
||||
+
|
||||
+ ix_x = 11
|
||||
+ iy_y = 22.0
|
||||
+ iz_z = 33.0
|
||||
+
|
||||
+ call in ! stop-here-out
|
||||
+
|
||||
+end program common_test
|
@ -1,8 +1,8 @@
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 53100c5..e7586ac 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -13306,6 +13306,25 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
||||
Index: gdb-7.5.50.20130118/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/dwarf2read.c 2013-01-19 21:16:22.437961789 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/dwarf2read.c 2013-01-19 21:24:22.242969266 +0100
|
||||
@@ -15987,6 +15987,25 @@ new_symbol_full (struct die_info *die, s
|
||||
/* Cache this symbol's name and the name's demangled form (if any). */
|
||||
SYMBOL_SET_LANGUAGE (sym, cu->language);
|
||||
linkagename = dwarf2_physname (name, die, cu);
|
||||
@ -28,12 +28,11 @@ index 53100c5..e7586ac 100644
|
||||
SYMBOL_SET_NAMES (sym, linkagename, strlen (linkagename), 0, objfile);
|
||||
|
||||
/* Fortran does not have mangling standard and the mangling does differ
|
||||
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
new file mode 100644
|
||||
index 0000000..575071f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
@@ -0,0 +1,101 @@
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2013-01-19 21:23:09.119827963 +0100
|
||||
@@ -0,0 +1,108 @@
|
||||
+# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
@ -90,7 +89,11 @@ index 0000000..575071f
|
||||
+ }
|
||||
+ -re " = {<text gnu-indirect-function variable, no debug info>} (0x\[0-9a-f\]+) <__strstr>\r\n$gdb_prompt $" {
|
||||
+ set addr $expect_out(1,string)
|
||||
+ pass "$test (GDB workaround or future fixed glibc)"
|
||||
+ pass "$test (GDB workaround)"
|
||||
+ }
|
||||
+ -re " = {<text gnu-indirect-function variable, no debug info>} (0x\[0-9a-f\]+) <__libc_strstr>\r\n$gdb_prompt $" {
|
||||
+ set addr $expect_out(1,string)
|
||||
+ pass "$test (fixed glibc)"
|
||||
+ }
|
||||
+ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
|
||||
+ untested "$test (gnu-ifunc not in use by glibc)"
|
||||
@ -126,7 +129,10 @@ index 0000000..575071f
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__strstr>\r\n$gdb_prompt $" {
|
||||
+ pass "$test (GDB workaround or future fixed glibc)"
|
||||
+ pass "$test (GDB workaround)"
|
||||
+ }
|
||||
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__libc_strstr>\r\n$gdb_prompt $" {
|
||||
+ pass "$test (fixed glibc)"
|
||||
+ }
|
||||
+ -re " = {void \\*\\(void\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
|
||||
+ fail $test
|
||||
|
75
gdb-ia64-tdep.patch
Normal file
75
gdb-ia64-tdep.patch
Normal file
@ -0,0 +1,75 @@
|
||||
Index: gdb-7.5.50.20130215/gdb/ia64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/ia64-tdep.c
|
||||
+++ gdb-7.5.50.20130215/gdb/ia64-tdep.c
|
||||
@@ -2256,7 +2256,7 @@ static int
|
||||
ia64_outermost_frame (struct frame_info *this_frame)
|
||||
{
|
||||
CORE_ADDR pc = get_frame_pc (this_frame);
|
||||
- char *name;
|
||||
+ const char *name;
|
||||
|
||||
find_pc_partial_function (pc, &name, NULL, NULL);
|
||||
|
||||
@@ -2302,6 +2302,7 @@ ia64_clone2_frame_sniffer (const struct
|
||||
static const struct frame_unwind ia64_clone2_frame_unwind =
|
||||
{
|
||||
NORMAL_FRAME,
|
||||
+ default_frame_unwind_stop_reason,
|
||||
&ia64_clone2_frame_this_id,
|
||||
&ia64_clone2_frame_prev_register,
|
||||
NULL,
|
||||
@@ -2454,7 +2455,7 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
ULONGEST unatN_val;
|
||||
ULONGEST unat;
|
||||
read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
|
||||
- register_size (target_gdbarch, IA64_UNAT_REGNUM));
|
||||
+ register_size (gdbarch, IA64_UNAT_REGNUM));
|
||||
unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
|
||||
return frame_unwind_got_constant (this_frame, regnum, unatN_val);
|
||||
}
|
||||
@@ -2470,9 +2471,9 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
CORE_ADDR gr_addr = 0, nat_addr = 0;
|
||||
|
||||
read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
|
||||
- register_size (target_gdbarch, IA64_BSP_REGNUM));
|
||||
+ register_size (gdbarch, IA64_BSP_REGNUM));
|
||||
read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
||||
- register_size (target_gdbarch, IA64_CFM_REGNUM));
|
||||
+ register_size (gdbarch, IA64_CFM_REGNUM));
|
||||
|
||||
/* The bsp points at the end of the register frame so we
|
||||
subtract the size of frame from it to get start of register frame. */
|
||||
@@ -2496,7 +2497,7 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
|
||||
if (nat_addr != 0)
|
||||
read_memory (nat_addr, (char *) &nat_collection,
|
||||
- register_size (target_gdbarch, IA64_RNAT_REGNUM));
|
||||
+ register_size (gdbarch, IA64_RNAT_REGNUM));
|
||||
}
|
||||
else
|
||||
nat_collection = read_memory_integer (nat_addr, 8, BFD_ENDIAN_LITTLE);
|
||||
@@ -2522,9 +2523,9 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
ULONGEST bof;
|
||||
|
||||
read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
|
||||
- register_size (target_gdbarch, IA64_BSP_REGNUM));
|
||||
+ register_size (gdbarch, IA64_BSP_REGNUM));
|
||||
read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
||||
- register_size (target_gdbarch, IA64_CFM_REGNUM));
|
||||
+ register_size (gdbarch, IA64_CFM_REGNUM));
|
||||
|
||||
/* The bsp points at the end of the register frame so we
|
||||
subtract the size of frame from it to get beginning of frame. */
|
||||
@@ -2564,9 +2565,9 @@ ia64_sigtramp_frame_prev_register (struc
|
||||
ULONGEST cfm;
|
||||
ULONGEST prN_val;
|
||||
read_memory (pr_addr, (char *) &pr,
|
||||
- register_size (target_gdbarch, IA64_PR_REGNUM));
|
||||
+ register_size (gdbarch, IA64_PR_REGNUM));
|
||||
read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
||||
- register_size (target_gdbarch, IA64_CFM_REGNUM));
|
||||
+ register_size (gdbarch, IA64_CFM_REGNUM));
|
||||
|
||||
/* Get the register rename base for this frame and adjust the
|
||||
* register name to take rotation into account. */
|
3
gdb-libstdc++-v3-python-r155978.tar.bz2
Normal file
3
gdb-libstdc++-v3-python-r155978.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1877172a7efbf7540290471e64816c9549b24a65e825f0e1a725ac950b4e5029
|
||||
size 11744
|
File diff suppressed because it is too large
Load Diff
@ -48,10 +48,12 @@
|
||||
static const char *progname;
|
||||
|
||||
static volatile int signal_chld_hit = 0;
|
||||
static volatile pid_t child;
|
||||
|
||||
static void signal_chld (int signo)
|
||||
{
|
||||
signal_chld_hit = 1;
|
||||
if (child && kill (child, 0) != 0)
|
||||
signal_chld_hit = 1;
|
||||
}
|
||||
|
||||
static volatile int signal_alrm_hit = 0;
|
||||
@ -62,7 +64,6 @@ static void signal_alrm (int signo)
|
||||
}
|
||||
|
||||
static char childptyname[LINE_MAX];
|
||||
static pid_t child;
|
||||
|
||||
static void print_child_error (const char *reason, char **argv)
|
||||
{
|
||||
@ -203,8 +204,13 @@ static int spawn (char **argv, int timeout)
|
||||
pollfd.fd = amaster;
|
||||
pollfd.events = POLLIN;
|
||||
i = ppoll (&pollfd, 1, NULL, &set);
|
||||
if (i == -1 && errno == EINTR && signal_chld_hit)
|
||||
break;
|
||||
if (i == -1 && errno == EINTR)
|
||||
{
|
||||
if (signal_chld_hit)
|
||||
break;
|
||||
/* Non-CHILD child may have exited. */
|
||||
continue;
|
||||
}
|
||||
assert (i == 1);
|
||||
/* Data available? Process it first. */
|
||||
if (pollfd.revents & POLLIN)
|
||||
|
@ -1,110 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00169.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/27 12:53:57 1.14718
|
||||
### src/gdb/ChangeLog 2012/09/27 16:04:18 1.14719
|
||||
## -1,3 +1,8 @@
|
||||
+2012-09-27 Tom Tromey <tromey@redhat.com>
|
||||
+
|
||||
+ Fix https://bugzilla.redhat.com/show_bug.cgi?id=849357
|
||||
+ * cp-valprint.c (cp_print_value_fields): Use get_vptr_fieldno.
|
||||
+
|
||||
2012-09-27 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* sol-thread.c (sol_thread_fetch_registers)
|
||||
--- src/gdb/cp-valprint.c 2012/07/06 05:36:07 1.85
|
||||
+++ src/gdb/cp-valprint.c 2012/09/27 16:04:22 1.86
|
||||
@@ -210,7 +210,9 @@
|
||||
{
|
||||
int statmem_obstack_initial_size = 0;
|
||||
int stat_array_obstack_initial_size = 0;
|
||||
-
|
||||
+ struct type *vptr_basetype = NULL;
|
||||
+ int vptr_fieldno;
|
||||
+
|
||||
if (dont_print_statmem == 0)
|
||||
{
|
||||
statmem_obstack_initial_size =
|
||||
@@ -225,6 +227,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ vptr_fieldno = get_vptr_fieldno (type, &vptr_basetype);
|
||||
for (i = n_baseclasses; i < len; i++)
|
||||
{
|
||||
/* If requested, skip printing of static fields. */
|
||||
@@ -358,7 +361,7 @@
|
||||
v, stream, recurse + 1,
|
||||
options);
|
||||
}
|
||||
- else if (i == TYPE_VPTR_FIELDNO (type))
|
||||
+ else if (i == vptr_fieldno && type == vptr_basetype)
|
||||
{
|
||||
int i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
|
||||
struct type *i_type = TYPE_FIELD_TYPE (type, i);
|
||||
### src/gdb/testsuite/ChangeLog 2012/09/26 19:50:12 1.3396
|
||||
### src/gdb/testsuite/ChangeLog 2012/09/27 16:04:22 1.3397
|
||||
## -1,3 +1,10 @@
|
||||
+2012-09-27 Tom Tromey <tromey@redhat.com>
|
||||
+
|
||||
+ * gdb.cp/derivation.exp: Add regression test.
|
||||
+ * gdb.cp/derivation.cc (class V_base, class V_inter, class
|
||||
+ V_derived): New.
|
||||
+ (vderived): New global.
|
||||
+
|
||||
2012-09-26 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.dwarf2/dw2-common-block.S: New file.
|
||||
--- src/gdb/testsuite/gdb.cp/derivation.cc 2011/12/13 17:22:08 1.2
|
||||
+++ src/gdb/testsuite/gdb.cp/derivation.cc 2012/09/27 16:04:23 1.3
|
||||
@@ -118,8 +118,37 @@
|
||||
|
||||
};
|
||||
|
||||
+class V_base
|
||||
+{
|
||||
+public:
|
||||
+ virtual void m();
|
||||
+ int base;
|
||||
+};
|
||||
|
||||
+void
|
||||
+V_base::m()
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+class V_inter : public virtual V_base
|
||||
+{
|
||||
+public:
|
||||
+ virtual void f();
|
||||
+ int inter;
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+V_inter::f()
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+class V_derived : public V_inter
|
||||
+{
|
||||
+public:
|
||||
+ double x;
|
||||
+};
|
||||
|
||||
+V_derived vderived;
|
||||
|
||||
int A::afoo() {
|
||||
return 1;
|
||||
--- src/gdb/testsuite/gdb.cp/derivation.exp 2012/07/10 15:18:18 1.19
|
||||
+++ src/gdb/testsuite/gdb.cp/derivation.exp 2012/09/27 16:04:23 1.20
|
||||
@@ -176,3 +176,11 @@
|
||||
|
||||
gdb_test "print g_instance.bfoo()" "\\$\[0-9\]+ = 2" "print value of g_instance.bfoo()"
|
||||
gdb_test "print g_instance.cfoo()" "\\$\[0-9\]+ = 3" "print value of g_instance.cfoo()"
|
||||
+
|
||||
+# This is a regression test for a bug that caused a crash when trying
|
||||
+# to print the vtbl pointer. We don't care about the output so much
|
||||
+# here (it is tested elsewhere), just that gdb doesn't crash. We test
|
||||
+# "ptype" first because, before the gdb fix, that was the only code
|
||||
+# path calling get_vptr_fieldno.
|
||||
+gdb_test "ptype vderived" "type = .*"
|
||||
+gdb_test "print vderived" " = {.* inter = 0.*x = 0}"
|
@ -1,23 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-07/msg00173.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/07/20 17:54:05 1.14507
|
||||
### src/gdb/ChangeLog 2012/07/22 16:52:39 1.14508
|
||||
## -1,3 +1,7 @@
|
||||
+2012-07-22 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * sh-tdep.c (sh_treat_as_flt_p): Remove unused variable LEN.
|
||||
+
|
||||
2012-07-20 Jeff Kenton <jkenton@tilera.com>
|
||||
|
||||
* tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Fix
|
||||
--- src/gdb/sh-tdep.c 2012/06/08 14:24:57 1.245
|
||||
+++ src/gdb/sh-tdep.c 2012/07/22 16:52:41 1.246
|
||||
@@ -1032,8 +1032,6 @@
|
||||
static int
|
||||
sh_treat_as_flt_p (struct type *type)
|
||||
{
|
||||
- int len = TYPE_LENGTH (type);
|
||||
-
|
||||
/* Ordinary float types are obviously treated as float. */
|
||||
if (TYPE_CODE (type) == TYPE_CODE_FLT)
|
||||
return 1;
|
@ -1,64 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-07/msg00182.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/07/23 15:25:11 1.14514
|
||||
### src/gdb/ChangeLog 2012/07/23 18:08:27 1.14515
|
||||
## -1,3 +1,9 @@
|
||||
+2012-07-23 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * p-valprint.c (pascal_object_print_value): Replace potentially
|
||||
+ unsafe alloca with xmalloc/xfree.
|
||||
+ * valops.c (search_struct_method): Likewise.
|
||||
+
|
||||
2012-07-23 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* solib-svr4.c (enable_break): Update.
|
||||
--- src/gdb/p-valprint.c 2012/05/18 21:02:49 1.100
|
||||
+++ src/gdb/p-valprint.c 2012/07/23 18:08:29 1.101
|
||||
@@ -797,8 +797,11 @@
|
||||
|
||||
if (boffset < 0 || boffset >= TYPE_LENGTH (type))
|
||||
{
|
||||
- /* FIXME (alloc): not safe is baseclass is really really big. */
|
||||
- gdb_byte *buf = alloca (TYPE_LENGTH (baseclass));
|
||||
+ gdb_byte *buf;
|
||||
+ struct cleanup *back_to;
|
||||
+
|
||||
+ buf = xmalloc (TYPE_LENGTH (baseclass));
|
||||
+ back_to = make_cleanup (xfree, buf);
|
||||
|
||||
base_valaddr = buf;
|
||||
if (target_read_memory (address + boffset, buf,
|
||||
@@ -807,6 +810,7 @@
|
||||
address = address + boffset;
|
||||
thisoffset = 0;
|
||||
boffset = 0;
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
else
|
||||
base_valaddr = valaddr;
|
||||
--- src/gdb/valops.c 2012/06/24 07:28:10 1.297
|
||||
+++ src/gdb/valops.c 2012/07/23 18:08:29 1.298
|
||||
@@ -2281,8 +2281,13 @@
|
||||
|
||||
if (offset < 0 || offset >= TYPE_LENGTH (type))
|
||||
{
|
||||
- gdb_byte *tmp = alloca (TYPE_LENGTH (baseclass));
|
||||
- CORE_ADDR address = value_address (*arg1p);
|
||||
+ gdb_byte *tmp;
|
||||
+ struct cleanup *back_to;
|
||||
+ CORE_ADDR address;
|
||||
+
|
||||
+ tmp = xmalloc (TYPE_LENGTH (baseclass));
|
||||
+ back_to = make_cleanup (xfree, tmp);
|
||||
+ address = value_address (*arg1p);
|
||||
|
||||
if (target_read_memory (address + offset,
|
||||
tmp, TYPE_LENGTH (baseclass)) != 0)
|
||||
@@ -2293,6 +2298,7 @@
|
||||
address + offset);
|
||||
base_valaddr = value_contents_for_printing (base_val);
|
||||
this_offset = 0;
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
else
|
||||
{
|
@ -1,139 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-07/msg00213.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/07/25 20:14:17 1.14531
|
||||
### src/gdb/ChangeLog 2012/07/26 02:03:14 1.14532
|
||||
## -1,3 +1,17 @@
|
||||
+2012-07-26 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Expand parameter
|
||||
+ SIZE to size_t.
|
||||
+ (dwarf2_evaluate_loc_desc): Likewise.
|
||||
+ (dwarf2_loc_desc_needs_frame): Likewise.
|
||||
+ (locexpr_describe_location_1): Likewise.
|
||||
+ * dwarf2loc.h (struct dwarf2_locexpr_baton): Make SIZE as
|
||||
+ size_t.
|
||||
+ (struct dwarf2_loclist_baton): Likewise.
|
||||
+ * dwarf2read.c (struct dwarf_block): Likewise.
|
||||
+ (dump_die_shallow): Use pulongest to print dwarf_block.size.
|
||||
+ (decode_locdesc): Expand SIZE and I to size_t.
|
||||
+
|
||||
2012-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* contrib/cc-with-tweaks.sh: Put into comment path gdb/contrib/.
|
||||
--- src/gdb/dwarf2loc.c 2012/07/13 20:15:50 1.152
|
||||
+++ src/gdb/dwarf2loc.c 2012/07/26 02:03:16 1.153
|
||||
@@ -54,8 +54,8 @@
|
||||
static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
|
||||
struct frame_info *frame,
|
||||
const gdb_byte *data,
|
||||
- unsigned short size,
|
||||
- struct dwarf2_per_cu_data *per_cu,
|
||||
+ size_t size,
|
||||
+ struct dwarf2_per_cu_data *per_cu,
|
||||
LONGEST byte_offset);
|
||||
|
||||
/* Until these have formal names, we define these here.
|
||||
@@ -2111,7 +2111,7 @@
|
||||
|
||||
static struct value *
|
||||
dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
- const gdb_byte *data, unsigned short size,
|
||||
+ const gdb_byte *data, size_t size,
|
||||
struct dwarf2_per_cu_data *per_cu,
|
||||
LONGEST byte_offset)
|
||||
{
|
||||
@@ -2312,7 +2312,7 @@
|
||||
|
||||
struct value *
|
||||
dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame,
|
||||
- const gdb_byte *data, unsigned short size,
|
||||
+ const gdb_byte *data, size_t size,
|
||||
struct dwarf2_per_cu_data *per_cu)
|
||||
{
|
||||
return dwarf2_evaluate_loc_desc_full (type, frame, data, size, per_cu, 0);
|
||||
@@ -2433,7 +2433,7 @@
|
||||
requires a frame to evaluate. */
|
||||
|
||||
static int
|
||||
-dwarf2_loc_desc_needs_frame (const gdb_byte *data, unsigned short size,
|
||||
+dwarf2_loc_desc_needs_frame (const gdb_byte *data, size_t size,
|
||||
struct dwarf2_per_cu_data *per_cu)
|
||||
{
|
||||
struct needs_frame_baton baton;
|
||||
@@ -3827,7 +3827,7 @@
|
||||
static void
|
||||
locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr,
|
||||
struct ui_file *stream,
|
||||
- const gdb_byte *data, int size,
|
||||
+ const gdb_byte *data, size_t size,
|
||||
struct objfile *objfile, unsigned int addr_size,
|
||||
int offset_size, struct dwarf2_per_cu_data *per_cu)
|
||||
{
|
||||
--- src/gdb/dwarf2loc.h 2012/05/22 18:45:22 1.33
|
||||
+++ src/gdb/dwarf2loc.h 2012/07/26 02:03:16 1.34
|
||||
@@ -77,7 +77,7 @@
|
||||
struct value *dwarf2_evaluate_loc_desc (struct type *type,
|
||||
struct frame_info *frame,
|
||||
const gdb_byte *data,
|
||||
- unsigned short size,
|
||||
+ size_t size,
|
||||
struct dwarf2_per_cu_data *per_cu);
|
||||
|
||||
CORE_ADDR dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu,
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
/* Length of the location expression. For optimized out expressions it is
|
||||
zero. */
|
||||
- unsigned long size;
|
||||
+ size_t size;
|
||||
|
||||
/* The compilation unit containing the symbol whose location
|
||||
we're computing. */
|
||||
@@ -114,7 +114,7 @@
|
||||
const gdb_byte *data;
|
||||
|
||||
/* Length of the location list. */
|
||||
- unsigned long size;
|
||||
+ size_t size;
|
||||
|
||||
/* The compilation unit containing the symbol whose location
|
||||
we're computing. */
|
||||
--- src/gdb/dwarf2read.c 2012/07/20 17:38:04 1.697
|
||||
+++ src/gdb/dwarf2read.c 2012/07/26 02:03:16 1.698
|
||||
@@ -990,7 +990,7 @@
|
||||
/* Blocks are a bunch of untyped bytes. */
|
||||
struct dwarf_block
|
||||
{
|
||||
- unsigned int size;
|
||||
+ size_t size;
|
||||
|
||||
/* Valid only if SIZE is not zero. */
|
||||
gdb_byte *data;
|
||||
@@ -16197,12 +16197,12 @@
|
||||
case DW_FORM_block4:
|
||||
case DW_FORM_block:
|
||||
case DW_FORM_block1:
|
||||
- fprintf_unfiltered (f, "block: size %d",
|
||||
- DW_BLOCK (&die->attrs[i])->size);
|
||||
+ fprintf_unfiltered (f, "block: size %s",
|
||||
+ pulongest (DW_BLOCK (&die->attrs[i])->size));
|
||||
break;
|
||||
case DW_FORM_exprloc:
|
||||
- fprintf_unfiltered (f, "expression: size %u",
|
||||
- DW_BLOCK (&die->attrs[i])->size);
|
||||
+ fprintf_unfiltered (f, "expression: size %s",
|
||||
+ pulongest (DW_BLOCK (&die->attrs[i])->size));
|
||||
break;
|
||||
case DW_FORM_ref_addr:
|
||||
fprintf_unfiltered (f, "ref address: ");
|
||||
@@ -16746,8 +16746,8 @@
|
||||
decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
|
||||
{
|
||||
struct objfile *objfile = cu->objfile;
|
||||
- int i;
|
||||
- int size = blk->size;
|
||||
+ size_t i;
|
||||
+ size_t size = blk->size;
|
||||
gdb_byte *data = blk->data;
|
||||
CORE_ADDR stack[64];
|
||||
int stacki;
|
@ -1,34 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-08/msg00085.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/08/10 05:03:07 1.14574
|
||||
### src/gdb/ChangeLog 2012/08/10 18:55:16 1.14575
|
||||
## -1,3 +1,9 @@
|
||||
+2012-08-10 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * python/py-type.c (convert_field): Use gdb_py_long_from_longest
|
||||
+ for TYPE_FIELD_BITPOS.
|
||||
+ (typy_get_sizeof): Likewise for TYPE_LENGTH.
|
||||
+
|
||||
2012-08-10 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR cli/10436:
|
||||
--- src/gdb/python/py-type.c 2012/05/18 21:02:52 1.39
|
||||
+++ src/gdb/python/py-type.c 2012/08/10 18:55:18 1.40
|
||||
@@ -176,7 +176,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- arg = PyLong_FromLong (TYPE_FIELD_BITPOS (type, field));
|
||||
+ arg = gdb_py_long_from_longest (TYPE_FIELD_BITPOS (type, field));
|
||||
attrstring = "bitpos";
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@
|
||||
}
|
||||
/* Ignore exceptions. */
|
||||
|
||||
- return PyLong_FromLong (TYPE_LENGTH (type));
|
||||
+ return gdb_py_long_from_longest (TYPE_LENGTH (type));
|
||||
}
|
||||
|
||||
static struct type *
|
@ -1,119 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-08/msg00187.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/08/24 03:17:12 1.14628
|
||||
### src/gdb/ChangeLog 2012/08/24 03:57:22 1.14629
|
||||
## -1,3 +1,11 @@
|
||||
+2012-08-24 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * h8300-tdep.c (h8300_push_dummy_call): Replace unsafe alloca
|
||||
+ with xmalloc/cleanup.
|
||||
+ * mt-tdep.c (mt_push_dummy_call): Likewise.
|
||||
+ * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
|
||||
+ * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
|
||||
+
|
||||
2012-08-24 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
* jv-exp.y (push_expression_name): Add "." at the end of error
|
||||
--- src/gdb/h8300-tdep.c 2012/05/18 21:02:47 1.133
|
||||
+++ src/gdb/h8300-tdep.c 2012/08/24 03:57:22 1.134
|
||||
@@ -666,13 +666,15 @@
|
||||
|
||||
for (argument = 0; argument < nargs; argument++)
|
||||
{
|
||||
+ struct cleanup *back_to;
|
||||
struct type *type = value_type (args[argument]);
|
||||
int len = TYPE_LENGTH (type);
|
||||
char *contents = (char *) value_contents (args[argument]);
|
||||
|
||||
/* Pad the argument appropriately. */
|
||||
int padded_len = align_up (len, wordsize);
|
||||
- gdb_byte *padded = alloca (padded_len);
|
||||
+ gdb_byte *padded = xmalloc (padded_len);
|
||||
+ back_to = make_cleanup (xfree, padded);
|
||||
|
||||
memset (padded, 0, padded_len);
|
||||
memcpy (len < wordsize ? padded + padded_len - len : padded,
|
||||
@@ -720,6 +722,8 @@
|
||||
subsequent arguments go on the stack. */
|
||||
reg = E_ARGLAST_REGNUM + 1;
|
||||
}
|
||||
+
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
|
||||
/* Store return address. */
|
||||
--- src/gdb/mt-tdep.c 2012/05/16 14:35:06 1.40
|
||||
+++ src/gdb/mt-tdep.c 2012/08/24 03:57:22 1.41
|
||||
@@ -845,16 +845,20 @@
|
||||
for (j = nargs - 1; j >= i; j--)
|
||||
{
|
||||
gdb_byte *val;
|
||||
+ struct cleanup *back_to;
|
||||
+ const gdb_byte *contents = value_contents (args[j]);
|
||||
|
||||
/* Right-justify the value in an aligned-length buffer. */
|
||||
typelen = TYPE_LENGTH (value_type (args[j]));
|
||||
slacklen = (wordsize - (typelen % wordsize)) % wordsize;
|
||||
- val = alloca (typelen + slacklen);
|
||||
- memcpy (val, value_contents (args[j]), typelen);
|
||||
+ val = xmalloc (typelen + slacklen);
|
||||
+ back_to = make_cleanup (xfree, val);
|
||||
+ memcpy (val, contents, typelen);
|
||||
memset (val + typelen, 0, slacklen);
|
||||
/* Now write this data to the stack. */
|
||||
stack_dest -= typelen + slacklen;
|
||||
write_memory (stack_dest, val, typelen + slacklen);
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
|
||||
/* Finally, if a param needs to be split between registers and stack,
|
||||
--- src/gdb/tilegx-tdep.c 2012/05/30 19:31:44 1.1
|
||||
+++ src/gdb/tilegx-tdep.c 2012/08/24 03:57:22 1.2
|
||||
@@ -343,16 +343,20 @@
|
||||
for (j = nargs - 1; j >= i; j--)
|
||||
{
|
||||
gdb_byte *val;
|
||||
+ struct cleanup *back_to;
|
||||
+ const gdb_byte *contents = value_contents (args[j]);
|
||||
|
||||
typelen = TYPE_LENGTH (value_enclosing_type (args[j]));
|
||||
slacklen = ((typelen + 3) & (~3)) - typelen;
|
||||
- val = alloca (typelen + slacklen);
|
||||
- memcpy (val, value_contents (args[j]), typelen);
|
||||
+ val = xmalloc (typelen + slacklen);
|
||||
+ back_to = make_cleanup (xfree, val);
|
||||
+ memcpy (val, contents, typelen);
|
||||
memset (val + typelen, 0, slacklen);
|
||||
|
||||
/* Now write data to the stack. The stack grows downwards. */
|
||||
stack_dest -= typelen + slacklen;
|
||||
write_memory (stack_dest, val, typelen + slacklen);
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
|
||||
/* Add 2 words for linkage space to the stack. */
|
||||
--- src/gdb/xstormy16-tdep.c 2012/05/16 14:35:08 1.118
|
||||
+++ src/gdb/xstormy16-tdep.c 2012/08/24 03:57:22 1.119
|
||||
@@ -279,16 +279,20 @@
|
||||
for (j = nargs - 1; j >= i; j--)
|
||||
{
|
||||
char *val;
|
||||
+ struct cleanup *back_to;
|
||||
+ const gdb_byte *bytes = value_contents (args[j]);
|
||||
|
||||
typelen = TYPE_LENGTH (value_enclosing_type (args[j]));
|
||||
slacklen = typelen & 1;
|
||||
- val = alloca (typelen + slacklen);
|
||||
- memcpy (val, value_contents (args[j]), typelen);
|
||||
+ val = xmalloc (typelen + slacklen);
|
||||
+ back_to = make_cleanup (xfree, val);
|
||||
+ memcpy (val, bytes, typelen);
|
||||
memset (val + typelen, 0, slacklen);
|
||||
|
||||
/* Now write this data to the stack. The stack grows upwards. */
|
||||
write_memory (stack_dest, val, typelen + slacklen);
|
||||
stack_dest += typelen + slacklen;
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
|
||||
store_unsigned_integer (buf, xstormy16_pc_size, byte_order, bp_addr);
|
@ -1,34 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00065.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/14 00:54:57 1.14656
|
||||
### src/gdb/ChangeLog 2012/09/14 07:00:37 1.14657
|
||||
## -1,3 +1,8 @@
|
||||
+2012-09-14 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * printcmd.c (ui_printf): Eliminate single-use variable
|
||||
+ PARAM_LEN.
|
||||
+
|
||||
2012-09-14 Yao Qi <yao@codesourcery.com>
|
||||
Pedro Alves <palves@redhat.com>
|
||||
|
||||
--- src/gdb/printcmd.c 2012/09/11 21:26:16 1.211
|
||||
+++ src/gdb/printcmd.c 2012/09/14 07:00:42 1.212
|
||||
@@ -2267,7 +2267,6 @@
|
||||
|
||||
/* Parameter data. */
|
||||
struct type *param_type = value_type (val_args[i]);
|
||||
- unsigned int param_len = TYPE_LENGTH (param_type);
|
||||
struct gdbarch *gdbarch = get_type_arch (param_type);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
@@ -2329,8 +2328,8 @@
|
||||
|
||||
/* Conversion between different DFP types. */
|
||||
if (TYPE_CODE (param_type) == TYPE_CODE_DECFLOAT)
|
||||
- decimal_convert (param_ptr, param_len, byte_order,
|
||||
- dec, dfp_len, byte_order);
|
||||
+ decimal_convert (param_ptr, TYPE_LENGTH (param_type),
|
||||
+ byte_order, dec, dfp_len, byte_order);
|
||||
else
|
||||
/* If this is a non-trivial conversion, just output 0.
|
||||
A correct converted value can be displayed by explicitly
|
@ -1,66 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00068.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/14 12:10:21 1.14659
|
||||
### src/gdb/ChangeLog 2012/09/14 12:46:55 1.14660
|
||||
## -1,3 +1,8 @@
|
||||
+2012-09-14 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * valarith.c (value_concat): Replace unsafe ALLOCA with
|
||||
+ XMALLOC/XFREE.
|
||||
+
|
||||
2012-09-14 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* gdb.1 (SEE ALSO): Expand pointer to GDB's Texinfo manual.
|
||||
Index: gdb-7.5.0.20120926/gdb/valarith.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/valarith.c 2012-11-07 22:00:41.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/valarith.c 2012-11-07 22:02:18.661767281 +0100
|
||||
@@ -716,9 +716,12 @@ value_concat (struct value *arg1, struct
|
||||
if (TYPE_CODE (type2) == TYPE_CODE_STRING
|
||||
|| TYPE_CODE (type2) == TYPE_CODE_CHAR)
|
||||
{
|
||||
+ struct cleanup *back_to;
|
||||
+
|
||||
count = longest_to_int (value_as_long (inval1));
|
||||
inval2len = TYPE_LENGTH (type2);
|
||||
- ptr = (char *) alloca (count * inval2len);
|
||||
+ ptr = (char *) xmalloc (count * inval2len);
|
||||
+ back_to = make_cleanup (xfree, ptr);
|
||||
if (TYPE_CODE (type2) == TYPE_CODE_CHAR)
|
||||
{
|
||||
char_type = type2;
|
||||
@@ -741,6 +744,7 @@ value_concat (struct value *arg1, struct
|
||||
}
|
||||
}
|
||||
outval = value_string (ptr, count * inval2len, char_type);
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
else if (TYPE_CODE (type2) == TYPE_CODE_BITSTRING
|
||||
|| TYPE_CODE (type2) == TYPE_CODE_BOOL)
|
||||
@@ -755,6 +759,8 @@ value_concat (struct value *arg1, struct
|
||||
else if (TYPE_CODE (type1) == TYPE_CODE_STRING
|
||||
|| TYPE_CODE (type1) == TYPE_CODE_CHAR)
|
||||
{
|
||||
+ struct cleanup *back_to;
|
||||
+
|
||||
/* We have two character strings to concatenate. */
|
||||
if (TYPE_CODE (type2) != TYPE_CODE_STRING
|
||||
&& TYPE_CODE (type2) != TYPE_CODE_CHAR)
|
||||
@@ -763,7 +769,8 @@ value_concat (struct value *arg1, struct
|
||||
}
|
||||
inval1len = TYPE_LENGTH (type1);
|
||||
inval2len = TYPE_LENGTH (type2);
|
||||
- ptr = (char *) alloca (inval1len + inval2len);
|
||||
+ ptr = (char *) xmalloc (inval1len + inval2len);
|
||||
+ back_to = make_cleanup (xfree, ptr);
|
||||
if (TYPE_CODE (type1) == TYPE_CODE_CHAR)
|
||||
{
|
||||
char_type = type1;
|
||||
@@ -786,6 +793,7 @@ value_concat (struct value *arg1, struct
|
||||
memcpy (ptr + inval1len, value_contents (inval2), inval2len);
|
||||
}
|
||||
outval = value_string (ptr, inval1len + inval2len, char_type);
|
||||
+ do_cleanups (back_to);
|
||||
}
|
||||
else if (TYPE_CODE (type1) == TYPE_CODE_BITSTRING
|
||||
|| TYPE_CODE (type1) == TYPE_CODE_BOOL)
|
@ -1,28 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00082.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/17 07:15:47 1.14664
|
||||
### src/gdb/ChangeLog 2012/09/17 07:26:54 1.14665
|
||||
## -1,3 +1,8 @@
|
||||
+2012-09-17 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * infrun.c (restore_infcall_suspend_state): Eliminate single-use
|
||||
+ variable LEN.
|
||||
+
|
||||
2012-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR 14119
|
||||
--- src/gdb/infrun.c 2012/09/17 07:09:34 1.558
|
||||
+++ src/gdb/infrun.c 2012/09/17 07:26:55 1.559
|
||||
@@ -6777,11 +6777,10 @@
|
||||
if (inf_state->siginfo_gdbarch == gdbarch)
|
||||
{
|
||||
struct type *type = gdbarch_get_siginfo_type (gdbarch);
|
||||
- size_t len = TYPE_LENGTH (type);
|
||||
|
||||
/* Errors ignored. */
|
||||
target_write (¤t_target, TARGET_OBJECT_SIGNAL_INFO, NULL,
|
||||
- inf_state->siginfo_data, 0, len);
|
||||
+ inf_state->siginfo_data, 0, TYPE_LENGTH (type));
|
||||
}
|
||||
|
||||
/* The inferior can be gone if the user types "print exit(0)"
|
@ -1,209 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00084.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/17 08:42:07 1.14666
|
||||
### src/gdb/ChangeLog 2012/09/17 08:52:17 1.14667
|
||||
## -1,3 +1,23 @@
|
||||
+2012-09-17 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * m2-valprint.c (m2_print_array_contents): Eliminate variable
|
||||
+ ELTLEN and use TYPE_LENGTH directly.
|
||||
+ (m2_val_print): Likewise.
|
||||
+ * m68k-tdep.c (m68k_svr4_extract_return_value): Eliminate
|
||||
+ variable LEN and use TYPE_LENGTH directly.
|
||||
+ (m68k_svr4_store_return_value): Likewise.
|
||||
+ * mips-tdep.c (mips_o32_push_dummy_call): Eliminate variable
|
||||
+ ARGLEN and use TYPE_LENGTH directly.
|
||||
+ (mips_o64_push_dummy_call): Likewise.
|
||||
+ * s390-tdep (s390_function_arg_pass_by_reference): Eliminate
|
||||
+ variable LENGTH and use TYPE_LENGTH directly.
|
||||
+ (s390_function_arg_float): Likewise.
|
||||
+ (s390_function_arg_integer): Likewise.
|
||||
+ (s390_push_dummy_call): Likewise.
|
||||
+ (s390_return_value_convention): Likewise.
|
||||
+ * spu-tdep.c (spu_push_dummy_call): Eliminate LEN and use
|
||||
+ TYPE_LENGTH directly.
|
||||
+
|
||||
2012-09-17 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
* cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): New.
|
||||
--- src/gdb/m2-valprint.c 2012/08/16 07:36:20 1.45
|
||||
+++ src/gdb/m2-valprint.c 2012/09/17 08:52:18 1.46
|
||||
@@ -269,16 +269,14 @@
|
||||
const struct value_print_options *options,
|
||||
int len)
|
||||
{
|
||||
- int eltlen;
|
||||
CHECK_TYPEDEF (type);
|
||||
|
||||
if (TYPE_LENGTH (type) > 0)
|
||||
{
|
||||
- eltlen = TYPE_LENGTH (type);
|
||||
if (options->prettyprint_arrays)
|
||||
print_spaces_filtered (2 + 2 * recurse, stream);
|
||||
/* For an array of chars, print with string syntax. */
|
||||
- if (eltlen == 1 &&
|
||||
+ if (TYPE_LENGTH (type) == 1 &&
|
||||
((TYPE_CODE (type) == TYPE_CODE_INT)
|
||||
|| ((current_language->la_language == language_m2)
|
||||
&& (TYPE_CODE (type) == TYPE_CODE_CHAR)))
|
||||
@@ -320,7 +318,6 @@
|
||||
unsigned int i = 0; /* Number of characters printed. */
|
||||
unsigned len;
|
||||
struct type *elttype;
|
||||
- unsigned eltlen;
|
||||
CORE_ADDR addr;
|
||||
|
||||
CHECK_TYPEDEF (type);
|
||||
@@ -330,12 +327,11 @@
|
||||
if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
|
||||
{
|
||||
elttype = check_typedef (TYPE_TARGET_TYPE (type));
|
||||
- eltlen = TYPE_LENGTH (elttype);
|
||||
- len = TYPE_LENGTH (type) / eltlen;
|
||||
+ len = TYPE_LENGTH (type) / TYPE_LENGTH (elttype);
|
||||
if (options->prettyprint_arrays)
|
||||
print_spaces_filtered (2 + 2 * recurse, stream);
|
||||
/* For an array of chars, print with string syntax. */
|
||||
- if (eltlen == 1 &&
|
||||
+ if (TYPE_LENGTH (elttype) == 1 &&
|
||||
((TYPE_CODE (elttype) == TYPE_CODE_INT)
|
||||
|| ((current_language->la_language == language_m2)
|
||||
&& (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
|
||||
--- src/gdb/m68k-tdep.c 2012/07/24 16:37:24 1.159
|
||||
+++ src/gdb/m68k-tdep.c 2012/09/17 08:52:18 1.160
|
||||
@@ -315,7 +315,6 @@
|
||||
m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
|
||||
gdb_byte *valbuf)
|
||||
{
|
||||
- int len = TYPE_LENGTH (type);
|
||||
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
@@ -326,7 +325,7 @@
|
||||
regcache_raw_read (regcache, M68K_FP0_REGNUM, buf);
|
||||
convert_typed_floating (buf, fpreg_type, valbuf, type);
|
||||
}
|
||||
- else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
|
||||
+ else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
|
||||
regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);
|
||||
else
|
||||
m68k_extract_return_value (type, regcache, valbuf);
|
||||
@@ -357,7 +356,6 @@
|
||||
m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
|
||||
const gdb_byte *valbuf)
|
||||
{
|
||||
- int len = TYPE_LENGTH (type);
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
|
||||
@@ -368,7 +366,7 @@
|
||||
convert_typed_floating (valbuf, type, buf, fpreg_type);
|
||||
regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
|
||||
}
|
||||
- else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
|
||||
+ else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
|
||||
{
|
||||
regcache_raw_write (regcache, M68K_A0_REGNUM, valbuf);
|
||||
regcache_raw_write (regcache, M68K_D0_REGNUM, valbuf);
|
||||
--- src/gdb/mips-tdep.c 2012/08/19 22:22:49 1.561
|
||||
+++ src/gdb/mips-tdep.c 2012/09/17 08:52:18 1.562
|
||||
@@ -5174,13 +5174,12 @@
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
struct type *arg_type = check_typedef (value_type (args[argnum]));
|
||||
- int arglen = TYPE_LENGTH (arg_type);
|
||||
|
||||
/* Align to double-word if necessary. */
|
||||
if (mips_type_needs_double_align (arg_type))
|
||||
len = align_up (len, MIPS32_REGSIZE * 2);
|
||||
/* Allocate space on the stack. */
|
||||
- len += align_up (arglen, MIPS32_REGSIZE);
|
||||
+ len += align_up (TYPE_LENGTH (arg_type), MIPS32_REGSIZE);
|
||||
}
|
||||
sp -= align_up (len, 16);
|
||||
|
||||
@@ -5703,10 +5702,9 @@
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
struct type *arg_type = check_typedef (value_type (args[argnum]));
|
||||
- int arglen = TYPE_LENGTH (arg_type);
|
||||
|
||||
/* Allocate space on the stack. */
|
||||
- len += align_up (arglen, MIPS64_REGSIZE);
|
||||
+ len += align_up (TYPE_LENGTH (arg_type), MIPS64_REGSIZE);
|
||||
}
|
||||
sp -= align_up (len, 16);
|
||||
|
||||
--- src/gdb/s390-tdep.c 2012/05/18 21:02:50 1.206
|
||||
+++ src/gdb/s390-tdep.c 2012/09/17 08:52:18 1.207
|
||||
@@ -2489,8 +2489,7 @@
|
||||
static int
|
||||
s390_function_arg_pass_by_reference (struct type *type)
|
||||
{
|
||||
- unsigned length = TYPE_LENGTH (type);
|
||||
- if (length > 8)
|
||||
+ if (TYPE_LENGTH (type) > 8)
|
||||
return 1;
|
||||
|
||||
return (is_struct_like (type) && !is_power_of_two (TYPE_LENGTH (type)))
|
||||
@@ -2503,8 +2502,7 @@
|
||||
static int
|
||||
s390_function_arg_float (struct type *type)
|
||||
{
|
||||
- unsigned length = TYPE_LENGTH (type);
|
||||
- if (length > 8)
|
||||
+ if (TYPE_LENGTH (type) > 8)
|
||||
return 0;
|
||||
|
||||
return is_float_like (type);
|
||||
@@ -2515,13 +2513,12 @@
|
||||
static int
|
||||
s390_function_arg_integer (struct type *type)
|
||||
{
|
||||
- unsigned length = TYPE_LENGTH (type);
|
||||
- if (length > 8)
|
||||
+ if (TYPE_LENGTH (type) > 8)
|
||||
return 0;
|
||||
|
||||
return is_integer_like (type)
|
||||
|| is_pointer_like (type)
|
||||
- || (is_struct_like (type) && is_power_of_two (length));
|
||||
+ || (is_struct_like (type) && is_power_of_two (TYPE_LENGTH (type)));
|
||||
}
|
||||
|
||||
/* Return ARG, a `SIMPLE_ARG', sign-extended or zero-extended to a full
|
||||
@@ -2616,11 +2613,10 @@
|
||||
{
|
||||
struct value *arg = args[i];
|
||||
struct type *type = check_typedef (value_type (arg));
|
||||
- unsigned length = TYPE_LENGTH (type);
|
||||
|
||||
if (s390_function_arg_pass_by_reference (type))
|
||||
{
|
||||
- sp -= length;
|
||||
+ sp -= TYPE_LENGTH (type);
|
||||
sp = align_down (sp, alignment_of (type));
|
||||
copy_addr[i] = sp;
|
||||
}
|
||||
@@ -2799,8 +2795,7 @@
|
||||
static enum return_value_convention
|
||||
s390_return_value_convention (struct gdbarch *gdbarch, struct type *type)
|
||||
{
|
||||
- int length = TYPE_LENGTH (type);
|
||||
- if (length > 8)
|
||||
+ if (TYPE_LENGTH (type) > 8)
|
||||
return RETURN_VALUE_STRUCT_CONVENTION;
|
||||
|
||||
switch (TYPE_CODE (type))
|
||||
--- src/gdb/spu-tdep.c 2012/05/18 21:02:50 1.81
|
||||
+++ src/gdb/spu-tdep.c 2012/09/17 08:52:18 1.82
|
||||
@@ -1373,8 +1373,7 @@
|
||||
struct value *arg = args[i];
|
||||
struct type *type = check_typedef (value_type (arg));
|
||||
const gdb_byte *contents = value_contents (arg);
|
||||
- int len = TYPE_LENGTH (type);
|
||||
- int n_regs = align_up (len, 16) / 16;
|
||||
+ int n_regs = align_up (TYPE_LENGTH (type), 16) / 16;
|
||||
|
||||
/* If the argument doesn't wholly fit into registers, it and
|
||||
all subsequent arguments go to the stack. */
|
@ -1,36 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00132.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/22 13:04:54 1.14691
|
||||
### src/gdb/ChangeLog 2012/09/24 10:25:07 1.14692
|
||||
## -1,3 +1,8 @@
|
||||
+2012-09-24 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST.
|
||||
+ * p-valprint.c (pascal_type_print_base): Likewise.
|
||||
+
|
||||
2012-09-22 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
* remote.c (remote_get_trace_status): Remove setting default
|
||||
--- src/gdb/m2-typeprint.c 2012/04/18 06:46:46 1.30
|
||||
+++ src/gdb/m2-typeprint.c 2012/09/24 10:25:09 1.31
|
||||
@@ -587,7 +587,8 @@
|
||||
void
|
||||
m2_enum (struct type *type, struct ui_file *stream, int show, int level)
|
||||
{
|
||||
- int lastval, i, len;
|
||||
+ LONGEST lastval;
|
||||
+ int i, len;
|
||||
|
||||
if (show < 0)
|
||||
{
|
||||
--- src/gdb/p-typeprint.c 2012/08/16 07:36:20 1.47
|
||||
+++ src/gdb/p-typeprint.c 2012/09/24 10:25:09 1.48
|
||||
@@ -440,7 +440,7 @@
|
||||
{
|
||||
int i;
|
||||
int len;
|
||||
- int lastval;
|
||||
+ LONGEST lastval;
|
||||
enum
|
||||
{
|
||||
s_none, s_public, s_private, s_protected
|
@ -1,27 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00138.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/24 10:25:07 1.14692
|
||||
### src/gdb/ChangeLog 2012/09/25 12:20:35 1.14693
|
||||
## -1,3 +1,8 @@
|
||||
+2012-09-25 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * c-typeprint.c (c_type_print_varspec_suffix): Remove cast and
|
||||
+ use plongest to print the array size.
|
||||
+
|
||||
2012-09-24 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
|
||||
* m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST.
|
||||
Index: gdb-7.5.0.20120926/gdb/c-typeprint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/c-typeprint.c 2012-11-07 22:00:40.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/c-typeprint.c 2012-11-07 22:03:39.269650157 +0100
|
||||
@@ -631,7 +631,8 @@ c_type_print_varspec_suffix (struct type
|
||||
fprintf_filtered (stream, "variable");
|
||||
}
|
||||
else if (get_array_bounds (type, &low_bound, &high_bound))
|
||||
- fprintf_filtered (stream, "%d", (int) (high_bound - low_bound + 1));
|
||||
+ fprintf_filtered (stream, "%s",
|
||||
+ plongest (high_bound - low_bound + 1));
|
||||
fprintf_filtered (stream, "]");
|
||||
|
||||
c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream,
|
@ -1,729 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00142.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/25 12:38:55 1.14696
|
||||
### src/gdb/ChangeLog 2012/09/25 12:48:52 1.14697
|
||||
## -1,3 +1,36 @@
|
||||
+2012-09-25 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * ada-valprint.c (ada_val_print_1): Eliminate single-use
|
||||
+ variable LEN.
|
||||
+ * alpha-tdep.c (alpha_extract_return_value): Use TYPE_LENGTH
|
||||
+ directly.
|
||||
+ (alpha_store_return_value): Likewise.
|
||||
+ * amd64-tdep.c (amd64_classify_aggregate): Likewise.
|
||||
+ (amd64_push_arguments): Likewise.
|
||||
+ * ax-gdb.c (gen_trace_static_fields): Likewise.
|
||||
+ (gen_traced_pop): Likewise.
|
||||
+ * bfin-tdep.c (bfin_push_dummy_call): Likewise.
|
||||
+ * breakpoint.c (update_watchpoint): Likewise.
|
||||
+ * findcmd.c (parse_find_args): Use local variable for type
|
||||
+ instead of length.
|
||||
+ * findvar.c (default_read_var_value): Use TYPE_LENGTH directly.
|
||||
+ * h8300-tdep.c (h8300h_extract_return_value): Likewise.
|
||||
+ (h8300_store_return_value): Likewise.
|
||||
+ * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
|
||||
+ Use i386_darwin_arg_type_alignment directly.
|
||||
+ * infcall.c (call_function_by_hand): Use TYPE_LENGTH directly.
|
||||
+ * lm32-tdep.c (lm32_push_dummy_call): Likewise.
|
||||
+ * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
|
||||
+ (m68hc11_extract_return_value): Likewise.
|
||||
+ * mep-tdep.c (mep_push_dummy_call): Likewise.
|
||||
+ * printcmd.c (float_type_from_length): Likewise.
|
||||
+ * s390-tdep.c (s390_value_from_register): Likewise.
|
||||
+ * stack.c (read_frame_arg): Likewise.
|
||||
+ * tracepoint.c (encode_actions_1): Likewise.
|
||||
+ * valops.c (value_fetch_lazy): Use local variable for type
|
||||
+ instead of length. Use TYPE_LENGTH directly.
|
||||
+ * value.c (value_contents_equal): Use TYPE_LENGTH directly.
|
||||
+
|
||||
2012-09-25 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* symtab.c (skip_prologue_sal): Fix typo in comment.
|
||||
Index: gdb-7.5.0.20120926/gdb/ada-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/ada-valprint.c 2012-04-18 08:46:46.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/ada-valprint.c 2012-11-07 22:03:57.600623522 +0100
|
||||
@@ -730,9 +730,8 @@ ada_val_print_1 (struct type *type, cons
|
||||
if (ada_is_fixed_point_type (type))
|
||||
{
|
||||
LONGEST v = unpack_long (type, valaddr + offset_aligned);
|
||||
- int len = TYPE_LENGTH (type);
|
||||
|
||||
- fprintf_filtered (stream, len < 4 ? "%.11g" : "%.17g",
|
||||
+ fprintf_filtered (stream, TYPE_LENGTH (type) < 4 ? "%.11g" : "%.17g",
|
||||
(double) ada_fixed_to_float (type, v));
|
||||
return;
|
||||
}
|
||||
Index: gdb-7.5.0.20120926/gdb/alpha-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/alpha-tdep.c 2012-05-16 16:35:02.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/alpha-tdep.c 2012-11-07 22:03:57.602623520 +0100
|
||||
@@ -475,14 +475,13 @@ alpha_extract_return_value (struct type
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
- int length = TYPE_LENGTH (valtype);
|
||||
gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
|
||||
ULONGEST l;
|
||||
|
||||
switch (TYPE_CODE (valtype))
|
||||
{
|
||||
case TYPE_CODE_FLT:
|
||||
- switch (length)
|
||||
+ switch (TYPE_LENGTH (valtype))
|
||||
{
|
||||
case 4:
|
||||
regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, raw_buffer);
|
||||
@@ -505,7 +504,7 @@ alpha_extract_return_value (struct type
|
||||
break;
|
||||
|
||||
case TYPE_CODE_COMPLEX:
|
||||
- switch (length)
|
||||
+ switch (TYPE_LENGTH (valtype))
|
||||
{
|
||||
case 8:
|
||||
/* ??? This isn't correct wrt the ABI, but it's what GCC does. */
|
||||
@@ -531,7 +530,7 @@ alpha_extract_return_value (struct type
|
||||
default:
|
||||
/* Assume everything else degenerates to an integer. */
|
||||
regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &l);
|
||||
- store_unsigned_integer (valbuf, length, byte_order, l);
|
||||
+ store_unsigned_integer (valbuf, TYPE_LENGTH (valtype), byte_order, l);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -544,14 +543,13 @@ alpha_store_return_value (struct type *v
|
||||
const gdb_byte *valbuf)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
- int length = TYPE_LENGTH (valtype);
|
||||
gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
|
||||
ULONGEST l;
|
||||
|
||||
switch (TYPE_CODE (valtype))
|
||||
{
|
||||
case TYPE_CODE_FLT:
|
||||
- switch (length)
|
||||
+ switch (TYPE_LENGTH (valtype))
|
||||
{
|
||||
case 4:
|
||||
alpha_lds (gdbarch, raw_buffer, valbuf);
|
||||
@@ -575,7 +573,7 @@ alpha_store_return_value (struct type *v
|
||||
break;
|
||||
|
||||
case TYPE_CODE_COMPLEX:
|
||||
- switch (length)
|
||||
+ switch (TYPE_LENGTH (valtype))
|
||||
{
|
||||
case 8:
|
||||
/* ??? This isn't correct wrt the ABI, but it's what GCC does. */
|
||||
@@ -603,7 +601,7 @@ alpha_store_return_value (struct type *v
|
||||
/* Assume everything else degenerates to an integer. */
|
||||
/* 32-bit values must be sign-extended to 64 bits
|
||||
even if the base data type is unsigned. */
|
||||
- if (length == 4)
|
||||
+ if (TYPE_LENGTH (valtype) == 4)
|
||||
valtype = builtin_type (gdbarch)->builtin_int32;
|
||||
l = unpack_long (valtype, valbuf);
|
||||
regcache_cooked_write_unsigned (regcache, ALPHA_V0_REGNUM, l);
|
||||
Index: gdb-7.5.0.20120926/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/amd64-tdep.c 2012-11-07 22:00:42.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/amd64-tdep.c 2012-11-07 22:03:57.623623489 +0100
|
||||
@@ -446,12 +446,10 @@ amd64_non_pod_p (struct type *type)
|
||||
static void
|
||||
amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
|
||||
{
|
||||
- int len = TYPE_LENGTH (type);
|
||||
-
|
||||
/* 1. If the size of an object is larger than two eightbytes, or in
|
||||
C++, is a non-POD structure or union type, or contains
|
||||
unaligned fields, it has class memory. */
|
||||
- if (len > 16 || amd64_non_pod_p (type))
|
||||
+ if (TYPE_LENGTH (type) > 16 || amd64_non_pod_p (type))
|
||||
{
|
||||
class[0] = class[1] = AMD64_MEMORY;
|
||||
return;
|
||||
@@ -471,7 +469,7 @@ amd64_classify_aggregate (struct type *t
|
||||
|
||||
/* All fields in an array have the same type. */
|
||||
amd64_classify (subtype, class);
|
||||
- if (len > 8 && class[1] == AMD64_NO_CLASS)
|
||||
+ if (TYPE_LENGTH (type) > 8 && class[1] == AMD64_NO_CLASS)
|
||||
class[1] = class[0];
|
||||
}
|
||||
else
|
||||
@@ -839,10 +837,9 @@ amd64_push_arguments (struct regcache *r
|
||||
{
|
||||
struct type *type = value_type (stack_args[i]);
|
||||
const gdb_byte *valbuf = value_contents (stack_args[i]);
|
||||
- int len = TYPE_LENGTH (type);
|
||||
CORE_ADDR arg_addr = sp + element * 8;
|
||||
|
||||
- write_memory (arg_addr, valbuf, len);
|
||||
+ write_memory (arg_addr, valbuf, TYPE_LENGTH (type));
|
||||
if (arg_addr_regno[i] >= 0)
|
||||
{
|
||||
/* We also need to store the address of that argument in
|
||||
@@ -853,7 +850,7 @@ amd64_push_arguments (struct regcache *r
|
||||
store_unsigned_integer (buf, 8, byte_order, arg_addr);
|
||||
regcache_cooked_write (regcache, arg_addr_regno[i], buf);
|
||||
}
|
||||
- element += ((len + 7) / 8);
|
||||
+ element += ((TYPE_LENGTH (type) + 7) / 8);
|
||||
}
|
||||
|
||||
/* The psABI says that "For calls that may call functions that use
|
||||
Index: gdb-7.5.0.20120926/gdb/ax-gdb.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/ax-gdb.c 2012-07-05 03:03:01.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/ax-gdb.c 2012-11-07 22:03:57.626623484 +0100
|
||||
@@ -367,9 +367,9 @@ gen_trace_static_fields (struct gdbarch
|
||||
{
|
||||
case axs_lvalue_memory:
|
||||
{
|
||||
- int length = TYPE_LENGTH (check_typedef (value.type));
|
||||
-
|
||||
- ax_const_l (ax, length);
|
||||
+ /* Initialize the TYPE_LENGTH if it is a typedef. */
|
||||
+ check_typedef (value.type);
|
||||
+ ax_const_l (ax, TYPE_LENGTH (value.type));
|
||||
ax_simple (ax, aop_trace);
|
||||
}
|
||||
break;
|
||||
@@ -425,17 +425,18 @@ gen_traced_pop (struct gdbarch *gdbarch,
|
||||
|
||||
case axs_lvalue_memory:
|
||||
{
|
||||
- int length = TYPE_LENGTH (check_typedef (value->type));
|
||||
-
|
||||
if (string_trace)
|
||||
ax_simple (ax, aop_dup);
|
||||
|
||||
+ /* Initialize the TYPE_LENGTH if it is a typedef. */
|
||||
+ check_typedef (value->type);
|
||||
+
|
||||
/* There's no point in trying to use a trace_quick bytecode
|
||||
here, since "trace_quick SIZE pop" is three bytes, whereas
|
||||
"const8 SIZE trace" is also three bytes, does the same
|
||||
thing, and the simplest code which generates that will also
|
||||
work correctly for objects with large sizes. */
|
||||
- ax_const_l (ax, length);
|
||||
+ ax_const_l (ax, TYPE_LENGTH (value->type));
|
||||
ax_simple (ax, aop_trace);
|
||||
|
||||
if (string_trace)
|
||||
Index: gdb-7.5.0.20120926/gdb/bfin-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/bfin-tdep.c 2012-05-16 16:35:03.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/bfin-tdep.c 2012-11-07 22:03:57.643623460 +0100
|
||||
@@ -513,9 +513,8 @@ bfin_push_dummy_call (struct gdbarch *gd
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
{
|
||||
struct type *value_type = value_enclosing_type (args[i]);
|
||||
- int len = TYPE_LENGTH (value_type);
|
||||
|
||||
- total_len += (len + 3) & ~3;
|
||||
+ total_len += (TYPE_LENGTH (value_type) + 3) & ~3;
|
||||
}
|
||||
|
||||
/* At least twelve bytes of stack space must be allocated for the function's
|
||||
@@ -531,8 +530,7 @@ bfin_push_dummy_call (struct gdbarch *gd
|
||||
{
|
||||
struct type *value_type = value_enclosing_type (args[i]);
|
||||
struct type *arg_type = check_typedef (value_type);
|
||||
- int len = TYPE_LENGTH (value_type);
|
||||
- int container_len = (len + 3) & ~3;
|
||||
+ int container_len = (TYPE_LENGTH (value_type) + 3) & ~3;
|
||||
|
||||
sp -= container_len;
|
||||
write_memory (sp, value_contents_writeable (args[i]), container_len);
|
||||
Index: gdb-7.5.0.20120926/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/breakpoint.c 2012-11-07 22:00:43.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/breakpoint.c 2012-11-07 22:03:57.660623434 +0100
|
||||
@@ -1844,11 +1844,10 @@ update_watchpoint (struct watchpoint *b,
|
||||
&& TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
- int len, type;
|
||||
+ int type;
|
||||
struct bp_location *loc, **tmp;
|
||||
|
||||
addr = value_address (v);
|
||||
- len = TYPE_LENGTH (value_type (v));
|
||||
type = hw_write;
|
||||
if (b->base.type == bp_read_watchpoint)
|
||||
type = hw_read;
|
||||
@@ -1863,7 +1862,7 @@ update_watchpoint (struct watchpoint *b,
|
||||
|
||||
loc->pspace = frame_pspace;
|
||||
loc->address = addr;
|
||||
- loc->length = len;
|
||||
+ loc->length = TYPE_LENGTH (value_type (v));
|
||||
loc->watchpoint_type = type;
|
||||
}
|
||||
}
|
||||
Index: gdb-7.5.0.20120926/gdb/findcmd.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/findcmd.c 2012-07-06 17:51:39.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/findcmd.c 2012-11-07 22:03:57.676623411 +0100
|
||||
@@ -169,19 +169,19 @@ parse_find_args (char *args, ULONGEST *m
|
||||
while (*s != '\0')
|
||||
{
|
||||
LONGEST x;
|
||||
- int val_bytes;
|
||||
+ struct type *t;
|
||||
ULONGEST pattern_buf_size_need;
|
||||
|
||||
while (isspace (*s))
|
||||
++s;
|
||||
|
||||
v = parse_to_comma_and_eval (&s);
|
||||
- val_bytes = TYPE_LENGTH (value_type (v));
|
||||
+ t = value_type (v);
|
||||
|
||||
/* Keep it simple and assume size == 'g' when watching for when we
|
||||
need to grow the pattern buf. */
|
||||
pattern_buf_size_need = (pattern_buf_end - pattern_buf
|
||||
- + max (val_bytes, sizeof (int64_t)));
|
||||
+ + max (TYPE_LENGTH (t), sizeof (int64_t)));
|
||||
if (pattern_buf_size_need > pattern_buf_size)
|
||||
{
|
||||
size_t current_offset = pattern_buf_end - pattern_buf;
|
||||
@@ -215,8 +215,8 @@ parse_find_args (char *args, ULONGEST *m
|
||||
}
|
||||
else
|
||||
{
|
||||
- memcpy (pattern_buf_end, value_contents (v), val_bytes);
|
||||
- pattern_buf_end += val_bytes;
|
||||
+ memcpy (pattern_buf_end, value_contents (v), TYPE_LENGTH (t));
|
||||
+ pattern_buf_end += TYPE_LENGTH (t);
|
||||
}
|
||||
|
||||
if (*s == ',')
|
||||
Index: gdb-7.5.0.20120926/gdb/h8300-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/h8300-tdep.c 2012-11-07 22:00:44.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/h8300-tdep.c 2012-11-07 22:03:57.679623409 +0100
|
||||
@@ -785,16 +785,15 @@ h8300h_extract_return_value (struct type
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
- int len = TYPE_LENGTH (type);
|
||||
ULONGEST c;
|
||||
|
||||
- switch (len)
|
||||
+ switch (TYPE_LENGTH (type))
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
|
||||
- store_unsigned_integer (valbuf, len, byte_order, c);
|
||||
+ store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c);
|
||||
break;
|
||||
case 8: /* long long is now 8 bytes. */
|
||||
if (TYPE_CODE (type) == TYPE_CODE_INT)
|
||||
@@ -852,18 +851,17 @@ h8300_store_return_value (struct type *t
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
- int len = TYPE_LENGTH (type);
|
||||
ULONGEST val;
|
||||
|
||||
- switch (len)
|
||||
+ switch (TYPE_LENGTH (type))
|
||||
{
|
||||
case 1:
|
||||
case 2: /* short... */
|
||||
- val = extract_unsigned_integer (valbuf, len, byte_order);
|
||||
+ val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
|
||||
break;
|
||||
case 4: /* long, float */
|
||||
- val = extract_unsigned_integer (valbuf, len, byte_order);
|
||||
+ val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM,
|
||||
(val >> 16) & 0xffff);
|
||||
regcache_cooked_write_unsigned (regcache, E_RET1_REGNUM, val & 0xffff);
|
||||
@@ -882,19 +880,18 @@ h8300h_store_return_value (struct type *
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
- int len = TYPE_LENGTH (type);
|
||||
ULONGEST val;
|
||||
|
||||
- switch (len)
|
||||
+ switch (TYPE_LENGTH (type))
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 4: /* long, float */
|
||||
- val = extract_unsigned_integer (valbuf, len, byte_order);
|
||||
+ val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
|
||||
break;
|
||||
case 8:
|
||||
- val = extract_unsigned_integer (valbuf, len, byte_order);
|
||||
+ val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM,
|
||||
(val >> 32) & 0xffffffff);
|
||||
regcache_cooked_write_unsigned (regcache, E_RET1_REGNUM,
|
||||
Index: gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/i386-darwin-tdep.c 2012-04-02 15:15:48.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c 2012-11-07 22:03:57.680623407 +0100
|
||||
@@ -196,13 +196,12 @@ i386_darwin_push_dummy_call (struct gdba
|
||||
}
|
||||
else
|
||||
{
|
||||
- int len = TYPE_LENGTH (arg_type);
|
||||
- int align = i386_darwin_arg_type_alignment (arg_type);
|
||||
-
|
||||
- args_space = align_up (args_space, align);
|
||||
+ args_space = align_up (args_space,
|
||||
+ i386_darwin_arg_type_alignment (arg_type));
|
||||
if (write_pass)
|
||||
write_memory (sp + args_space,
|
||||
- value_contents_all (args[i]), len);
|
||||
+ value_contents_all (args[i]),
|
||||
+ TYPE_LENGTH (arg_type));
|
||||
|
||||
/* The System V ABI says that:
|
||||
|
||||
@@ -211,7 +210,7 @@ i386_darwin_push_dummy_call (struct gdba
|
||||
depending on the size of the argument."
|
||||
|
||||
This makes sure the stack stays word-aligned. */
|
||||
- args_space += align_up (len, 4);
|
||||
+ args_space += align_up (TYPE_LENGTH (arg_type), 4);
|
||||
}
|
||||
}
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/infcall.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/infcall.c 2012-07-31 09:34:39.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/infcall.c 2012-11-07 22:03:57.694623385 +0100
|
||||
@@ -709,13 +709,11 @@ call_function_by_hand (struct value *fun
|
||||
|
||||
if (struct_return || hidden_first_param_p)
|
||||
{
|
||||
- int len = TYPE_LENGTH (values_type);
|
||||
-
|
||||
if (gdbarch_inner_than (gdbarch, 1, 2))
|
||||
{
|
||||
/* Stack grows downward. Align STRUCT_ADDR and SP after
|
||||
making space for the return value. */
|
||||
- sp -= len;
|
||||
+ sp -= TYPE_LENGTH (values_type);
|
||||
if (gdbarch_frame_align_p (gdbarch))
|
||||
sp = gdbarch_frame_align (gdbarch, sp);
|
||||
struct_addr = sp;
|
||||
@@ -727,7 +725,7 @@ call_function_by_hand (struct value *fun
|
||||
if (gdbarch_frame_align_p (gdbarch))
|
||||
sp = gdbarch_frame_align (gdbarch, sp);
|
||||
struct_addr = sp;
|
||||
- sp += len;
|
||||
+ sp += TYPE_LENGTH (values_type);
|
||||
if (gdbarch_frame_align_p (gdbarch))
|
||||
sp = gdbarch_frame_align (gdbarch, sp);
|
||||
}
|
||||
Index: gdb-7.5.0.20120926/gdb/lm32-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/lm32-tdep.c 2012-05-18 23:02:48.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/lm32-tdep.c 2012-11-07 22:03:57.695623384 +0100
|
||||
@@ -261,7 +261,6 @@ lm32_push_dummy_call (struct gdbarch *gd
|
||||
struct value *arg = args[i];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
gdb_byte *contents;
|
||||
- int len;
|
||||
ULONGEST val;
|
||||
|
||||
/* Promote small integer types to int. */
|
||||
@@ -283,8 +282,8 @@ lm32_push_dummy_call (struct gdbarch *gd
|
||||
/* FIXME: Handle structures. */
|
||||
|
||||
contents = (gdb_byte *) value_contents (arg);
|
||||
- len = TYPE_LENGTH (arg_type);
|
||||
- val = extract_unsigned_integer (contents, len, byte_order);
|
||||
+ val = extract_unsigned_integer (contents, TYPE_LENGTH (arg_type),
|
||||
+ byte_order);
|
||||
|
||||
/* First num_arg_regs parameters are passed by registers,
|
||||
and the rest are passed on the stack. */
|
||||
@@ -292,7 +291,7 @@ lm32_push_dummy_call (struct gdbarch *gd
|
||||
regcache_cooked_write_unsigned (regcache, first_arg_reg + i, val);
|
||||
else
|
||||
{
|
||||
- write_memory (sp, (void *) &val, len);
|
||||
+ write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type));
|
||||
sp -= 4;
|
||||
}
|
||||
}
|
||||
Index: gdb-7.5.0.20120926/gdb/m68hc11-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/m68hc11-tdep.c 2012-05-16 16:35:06.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/m68hc11-tdep.c 2012-11-07 22:03:57.724623347 +0100
|
||||
@@ -1174,7 +1174,6 @@ m68hc11_push_dummy_call (struct gdbarch
|
||||
int first_stack_argnum;
|
||||
struct type *type;
|
||||
char *val;
|
||||
- int len;
|
||||
char buf[2];
|
||||
|
||||
first_stack_argnum = 0;
|
||||
@@ -1185,19 +1184,18 @@ m68hc11_push_dummy_call (struct gdbarch
|
||||
else if (nargs > 0)
|
||||
{
|
||||
type = value_type (args[0]);
|
||||
- len = TYPE_LENGTH (type);
|
||||
|
||||
/* First argument is passed in D and X registers. */
|
||||
- if (len <= 4)
|
||||
+ if (TYPE_LENGTH (type) <= 4)
|
||||
{
|
||||
ULONGEST v;
|
||||
|
||||
v = extract_unsigned_integer (value_contents (args[0]),
|
||||
- len, byte_order);
|
||||
+ TYPE_LENGTH (type), byte_order);
|
||||
first_stack_argnum = 1;
|
||||
|
||||
regcache_cooked_write_unsigned (regcache, HARD_D_REGNUM, v);
|
||||
- if (len > 2)
|
||||
+ if (TYPE_LENGTH (type) > 2)
|
||||
{
|
||||
v >>= 16;
|
||||
regcache_cooked_write_unsigned (regcache, HARD_X_REGNUM, v);
|
||||
@@ -1208,9 +1206,8 @@ m68hc11_push_dummy_call (struct gdbarch
|
||||
for (argnum = nargs - 1; argnum >= first_stack_argnum; argnum--)
|
||||
{
|
||||
type = value_type (args[argnum]);
|
||||
- len = TYPE_LENGTH (type);
|
||||
|
||||
- if (len & 1)
|
||||
+ if (TYPE_LENGTH (type) & 1)
|
||||
{
|
||||
static char zero = 0;
|
||||
|
||||
@@ -1218,8 +1215,8 @@ m68hc11_push_dummy_call (struct gdbarch
|
||||
write_memory (sp, &zero, 1);
|
||||
}
|
||||
val = (char*) value_contents (args[argnum]);
|
||||
- sp -= len;
|
||||
- write_memory (sp, val, len);
|
||||
+ sp -= TYPE_LENGTH (type);
|
||||
+ write_memory (sp, val, TYPE_LENGTH (type));
|
||||
}
|
||||
|
||||
/* Store return address. */
|
||||
@@ -1291,11 +1288,10 @@ static void
|
||||
m68hc11_extract_return_value (struct type *type, struct regcache *regcache,
|
||||
void *valbuf)
|
||||
{
|
||||
- int len = TYPE_LENGTH (type);
|
||||
char buf[M68HC11_REG_SIZE];
|
||||
|
||||
regcache_raw_read (regcache, HARD_D_REGNUM, buf);
|
||||
- switch (len)
|
||||
+ switch (TYPE_LENGTH (type))
|
||||
{
|
||||
case 1:
|
||||
memcpy (valbuf, buf + 1, 1);
|
||||
Index: gdb-7.5.0.20120926/gdb/mep-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/mep-tdep.c 2012-05-16 16:35:06.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/mep-tdep.c 2012-11-07 22:03:57.727623334 +0100
|
||||
@@ -2337,11 +2337,10 @@ mep_push_dummy_call (struct gdbarch *gdb
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
- unsigned arg_size = TYPE_LENGTH (value_type (argv[i]));
|
||||
ULONGEST value;
|
||||
|
||||
/* Arguments that fit in a GPR get expanded to fill the GPR. */
|
||||
- if (arg_size <= MEP_GPR_SIZE)
|
||||
+ if (TYPE_LENGTH (value_type (argv[i])) <= MEP_GPR_SIZE)
|
||||
value = extract_unsigned_integer (value_contents (argv[i]),
|
||||
TYPE_LENGTH (value_type (argv[i])),
|
||||
byte_order);
|
||||
Index: gdb-7.5.0.20120926/gdb/printcmd.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/printcmd.c 2012-11-07 22:00:44.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/printcmd.c 2012-11-07 22:03:57.730623334 +0100
|
||||
@@ -347,13 +347,12 @@ float_type_from_length (struct type *typ
|
||||
{
|
||||
struct gdbarch *gdbarch = get_type_arch (type);
|
||||
const struct builtin_type *builtin = builtin_type (gdbarch);
|
||||
- unsigned int len = TYPE_LENGTH (type);
|
||||
|
||||
- if (len == TYPE_LENGTH (builtin->builtin_float))
|
||||
+ if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_float))
|
||||
type = builtin->builtin_float;
|
||||
- else if (len == TYPE_LENGTH (builtin->builtin_double))
|
||||
+ else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_double))
|
||||
type = builtin->builtin_double;
|
||||
- else if (len == TYPE_LENGTH (builtin->builtin_long_double))
|
||||
+ else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_long_double))
|
||||
type = builtin->builtin_long_double;
|
||||
|
||||
return type;
|
||||
Index: gdb-7.5.0.20120926/gdb/s390-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/s390-tdep.c 2012-11-07 22:02:30.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/s390-tdep.c 2012-11-07 22:03:57.733623329 +0100
|
||||
@@ -376,9 +376,11 @@ s390_value_from_register (struct type *t
|
||||
struct frame_info *frame)
|
||||
{
|
||||
struct value *value = default_value_from_register (type, regnum, frame);
|
||||
- int len = TYPE_LENGTH (check_typedef (type));
|
||||
|
||||
- if (regnum >= S390_F0_REGNUM && regnum <= S390_F15_REGNUM && len < 8)
|
||||
+ check_typedef (type);
|
||||
+
|
||||
+ if (regnum >= S390_F0_REGNUM && regnum <= S390_F15_REGNUM
|
||||
+ && TYPE_LENGTH (type) < 8)
|
||||
set_value_offset (value, 0);
|
||||
|
||||
return value;
|
||||
Index: gdb-7.5.0.20120926/gdb/stack.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/stack.c 2012-11-07 22:00:43.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/stack.c 2012-11-07 22:03:57.737623322 +0100
|
||||
@@ -354,14 +354,15 @@ read_frame_arg (struct symbol *sym, stru
|
||||
|
||||
if (val && entryval && !ui_out_is_mi_like_p (current_uiout))
|
||||
{
|
||||
- unsigned len = TYPE_LENGTH (value_type (val));
|
||||
+ struct type *type = value_type (val);
|
||||
|
||||
if (!value_optimized_out (val) && value_lazy (val))
|
||||
value_fetch_lazy (val);
|
||||
if (!value_optimized_out (val) && value_lazy (entryval))
|
||||
value_fetch_lazy (entryval);
|
||||
if (!value_optimized_out (val)
|
||||
- && value_available_contents_eq (val, 0, entryval, 0, len))
|
||||
+ && value_available_contents_eq (val, 0, entryval, 0,
|
||||
+ TYPE_LENGTH (type)))
|
||||
{
|
||||
/* Initialize it just to avoid a GCC false warning. */
|
||||
struct value *val_deref = NULL, *entryval_deref;
|
||||
@@ -373,12 +374,12 @@ read_frame_arg (struct symbol *sym, stru
|
||||
|
||||
TRY_CATCH (except, RETURN_MASK_ERROR)
|
||||
{
|
||||
- unsigned len_deref;
|
||||
+ struct type *type_deref;
|
||||
|
||||
val_deref = coerce_ref (val);
|
||||
if (value_lazy (val_deref))
|
||||
value_fetch_lazy (val_deref);
|
||||
- len_deref = TYPE_LENGTH (value_type (val_deref));
|
||||
+ type_deref = value_type (val_deref);
|
||||
|
||||
entryval_deref = coerce_ref (entryval);
|
||||
if (value_lazy (entryval_deref))
|
||||
@@ -389,7 +390,7 @@ read_frame_arg (struct symbol *sym, stru
|
||||
if (val != val_deref
|
||||
&& value_available_contents_eq (val_deref, 0,
|
||||
entryval_deref, 0,
|
||||
- len_deref))
|
||||
+ TYPE_LENGTH (type_deref)))
|
||||
val_equal = 1;
|
||||
}
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/tracepoint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/tracepoint.c 2012-06-30 00:46:46.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/tracepoint.c 2012-11-07 22:03:57.741623318 +0100
|
||||
@@ -1450,7 +1450,7 @@ encode_actions_1 (struct command_line *a
|
||||
}
|
||||
else
|
||||
{
|
||||
- unsigned long addr, len;
|
||||
+ unsigned long addr;
|
||||
struct cleanup *old_chain = NULL;
|
||||
struct cleanup *old_chain1 = NULL;
|
||||
|
||||
@@ -1480,8 +1480,10 @@ encode_actions_1 (struct command_line *a
|
||||
/* Safe because we know it's a simple expression. */
|
||||
tempval = evaluate_expression (exp);
|
||||
addr = value_address (tempval);
|
||||
- len = TYPE_LENGTH (check_typedef (exp->elts[1].type));
|
||||
- add_memrange (collect, memrange_absolute, addr, len);
|
||||
+ /* Initialize the TYPE_LENGTH if it is a typedef. */
|
||||
+ check_typedef (exp->elts[1].type);
|
||||
+ add_memrange (collect, memrange_absolute, addr,
|
||||
+ TYPE_LENGTH (exp->elts[1].type));
|
||||
break;
|
||||
|
||||
case OP_VAR_VALUE:
|
||||
Index: gdb-7.5.0.20120926/gdb/valops.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/valops.c 2012-11-07 22:00:44.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/valops.c 2012-11-07 22:06:35.899393539 +0100
|
||||
@@ -1055,7 +1055,6 @@ value_fetch_lazy (struct value *val)
|
||||
struct value *parent = value_parent (val);
|
||||
LONGEST offset = value_offset (val);
|
||||
LONGEST num;
|
||||
- int length = TYPE_LENGTH (type);
|
||||
|
||||
if (!value_bits_valid (val,
|
||||
TARGET_CHAR_BIT * offset + value_bitpos (val),
|
||||
@@ -1069,9 +1068,9 @@ value_fetch_lazy (struct value *val)
|
||||
value_bitsize (val), parent, &num))
|
||||
mark_value_bytes_unavailable (val,
|
||||
value_embedded_offset (val),
|
||||
- length);
|
||||
+ TYPE_LENGTH (type));
|
||||
else
|
||||
- store_signed_integer (value_contents_raw (val), length,
|
||||
+ store_signed_integer (value_contents_raw (val), TYPE_LENGTH (type),
|
||||
byte_order, num);
|
||||
}
|
||||
else if (VALUE_LVAL (val) == lval_memory)
|
||||
@@ -1080,16 +1079,16 @@ value_fetch_lazy (struct value *val)
|
||||
|
||||
if (object_address_get_data (value_type (val), &addr))
|
||||
{
|
||||
- struct type *type = value_enclosing_type (val);
|
||||
- int length = TYPE_LENGTH (check_typedef (type));
|
||||
+ struct type *type = check_typedef (value_enclosing_type (val));
|
||||
|
||||
- if (length)
|
||||
+ if (TYPE_LENGTH (type))
|
||||
{
|
||||
/* Delay it after object_address_get_data above. */
|
||||
allocate_value_contents (val);
|
||||
addr += value_offset (val);
|
||||
read_value_memory (val, 0, value_stack (val),
|
||||
- addr, value_contents_all_raw (val), length);
|
||||
+ addr, value_contents_all_raw (val),
|
||||
+ TYPE_LENGTH (type));
|
||||
}
|
||||
}
|
||||
/* Just to be sure it has been called. */
|
||||
Index: gdb-7.5.0.20120926/gdb/value.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/value.c 2012-11-07 22:00:43.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/value.c 2012-11-07 22:03:57.751623303 +0100
|
||||
@@ -1034,15 +1034,14 @@ value_contents_equal (struct value *val1
|
||||
{
|
||||
struct type *type1;
|
||||
struct type *type2;
|
||||
- int len;
|
||||
|
||||
type1 = check_typedef (value_type (val1));
|
||||
type2 = check_typedef (value_type (val2));
|
||||
- len = TYPE_LENGTH (type1);
|
||||
- if (len != TYPE_LENGTH (type2))
|
||||
+ if (TYPE_LENGTH (type1) != TYPE_LENGTH (type2))
|
||||
return 0;
|
||||
|
||||
- return (memcmp (value_contents (val1), value_contents (val2), len) == 0);
|
||||
+ return (memcmp (value_contents (val1), value_contents (val2),
|
||||
+ TYPE_LENGTH (type1)) == 0);
|
||||
}
|
||||
|
||||
int
|
@ -1,45 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00145.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/25 12:48:52 1.14697
|
||||
### src/gdb/ChangeLog 2012/09/26 02:06:51 1.14698
|
||||
## -1,3 +1,8 @@
|
||||
+2012-09-26 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * breakpoint.c (invalidate_bp_value_on_memory_change): Expand
|
||||
+ parameter LEN to ssize_t.
|
||||
+
|
||||
2012-09-25 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
|
||||
* ada-valprint.c (ada_val_print_1): Eliminate single-use
|
||||
--- src/gdb/breakpoint.c 2012/09/25 12:48:52 1.705
|
||||
+++ src/gdb/breakpoint.c 2012/09/26 02:06:54 1.706
|
||||
@@ -14718,7 +14718,7 @@
|
||||
GDB itself. */
|
||||
|
||||
static void
|
||||
-invalidate_bp_value_on_memory_change (CORE_ADDR addr, int len,
|
||||
+invalidate_bp_value_on_memory_change (CORE_ADDR addr, ssize_t len,
|
||||
const bfd_byte *data)
|
||||
{
|
||||
struct breakpoint *bp;
|
||||
### src/gdb/doc/ChangeLog 2012/09/21 01:46:42 1.1370
|
||||
### src/gdb/doc/ChangeLog 2012/09/26 02:06:55 1.1371
|
||||
## -1,3 +1,7 @@
|
||||
+2012-09-26 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * observer.texi (memory_changed): Expand parameter LEN to ssize_t.
|
||||
+
|
||||
2012-09-21 Yao Qi <yao@codesourcery.com>
|
||||
Pedro Alves <palves@redhat.com>
|
||||
|
||||
--- src/gdb/doc/observer.texi 2012/09/21 01:46:43 1.40
|
||||
+++ src/gdb/doc/observer.texi 2012/09/26 02:06:55 1.41
|
||||
@@ -230,7 +230,7 @@
|
||||
This method is called immediately before freeing @var{inf}.
|
||||
@end deftypefun
|
||||
|
||||
-@deftypefun void memory_changed (CORE_ADDR @var{addr}, int @var{len}, const bfd_byte *@var{data})
|
||||
+@deftypefun void memory_changed (CORE_ADDR @var{addr}, ssize_t @var{len}, const bfd_byte *@var{data})
|
||||
Bytes from @var{data} to @var{data} + @var{len} have been written
|
||||
to the current inferior at @var{addr}.
|
||||
@end deftypefun
|
@ -1,260 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00147.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/26 02:06:51 1.14698
|
||||
### src/gdb/ChangeLog 2012/09/26 07:52:44 1.14699
|
||||
## -1,5 +1,19 @@
|
||||
2012-09-26 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
|
||||
+ * amd64-tdep.c (amd64_return_value): Use TYPE_LENGTH directly.
|
||||
+ * bfin-tdep.c (bfin_extract_return_value): Likewise.
|
||||
+ (bfin_store_return_value): Likewise.
|
||||
+ * cris-tdep.c (cris_store_return_value): Likewise.
|
||||
+ (cris_extract_return_value): Likewise.
|
||||
+ * h8300-tdep.c (h8300_extract_return_value): Likewise.
|
||||
+ * hppa-tdep.c (hppa64_return_value): Likewise.
|
||||
+ * lm32-tdep.c (lm32_store_return_value): Likewise.
|
||||
+ * microblaze-tdep.c (microblaze_store_return_value): Likewise.
|
||||
+ * spu-tdep.c (spu_value_from_register): Likewise.
|
||||
+ * vax-tdep.c (vax_return_value): Likewise.
|
||||
+
|
||||
+2012-09-26 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
* breakpoint.c (invalidate_bp_value_on_memory_change): Expand
|
||||
parameter LEN to ssize_t.
|
||||
|
||||
--- src/gdb/amd64-tdep.c 2012/09/25 12:48:52 1.110
|
||||
+++ src/gdb/amd64-tdep.c 2012/09/26 07:52:47 1.111
|
||||
@@ -637,7 +637,7 @@
|
||||
}
|
||||
|
||||
gdb_assert (class[1] != AMD64_MEMORY);
|
||||
- gdb_assert (len <= 16);
|
||||
+ gdb_assert (TYPE_LENGTH (type) <= 16);
|
||||
|
||||
for (i = 0; len > 0; i++, len -= 8)
|
||||
{
|
||||
--- src/gdb/bfin-tdep.c 2012/09/25 12:48:52 1.11
|
||||
+++ src/gdb/bfin-tdep.c 2012/09/26 07:52:47 1.12
|
||||
@@ -615,7 +615,7 @@
|
||||
ULONGEST tmp;
|
||||
int regno = BFIN_R0_REGNUM;
|
||||
|
||||
- gdb_assert (len <= 8);
|
||||
+ gdb_assert (TYPE_LENGTH (type) <= 8);
|
||||
|
||||
while (len > 0)
|
||||
{
|
||||
@@ -643,7 +643,7 @@
|
||||
int len = TYPE_LENGTH (type);
|
||||
int regno = BFIN_R0_REGNUM;
|
||||
|
||||
- gdb_assert (len <= 8);
|
||||
+ gdb_assert (TYPE_LENGTH (type) <= 8);
|
||||
|
||||
while (len > 0)
|
||||
{
|
||||
--- src/gdb/cris-tdep.c 2012/05/18 21:02:47 1.185
|
||||
+++ src/gdb/cris-tdep.c 2012/09/26 07:52:47 1.186
|
||||
@@ -1662,20 +1662,20 @@
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
ULONGEST val;
|
||||
- int len = TYPE_LENGTH (type);
|
||||
|
||||
- if (len <= 4)
|
||||
+ if (TYPE_LENGTH (type) <= 4)
|
||||
{
|
||||
/* Put the return value in R10. */
|
||||
- val = extract_unsigned_integer (valbuf, len, byte_order);
|
||||
+ val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, ARG1_REGNUM, val);
|
||||
}
|
||||
- else if (len <= 8)
|
||||
+ else if (TYPE_LENGTH (type) <= 8)
|
||||
{
|
||||
/* Put the return value in R10 and R11. */
|
||||
val = extract_unsigned_integer (valbuf, 4, byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, ARG1_REGNUM, val);
|
||||
- val = extract_unsigned_integer ((char *)valbuf + 4, len - 4, byte_order);
|
||||
+ val = extract_unsigned_integer ((char *)valbuf + 4,
|
||||
+ TYPE_LENGTH (type) - 4, byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, ARG2_REGNUM, val);
|
||||
}
|
||||
else
|
||||
@@ -1833,21 +1833,21 @@
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
ULONGEST val;
|
||||
- int len = TYPE_LENGTH (type);
|
||||
|
||||
- if (len <= 4)
|
||||
+ if (TYPE_LENGTH (type) <= 4)
|
||||
{
|
||||
/* Get the return value from R10. */
|
||||
regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &val);
|
||||
- store_unsigned_integer (valbuf, len, byte_order, val);
|
||||
+ store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, val);
|
||||
}
|
||||
- else if (len <= 8)
|
||||
+ else if (TYPE_LENGTH (type) <= 8)
|
||||
{
|
||||
/* Get the return value from R10 and R11. */
|
||||
regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &val);
|
||||
store_unsigned_integer (valbuf, 4, byte_order, val);
|
||||
regcache_cooked_read_unsigned (regcache, ARG2_REGNUM, &val);
|
||||
- store_unsigned_integer ((char *)valbuf + 4, len - 4, byte_order, val);
|
||||
+ store_unsigned_integer ((char *)valbuf + 4, TYPE_LENGTH (type) - 4,
|
||||
+ byte_order, val);
|
||||
}
|
||||
else
|
||||
error (_("cris_extract_return_value: type length too large"));
|
||||
--- src/gdb/h8300-tdep.c 2012/09/25 12:48:53 1.136
|
||||
+++ src/gdb/h8300-tdep.c 2012/09/26 07:52:48 1.137
|
||||
@@ -751,12 +751,12 @@
|
||||
int len = TYPE_LENGTH (type);
|
||||
ULONGEST c, addr;
|
||||
|
||||
- switch (len)
|
||||
+ switch (TYPE_LENGTH (type))
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
|
||||
- store_unsigned_integer (valbuf, len, byte_order, c);
|
||||
+ store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c);
|
||||
break;
|
||||
case 4: /* Needs two registers on plain H8/300 */
|
||||
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
|
||||
@@ -768,8 +768,9 @@
|
||||
if (TYPE_CODE (type) == TYPE_CODE_INT)
|
||||
{
|
||||
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &addr);
|
||||
- c = read_memory_unsigned_integer ((CORE_ADDR) addr, len, byte_order);
|
||||
- store_unsigned_integer (valbuf, len, byte_order, c);
|
||||
+ c = read_memory_unsigned_integer ((CORE_ADDR) addr,
|
||||
+ TYPE_LENGTH (type), byte_order);
|
||||
+ store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c);
|
||||
}
|
||||
else
|
||||
{
|
||||
--- src/gdb/hppa-tdep.c 2012/05/18 21:02:48 1.281
|
||||
+++ src/gdb/hppa-tdep.c 2012/09/26 07:52:48 1.282
|
||||
@@ -1160,7 +1160,7 @@
|
||||
int len = TYPE_LENGTH (type);
|
||||
int regnum, offset;
|
||||
|
||||
- if (len > 16)
|
||||
+ if (TYPE_LENGTH (type) > 16)
|
||||
{
|
||||
/* All return values larget than 128 bits must be aggregate
|
||||
return values. */
|
||||
--- src/gdb/lm32-tdep.c 2012/09/25 12:48:53 1.13
|
||||
+++ src/gdb/lm32-tdep.c 2012/09/26 07:52:48 1.14
|
||||
@@ -349,18 +349,18 @@
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
ULONGEST val;
|
||||
- int len = TYPE_LENGTH (type);
|
||||
|
||||
- if (len <= 4)
|
||||
+ if (TYPE_LENGTH (type) <= 4)
|
||||
{
|
||||
- val = extract_unsigned_integer (valbuf, len, byte_order);
|
||||
+ val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, SIM_LM32_R1_REGNUM, val);
|
||||
}
|
||||
- else if (len <= 8)
|
||||
+ else if (TYPE_LENGTH (type) <= 8)
|
||||
{
|
||||
val = extract_unsigned_integer (valbuf, 4, byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, SIM_LM32_R1_REGNUM, val);
|
||||
- val = extract_unsigned_integer (valbuf + 4, len - 4, byte_order);
|
||||
+ val = extract_unsigned_integer (valbuf + 4, TYPE_LENGTH (type) - 4,
|
||||
+ byte_order);
|
||||
regcache_cooked_write_unsigned (regcache, SIM_LM32_R2_REGNUM, val);
|
||||
}
|
||||
else
|
||||
--- src/gdb/microblaze-tdep.c 2012/08/02 09:36:39 1.13
|
||||
+++ src/gdb/microblaze-tdep.c 2012/09/26 07:52:48 1.14
|
||||
@@ -590,22 +590,21 @@
|
||||
microblaze_store_return_value (struct type *type, struct regcache *regcache,
|
||||
const gdb_byte *valbuf)
|
||||
{
|
||||
- int len = TYPE_LENGTH (type);
|
||||
gdb_byte buf[8];
|
||||
|
||||
memset (buf, 0, sizeof(buf));
|
||||
|
||||
/* Integral and pointer return values. */
|
||||
|
||||
- if (len > 4)
|
||||
+ if (TYPE_LENGTH (type) > 4)
|
||||
{
|
||||
- gdb_assert (len == 8);
|
||||
+ gdb_assert (TYPE_LENGTH (type) == 8);
|
||||
memcpy (buf, valbuf, 8);
|
||||
regcache_cooked_write (regcache, MICROBLAZE_RETVAL_REGNUM+1, buf + 4);
|
||||
}
|
||||
else
|
||||
/* ??? Do we need to do any sign-extension here? */
|
||||
- memcpy (buf + 4 - len, valbuf, len);
|
||||
+ memcpy (buf + 4 - TYPE_LENGTH (type), valbuf, TYPE_LENGTH (type));
|
||||
|
||||
regcache_cooked_write (regcache, MICROBLAZE_RETVAL_REGNUM, buf);
|
||||
}
|
||||
--- src/gdb/spu-tdep.c 2012/09/17 08:52:18 1.82
|
||||
+++ src/gdb/spu-tdep.c 2012/09/26 07:52:48 1.83
|
||||
@@ -316,11 +316,10 @@
|
||||
struct frame_info *frame)
|
||||
{
|
||||
struct value *value = default_value_from_register (type, regnum, frame);
|
||||
- int len = TYPE_LENGTH (type);
|
||||
|
||||
- if (regnum < SPU_NUM_GPRS && len < 16)
|
||||
+ if (regnum < SPU_NUM_GPRS && TYPE_LENGTH (type) < 16)
|
||||
{
|
||||
- int preferred_slot = len < 4 ? 4 - len : 0;
|
||||
+ int preferred_slot = TYPE_LENGTH (type) < 4 ? 4 - TYPE_LENGTH (type) : 0;
|
||||
set_value_offset (value, preferred_slot);
|
||||
}
|
||||
|
||||
--- src/gdb/vax-tdep.c 2012/05/16 14:35:08 1.112
|
||||
+++ src/gdb/vax-tdep.c 2012/09/26 07:52:48 1.113
|
||||
@@ -208,7 +208,6 @@
|
||||
struct type *type, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
- int len = TYPE_LENGTH (type);
|
||||
gdb_byte buf[8];
|
||||
|
||||
if (TYPE_CODE (type) == TYPE_CODE_STRUCT
|
||||
@@ -224,7 +223,7 @@
|
||||
ULONGEST addr;
|
||||
|
||||
regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr);
|
||||
- read_memory (addr, readbuf, len);
|
||||
+ read_memory (addr, readbuf, TYPE_LENGTH (type));
|
||||
}
|
||||
|
||||
return RETURN_VALUE_ABI_RETURNS_ADDRESS;
|
||||
@@ -234,16 +233,16 @@
|
||||
{
|
||||
/* Read the contents of R0 and (if necessary) R1. */
|
||||
regcache_cooked_read (regcache, VAX_R0_REGNUM, buf);
|
||||
- if (len > 4)
|
||||
+ if (TYPE_LENGTH (type) > 4)
|
||||
regcache_cooked_read (regcache, VAX_R1_REGNUM, buf + 4);
|
||||
- memcpy (readbuf, buf, len);
|
||||
+ memcpy (readbuf, buf, TYPE_LENGTH (type));
|
||||
}
|
||||
if (writebuf)
|
||||
{
|
||||
/* Read the contents to R0 and (if necessary) R1. */
|
||||
- memcpy (buf, writebuf, len);
|
||||
+ memcpy (buf, writebuf, TYPE_LENGTH (type));
|
||||
regcache_cooked_write (regcache, VAX_R0_REGNUM, buf);
|
||||
- if (len > 4)
|
||||
+ if (TYPE_LENGTH (type) > 4)
|
||||
regcache_cooked_write (regcache, VAX_R1_REGNUM, buf + 4);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -52,10 +52,10 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/alpha-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/alpha-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/alpha-tdep.c 2012-11-07 22:03:57.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/alpha-tdep.c 2012-11-07 22:46:00.042902382 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/alpha-tdep.c 2013-01-18 23:33:59.277047324 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/alpha-tdep.c 2013-01-18 23:34:02.678051846 +0100
|
||||
@@ -414,6 +414,13 @@ alpha_push_dummy_call (struct gdbarch *g
|
||||
accumulate_size = 0;
|
||||
else
|
||||
@ -70,11 +70,11 @@ Index: gdb-7.5.0.20120926/gdb/alpha-tdep.c
|
||||
sp -= accumulate_size;
|
||||
|
||||
/* Keep sp aligned to a multiple of 16 as the ABI requires. */
|
||||
Index: gdb-7.5.0.20120926/gdb/cp-valprint.c
|
||||
Index: gdb-7.5.50.20130118/gdb/cp-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/cp-valprint.c 2012-11-07 22:12:14.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/cp-valprint.c 2012-11-07 22:46:00.043902381 +0100
|
||||
@@ -561,6 +561,8 @@ cp_print_value (struct type *type, struc
|
||||
--- gdb-7.5.50.20130118.orig/gdb/cp-valprint.c 2013-01-18 23:33:59.278047326 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/cp-valprint.c 2013-01-18 23:34:02.679051848 +0100
|
||||
@@ -540,6 +540,8 @@ cp_print_value (struct type *type, struc
|
||||
gdb_byte *buf;
|
||||
struct cleanup *back_to;
|
||||
|
||||
@ -83,10 +83,10 @@ Index: gdb-7.5.0.20120926/gdb/cp-valprint.c
|
||||
buf = xmalloc (TYPE_LENGTH (baseclass));
|
||||
back_to = make_cleanup (xfree, buf);
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/dwarf2loc.c
|
||||
Index: gdb-7.5.50.20130118/gdb/dwarf2loc.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/dwarf2loc.c 2012-11-07 22:09:29.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/dwarf2loc.c 2012-11-07 22:46:00.070902342 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/dwarf2loc.c 2013-01-18 23:33:59.280047332 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/dwarf2loc.c 2013-01-18 23:34:02.680051851 +0100
|
||||
@@ -1784,6 +1784,8 @@ read_pieced_value (struct value *v)
|
||||
|
||||
this_size = (this_size_bits + source_offset_bits % 8 + 7) / 8;
|
||||
@ -104,10 +104,10 @@ Index: gdb-7.5.0.20120926/gdb/dwarf2loc.c
|
||||
if (buffer_size < this_size)
|
||||
{
|
||||
buffer_size = this_size;
|
||||
Index: gdb-7.5.0.20120926/gdb/findcmd.c
|
||||
Index: gdb-7.5.50.20130118/gdb/findcmd.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/findcmd.c 2012-11-07 22:03:57.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/findcmd.c 2012-11-07 22:46:00.153902249 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/findcmd.c 2013-01-18 23:33:59.280047332 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/findcmd.c 2013-01-18 23:34:02.680051851 +0100
|
||||
@@ -187,6 +187,7 @@ parse_find_args (char *args, ULONGEST *m
|
||||
size_t current_offset = pattern_buf_end - pattern_buf;
|
||||
|
||||
@ -116,11 +116,11 @@ Index: gdb-7.5.0.20120926/gdb/findcmd.c
|
||||
pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
|
||||
pattern_buf_end = pattern_buf + current_offset;
|
||||
}
|
||||
Index: gdb-7.5.0.20120926/gdb/p-valprint.c
|
||||
Index: gdb-7.5.50.20130118/gdb/p-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/p-valprint.c 2012-11-07 22:09:29.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/p-valprint.c 2012-11-07 22:46:00.163902208 +0100
|
||||
@@ -827,6 +827,7 @@ pascal_object_print_value (struct type *
|
||||
--- gdb-7.5.50.20130118.orig/gdb/p-valprint.c 2013-01-18 23:33:59.281047334 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/p-valprint.c 2013-01-18 23:34:02.680051851 +0100
|
||||
@@ -797,6 +797,7 @@ pascal_object_print_value (struct type *
|
||||
gdb_byte *buf;
|
||||
struct cleanup *back_to;
|
||||
|
||||
@ -128,11 +128,11 @@ Index: gdb-7.5.0.20120926/gdb/p-valprint.c
|
||||
buf = xmalloc (TYPE_LENGTH (baseclass));
|
||||
back_to = make_cleanup (xfree, buf);
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/utils.c
|
||||
Index: gdb-7.5.50.20130118/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/utils.c 2012-11-07 22:00:43.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/utils.c 2012-11-07 22:46:00.166902202 +0100
|
||||
@@ -3135,6 +3135,18 @@ host_address_to_string (const void *addr
|
||||
--- gdb-7.5.50.20130118.orig/gdb/utils.c 2013-01-18 23:33:59.282047336 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/utils.c 2013-01-18 23:34:02.681051854 +0100
|
||||
@@ -3219,6 +3219,18 @@ host_address_to_string (const void *addr
|
||||
return str;
|
||||
}
|
||||
|
||||
@ -151,11 +151,11 @@ Index: gdb-7.5.0.20120926/gdb/utils.c
|
||||
char *
|
||||
gdb_realpath (const char *filename)
|
||||
{
|
||||
Index: gdb-7.5.0.20120926/gdb/valops.c
|
||||
Index: gdb-7.5.50.20130118/gdb/valops.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/valops.c 2012-11-07 22:09:30.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/valops.c 2012-11-07 22:46:00.181902181 +0100
|
||||
@@ -2383,6 +2383,7 @@ search_struct_method (const char *name,
|
||||
--- gdb-7.5.50.20130118.orig/gdb/valops.c 2013-01-18 23:33:59.283047338 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/valops.c 2013-01-18 23:34:02.682051856 +0100
|
||||
@@ -2369,6 +2369,7 @@ search_struct_method (const char *name,
|
||||
struct cleanup *back_to;
|
||||
CORE_ADDR address;
|
||||
|
||||
@ -163,10 +163,10 @@ Index: gdb-7.5.0.20120926/gdb/valops.c
|
||||
tmp = xmalloc (TYPE_LENGTH (baseclass));
|
||||
back_to = make_cleanup (xfree, tmp);
|
||||
address = value_address (*arg1p);
|
||||
Index: gdb-7.5.0.20120926/gdb/value.c
|
||||
Index: gdb-7.5.50.20130118/gdb/value.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/value.c 2012-11-07 22:09:30.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/value.c 2012-11-07 22:46:00.184902176 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/value.c 2013-01-18 23:33:59.285047342 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/value.c 2013-01-18 23:34:02.683051858 +0100
|
||||
@@ -663,6 +663,7 @@ allocate_value_lazy (struct type *type)
|
||||
description correctly. */
|
||||
check_typedef (type);
|
||||
@ -184,7 +184,7 @@ Index: gdb-7.5.0.20120926/gdb/value.c
|
||||
if (!val->contents)
|
||||
val->contents = (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type));
|
||||
}
|
||||
@@ -2662,8 +2665,12 @@ void
|
||||
@@ -2672,8 +2675,12 @@ void
|
||||
set_value_enclosing_type (struct value *val, struct type *new_encl_type)
|
||||
{
|
||||
if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val)))
|
||||
@ -199,25 +199,25 @@ Index: gdb-7.5.0.20120926/gdb/value.c
|
||||
|
||||
val->enclosing_type = new_encl_type;
|
||||
}
|
||||
Index: gdb-7.5.0.20120926/gdb/vax-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/vax-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/vax-tdep.c 2012-11-07 22:09:24.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/vax-tdep.c 2012-11-07 22:46:56.810819878 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/vax-tdep.c 2013-01-18 23:34:02.683051858 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/vax-tdep.c 2013-01-18 23:34:34.950094198 +0100
|
||||
@@ -223,6 +223,7 @@ vax_return_value (struct gdbarch *gdbarc
|
||||
ULONGEST addr;
|
||||
|
||||
regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr);
|
||||
+ ulongest_fits_host_or_error (TYPE_LENGTH (type));
|
||||
read_memory (addr, readbuf, TYPE_LENGTH (type));
|
||||
read_memory (addr, readbuf, len);
|
||||
}
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/defs.h
|
||||
Index: gdb-7.5.50.20130118/gdb/defs.h
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/defs.h 2012-11-07 22:00:43.111906109 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/defs.h 2012-11-07 22:47:46.001001239 +0100
|
||||
@@ -1170,4 +1170,6 @@ enum block_enum
|
||||
FIRST_LOCAL_BLOCK = 2
|
||||
};
|
||||
--- gdb-7.5.50.20130118.orig/gdb/defs.h 2013-01-18 23:34:02.684051860 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/defs.h 2013-01-18 23:34:14.238067193 +0100
|
||||
@@ -801,4 +801,6 @@ enum block_enum
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
+extern void ulongest_fits_host_or_error (ULONGEST num);
|
||||
+
|
||||
|
@ -96,11 +96,11 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=bitpos-wp.patch
|
||||
|
||||
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
|
||||
index 231b008..6deb23d 100644
|
||||
--- a/gdb/arm-linux-nat.c
|
||||
+++ b/gdb/arm-linux-nat.c
|
||||
@@ -1105,7 +1105,7 @@ arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
|
||||
Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/arm-linux-nat.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/arm-linux-nat.c 2013-02-15 22:42:45.988804306 +0100
|
||||
@@ -1105,7 +1105,7 @@ arm_linux_region_ok_for_hw_watchpoint (C
|
||||
|
||||
/* Insert a Hardware breakpoint. */
|
||||
static int
|
||||
@ -109,7 +109,7 @@ index 231b008..6deb23d 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
@@ -1123,7 +1123,7 @@ arm_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
|
||||
@@ -1123,7 +1123,7 @@ arm_linux_insert_watchpoint (CORE_ADDR a
|
||||
|
||||
/* Remove a hardware breakpoint. */
|
||||
static int
|
||||
@ -127,11 +127,11 @@ index 231b008..6deb23d 100644
|
||||
{
|
||||
return start <= addr && start + length - 1 >= addr;
|
||||
}
|
||||
diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
|
||||
index 76c51a8..9e293fe 100644
|
||||
--- a/gdb/i386-nat.c
|
||||
+++ b/gdb/i386-nat.c
|
||||
@@ -592,7 +592,7 @@ i386_update_inferior_debug_regs (struct i386_debug_reg_state *new_state)
|
||||
Index: gdb-7.5.50.20130215/gdb/i386-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/i386-nat.c 2013-02-15 22:41:53.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/i386-nat.c 2013-02-15 22:43:14.005838741 +0100
|
||||
@@ -589,7 +589,7 @@ i386_update_inferior_debug_regs (struct
|
||||
of the type TYPE. Return 0 on success, -1 on failure. */
|
||||
|
||||
static int
|
||||
@ -139,8 +139,8 @@ index 76c51a8..9e293fe 100644
|
||||
+i386_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct i386_debug_reg_state *state = i386_debug_reg_state ();
|
||||
@@ -629,7 +629,7 @@ i386_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
struct i386_debug_reg_state *state
|
||||
@@ -627,7 +627,7 @@ i386_insert_watchpoint (CORE_ADDR addr,
|
||||
address ADDR, whose length is LEN bytes, and for accesses of the
|
||||
type TYPE. Return 0 on success, -1 on failure. */
|
||||
static int
|
||||
@ -148,11 +148,11 @@ index 76c51a8..9e293fe 100644
|
||||
+i386_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct i386_debug_reg_state *state = i386_debug_reg_state ();
|
||||
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
|
||||
index 9b5fbf3..6061eae 100644
|
||||
--- a/gdb/ia64-linux-nat.c
|
||||
+++ b/gdb/ia64-linux-nat.c
|
||||
struct i386_debug_reg_state *state
|
||||
Index: gdb-7.5.50.20130215/gdb/ia64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/ia64-linux-nat.c 2013-02-15 22:34:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/ia64-linux-nat.c 2013-02-15 22:42:45.989804309 +0100
|
||||
@@ -542,7 +542,7 @@ is_power_of_2 (int val)
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ index 9b5fbf3..6061eae 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
@@ -596,7 +596,7 @@ ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
|
||||
@@ -596,7 +596,7 @@ ia64_linux_insert_watchpoint (CORE_ADDR
|
||||
}
|
||||
|
||||
static int
|
||||
@ -171,11 +171,11 @@ index 9b5fbf3..6061eae 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
int idx;
|
||||
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
|
||||
index d60eddb..c33db45 100644
|
||||
--- a/gdb/inf-ttrace.c
|
||||
+++ b/gdb/inf-ttrace.c
|
||||
@@ -313,14 +313,14 @@ inf_ttrace_disable_page_protections (pid_t pid)
|
||||
Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/inf-ttrace.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/inf-ttrace.c 2013-02-15 22:42:45.989804309 +0100
|
||||
@@ -313,14 +313,14 @@ inf_ttrace_disable_page_protections (pid
|
||||
type TYPE. */
|
||||
|
||||
static int
|
||||
@ -193,7 +193,7 @@ index d60eddb..c33db45 100644
|
||||
|
||||
gdb_assert (type == hw_write);
|
||||
|
||||
@@ -337,14 +337,14 @@ inf_ttrace_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -337,14 +337,14 @@ inf_ttrace_insert_watchpoint (CORE_ADDR
|
||||
type TYPE. */
|
||||
|
||||
static int
|
||||
@ -211,11 +211,11 @@ index d60eddb..c33db45 100644
|
||||
|
||||
gdb_assert (type == hw_write);
|
||||
|
||||
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
|
||||
index 5566d0c..7467d11 100644
|
||||
--- a/gdb/mips-linux-nat.c
|
||||
+++ b/gdb/mips-linux-nat.c
|
||||
@@ -1017,7 +1017,7 @@ populate_regs_from_watches (struct pt_watch_regs *regs)
|
||||
Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/mips-linux-nat.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/mips-linux-nat.c 2013-02-15 22:42:45.990804311 +0100
|
||||
@@ -1017,7 +1017,7 @@ populate_regs_from_watches (struct pt_wa
|
||||
watch. Return zero on success. */
|
||||
|
||||
static int
|
||||
@ -224,7 +224,7 @@ index 5566d0c..7467d11 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct pt_watch_regs regs;
|
||||
@@ -1067,7 +1067,7 @@ mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -1067,7 +1067,7 @@ mips_linux_insert_watchpoint (CORE_ADDR
|
||||
Return zero on success. */
|
||||
|
||||
static int
|
||||
@ -233,10 +233,10 @@ index 5566d0c..7467d11 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
|
||||
index b58f318..25fecf3 100644
|
||||
--- a/gdb/nto-procfs.c
|
||||
+++ b/gdb/nto-procfs.c
|
||||
Index: gdb-7.5.50.20130215/gdb/nto-procfs.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/nto-procfs.c 2013-01-01 07:32:47.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/nto-procfs.c 2013-02-15 22:42:45.990804311 +0100
|
||||
@@ -69,10 +69,10 @@ static ptid_t do_attach (ptid_t ptid);
|
||||
|
||||
static int procfs_can_use_hw_breakpoint (int, int, int);
|
||||
@ -250,7 +250,7 @@ index b58f318..25fecf3 100644
|
||||
struct expression *cond);
|
||||
|
||||
static int procfs_stopped_by_watchpoint (void);
|
||||
@@ -1493,14 +1493,14 @@ procfs_can_use_hw_breakpoint (int type, int cnt, int othertype)
|
||||
@@ -1493,14 +1493,14 @@ procfs_can_use_hw_breakpoint (int type,
|
||||
}
|
||||
|
||||
static int
|
||||
@ -267,11 +267,11 @@ index b58f318..25fecf3 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
return procfs_hw_watchpoint (addr, len, type);
|
||||
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
|
||||
index 67e1cac..abfb2fc 100644
|
||||
--- a/gdb/ppc-linux-nat.c
|
||||
+++ b/gdb/ppc-linux-nat.c
|
||||
@@ -1839,11 +1839,11 @@ can_use_watchpoint_cond_accel (void)
|
||||
Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/ppc-linux-nat.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/ppc-linux-nat.c 2013-02-15 22:42:45.991804313 +0100
|
||||
@@ -1838,11 +1838,11 @@ can_use_watchpoint_cond_accel (void)
|
||||
CONDITION_VALUE will hold the value which should be put in the
|
||||
DVC register. */
|
||||
static void
|
||||
@ -286,7 +286,7 @@ index 67e1cac..abfb2fc 100644
|
||||
CORE_ADDR addr_end_data, addr_end_dvc;
|
||||
|
||||
/* The DVC register compares bytes within fixed-length windows which
|
||||
@@ -1930,7 +1930,7 @@ num_memory_accesses (struct value *v)
|
||||
@@ -1929,7 +1929,7 @@ num_memory_accesses (struct value *v)
|
||||
of the constant. */
|
||||
static int
|
||||
check_condition (CORE_ADDR watch_addr, struct expression *cond,
|
||||
@ -295,7 +295,7 @@ index 67e1cac..abfb2fc 100644
|
||||
{
|
||||
int pc = 1, num_accesses_left, num_accesses_right;
|
||||
struct value *left_val, *right_val, *left_chain, *right_chain;
|
||||
@@ -1997,7 +1997,7 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond,
|
||||
@@ -1996,7 +1996,7 @@ check_condition (CORE_ADDR watch_addr, s
|
||||
the condition expression, thus only triggering the watchpoint when it is
|
||||
true. */
|
||||
static int
|
||||
@ -304,7 +304,7 @@ index 67e1cac..abfb2fc 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
CORE_ADDR data_value;
|
||||
@@ -2014,7 +2014,7 @@ ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
|
||||
@@ -2013,7 +2013,7 @@ ppc_linux_can_accel_watchpoint_condition
|
||||
|
||||
static void
|
||||
create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
|
||||
@ -313,7 +313,7 @@ index 67e1cac..abfb2fc 100644
|
||||
int insert)
|
||||
{
|
||||
if (len == 1
|
||||
@@ -2059,7 +2059,7 @@ create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
|
||||
@@ -2058,7 +2058,7 @@ create_watchpoint_request (struct ppc_hw
|
||||
}
|
||||
|
||||
static int
|
||||
@ -322,7 +322,7 @@ index 67e1cac..abfb2fc 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
@@ -2127,7 +2127,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
|
||||
@@ -2126,7 +2126,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR a
|
||||
}
|
||||
|
||||
static int
|
||||
@ -331,7 +331,7 @@ index 67e1cac..abfb2fc 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
@@ -2267,7 +2267,7 @@ ppc_linux_stopped_by_watchpoint (void)
|
||||
@@ -2266,7 +2266,7 @@ ppc_linux_stopped_by_watchpoint (void)
|
||||
static int
|
||||
ppc_linux_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -340,11 +340,11 @@ index 67e1cac..abfb2fc 100644
|
||||
{
|
||||
int mask;
|
||||
|
||||
diff --git a/gdb/procfs.c b/gdb/procfs.c
|
||||
index 4a9336f..26accd8 100644
|
||||
--- a/gdb/procfs.c
|
||||
+++ b/gdb/procfs.c
|
||||
@@ -2470,7 +2470,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr)
|
||||
Index: gdb-7.5.50.20130215/gdb/procfs.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/procfs.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/procfs.c 2013-02-15 22:42:45.992804315 +0100
|
||||
@@ -2433,7 +2433,7 @@ procfs_address_to_host_pointer (CORE_ADD
|
||||
#endif
|
||||
|
||||
static int
|
||||
@ -353,7 +353,7 @@ index 4a9336f..26accd8 100644
|
||||
{
|
||||
#if !defined (PCWATCH) && !defined (PIOCSWATCH)
|
||||
/* If neither or these is defined, we can't support watchpoints.
|
||||
@@ -4816,7 +4816,7 @@ procfs_pid_to_str (struct target_ops *ops, ptid_t ptid)
|
||||
@@ -4777,7 +4777,7 @@ procfs_pid_to_str (struct target_ops *op
|
||||
/* Insert a watchpoint. */
|
||||
|
||||
static int
|
||||
@ -361,8 +361,8 @@ index 4a9336f..26accd8 100644
|
||||
+procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, LONGEST len, int rwflag,
|
||||
int after)
|
||||
{
|
||||
#ifndef UNIXWARE
|
||||
@@ -4938,7 +4938,7 @@ procfs_stopped_data_address (struct target_ops *targ, CORE_ADDR *addr)
|
||||
#ifndef AIX5
|
||||
@@ -4897,7 +4897,7 @@ procfs_stopped_data_address (struct targ
|
||||
}
|
||||
|
||||
static int
|
||||
@ -371,7 +371,7 @@ index 4a9336f..26accd8 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
if (!target_have_steppable_watchpoint
|
||||
@@ -4960,7 +4960,7 @@ procfs_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -4919,7 +4919,7 @@ procfs_insert_watchpoint (CORE_ADDR addr
|
||||
}
|
||||
|
||||
static int
|
||||
@ -380,11 +380,11 @@ index 4a9336f..26accd8 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0);
|
||||
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
|
||||
index 748aeba..b385c3f 100644
|
||||
--- a/gdb/remote-m32r-sdi.c
|
||||
+++ b/gdb/remote-m32r-sdi.c
|
||||
@@ -1417,14 +1417,14 @@ m32r_can_use_hw_watchpoint (int type, int cnt, int othertype)
|
||||
Index: gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/remote-m32r-sdi.c 2013-01-01 07:32:50.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c 2013-02-15 22:42:45.993804317 +0100
|
||||
@@ -1417,14 +1417,15 @@ m32r_can_use_hw_watchpoint (int type, in
|
||||
watchpoint. */
|
||||
|
||||
static int
|
||||
@ -396,13 +396,14 @@ index 748aeba..b385c3f 100644
|
||||
|
||||
if (remote_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%d,%d)\n",
|
||||
- paddress (target_gdbarch, addr), len, type);
|
||||
- paddress (target_gdbarch (), addr), len, type);
|
||||
+ fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%s,%d)\n",
|
||||
+ paddress (target_gdbarch, addr), plongest (len), type);
|
||||
+ paddress (target_gdbarch (), addr), plongest (len),
|
||||
+ type);
|
||||
|
||||
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
|
||||
{
|
||||
@@ -1442,14 +1442,14 @@ m32r_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -1442,14 +1443,15 @@ m32r_insert_watchpoint (CORE_ADDR addr,
|
||||
}
|
||||
|
||||
static int
|
||||
@ -414,16 +415,17 @@ index 748aeba..b385c3f 100644
|
||||
|
||||
if (remote_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%d,%d)\n",
|
||||
- paddress (target_gdbarch, addr), len, type);
|
||||
- paddress (target_gdbarch (), addr), len, type);
|
||||
+ fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%s,%d)\n",
|
||||
+ paddress (target_gdbarch, addr), plongest (len), type);
|
||||
+ paddress (target_gdbarch (), addr), plongest (len),
|
||||
+ type);
|
||||
|
||||
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
|
||||
{
|
||||
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
|
||||
index eee2460..9a9265a 100644
|
||||
--- a/gdb/remote-mips.c
|
||||
+++ b/gdb/remote-mips.c
|
||||
Index: gdb-7.5.50.20130215/gdb/remote-mips.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/remote-mips.c 2013-01-01 07:32:50.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/remote-mips.c 2013-02-15 22:42:45.994804319 +0100
|
||||
@@ -2419,7 +2419,7 @@ calculate_mask (CORE_ADDR addr, int len)
|
||||
watchpoint. */
|
||||
|
||||
@ -433,7 +435,7 @@ index eee2460..9a9265a 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
if (mips_set_breakpoint (addr, len, type))
|
||||
@@ -2431,7 +2431,7 @@ mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -2431,7 +2431,7 @@ mips_insert_watchpoint (CORE_ADDR addr,
|
||||
/* Remove a watchpoint. */
|
||||
|
||||
static int
|
||||
@ -442,11 +444,11 @@ index eee2460..9a9265a 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
if (mips_clear_breakpoint (addr, len, type))
|
||||
diff --git a/gdb/remote.c b/gdb/remote.c
|
||||
index 8c27390..bcec331 100644
|
||||
--- a/gdb/remote.c
|
||||
+++ b/gdb/remote.c
|
||||
@@ -8035,7 +8035,7 @@ watchpoint_to_Z_packet (int type)
|
||||
Index: gdb-7.5.50.20130215/gdb/remote.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/remote.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/remote.c 2013-02-15 22:42:45.996804323 +0100
|
||||
@@ -8155,7 +8155,7 @@ watchpoint_to_Z_packet (int type)
|
||||
}
|
||||
|
||||
static int
|
||||
@ -455,7 +457,7 @@ index 8c27390..bcec331 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct remote_state *rs = get_remote_state ();
|
||||
@@ -8050,7 +8050,7 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -8170,7 +8170,7 @@ remote_insert_watchpoint (CORE_ADDR addr
|
||||
p = strchr (rs->buf, '\0');
|
||||
addr = remote_address_masked (addr);
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
@ -464,7 +466,7 @@ index 8c27390..bcec331 100644
|
||||
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
@@ -8070,7 +8070,7 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -8190,7 +8190,7 @@ remote_insert_watchpoint (CORE_ADDR addr
|
||||
|
||||
static int
|
||||
remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
|
||||
@ -473,7 +475,7 @@ index 8c27390..bcec331 100644
|
||||
{
|
||||
CORE_ADDR diff = remote_address_masked (addr - start);
|
||||
|
||||
@@ -8079,7 +8079,7 @@ remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
|
||||
@@ -8199,7 +8199,7 @@ remote_watchpoint_addr_within_range (str
|
||||
|
||||
|
||||
static int
|
||||
@ -482,7 +484,7 @@ index 8c27390..bcec331 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct remote_state *rs = get_remote_state ();
|
||||
@@ -8094,7 +8094,7 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -8214,7 +8214,7 @@ remote_remove_watchpoint (CORE_ADDR addr
|
||||
p = strchr (rs->buf, '\0');
|
||||
addr = remote_address_masked (addr);
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
@ -491,11 +493,11 @@ index 8c27390..bcec331 100644
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
|
||||
diff --git a/gdb/s390-nat.c b/gdb/s390-nat.c
|
||||
index 4974bad..3f41519 100644
|
||||
--- a/gdb/s390-nat.c
|
||||
+++ b/gdb/s390-nat.c
|
||||
@@ -517,7 +517,7 @@ s390_fix_watch_points (struct lwp_info *lp)
|
||||
Index: gdb-7.5.50.20130215/gdb/s390-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/s390-nat.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/s390-nat.c 2013-02-15 22:42:45.997804325 +0100
|
||||
@@ -516,7 +516,7 @@ s390_fix_watch_points (struct lwp_info *
|
||||
}
|
||||
|
||||
static int
|
||||
@ -504,7 +506,7 @@ index 4974bad..3f41519 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
@@ -538,7 +538,7 @@ s390_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -537,7 +537,7 @@ s390_insert_watchpoint (CORE_ADDR addr,
|
||||
}
|
||||
|
||||
static int
|
||||
@ -513,10 +515,10 @@ index 4974bad..3f41519 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
diff --git a/gdb/target.c b/gdb/target.c
|
||||
index f7207c0..a69fb06 100644
|
||||
--- a/gdb/target.c
|
||||
+++ b/gdb/target.c
|
||||
Index: gdb-7.5.50.20130215/gdb/target.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/target.c 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/target.c 2013-02-15 22:42:45.997804325 +0100
|
||||
@@ -49,7 +49,8 @@ static void target_info (char *, int);
|
||||
static void default_terminal_info (char *, int);
|
||||
|
||||
@ -527,7 +529,7 @@ index f7207c0..a69fb06 100644
|
||||
|
||||
static int default_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
|
||||
|
||||
@@ -114,10 +115,10 @@ static int debug_to_insert_hw_breakpoint (struct gdbarch *,
|
||||
@@ -114,10 +115,10 @@ static int debug_to_insert_hw_breakpoint
|
||||
static int debug_to_remove_hw_breakpoint (struct gdbarch *,
|
||||
struct bp_target_info *);
|
||||
|
||||
@ -540,7 +542,7 @@ index f7207c0..a69fb06 100644
|
||||
struct expression *);
|
||||
|
||||
static int debug_to_stopped_by_watchpoint (void);
|
||||
@@ -125,11 +126,12 @@ static int debug_to_stopped_by_watchpoint (void);
|
||||
@@ -125,11 +126,12 @@ static int debug_to_stopped_by_watchpoin
|
||||
static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
|
||||
|
||||
static int debug_to_watchpoint_addr_within_range (struct target_ops *,
|
||||
@ -577,7 +579,7 @@ index f7207c0..a69fb06 100644
|
||||
return_zero);
|
||||
de_fault (to_terminal_init,
|
||||
(void (*) (void))
|
||||
@@ -3558,7 +3560,7 @@ default_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
|
||||
@@ -3558,7 +3560,7 @@ default_region_ok_for_hw_watchpoint (COR
|
||||
static int
|
||||
default_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -586,7 +588,7 @@ index f7207c0..a69fb06 100644
|
||||
{
|
||||
return addr >= start && addr < start + length;
|
||||
}
|
||||
@@ -4263,7 +4265,7 @@ debug_to_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
|
||||
@@ -4265,7 +4267,7 @@ debug_to_region_ok_for_hw_watchpoint (CO
|
||||
}
|
||||
|
||||
static int
|
||||
@ -595,7 +597,7 @@ index f7207c0..a69fb06 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
@@ -4273,8 +4275,8 @@ debug_to_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
|
||||
@@ -4275,8 +4277,8 @@ debug_to_can_accel_watchpoint_condition
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"target_can_accel_watchpoint_condition "
|
||||
@ -606,7 +608,7 @@ index f7207c0..a69fb06 100644
|
||||
host_address_to_string (cond), (unsigned long) retval);
|
||||
return retval;
|
||||
}
|
||||
@@ -4309,7 +4311,7 @@ debug_to_stopped_data_address (struct target_ops *target, CORE_ADDR *addr)
|
||||
@@ -4311,7 +4313,7 @@ debug_to_stopped_data_address (struct ta
|
||||
static int
|
||||
debug_to_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -615,7 +617,7 @@ index f7207c0..a69fb06 100644
|
||||
{
|
||||
int retval;
|
||||
|
||||
@@ -4317,9 +4319,9 @@ debug_to_watchpoint_addr_within_range (struct target_ops *target,
|
||||
@@ -4319,9 +4321,9 @@ debug_to_watchpoint_addr_within_range (s
|
||||
start, length);
|
||||
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
@ -627,7 +629,7 @@ index f7207c0..a69fb06 100644
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -4354,7 +4356,7 @@ debug_to_remove_hw_breakpoint (struct gdbarch *gdbarch,
|
||||
@@ -4356,7 +4358,7 @@ debug_to_remove_hw_breakpoint (struct gd
|
||||
}
|
||||
|
||||
static int
|
||||
@ -636,7 +638,7 @@ index f7207c0..a69fb06 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
@@ -4362,14 +4364,14 @@ debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -4364,14 +4366,14 @@ debug_to_insert_watchpoint (CORE_ADDR ad
|
||||
retval = debug_target.to_insert_watchpoint (addr, len, type, cond);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -654,7 +656,7 @@ index f7207c0..a69fb06 100644
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
@@ -4377,8 +4379,8 @@ debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
@@ -4379,8 +4381,8 @@ debug_to_remove_watchpoint (CORE_ADDR ad
|
||||
retval = debug_target.to_remove_watchpoint (addr, len, type, cond);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -665,10 +667,10 @@ index f7207c0..a69fb06 100644
|
||||
host_address_to_string (cond), (unsigned long) retval);
|
||||
return retval;
|
||||
}
|
||||
diff --git a/gdb/target.h b/gdb/target.h
|
||||
index 69228e1..4b52d53 100644
|
||||
--- a/gdb/target.h
|
||||
+++ b/gdb/target.h
|
||||
Index: gdb-7.5.50.20130215/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/target.h 2013-02-15 22:40:18.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/target.h 2013-02-15 22:42:45.998804328 +0100
|
||||
@@ -466,8 +466,8 @@ struct target_ops
|
||||
|
||||
/* Documentation of what the two routines below are expected to do is
|
||||
@ -696,6 +698,3 @@ index 69228e1..4b52d53 100644
|
||||
struct expression *);
|
||||
int (*to_masked_watch_num_registers) (struct target_ops *,
|
||||
CORE_ADDR, CORE_ADDR);
|
||||
|
||||
--MP_/6HRlH6vpyqtSy4CYyMrX6b2--
|
||||
|
||||
|
@ -137,10 +137,10 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=bitpos-tdep.patch
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/alpha-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/alpha-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/alpha-tdep.c 2012-11-07 22:46:00.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/alpha-tdep.c 2012-11-07 22:47:57.371984929 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/alpha-tdep.c 2013-01-18 23:36:59.954290362 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/alpha-tdep.c 2013-01-18 23:37:12.465307566 +0100
|
||||
@@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *g
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -184,11 +184,11 @@ Index: gdb-7.5.0.20120926/gdb/alpha-tdep.c
|
||||
memcpy (arg_reg_buffer + offset, contents, tlen);
|
||||
offset += tlen;
|
||||
contents += tlen;
|
||||
Index: gdb-7.5.0.20120926/gdb/amd64-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/amd64-tdep.c 2012-11-07 22:09:24.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/amd64-tdep.c 2012-11-07 22:47:57.374984923 +0100
|
||||
@@ -599,7 +599,7 @@ amd64_return_value (struct gdbarch *gdba
|
||||
--- gdb-7.5.50.20130118.orig/gdb/amd64-tdep.c 2013-01-18 23:36:59.955290365 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/amd64-tdep.c 2013-01-18 23:37:12.466307569 +0100
|
||||
@@ -616,7 +616,7 @@ amd64_return_value (struct gdbarch *gdba
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum amd64_reg_class class[2];
|
||||
@ -197,7 +197,7 @@ Index: gdb-7.5.0.20120926/gdb/amd64-tdep.c
|
||||
static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM };
|
||||
static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM };
|
||||
int integer_reg = 0;
|
||||
@@ -728,8 +728,8 @@ amd64_push_arguments (struct regcache *r
|
||||
@@ -769,8 +769,8 @@ amd64_push_arguments (struct regcache *r
|
||||
that register number (or a negative value otherwise). */
|
||||
int *arg_addr_regno = alloca (nargs * sizeof (int));
|
||||
int num_stack_args = 0;
|
||||
@ -208,7 +208,7 @@ Index: gdb-7.5.0.20120926/gdb/amd64-tdep.c
|
||||
int integer_reg = 0;
|
||||
int sse_reg = 0;
|
||||
int i;
|
||||
@@ -743,7 +743,7 @@ amd64_push_arguments (struct regcache *r
|
||||
@@ -784,7 +784,7 @@ amd64_push_arguments (struct regcache *r
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
struct type *type = value_type (args[i]);
|
||||
@ -217,11 +217,11 @@ Index: gdb-7.5.0.20120926/gdb/amd64-tdep.c
|
||||
enum amd64_reg_class class[2];
|
||||
int needed_integer_regs = 0;
|
||||
int needed_sse_regs = 0;
|
||||
Index: gdb-7.5.0.20120926/gdb/amd64-windows-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/amd64-windows-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/amd64-windows-tdep.c 2012-06-05 15:50:57.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/amd64-windows-tdep.c 2012-11-07 22:47:57.413984867 +0100
|
||||
@@ -78,7 +78,7 @@ amd64_windows_return_value (struct gdbar
|
||||
--- gdb-7.5.50.20130118.orig/gdb/amd64-windows-tdep.c 2013-01-18 23:36:59.956290369 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/amd64-windows-tdep.c 2013-01-18 23:37:12.466307569 +0100
|
||||
@@ -79,7 +79,7 @@ amd64_windows_return_value (struct gdbar
|
||||
struct type *type, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
@ -230,11 +230,11 @@ Index: gdb-7.5.0.20120926/gdb/amd64-windows-tdep.c
|
||||
int regnum = -1;
|
||||
|
||||
/* See if our value is returned through a register. If it is, then
|
||||
Index: gdb-7.5.0.20120926/gdb/arm-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/arm-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/arm-tdep.c 2012-06-25 14:32:45.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/arm-tdep.c 2012-11-07 22:47:57.422984855 +0100
|
||||
@@ -3377,7 +3377,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc
|
||||
--- gdb-7.5.50.20130118.orig/gdb/arm-tdep.c 2013-01-18 23:36:59.961290378 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/arm-tdep.c 2013-01-18 23:37:12.469307573 +0100
|
||||
@@ -3496,7 +3496,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc
|
||||
array). Vectors and complex types are not currently supported,
|
||||
matching the generic AAPCS support. */
|
||||
|
||||
@ -243,7 +243,7 @@ Index: gdb-7.5.0.20120926/gdb/arm-tdep.c
|
||||
arm_vfp_cprc_sub_candidate (struct type *t,
|
||||
enum arm_vfp_cprc_base_type *base_type)
|
||||
{
|
||||
@@ -3408,7 +3408,7 @@ arm_vfp_cprc_sub_candidate (struct type
|
||||
@@ -3527,7 +3527,7 @@ arm_vfp_cprc_sub_candidate (struct type
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
{
|
||||
@ -252,7 +252,7 @@ Index: gdb-7.5.0.20120926/gdb/arm-tdep.c
|
||||
unsigned unitlen;
|
||||
count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type);
|
||||
if (count == -1)
|
||||
@@ -3428,13 +3428,15 @@ arm_vfp_cprc_sub_candidate (struct type
|
||||
@@ -3547,13 +3547,15 @@ arm_vfp_cprc_sub_candidate (struct type
|
||||
|
||||
case TYPE_CODE_STRUCT:
|
||||
{
|
||||
@ -271,7 +271,7 @@ Index: gdb-7.5.0.20120926/gdb/arm-tdep.c
|
||||
if (sub_count == -1)
|
||||
return -1;
|
||||
count += sub_count;
|
||||
@@ -3454,13 +3456,15 @@ arm_vfp_cprc_sub_candidate (struct type
|
||||
@@ -3573,13 +3575,15 @@ arm_vfp_cprc_sub_candidate (struct type
|
||||
|
||||
case TYPE_CODE_UNION:
|
||||
{
|
||||
@ -290,7 +290,7 @@ Index: gdb-7.5.0.20120926/gdb/arm-tdep.c
|
||||
if (sub_count == -1)
|
||||
return -1;
|
||||
count = (count > sub_count ? count : sub_count);
|
||||
@@ -3496,7 +3500,7 @@ arm_vfp_call_candidate (struct type *t,
|
||||
@@ -3615,7 +3619,7 @@ arm_vfp_call_candidate (struct type *t,
|
||||
int *count)
|
||||
{
|
||||
enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN;
|
||||
@ -299,7 +299,7 @@ Index: gdb-7.5.0.20120926/gdb/arm-tdep.c
|
||||
if (c <= 0 || c > 4)
|
||||
return 0;
|
||||
*base_type = b;
|
||||
@@ -3577,7 +3581,7 @@ arm_push_dummy_call (struct gdbarch *gdb
|
||||
@@ -3696,7 +3700,7 @@ arm_push_dummy_call (struct gdbarch *gdb
|
||||
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
@ -308,10 +308,10 @@ Index: gdb-7.5.0.20120926/gdb/arm-tdep.c
|
||||
struct type *arg_type;
|
||||
struct type *target_type;
|
||||
enum type_code typecode;
|
||||
Index: gdb-7.5.0.20120926/gdb/avr-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/avr-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/avr-tdep.c 2012-05-18 23:02:47.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/avr-tdep.c 2012-11-07 22:47:57.444984823 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/avr-tdep.c 2013-01-18 23:36:59.963290385 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/avr-tdep.c 2013-01-18 23:37:12.470307574 +0100
|
||||
@@ -1170,13 +1170,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s
|
||||
|
||||
struct stack_item
|
||||
@ -345,10 +345,10 @@ Index: gdb-7.5.0.20120926/gdb/avr-tdep.c
|
||||
|
||||
/* Calculate the potential last register needed. */
|
||||
last_regnum = regnum - (len + (len & 1));
|
||||
Index: gdb-7.5.0.20120926/gdb/bfin-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/bfin-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/bfin-tdep.c 2012-11-07 22:09:24.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/bfin-tdep.c 2012-11-07 22:47:57.450984814 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/bfin-tdep.c 2013-01-18 23:36:59.963290385 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/bfin-tdep.c 2013-01-18 23:37:12.470307574 +0100
|
||||
@@ -506,7 +506,7 @@ bfin_push_dummy_call (struct gdbarch *gd
|
||||
char buf[4];
|
||||
int i;
|
||||
@ -367,10 +367,10 @@ Index: gdb-7.5.0.20120926/gdb/bfin-tdep.c
|
||||
|
||||
sp -= container_len;
|
||||
write_memory (sp, value_contents_writeable (args[i]), container_len);
|
||||
Index: gdb-7.5.0.20120926/gdb/cris-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/cris-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/cris-tdep.c 2012-11-07 22:09:24.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/cris-tdep.c 2012-11-07 22:47:57.453984810 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/cris-tdep.c 2013-01-18 23:36:59.965290390 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/cris-tdep.c 2013-01-18 23:37:12.471307578 +0100
|
||||
@@ -670,13 +670,13 @@ static CORE_ADDR cris_unwind_sp (struct
|
||||
|
||||
struct stack_item
|
||||
@ -405,11 +405,11 @@ Index: gdb-7.5.0.20120926/gdb/cris-tdep.c
|
||||
|
||||
/* How may registers worth of storage do we need for this argument? */
|
||||
reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0);
|
||||
Index: gdb-7.5.0.20120926/gdb/h8300-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/h8300-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/h8300-tdep.c 2012-11-07 22:09:24.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/h8300-tdep.c 2012-11-07 22:47:57.456984806 +0100
|
||||
@@ -641,7 +641,7 @@ h8300_push_dummy_call (struct gdbarch *g
|
||||
--- gdb-7.5.50.20130118.orig/gdb/h8300-tdep.c 2013-01-18 23:36:59.966290392 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/h8300-tdep.c 2013-01-18 23:37:12.472307583 +0100
|
||||
@@ -640,7 +640,7 @@ h8300_push_dummy_call (struct gdbarch *g
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -418,7 +418,7 @@ Index: gdb-7.5.0.20120926/gdb/h8300-tdep.c
|
||||
int wordsize = BINWORD (gdbarch);
|
||||
int reg = E_ARG0_REGNUM;
|
||||
int argument;
|
||||
@@ -668,11 +668,11 @@ h8300_push_dummy_call (struct gdbarch *g
|
||||
@@ -667,11 +667,11 @@ h8300_push_dummy_call (struct gdbarch *g
|
||||
{
|
||||
struct cleanup *back_to;
|
||||
struct type *type = value_type (args[argument]);
|
||||
@ -432,7 +432,7 @@ Index: gdb-7.5.0.20120926/gdb/h8300-tdep.c
|
||||
gdb_byte *padded = xmalloc (padded_len);
|
||||
back_to = make_cleanup (xfree, padded);
|
||||
|
||||
@@ -701,7 +701,7 @@ h8300_push_dummy_call (struct gdbarch *g
|
||||
@@ -700,7 +700,7 @@ h8300_push_dummy_call (struct gdbarch *g
|
||||
/* Heavens to Betsy --- it's really going in registers!
|
||||
Note that on the h8/300s, there are gaps between the
|
||||
registers in the register file. */
|
||||
@ -441,11 +441,11 @@ Index: gdb-7.5.0.20120926/gdb/h8300-tdep.c
|
||||
|
||||
for (offset = 0; offset < padded_len; offset += wordsize)
|
||||
{
|
||||
Index: gdb-7.5.0.20120926/gdb/hppa-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/hppa-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/hppa-tdep.c 2012-11-07 22:09:24.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/hppa-tdep.c 2012-11-07 22:48:31.378936083 +0100
|
||||
@@ -962,7 +962,7 @@ hppa64_push_dummy_call (struct gdbarch *
|
||||
--- gdb-7.5.50.20130118.orig/gdb/hppa-tdep.c 2013-01-18 23:36:59.966290392 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/hppa-tdep.c 2013-01-18 23:37:44.228351370 +0100
|
||||
@@ -961,7 +961,7 @@ hppa64_push_dummy_call (struct gdbarch *
|
||||
{
|
||||
struct value *arg = args[i];
|
||||
struct type *type = value_type (arg);
|
||||
@ -454,7 +454,7 @@ Index: gdb-7.5.0.20120926/gdb/hppa-tdep.c
|
||||
const bfd_byte *valbuf;
|
||||
bfd_byte fptrbuf[8];
|
||||
int regnum;
|
||||
@@ -1157,7 +1157,7 @@ hppa64_return_value (struct gdbarch *gdb
|
||||
@@ -1156,7 +1156,7 @@ hppa64_return_value (struct gdbarch *gdb
|
||||
struct type *type, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
@ -462,11 +462,11 @@ Index: gdb-7.5.0.20120926/gdb/hppa-tdep.c
|
||||
+ LONGEST len = TYPE_LENGTH (type);
|
||||
int regnum, offset;
|
||||
|
||||
if (TYPE_LENGTH (type) > 16)
|
||||
Index: gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c
|
||||
if (len > 16)
|
||||
Index: gdb-7.5.50.20130118/gdb/i386-darwin-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/i386-darwin-tdep.c 2012-11-07 22:03:57.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c 2012-11-07 22:47:57.470984786 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/i386-darwin-tdep.c 2013-01-18 23:36:59.967290394 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/i386-darwin-tdep.c 2013-01-18 23:37:12.473307586 +0100
|
||||
@@ -166,7 +166,7 @@ i386_darwin_push_dummy_call (struct gdba
|
||||
|
||||
for (write_pass = 0; write_pass < 2; write_pass++)
|
||||
@ -476,11 +476,11 @@ Index: gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c
|
||||
int num_m128 = 0;
|
||||
|
||||
if (struct_return)
|
||||
Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/i386-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/i386-tdep.c 2012-11-07 22:00:42.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/i386-tdep.c 2012-11-07 22:47:57.474984780 +0100
|
||||
@@ -2358,7 +2358,7 @@ i386_push_dummy_call (struct gdbarch *gd
|
||||
--- gdb-7.5.50.20130118.orig/gdb/i386-tdep.c 2013-01-18 23:36:59.969290398 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/i386-tdep.c 2013-01-18 23:37:12.475307589 +0100
|
||||
@@ -2407,7 +2407,7 @@ i386_push_dummy_call (struct gdbarch *gd
|
||||
gdb_byte buf[4];
|
||||
int i;
|
||||
int write_pass;
|
||||
@ -489,7 +489,7 @@ Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
|
||||
|
||||
/* Determine the total space required for arguments and struct
|
||||
return address in a first pass (allowing for 16-byte-aligned
|
||||
@@ -2366,7 +2366,7 @@ i386_push_dummy_call (struct gdbarch *gd
|
||||
@@ -2415,7 +2415,7 @@ i386_push_dummy_call (struct gdbarch *gd
|
||||
|
||||
for (write_pass = 0; write_pass < 2; write_pass++)
|
||||
{
|
||||
@ -498,7 +498,7 @@ Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
|
||||
|
||||
if (struct_return)
|
||||
{
|
||||
@@ -2383,7 +2383,7 @@ i386_push_dummy_call (struct gdbarch *gd
|
||||
@@ -2432,7 +2432,7 @@ i386_push_dummy_call (struct gdbarch *gd
|
||||
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
@ -507,7 +507,7 @@ Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
|
||||
|
||||
if (write_pass)
|
||||
{
|
||||
@@ -2590,7 +2590,7 @@ i386_reg_struct_return_p (struct gdbarch
|
||||
@@ -2639,7 +2639,7 @@ i386_reg_struct_return_p (struct gdbarch
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum type_code code = TYPE_CODE (type);
|
||||
@ -516,7 +516,7 @@ Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
|
||||
|
||||
gdb_assert (code == TYPE_CODE_STRUCT
|
||||
|| code == TYPE_CODE_UNION
|
||||
@@ -3042,7 +3042,7 @@ static int
|
||||
@@ -3094,7 +3094,7 @@ static int
|
||||
i386_convert_register_p (struct gdbarch *gdbarch,
|
||||
int regnum, struct type *type)
|
||||
{
|
||||
@ -525,7 +525,7 @@ Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
|
||||
|
||||
/* Values may be spread across multiple registers. Most debugging
|
||||
formats aren't expressive enough to specify the locations, so
|
||||
@@ -3075,7 +3075,7 @@ i386_register_to_value (struct frame_inf
|
||||
@@ -3127,7 +3127,7 @@ i386_register_to_value (struct frame_inf
|
||||
int *optimizedp, int *unavailablep)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
@ -534,7 +534,7 @@ Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
|
||||
|
||||
if (i386_fp_regnum_p (gdbarch, regnum))
|
||||
return i387_register_to_value (frame, regnum, type, to,
|
||||
@@ -3111,7 +3111,7 @@ static void
|
||||
@@ -3163,7 +3163,7 @@ static void
|
||||
i386_value_to_register (struct frame_info *frame, int regnum,
|
||||
struct type *type, const gdb_byte *from)
|
||||
{
|
||||
@ -543,10 +543,10 @@ Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
|
||||
|
||||
if (i386_fp_regnum_p (get_frame_arch (frame), regnum))
|
||||
{
|
||||
Index: gdb-7.5.0.20120926/gdb/ia64-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/ia64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/ia64-tdep.c 2012-11-07 22:00:42.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/ia64-tdep.c 2012-11-07 22:47:57.491984756 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/ia64-tdep.c 2013-01-18 23:36:59.970290400 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/ia64-tdep.c 2013-01-18 23:37:12.476307589 +0100
|
||||
@@ -3974,8 +3974,10 @@ ia64_push_dummy_call (struct gdbarch *gd
|
||||
int argno;
|
||||
struct value *arg;
|
||||
@ -560,11 +560,11 @@ Index: gdb-7.5.0.20120926/gdb/ia64-tdep.c
|
||||
int floatreg;
|
||||
ULONGEST bsp;
|
||||
CORE_ADDR funcdescaddr, pc, global_pointer;
|
||||
Index: gdb-7.5.0.20120926/gdb/iq2000-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/iq2000-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/iq2000-tdep.c 2012-05-16 16:35:06.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/iq2000-tdep.c 2012-11-07 22:47:57.509984729 +0100
|
||||
@@ -655,8 +655,9 @@ iq2000_push_dummy_call (struct gdbarch *
|
||||
--- gdb-7.5.50.20130118.orig/gdb/iq2000-tdep.c 2013-01-18 23:36:59.970290400 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/iq2000-tdep.c 2013-01-18 23:37:12.476307589 +0100
|
||||
@@ -654,8 +654,9 @@ iq2000_push_dummy_call (struct gdbarch *
|
||||
const bfd_byte *val;
|
||||
bfd_byte buf[4];
|
||||
struct type *type;
|
||||
@ -576,11 +576,11 @@ Index: gdb-7.5.0.20120926/gdb/iq2000-tdep.c
|
||||
/* Used to copy struct arguments into the stack. */
|
||||
CORE_ADDR struct_ptr;
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/m32r-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/m32r-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/m32r-tdep.c 2012-05-18 23:02:49.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/m32r-tdep.c 2012-11-07 22:47:57.516984719 +0100
|
||||
@@ -696,7 +696,7 @@ m32r_push_dummy_call (struct gdbarch *gd
|
||||
--- gdb-7.5.50.20130118.orig/gdb/m32r-tdep.c 2013-01-18 23:36:59.971290402 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/m32r-tdep.c 2013-01-18 23:37:12.476307589 +0100
|
||||
@@ -695,7 +695,7 @@ m32r_push_dummy_call (struct gdbarch *gd
|
||||
CORE_ADDR regval;
|
||||
gdb_byte *val;
|
||||
gdb_byte valbuf[MAX_REGISTER_SIZE];
|
||||
@ -589,10 +589,10 @@ Index: gdb-7.5.0.20120926/gdb/m32r-tdep.c
|
||||
|
||||
/* First force sp to a 4-byte alignment. */
|
||||
sp = sp & ~3;
|
||||
Index: gdb-7.5.0.20120926/gdb/m68k-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/m68k-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/m68k-tdep.c 2012-11-07 22:02:30.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/m68k-tdep.c 2012-11-07 22:49:45.881829032 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/m68k-tdep.c 2013-01-18 23:36:59.971290402 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/m68k-tdep.c 2013-01-18 23:39:06.474459041 +0100
|
||||
@@ -384,7 +384,7 @@ m68k_reg_struct_return_p (struct gdbarch
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
@ -600,9 +600,9 @@ Index: gdb-7.5.0.20120926/gdb/m68k-tdep.c
|
||||
- int len = TYPE_LENGTH (type);
|
||||
+ LONGEST len = TYPE_LENGTH (type);
|
||||
|
||||
gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION);
|
||||
|
||||
@@ -513,9 +513,9 @@ m68k_push_dummy_call (struct gdbarch *gd
|
||||
gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION
|
||||
|| code == TYPE_CODE_COMPLEX);
|
||||
@@ -516,9 +516,9 @@ m68k_push_dummy_call (struct gdbarch *gd
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
{
|
||||
struct type *value_type = value_enclosing_type (args[i]);
|
||||
@ -615,10 +615,10 @@ Index: gdb-7.5.0.20120926/gdb/m68k-tdep.c
|
||||
|
||||
/* Non-scalars bigger than 4 bytes are left aligned, others are
|
||||
right aligned. */
|
||||
Index: gdb-7.5.0.20120926/gdb/m88k-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/m88k-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/m88k-tdep.c 2012-05-16 16:35:06.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/m88k-tdep.c 2012-11-07 22:47:57.520984714 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/m88k-tdep.c 2013-01-18 23:36:59.971290402 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/m88k-tdep.c 2013-01-18 23:37:12.477307590 +0100
|
||||
@@ -260,13 +260,13 @@ m88k_store_arguments (struct regcache *r
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
@ -646,10 +646,10 @@ Index: gdb-7.5.0.20120926/gdb/m88k-tdep.c
|
||||
|
||||
if (m88k_in_register_p (type))
|
||||
{
|
||||
Index: gdb-7.5.0.20120926/gdb/mep-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/mep-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/mep-tdep.c 2012-11-07 22:03:57.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/mep-tdep.c 2012-11-07 22:47:57.522984712 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/mep-tdep.c 2013-01-18 23:36:59.972290404 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/mep-tdep.c 2013-01-18 23:37:12.477307590 +0100
|
||||
@@ -2279,7 +2279,7 @@ push_large_arguments (CORE_ADDR sp, int
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
@ -659,10 +659,10 @@ Index: gdb-7.5.0.20120926/gdb/mep-tdep.c
|
||||
|
||||
if (arg_len > MEP_GPR_SIZE)
|
||||
{
|
||||
Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/mips-tdep.c 2012-11-07 22:02:30.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/mips-tdep.c 2012-11-07 22:47:57.534984694 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/mips-tdep.c 2013-01-18 23:36:59.975290414 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/mips-tdep.c 2013-01-18 23:37:12.479307599 +0100
|
||||
@@ -396,7 +396,7 @@ static void
|
||||
mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
int reg_num, int length,
|
||||
@ -683,7 +683,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
if (mips_debug && out != NULL)
|
||||
{
|
||||
int i;
|
||||
@@ -4295,13 +4295,13 @@ mips_eabi_push_dummy_call (struct gdbarc
|
||||
@@ -4345,13 +4345,13 @@ mips_eabi_push_dummy_call (struct gdbarc
|
||||
gdb_byte valbuf[MAX_REGISTER_SIZE];
|
||||
struct value *arg = args[argnum];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
@ -700,7 +700,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
|
||||
/* Function pointer arguments to mips16 code need to be made into
|
||||
mips16 pointers. */
|
||||
@@ -4586,7 +4586,7 @@ mips_eabi_return_value (struct gdbarch *
|
||||
@@ -4636,7 +4636,7 @@ mips_eabi_return_value (struct gdbarch *
|
||||
|
||||
static int
|
||||
mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type,
|
||||
@ -709,7 +709,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -4601,7 +4601,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar
|
||||
@@ -4651,7 +4651,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar
|
||||
|
||||
for (i = 0; i < TYPE_NFIELDS (arg_type); i++)
|
||||
{
|
||||
@ -718,7 +718,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
struct type *field_type;
|
||||
|
||||
/* We're only looking at normal fields. */
|
||||
@@ -4643,7 +4643,7 @@ mips_n32n64_push_dummy_call (struct gdba
|
||||
@@ -4693,7 +4693,7 @@ mips_n32n64_push_dummy_call (struct gdba
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
int argnum;
|
||||
@ -727,7 +727,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
int stack_offset = 0;
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
@@ -4994,11 +4994,11 @@ mips_n32n64_return_value (struct gdbarch
|
||||
@@ -5044,11 +5044,11 @@ mips_n32n64_return_value (struct gdbarch
|
||||
: MIPS_V0_REGNUM);
|
||||
field < TYPE_NFIELDS (type); field++, regnum += 2)
|
||||
{
|
||||
@ -743,7 +743,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16)
|
||||
{
|
||||
/* A 16-byte long double field goes in two consecutive
|
||||
@@ -5040,8 +5040,8 @@ mips_n32n64_return_value (struct gdbarch
|
||||
@@ -5090,8 +5090,8 @@ mips_n32n64_return_value (struct gdbarch
|
||||
if (offset + xfer > TYPE_LENGTH (type))
|
||||
xfer = TYPE_LENGTH (type) - offset;
|
||||
if (mips_debug)
|
||||
@ -754,7 +754,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
mips_xfer_register (gdbarch, regcache,
|
||||
gdbarch_num_regs (gdbarch) + regnum,
|
||||
xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf,
|
||||
@@ -5099,7 +5099,7 @@ mips_o32_push_dummy_call (struct gdbarch
|
||||
@@ -5149,7 +5149,7 @@ mips_o32_push_dummy_call (struct gdbarch
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
int argnum;
|
||||
@ -763,7 +763,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
int stack_offset = 0;
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
@@ -5163,13 +5163,13 @@ mips_o32_push_dummy_call (struct gdbarch
|
||||
@@ -5213,13 +5213,13 @@ mips_o32_push_dummy_call (struct gdbarch
|
||||
const gdb_byte *val;
|
||||
struct value *arg = args[argnum];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
@ -780,7 +780,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
|
||||
val = value_contents (arg);
|
||||
|
||||
@@ -5627,8 +5627,8 @@ mips_o64_push_dummy_call (struct gdbarch
|
||||
@@ -5677,8 +5677,8 @@ mips_o64_push_dummy_call (struct gdbarch
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
int argnum;
|
||||
@ -791,7 +791,7 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
|
||||
@@ -5689,13 +5689,13 @@ mips_o64_push_dummy_call (struct gdbarch
|
||||
@@ -5739,13 +5739,13 @@ mips_o64_push_dummy_call (struct gdbarch
|
||||
gdb_byte valbuf[MAX_REGISTER_SIZE];
|
||||
struct value *arg = args[argnum];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
@ -808,10 +808,10 @@ Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
|
||||
|
||||
val = value_contents (arg);
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/mn10300-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/mn10300-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/mn10300-tdep.c 2012-05-18 23:02:49.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/mn10300-tdep.c 2012-11-07 22:47:57.542984682 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/mn10300-tdep.c 2013-01-18 23:36:59.976290416 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/mn10300-tdep.c 2013-01-18 23:37:12.479307599 +0100
|
||||
@@ -1228,7 +1228,7 @@ mn10300_push_dummy_call (struct gdbarch
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
const int push_size = register_size (gdbarch, E_PC_REGNUM);
|
||||
@ -821,10 +821,10 @@ Index: gdb-7.5.0.20120926/gdb/mn10300-tdep.c
|
||||
int stack_offset = 0;
|
||||
int argnum;
|
||||
char *val, valbuf[MAX_REGISTER_SIZE];
|
||||
Index: gdb-7.5.0.20120926/gdb/mt-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/mt-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/mt-tdep.c 2012-11-07 22:00:44.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/mt-tdep.c 2012-11-07 22:47:57.544984680 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/mt-tdep.c 2013-01-18 23:36:59.976290416 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/mt-tdep.c 2013-01-18 23:37:12.479307599 +0100
|
||||
@@ -783,9 +783,9 @@ mt_push_dummy_call (struct gdbarch *gdba
|
||||
gdb_byte buf[MT_MAX_STRUCT_SIZE];
|
||||
int argreg = MT_1ST_ARGREG;
|
||||
@ -837,11 +837,11 @@ Index: gdb-7.5.0.20120926/gdb/mt-tdep.c
|
||||
int i, j;
|
||||
|
||||
/* First handle however many args we can fit into MT_1ST_ARGREG thru
|
||||
Index: gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/ppc-sysv-tdep.c 2012-05-18 23:02:49.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c 2012-11-07 22:47:57.551984669 +0100
|
||||
@@ -69,7 +69,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
|
||||
--- gdb-7.5.50.20130118.orig/gdb/ppc-sysv-tdep.c 2013-01-18 23:36:59.977290417 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c 2013-01-18 23:37:12.480307602 +0100
|
||||
@@ -68,7 +68,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
|
||||
ULONGEST saved_sp;
|
||||
@ -850,7 +850,7 @@ Index: gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c
|
||||
int write_pass;
|
||||
|
||||
gdb_assert (tdep->wordsize == 4);
|
||||
@@ -100,9 +100,9 @@ ppc_sysv_abi_push_dummy_call (struct gdb
|
||||
@@ -99,9 +99,9 @@ ppc_sysv_abi_push_dummy_call (struct gdb
|
||||
/* Next available vector register for vector arguments. */
|
||||
int vreg = 2;
|
||||
/* Arguments start above the "LR save word" and "Back chain". */
|
||||
@ -862,7 +862,7 @@ Index: gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c
|
||||
|
||||
/* If the function is returning a `struct', then the first word
|
||||
(which will be passed in r3) is used for struct return
|
||||
@@ -121,7 +121,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
|
||||
@@ -120,7 +120,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
|
||||
{
|
||||
struct value *arg = args[argno];
|
||||
struct type *type = check_typedef (value_type (arg));
|
||||
@ -871,7 +871,7 @@ Index: gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c
|
||||
const bfd_byte *val = value_contents (arg);
|
||||
|
||||
if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8
|
||||
@@ -1557,14 +1557,14 @@ ppc64_sysv_abi_push_dummy_call (struct g
|
||||
@@ -1556,14 +1556,14 @@ ppc64_sysv_abi_push_dummy_call (struct g
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -888,7 +888,7 @@ Index: gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c
|
||||
if (len > tdep->wordsize)
|
||||
len = tdep->wordsize;
|
||||
memset (regval, 0, sizeof regval);
|
||||
@@ -1592,7 +1592,7 @@ ppc64_sysv_abi_push_dummy_call (struct g
|
||||
@@ -1591,7 +1591,7 @@ ppc64_sysv_abi_push_dummy_call (struct g
|
||||
register. Work around this by always writing the
|
||||
value to memory. Fortunately, doing this
|
||||
simplifies the code. */
|
||||
@ -897,10 +897,10 @@ Index: gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c
|
||||
if (len < tdep->wordsize)
|
||||
write_memory (gparam + tdep->wordsize - len, val, len);
|
||||
else
|
||||
Index: gdb-7.5.0.20120926/gdb/rl78-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/rl78-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/rl78-tdep.c 2012-05-18 23:02:50.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/rl78-tdep.c 2012-11-07 22:47:57.557984660 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/rl78-tdep.c 2013-01-18 23:36:59.977290417 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/rl78-tdep.c 2013-01-18 23:37:12.480307602 +0100
|
||||
@@ -1019,8 +1019,8 @@ rl78_push_dummy_call (struct gdbarch *gd
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
{
|
||||
@ -912,11 +912,11 @@ Index: gdb-7.5.0.20120926/gdb/rl78-tdep.c
|
||||
|
||||
sp -= container_len;
|
||||
write_memory (rl78_make_data_address (sp),
|
||||
Index: gdb-7.5.0.20120926/gdb/rs6000-aix-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/rs6000-aix-tdep.c 2012-05-18 23:02:50.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/rs6000-aix-tdep.c 2012-11-07 22:47:57.560984657 +0100
|
||||
@@ -197,9 +197,9 @@ rs6000_push_dummy_call (struct gdbarch *
|
||||
--- gdb-7.5.50.20130118.orig/gdb/rs6000-aix-tdep.c 2013-01-18 23:36:59.978290418 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c 2013-01-18 23:37:12.480307602 +0100
|
||||
@@ -198,9 +198,9 @@ rs6000_push_dummy_call (struct gdbarch *
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int ii;
|
||||
@ -928,7 +928,7 @@ Index: gdb-7.5.0.20120926/gdb/rs6000-aix-tdep.c
|
||||
gdb_byte tmp_buffer[50];
|
||||
int f_argno = 0; /* current floating point argno */
|
||||
int wordsize = gdbarch_tdep (gdbarch)->wordsize;
|
||||
@@ -327,7 +327,7 @@ ran_out_of_registers_for_arguments:
|
||||
@@ -328,7 +328,7 @@ ran_out_of_registers_for_arguments:
|
||||
|
||||
if ((argno < nargs) || argbytes)
|
||||
{
|
||||
@ -937,11 +937,11 @@ Index: gdb-7.5.0.20120926/gdb/rs6000-aix-tdep.c
|
||||
|
||||
if (argbytes)
|
||||
{
|
||||
Index: gdb-7.5.0.20120926/gdb/s390-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/s390-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/s390-tdep.c 2012-11-07 22:03:57.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/s390-tdep.c 2012-11-07 22:47:57.569984644 +0100
|
||||
@@ -2481,7 +2481,7 @@ is_float_like (struct type *type)
|
||||
--- gdb-7.5.50.20130118.orig/gdb/s390-tdep.c 2013-01-18 23:36:59.979290420 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/s390-tdep.c 2013-01-18 23:37:12.480307602 +0100
|
||||
@@ -2482,7 +2482,7 @@ is_float_like (struct type *type)
|
||||
|
||||
|
||||
static int
|
||||
@ -950,7 +950,7 @@ Index: gdb-7.5.0.20120926/gdb/s390-tdep.c
|
||||
{
|
||||
return ((n & (n - 1)) == 0);
|
||||
}
|
||||
@@ -2667,7 +2667,7 @@ s390_push_dummy_call (struct gdbarch *gd
|
||||
@@ -2668,7 +2668,7 @@ s390_push_dummy_call (struct gdbarch *gd
|
||||
{
|
||||
struct value *arg = args[i];
|
||||
struct type *type = check_typedef (value_type (arg));
|
||||
@ -959,10 +959,10 @@ Index: gdb-7.5.0.20120926/gdb/s390-tdep.c
|
||||
|
||||
if (s390_function_arg_pass_by_reference (type))
|
||||
{
|
||||
Index: gdb-7.5.0.20120926/gdb/score-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/score-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/score-tdep.c 2012-05-18 23:02:50.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/score-tdep.c 2012-11-07 22:47:57.571984640 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/score-tdep.c 2013-01-18 23:36:59.979290420 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/score-tdep.c 2013-01-18 23:37:12.481307604 +0100
|
||||
@@ -515,7 +515,7 @@ score_push_dummy_call (struct gdbarch *g
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argnum;
|
||||
@ -972,11 +972,11 @@ Index: gdb-7.5.0.20120926/gdb/score-tdep.c
|
||||
CORE_ADDR stack_offset = 0;
|
||||
CORE_ADDR addr = 0;
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/sh-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/sh-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/sh-tdep.c 2012-11-07 22:00:44.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/sh-tdep.c 2012-11-07 22:47:57.579984628 +0100
|
||||
@@ -805,7 +805,7 @@ sh_skip_prologue (struct gdbarch *gdbarc
|
||||
--- gdb-7.5.50.20130118.orig/gdb/sh-tdep.c 2013-01-18 23:36:59.980290423 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/sh-tdep.c 2013-01-18 23:37:12.481307604 +0100
|
||||
@@ -807,7 +807,7 @@ sh_skip_prologue (struct gdbarch *gdbarc
|
||||
static int
|
||||
sh_use_struct_convention (int renesas_abi, struct type *type)
|
||||
{
|
||||
@ -985,7 +985,7 @@ Index: gdb-7.5.0.20120926/gdb/sh-tdep.c
|
||||
int nelem = TYPE_NFIELDS (type);
|
||||
|
||||
/* The Renesas ABI returns aggregate types always on stack. */
|
||||
@@ -907,7 +907,7 @@ sh_frame_align (struct gdbarch *ignore,
|
||||
@@ -909,7 +909,7 @@ sh_frame_align (struct gdbarch *ignore,
|
||||
|
||||
/* Helper function to justify value in register according to endianess. */
|
||||
static char *
|
||||
@ -994,7 +994,7 @@ Index: gdb-7.5.0.20120926/gdb/sh-tdep.c
|
||||
{
|
||||
static char valbuf[4];
|
||||
|
||||
@@ -1067,7 +1067,8 @@ sh_push_dummy_call_fpu (struct gdbarch *
|
||||
@@ -1069,7 +1069,8 @@ sh_push_dummy_call_fpu (struct gdbarch *
|
||||
struct type *type;
|
||||
CORE_ADDR regval;
|
||||
char *val;
|
||||
@ -1004,7 +1004,7 @@ Index: gdb-7.5.0.20120926/gdb/sh-tdep.c
|
||||
int pass_on_stack = 0;
|
||||
int treat_as_flt;
|
||||
int last_reg_arg = INT_MAX;
|
||||
@@ -1208,7 +1209,8 @@ sh_push_dummy_call_nofpu (struct gdbarch
|
||||
@@ -1210,7 +1211,8 @@ sh_push_dummy_call_nofpu (struct gdbarch
|
||||
struct type *type;
|
||||
CORE_ADDR regval;
|
||||
char *val;
|
||||
@ -1014,10 +1014,10 @@ Index: gdb-7.5.0.20120926/gdb/sh-tdep.c
|
||||
int pass_on_stack = 0;
|
||||
int last_reg_arg = INT_MAX;
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/sh64-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/sh64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/sh64-tdep.c 2012-06-06 20:03:53.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/sh64-tdep.c 2012-11-07 22:47:57.582984625 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/sh64-tdep.c 2013-01-18 23:36:59.980290423 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/sh64-tdep.c 2013-01-18 23:37:12.482307606 +0100
|
||||
@@ -1058,7 +1058,7 @@ sh64_push_dummy_call (struct gdbarch *gd
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
@ -1036,11 +1036,11 @@ Index: gdb-7.5.0.20120926/gdb/sh64-tdep.c
|
||||
int argreg_size;
|
||||
int fp_args[12];
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/sparc-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/sparc-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/sparc-tdep.c 2012-11-07 22:00:43.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/sparc-tdep.c 2012-11-07 22:47:57.593984609 +0100
|
||||
@@ -470,7 +470,7 @@ sparc32_store_arguments (struct regcache
|
||||
--- gdb-7.5.50.20130118.orig/gdb/sparc-tdep.c 2013-01-18 23:36:59.981290427 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/sparc-tdep.c 2013-01-18 23:37:12.482307606 +0100
|
||||
@@ -471,7 +471,7 @@ sparc32_store_arguments (struct regcache
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
struct type *type = value_type (args[i]);
|
||||
@ -1049,10 +1049,10 @@ Index: gdb-7.5.0.20120926/gdb/sparc-tdep.c
|
||||
|
||||
if (sparc_structure_or_union_p (type)
|
||||
|| (sparc_floating_p (type) && len == 16)
|
||||
Index: gdb-7.5.0.20120926/gdb/sparc64-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/sparc64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/sparc64-tdep.c 2012-05-16 16:35:07.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/sparc64-tdep.c 2012-11-07 22:47:57.595984605 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/sparc64-tdep.c 2013-01-18 23:36:59.982290430 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/sparc64-tdep.c 2013-01-18 23:37:12.482307606 +0100
|
||||
@@ -639,7 +639,8 @@ sparc64_16_byte_align_p (struct type *ty
|
||||
|
||||
static void
|
||||
@ -1108,11 +1108,11 @@ Index: gdb-7.5.0.20120926/gdb/sparc64-tdep.c
|
||||
int regnum = -1;
|
||||
gdb_byte buf[16];
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/spu-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/spu-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/spu-tdep.c 2012-11-07 22:09:24.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/spu-tdep.c 2012-11-07 22:47:57.598984602 +0100
|
||||
@@ -1372,7 +1372,7 @@ spu_push_dummy_call (struct gdbarch *gdb
|
||||
--- gdb-7.5.50.20130118.orig/gdb/spu-tdep.c 2013-01-18 23:36:59.982290430 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/spu-tdep.c 2013-01-18 23:37:12.483307607 +0100
|
||||
@@ -1373,7 +1373,7 @@ spu_push_dummy_call (struct gdbarch *gdb
|
||||
struct value *arg = args[i];
|
||||
struct type *type = check_typedef (value_type (arg));
|
||||
const gdb_byte *contents = value_contents (arg);
|
||||
@ -1121,7 +1121,7 @@ Index: gdb-7.5.0.20120926/gdb/spu-tdep.c
|
||||
|
||||
/* If the argument doesn't wholly fit into registers, it and
|
||||
all subsequent arguments go to the stack. */
|
||||
@@ -1404,7 +1404,7 @@ spu_push_dummy_call (struct gdbarch *gdb
|
||||
@@ -1405,7 +1405,7 @@ spu_push_dummy_call (struct gdbarch *gdb
|
||||
{
|
||||
struct value *arg = args[i];
|
||||
struct type *type = check_typedef (value_type (arg));
|
||||
@ -1130,20 +1130,20 @@ Index: gdb-7.5.0.20120926/gdb/spu-tdep.c
|
||||
int preferred_slot;
|
||||
|
||||
if (spu_scalar_value_p (type))
|
||||
Index: gdb-7.5.0.20120926/gdb/tic6x-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/tic6x-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/tic6x-tdep.c 2012-06-08 16:24:57.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/tic6x-tdep.c 2012-11-07 22:50:31.792763178 +0100
|
||||
@@ -918,7 +918,7 @@ tic6x_push_dummy_call (struct gdbarch *g
|
||||
--- gdb-7.5.50.20130118.orig/gdb/tic6x-tdep.c 2013-01-18 23:36:59.983290432 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/tic6x-tdep.c 2013-01-18 23:39:27.770484516 +0100
|
||||
@@ -896,7 +896,7 @@ tic6x_push_dummy_call (struct gdbarch *g
|
||||
int argreg = 0;
|
||||
int argnum;
|
||||
int len = 0;
|
||||
int stack_offset = 4;
|
||||
- int references_offset = 4;
|
||||
+ LONGEST references_offset = 4;
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct type *func_type = value_type (function);
|
||||
@@ -952,7 +952,7 @@ tic6x_push_dummy_call (struct gdbarch *g
|
||||
@@ -930,7 +930,7 @@ tic6x_push_dummy_call (struct gdbarch *g
|
||||
/* Now make space on the stack for the args. */
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
@ -1152,7 +1152,7 @@ Index: gdb-7.5.0.20120926/gdb/tic6x-tdep.c
|
||||
if (argnum >= 10 - argreg)
|
||||
references_offset += len;
|
||||
stack_offset += len;
|
||||
@@ -971,7 +971,7 @@ tic6x_push_dummy_call (struct gdbarch *g
|
||||
@@ -949,7 +949,7 @@ tic6x_push_dummy_call (struct gdbarch *g
|
||||
const gdb_byte *val;
|
||||
struct value *arg = args[argnum];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
@ -1161,7 +1161,7 @@ Index: gdb-7.5.0.20120926/gdb/tic6x-tdep.c
|
||||
enum type_code typecode = TYPE_CODE (arg_type);
|
||||
|
||||
val = value_contents (arg);
|
||||
@@ -1131,7 +1131,8 @@ tic6x_push_dummy_call (struct gdbarch *g
|
||||
@@ -1109,7 +1109,8 @@ tic6x_push_dummy_call (struct gdbarch *g
|
||||
}
|
||||
else
|
||||
internal_error (__FILE__, __LINE__,
|
||||
@ -1171,10 +1171,10 @@ Index: gdb-7.5.0.20120926/gdb/tic6x-tdep.c
|
||||
|
||||
addr = sp + stack_offset;
|
||||
write_memory (addr, val, len);
|
||||
Index: gdb-7.5.0.20120926/gdb/tilegx-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/tilegx-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/tilegx-tdep.c 2012-11-07 22:00:44.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/tilegx-tdep.c 2012-11-07 22:47:57.610984584 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/tilegx-tdep.c 2013-01-18 23:36:59.983290432 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/tilegx-tdep.c 2013-01-18 23:37:12.483307607 +0100
|
||||
@@ -291,7 +291,7 @@ tilegx_push_dummy_call (struct gdbarch *
|
||||
CORE_ADDR stack_dest = sp;
|
||||
int argreg = TILEGX_R0_REGNUM;
|
||||
@ -1184,11 +1184,11 @@ Index: gdb-7.5.0.20120926/gdb/tilegx-tdep.c
|
||||
static const gdb_byte two_zero_words[8] = { 0 };
|
||||
|
||||
/* If struct_return is 1, then the struct return address will
|
||||
Index: gdb-7.5.0.20120926/gdb/v850-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/v850-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/v850-tdep.c 2012-05-18 23:02:50.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/v850-tdep.c 2012-11-07 22:47:57.617984575 +0100
|
||||
@@ -809,7 +809,7 @@ v850_push_dummy_call (struct gdbarch *gd
|
||||
--- gdb-7.5.50.20130118.orig/gdb/v850-tdep.c 2013-01-18 23:36:59.984290434 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/v850-tdep.c 2013-01-18 23:37:12.484307608 +0100
|
||||
@@ -808,7 +808,7 @@ v850_push_dummy_call (struct gdbarch *gd
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argreg;
|
||||
int argnum;
|
||||
@ -1197,7 +1197,7 @@ Index: gdb-7.5.0.20120926/gdb/v850-tdep.c
|
||||
int stack_offset;
|
||||
|
||||
/* The offset onto the stack at which we will start copying parameters
|
||||
@@ -834,7 +834,7 @@ v850_push_dummy_call (struct gdbarch *gd
|
||||
@@ -833,7 +833,7 @@ v850_push_dummy_call (struct gdbarch *gd
|
||||
in four registers available. Loop thru args from first to last. */
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
@ -1206,11 +1206,11 @@ Index: gdb-7.5.0.20120926/gdb/v850-tdep.c
|
||||
gdb_byte *val;
|
||||
gdb_byte valbuf[v850_reg_size];
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/vax-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/vax-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/vax-tdep.c 2012-11-07 22:46:56.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/vax-tdep.c 2012-11-07 22:47:57.618984573 +0100
|
||||
@@ -116,7 +116,7 @@ vax_store_arguments (struct regcache *re
|
||||
--- gdb-7.5.50.20130118.orig/gdb/vax-tdep.c 2013-01-18 23:36:59.984290434 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/vax-tdep.c 2013-01-18 23:37:12.484307608 +0100
|
||||
@@ -115,7 +115,7 @@ vax_store_arguments (struct regcache *re
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
gdb_byte buf[4];
|
||||
@ -1219,7 +1219,7 @@ Index: gdb-7.5.0.20120926/gdb/vax-tdep.c
|
||||
int i;
|
||||
|
||||
/* We create an argument list on the stack, and make the argument
|
||||
@@ -125,7 +125,7 @@ vax_store_arguments (struct regcache *re
|
||||
@@ -124,7 +124,7 @@ vax_store_arguments (struct regcache *re
|
||||
/* Push arguments in reverse order. */
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
{
|
||||
@ -1228,10 +1228,10 @@ Index: gdb-7.5.0.20120926/gdb/vax-tdep.c
|
||||
|
||||
sp -= (len + 3) & ~3;
|
||||
count += (len + 3) / 4;
|
||||
Index: gdb-7.5.0.20120926/gdb/xstormy16-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/xstormy16-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/xstormy16-tdep.c 2012-11-07 22:00:44.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/xstormy16-tdep.c 2012-11-07 22:47:57.626984562 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/xstormy16-tdep.c 2013-01-18 23:36:59.984290434 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/xstormy16-tdep.c 2013-01-18 23:37:12.484307608 +0100
|
||||
@@ -235,8 +235,9 @@ xstormy16_push_dummy_call (struct gdbarc
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR stack_dest = sp;
|
||||
@ -1244,10 +1244,10 @@ Index: gdb-7.5.0.20120926/gdb/xstormy16-tdep.c
|
||||
const gdb_byte *val;
|
||||
char buf[xstormy16_pc_size];
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/xtensa-tdep.c
|
||||
Index: gdb-7.5.50.20130118/gdb/xtensa-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/xtensa-tdep.c 2012-05-18 23:02:51.000000000 +0200
|
||||
+++ gdb-7.5.0.20120926/gdb/xtensa-tdep.c 2012-11-07 22:47:57.629984557 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/xtensa-tdep.c 2013-01-18 23:36:59.985290436 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/xtensa-tdep.c 2013-01-18 23:37:12.484307608 +0100
|
||||
@@ -1653,8 +1653,7 @@ xtensa_store_return_value (struct type *
|
||||
|
||||
if (len > (callsize > 8 ? 8 : 16))
|
||||
|
@ -1,113 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2012-09/msg00160.html
|
||||
|
||||
### src/gdb/ChangeLog 2012/09/26 23:53:53 1.14709
|
||||
### src/gdb/ChangeLog 2012/09/27 08:57:14 1.14710
|
||||
## -1,3 +1,16 @@
|
||||
+2012-09-27 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
+
|
||||
+ * gdbtypes.c (lookup_array_range_type): Expand parameters
|
||||
+ LOW_BOUND and HIGH_BOUND to LONGEST.
|
||||
+ (lookup_string_range_type): Likewise.
|
||||
+ * gdbtypes.h (lookup_array_range_type): Likewise.
|
||||
+ (lookup_string_range_type): Likewise.
|
||||
+ * valops.c (value_cstring): Expand parameter LEN to ssize_t.
|
||||
+ Expand HIGHBOUND to ssize_t.
|
||||
+ (value_string): Likewise.
|
||||
+ * value.h (value_cstring): Expand parameter LEN to ssize_t.
|
||||
+ (value_string): Likewise.
|
||||
+
|
||||
2012-09-27 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
PR breakpoints/13898
|
||||
Index: gdb-7.5.0.20120926/gdb/gdbtypes.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/gdbtypes.c 2012-11-07 22:09:57.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/gdbtypes.c 2012-11-07 22:50:47.048741164 +0100
|
||||
@@ -1022,7 +1022,7 @@ create_array_type (struct type *result_t
|
||||
|
||||
struct type *
|
||||
lookup_array_range_type (struct type *element_type,
|
||||
- int low_bound, int high_bound)
|
||||
+ LONGEST low_bound, LONGEST high_bound)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_type_arch (element_type);
|
||||
struct type *index_type = builtin_type (gdbarch)->builtin_int;
|
||||
@@ -1058,7 +1058,7 @@ create_string_type (struct type *result_
|
||||
|
||||
struct type *
|
||||
lookup_string_range_type (struct type *string_char_type,
|
||||
- int low_bound, int high_bound)
|
||||
+ LONGEST low_bound, LONGEST high_bound)
|
||||
{
|
||||
struct type *result_type;
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/gdbtypes.h 2012-11-07 22:09:29.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/gdbtypes.h 2012-11-07 22:51:46.440655817 +0100
|
||||
@@ -1640,7 +1640,7 @@ extern struct type *create_range_type (s
|
||||
|
||||
extern struct type *create_array_type (struct type *, struct type *,
|
||||
struct type *);
|
||||
-extern struct type *lookup_array_range_type (struct type *, int, int);
|
||||
+extern struct type *lookup_array_range_type (struct type *, LONGEST, LONGEST);
|
||||
|
||||
extern CORE_ADDR type_range_any_field_internal (struct type *range_type,
|
||||
int fieldno);
|
||||
@@ -1656,7 +1656,7 @@ extern void finalize_type (struct type *
|
||||
|
||||
extern struct type *create_string_type (struct type *, struct type *,
|
||||
struct type *);
|
||||
-extern struct type *lookup_string_range_type (struct type *, int, int);
|
||||
+extern struct type *lookup_string_range_type (struct type *, LONGEST, LONGEST);
|
||||
|
||||
extern struct type *create_set_type (struct type *, struct type *);
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/valops.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/valops.c 2012-11-07 22:46:00.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/valops.c 2012-11-07 22:50:47.091741104 +0100
|
||||
@@ -1937,11 +1937,11 @@ value_array (int lowbound, int highbound
|
||||
}
|
||||
|
||||
struct value *
|
||||
-value_cstring (char *ptr, int len, struct type *char_type)
|
||||
+value_cstring (char *ptr, ssize_t len, struct type *char_type)
|
||||
{
|
||||
struct value *val;
|
||||
int lowbound = current_language->string_lower_bound;
|
||||
- int highbound = len / TYPE_LENGTH (char_type);
|
||||
+ ssize_t highbound = len / TYPE_LENGTH (char_type);
|
||||
struct type *stringtype
|
||||
= lookup_array_range_type (char_type, lowbound, highbound + lowbound - 1);
|
||||
|
||||
@@ -1960,11 +1960,11 @@ value_cstring (char *ptr, int len, struc
|
||||
string may contain embedded null bytes. */
|
||||
|
||||
struct value *
|
||||
-value_string (char *ptr, int len, struct type *char_type)
|
||||
+value_string (char *ptr, ssize_t len, struct type *char_type)
|
||||
{
|
||||
struct value *val;
|
||||
int lowbound = current_language->string_lower_bound;
|
||||
- int highbound = len / TYPE_LENGTH (char_type);
|
||||
+ ssize_t highbound = len / TYPE_LENGTH (char_type);
|
||||
struct type *stringtype
|
||||
= lookup_string_range_type (char_type, lowbound, highbound + lowbound - 1);
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/value.h
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/value.h 2012-11-07 22:09:30.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/value.h 2012-11-07 22:51:11.744705614 +0100
|
||||
@@ -593,9 +593,9 @@ extern struct value *value_mark (void);
|
||||
|
||||
extern void value_free_to_mark (struct value *mark);
|
||||
|
||||
-extern struct value *value_cstring (char *ptr, int len,
|
||||
+extern struct value *value_cstring (char *ptr, ssize_t len,
|
||||
struct type *char_type);
|
||||
-extern struct value *value_string (char *ptr, int len,
|
||||
+extern struct value *value_string (char *ptr, ssize_t len,
|
||||
struct type *char_type);
|
||||
extern struct value *value_bitstring (char *ptr, int len,
|
||||
struct type *index_type);
|
@ -47,13 +47,13 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=f77-bounds.patch
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/f-lang.h
|
||||
Index: gdb-7.5.50.20130118/gdb/f-lang.h
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/f-lang.h 2012-11-07 22:12:39.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/f-lang.h 2012-11-07 22:52:02.688632498 +0100
|
||||
@@ -66,9 +66,9 @@ enum f90_range_type
|
||||
extern char *real_main_name; /* Name of main function. */
|
||||
extern int real_main_c_value; /* C_value field of main function. */
|
||||
--- gdb-7.5.50.20130118.orig/gdb/f-lang.h 2013-01-18 23:39:40.209500968 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/f-lang.h 2013-01-18 23:40:04.010531177 +0100
|
||||
@@ -65,9 +65,9 @@ struct common_block
|
||||
struct symbol *contents[1];
|
||||
};
|
||||
|
||||
-extern int f77_get_upperbound (struct type *);
|
||||
+extern LONGEST f77_get_upperbound (struct type *);
|
||||
@ -63,11 +63,11 @@ Index: gdb-7.5.0.20120926/gdb/f-lang.h
|
||||
|
||||
extern void f77_get_dynamic_array_length (struct type *);
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/f-typeprint.c
|
||||
Index: gdb-7.5.50.20130118/gdb/f-typeprint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/f-typeprint.c 2012-11-07 22:00:41.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/f-typeprint.c 2012-11-07 22:52:02.689632497 +0100
|
||||
@@ -182,7 +182,7 @@ f_type_print_varspec_suffix (struct type
|
||||
--- gdb-7.5.50.20130118.orig/gdb/f-typeprint.c 2013-01-18 23:39:37.564497620 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/f-typeprint.c 2013-01-18 23:39:40.210500970 +0100
|
||||
@@ -180,7 +180,7 @@ f_type_print_varspec_suffix (struct type
|
||||
int show, int passed_a_ptr, int demangled_args,
|
||||
int arrayprint_recurse_level)
|
||||
{
|
||||
@ -76,7 +76,7 @@ Index: gdb-7.5.0.20120926/gdb/f-typeprint.c
|
||||
|
||||
/* No static variables are permitted as an error call may occur during
|
||||
execution of this function. */
|
||||
@@ -212,7 +212,7 @@ f_type_print_varspec_suffix (struct type
|
||||
@@ -210,7 +210,7 @@ f_type_print_varspec_suffix (struct type
|
||||
|
||||
lower_bound = f77_get_lowerbound (type);
|
||||
if (lower_bound != 1) /* Not the default. */
|
||||
@ -85,7 +85,7 @@ Index: gdb-7.5.0.20120926/gdb/f-typeprint.c
|
||||
|
||||
/* Make sure that, if we have an assumed size array, we
|
||||
print out a warning and print the upperbound as '*'. */
|
||||
@@ -222,7 +222,7 @@ f_type_print_varspec_suffix (struct type
|
||||
@@ -220,7 +220,7 @@ f_type_print_varspec_suffix (struct type
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
@ -94,7 +94,7 @@ Index: gdb-7.5.0.20120926/gdb/f-typeprint.c
|
||||
}
|
||||
|
||||
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
@@ -291,7 +291,7 @@ void
|
||||
@@ -288,7 +288,7 @@ void
|
||||
f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
int level)
|
||||
{
|
||||
@ -103,7 +103,7 @@ Index: gdb-7.5.0.20120926/gdb/f-typeprint.c
|
||||
int index;
|
||||
|
||||
QUIT;
|
||||
@@ -373,7 +373,7 @@ f_type_print_base (struct type *type, st
|
||||
@@ -370,7 +370,7 @@ f_type_print_base (struct type *type, st
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
@ -112,10 +112,10 @@ Index: gdb-7.5.0.20120926/gdb/f-typeprint.c
|
||||
}
|
||||
break;
|
||||
|
||||
Index: gdb-7.5.0.20120926/gdb/f-valprint.c
|
||||
Index: gdb-7.5.50.20130118/gdb/f-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.5.0.20120926.orig/gdb/f-valprint.c 2012-11-07 22:09:29.000000000 +0100
|
||||
+++ gdb-7.5.0.20120926/gdb/f-valprint.c 2012-11-07 22:52:21.888604907 +0100
|
||||
--- gdb-7.5.50.20130118.orig/gdb/f-valprint.c 2013-01-18 23:39:37.564497620 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/f-valprint.c 2013-01-18 23:39:40.210500970 +0100
|
||||
@@ -57,7 +57,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN
|
||||
|
||||
#define F77_DIM_BYTE_STRIDE(n) (f77_array_offset_tbl[n][0])
|
||||
|
@ -9,7 +9,7 @@
|
||||
val->contents = NULL;
|
||||
val->next = all_values;
|
||||
--- /dev/null 2012-10-18 11:08:13.202328239 +0200
|
||||
+++ gdb-7.5.0.20120926-m64-test/gdb/testsuite/gdb.base/longest-types.exp 2012-11-09 18:13:56.286587994 +0100
|
||||
+++ gdb-7.5.0.20120926-m64-test/gdb/testsuite/gdb.base/longest-types-64bit.exp 2012-11-09 18:13:56.286587994 +0100
|
||||
@@ -0,0 +1,59 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -71,7 +71,7 @@
|
||||
+
|
||||
+test "native"
|
||||
--- /dev/null 2012-10-18 11:08:13.202328239 +0200
|
||||
+++ ./gdb/testsuite/gdb.base/longest-types.c 2012-11-09 17:08:51.374406344 +0100
|
||||
+++ ./gdb/testsuite/gdb.base/longest-types-64bit.c 2012-11-09 17:08:51.374406344 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
|
29
gdb-rhel5-compat.patch
Normal file
29
gdb-rhel5-compat.patch
Normal file
@ -0,0 +1,29 @@
|
||||
Index: gdb-7.4.50.20120602/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-06-02 20:54:30.000000000 +0200
|
||||
+++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 20:56:03.966493352 +0200
|
||||
@@ -1816,8 +1816,22 @@ get_pending_status (struct lwp_info *lp,
|
||||
gdb_signal_to_string (signo));
|
||||
}
|
||||
|
||||
- if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
|
||||
- *status = W_STOPCODE (SIGSTOP);
|
||||
+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
|
||||
+ many TIDs are left unstopped). See RH Bug 496732. */
|
||||
+ if (GET_PID (lp->ptid) == pid_was_stopped)
|
||||
+ {
|
||||
+ int err;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ err = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
|
||||
+ if (debug_linux_nat)
|
||||
+ {
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "SC: lwp kill %d %s\n",
|
||||
+ err,
|
||||
+ errno ? safe_strerror (errno) : "ERRNO-OK");
|
||||
+ }
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
431
gdb-rhel5-gcc44.patch
Normal file
431
gdb-rhel5-gcc44.patch
Normal file
@ -0,0 +1,431 @@
|
||||
Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
|
||||
the default gcc and gfortran binaries are from gcc-4.1.
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/vla.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/vla.exp 2013-01-18 23:43:04.455756362 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/vla.exp 2013-01-18 23:43:08.082761164 +0100
|
||||
@@ -16,7 +16,25 @@
|
||||
set testfile vla
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+# Temporarily provide compiler=gcc44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists compiler] {
|
||||
+ set old_compiler [board_info $board compiler]
|
||||
+ unset_board_info compiler
|
||||
+} elseif [info exists old_compiler] {
|
||||
+ unset old_compiler
|
||||
+}
|
||||
+set_board_info compiler gcc44
|
||||
+
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug quiet}]
|
||||
+
|
||||
+unset_board_info compiler
|
||||
+if [info exists old_compiler] {
|
||||
+ set_board_info compiler $old_compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
untested "Couldn't compile test program"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.base/break-interp.exp 2013-01-18 23:43:04.456756365 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp 2013-01-18 23:43:08.082761164 +0100
|
||||
@@ -34,9 +34,29 @@ if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
+# Temporarily provide compiler=gcc44 saving the original value around.
|
||||
+# RHEL-5 workaround of its:
|
||||
+# gcc: -soname: linker input file unused because linking not done
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists compiler] {
|
||||
+ set old_compiler [board_info $board compiler]
|
||||
+ unset_board_info compiler
|
||||
+} elseif [info exists old_compiler] {
|
||||
+ unset old_compiler
|
||||
+}
|
||||
+set_board_info compiler gcc44
|
||||
+
|
||||
# Use -soname so that the new library gets copied by build_executable_own_libs.
|
||||
|
||||
-if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]] != ""} {
|
||||
+set err [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]]
|
||||
+
|
||||
+unset_board_info compiler
|
||||
+if [info exists old_compiler] {
|
||||
+ set_board_info compiler $old_compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/common-block.exp 2013-01-18 23:43:08.082761164 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/common-block.exp 2013-01-18 23:44:23.047856182 +0100
|
||||
@@ -22,8 +22,25 @@ if {[skip_fortran_tests]} {
|
||||
|
||||
standard_testfile .f90
|
||||
|
||||
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
- $srcfile {debug f90 quiet}]} {
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+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 f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug f90 quiet}]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if {$err} {
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2013-01-18 23:43:04.456756365 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2013-01-18 23:43:08.083761148 +0100
|
||||
@@ -27,7 +27,25 @@
|
||||
set testfile dwarf-stride
|
||||
set srcfile ${testfile}.f90
|
||||
|
||||
-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 f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if $err {
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2013-01-18 23:43:04.457756367 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dynamic.exp 2013-01-18 23:43:08.083761148 +0100
|
||||
@@ -25,7 +25,25 @@ set testfile "dynamic"
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
-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 f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
untested "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/library-module.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/library-module.exp 2013-01-18 23:43:04.457756367 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/library-module.exp 2013-01-18 23:43:08.083761148 +0100
|
||||
@@ -23,16 +23,34 @@ if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}] != "" } {
|
||||
- untested "Couldn't compile ${srclibfile}"
|
||||
- return -1
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+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 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 $srcdir/$subdir/$srcfile $binfile executable [list debug f90 shlib=$libfile]] != "" } {
|
||||
+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}]
|
||||
+set err2 [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug f90 shlib=$libfile]]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err1 != "" } {
|
||||
+ untested "Couldn't compile ${srclibfile}"
|
||||
+ return -1
|
||||
+}
|
||||
+if { $err2 != "" } {
|
||||
untested "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/module.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/module.exp 2013-01-18 23:43:04.457756367 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/module.exp 2013-01-18 23:43:08.083761148 +0100
|
||||
@@ -15,7 +15,25 @@
|
||||
|
||||
standard_testfile .f90
|
||||
|
||||
-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 f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if $err {
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/string.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/string.exp 2013-01-18 23:43:04.457756367 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/string.exp 2013-01-18 23:43:08.083761148 +0100
|
||||
@@ -23,7 +23,25 @@ set testfile "string"
|
||||
set srcfile ${testfile}.f90
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
-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 f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
untested "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2013-01-18 23:43:04.458756369 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp 2013-01-18 23:43:08.083761148 +0100
|
||||
@@ -15,7 +15,26 @@
|
||||
|
||||
set testfile "omp-step"
|
||||
set srcfile ${testfile}.f90
|
||||
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
|
||||
+
|
||||
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+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 f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90 additional_flags=-fopenmp}]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if $err {
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/derived-type.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2013-01-18 23:43:04.458756369 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/derived-type.exp 2013-01-18 23:43:08.084761135 +0100
|
||||
@@ -22,7 +22,25 @@ if { [skip_fortran_tests] } { return -1
|
||||
|
||||
standard_testfile .f90
|
||||
|
||||
-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 f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if $err {
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/subarray.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.fortran/subarray.exp 2013-01-18 23:43:04.458756369 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/subarray.exp 2013-01-18 23:43:08.084761135 +0100
|
||||
@@ -22,7 +22,25 @@ if { [skip_fortran_tests] } { return -1
|
||||
|
||||
standard_testfile .f
|
||||
|
||||
-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 f90compiler] {
|
||||
+ set old_f90compiler [board_info $board f90compiler]
|
||||
+ unset_board_info f90compiler
|
||||
+} elseif [info exists old_f90compiler] {
|
||||
+ unset old_f90compiler
|
||||
+}
|
||||
+set_board_info f90compiler gfortran44
|
||||
+
|
||||
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
|
||||
+
|
||||
+unset_board_info f90compiler
|
||||
+if [info exists old_f90compiler] {
|
||||
+ set_board_info f90compiler $old_f90compiler
|
||||
+}
|
||||
+
|
||||
+if $err {
|
||||
return -1
|
||||
}
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2013-01-18 23:43:04.459756371 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2013-01-18 23:43:08.084761135 +0100
|
||||
@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
|
||||
|
||||
# FIXME: gcc dependency (-Wl,-soname).
|
||||
|
||||
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
|
||||
+# Temporarily provide compiler=gcc44 saving the original value around.
|
||||
+
|
||||
+set board [target_info name]
|
||||
+if [board_info $board exists compiler] {
|
||||
+ set old_compiler [board_info $board compiler]
|
||||
+ unset_board_info compiler
|
||||
+} elseif [info exists old_compiler] {
|
||||
+ unset old_compiler
|
||||
+}
|
||||
+set_board_info compiler gcc44
|
||||
+
|
||||
+set err [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]]
|
||||
+
|
||||
+unset_board_info compiler
|
||||
+if [info exists old_compiler] {
|
||||
+ set_board_info compiler $old_compiler
|
||||
+}
|
||||
+
|
||||
+if { $err != "" } {
|
||||
untested "Couldn't compile test library"
|
||||
return -1
|
||||
}
|
||||
Index: gdb-7.5.50.20130118/gdb/testsuite/lib/prelink-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/testsuite/lib/prelink-support.exp 2013-01-18 23:43:04.459756371 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/testsuite/lib/prelink-support.exp 2013-01-18 23:43:08.084761135 +0100
|
||||
@@ -119,9 +119,31 @@ proc file_copy {src dest} {
|
||||
proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} {
|
||||
global objdir subdir
|
||||
|
||||
- if {[build_executable $testname $executable $sources $options] == -1} {
|
||||
- return ""
|
||||
+ # Temporarily provide compiler=gcc44 saving the original value around.
|
||||
+ # RHEL-5 workaround of its:
|
||||
+ # gcc: -rpath: linker input file unused because linking not done
|
||||
+ # gcc: --dynamic-linker: linker input file unused because linking not done
|
||||
+
|
||||
+ set board [target_info name]
|
||||
+ if [board_info $board exists compiler] {
|
||||
+ set old_compiler [board_info $board compiler]
|
||||
+ unset_board_info compiler
|
||||
+ } elseif [info exists old_compiler] {
|
||||
+ unset old_compiler
|
||||
+ }
|
||||
+ set_board_info compiler gcc44
|
||||
+
|
||||
+ set err [build_executable $testname $executable $sources $options]
|
||||
+
|
||||
+ unset_board_info compiler
|
||||
+ if [info exists old_compiler] {
|
||||
+ set_board_info compiler $old_compiler
|
||||
}
|
||||
+
|
||||
+ if { $err == -1 } {
|
||||
+ return ""
|
||||
+ }
|
||||
+
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
set command "ldd $binfile"
|
14
gdb.changes
14
gdb.changes
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 2 12:34:27 UTC 2013 - schwab@suse.de
|
||||
|
||||
- Enable multi-target support
|
||||
- gdb-ia64-tdep.patch: build fixes
|
||||
- Use --build when configuring
|
||||
- Don't remove %buildroot in %install
|
||||
- Set pkgversion and bugurl
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 17 05:16:06 UTC 2013 - matz@suse.com
|
||||
|
||||
- Update to 7.5.50, mostly for aarch64.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 3 14:29:15 UTC 2012 - matz@suse.com
|
||||
|
||||
|
74
patchlist.pl
Normal file
74
patchlist.pl
Normal file
@ -0,0 +1,74 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
die "need gdb-Fedora directory" unless -d $ARGV[0];
|
||||
|
||||
my $gdbFedora = $ARGV[0];
|
||||
my $dir = `pwd`;
|
||||
chomp($dir);
|
||||
|
||||
system "rm \$(grep \"^Patch[0-9]\\{1,3\\}:\" gdb.spec | cut -d\" \" -f 2) 2>/dev/null";
|
||||
system "rm *.tar.bz2";
|
||||
system "cp $gdbFedora/*.tar.bz2 ./";
|
||||
system "pushd $gdbFedora ; $dir/patchname_get.sh -v gdb.spec 2>$dir/test.txt; popd";
|
||||
system "grep \"^Patch\" test.txt > test2.txt";
|
||||
|
||||
my @patchliste = `cat test2.txt`;
|
||||
my @patchdeklarationen = ();
|
||||
my @patchstatements = ();
|
||||
my %seenpatches = ();
|
||||
my $blockcounter = 0;
|
||||
my @patchcopy = ();
|
||||
|
||||
foreach my $line (@patchliste) {
|
||||
chomp($line);
|
||||
if ($line =~ /\((.*)\)/) {
|
||||
$patchname = $1;
|
||||
if (exists $seenpatches{$patchname}){
|
||||
my $oldcount = $seenpatches{$patchname};
|
||||
push @patchstatements, "%patch$oldcount -p1 -R\n";
|
||||
}
|
||||
else {
|
||||
$count = $count + 1;
|
||||
push @patchdeklarationen, "Patch$count: $patchname\n";
|
||||
push @patchstatements, "%patch$count -p1\n";
|
||||
$seenpatches{$patchname} = $count;
|
||||
push @patchcopy, $patchname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $copy (@patchcopy) {
|
||||
system "cp \"$gdbFedora/$copy\" ./";
|
||||
}
|
||||
|
||||
open F, ">gdb.spec.new";
|
||||
foreach my $line (`cat gdb.spec`) {
|
||||
if ($line eq "#Fedora Packages begin\n") {
|
||||
print F $line;
|
||||
$blockcounter = 1;
|
||||
}
|
||||
elsif ($line eq "#Fedora Packages end\n") {
|
||||
$blockcounter = 0;
|
||||
}
|
||||
elsif($line eq "#Fedora patching start\n") {
|
||||
print F $line;
|
||||
$blockcounter = 3;
|
||||
}
|
||||
elsif($line eq "#Fedora patching end\n") {
|
||||
$blockcounter = 0;
|
||||
}
|
||||
if ($blockcounter == 0){
|
||||
print F $line;
|
||||
} elsif ($blockcounter == 1) {
|
||||
print F @patchdeklarationen;
|
||||
$blockcounter = 2;
|
||||
} elsif ($blockcounter == 3) {
|
||||
print F @patchstatements;
|
||||
$blockcounter = 4;
|
||||
}
|
||||
}
|
||||
close F;
|
||||
|
||||
system "mv gdb.spec.new gdb.spec";
|
||||
system "rm test.txt test2.txt";
|
||||
system "osc addremove";
|
314
patchname_get.sh
Normal file
314
patchname_get.sh
Normal file
@ -0,0 +1,314 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
: ${QUILT_DIR=/usr/share/quilt}
|
||||
|
||||
|
||||
if ! [ -r $QUILT_DIR/scripts/patchfns ]
|
||||
then
|
||||
echo "Cannot read library $QUILT_DIR/scripts/patchfns" >&2
|
||||
exit 1
|
||||
fi
|
||||
. $QUILT_DIR/scripts/patchfns
|
||||
cd ${SUBDIR:-.}
|
||||
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [--fuzz=N] specfile"
|
||||
exit 1
|
||||
}
|
||||
|
||||
options=$(getopt -o v --long sourcedir:,fuzz: -n "${0##*/}" -- "$@") || exit
|
||||
|
||||
eval set -- "$options"
|
||||
|
||||
sourcedir=
|
||||
|
||||
while true
|
||||
do
|
||||
case "$1" in
|
||||
-v)
|
||||
verbose=1
|
||||
shift ;;
|
||||
--sourcedir)
|
||||
sourcedir=${2%/}/
|
||||
shift 2 ;;
|
||||
--fuzz)
|
||||
# Only works with rpm 4.6 and later
|
||||
DEFINE_FUZZ="%define _default_patch_fuzz $2"
|
||||
shift 2 ;;
|
||||
--)
|
||||
shift
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ "${sourcedir:0:1}" = / ] || sourcedir=$PWD/$sourcedir
|
||||
|
||||
specfile=$1
|
||||
if [ $# -ne 1 -o ! -f "$specfile" ]
|
||||
then
|
||||
|
||||
usage
|
||||
fi
|
||||
if [ "${specfile:0:1}" = / ]
|
||||
then
|
||||
specdir=$(dirname "$specfile")
|
||||
specfile=${specfile##*/}
|
||||
else
|
||||
specdir=$PWD
|
||||
fi
|
||||
|
||||
tmpdir="$(gen_tempfile -d ${VARTMPDIR:-/var/tmp}/${0##*/})"
|
||||
mkdir -p $tmpdir || exit 1
|
||||
add_exit_handler "rm -rf $tmpdir"
|
||||
mkdir -p $tmpdir/build
|
||||
mkdir -p $tmpdir/bin
|
||||
|
||||
# Older versions of Suse packages have a symbolic release number, and rpmbuild
|
||||
# won't like that, so change it to something compliant.
|
||||
if grep -q '^Release:.*[<>]' "$specdir/$specfile"
|
||||
then
|
||||
sed -e '/^Release:/s/[<>]//g' < "$specdir/$specfile" > $tmpdir/"$specfile"
|
||||
specdir=$tmpdir
|
||||
fi
|
||||
|
||||
# Redirect file descriptors
|
||||
# 5 is used in verbose mode, 4 in non-verbose mode, and 2 for both (real errors)
|
||||
if [ -n "$verbose" ]
|
||||
then
|
||||
exec 3>&1 5>&2 4>/dev/null
|
||||
else
|
||||
exec 3>&1 4>&2 5>/dev/null
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# wrapper script for patch and tar
|
||||
cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
#! /bin/bash
|
||||
|
||||
# find original data file by md5sum
|
||||
original_file() {
|
||||
local file=$1 md5sum
|
||||
|
||||
set -- $(md5sum < $file)
|
||||
md5sum=$1
|
||||
while read md5sum_ file_
|
||||
do
|
||||
if [ "$md5sum" = "$md5sum_" ]
|
||||
then
|
||||
echo ${file_#\*}
|
||||
return 0
|
||||
fi
|
||||
done < $tmpdir/md5sums
|
||||
|
||||
# Try harder
|
||||
if ! [ -e $tmpdir/more-md5sums ]
|
||||
then
|
||||
( cd $RPM_BUILD_DIR
|
||||
find . -type f \
|
||||
| sed -e 's:^.\/::' \
|
||||
| xargs md5sum \
|
||||
) > $tmpdir/more-md5sums
|
||||
fi
|
||||
|
||||
while read md5sum_ file_
|
||||
do
|
||||
if [ "$md5sum" = "$md5sum_" ]
|
||||
then
|
||||
echo ${file_#\*}
|
||||
return 0
|
||||
fi
|
||||
done < $tmpdir/more-md5sums
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Extract a command line option with or without argument
|
||||
cmdline_option() {
|
||||
local letter=$1 no_arg=$2
|
||||
shift
|
||||
|
||||
while [ $# -ne 0 ]
|
||||
do
|
||||
if [ "${1:0:2}" = -$letter ]
|
||||
then
|
||||
if [ -z "$no_arg" ]
|
||||
then
|
||||
[ "$1" = -$letter ] && set -- "$1$2"
|
||||
fi
|
||||
echo $1
|
||||
break
|
||||
fi
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
strip_option() {
|
||||
set -- $(cmdline_option p "$@")
|
||||
[ "$1" != -p1 ] && echo $1
|
||||
}
|
||||
|
||||
# Extract the -p option from the command line
|
||||
strip_option() {
|
||||
set -- $(cmdline_option p "$@")
|
||||
[ "$1" != -p1 ] && echo $1
|
||||
}
|
||||
|
||||
# Extract the -R option from the command line
|
||||
reverse_option() {
|
||||
set -- $(cmdline_option R no_arg "$@")
|
||||
echo $1
|
||||
}
|
||||
|
||||
patch_opt_d() {
|
||||
local subdir=$(cmdline_option d "$@")
|
||||
[ -z "$subdir" ] || echo "${subdir:2}"
|
||||
}
|
||||
|
||||
|
||||
|
||||
patch_input_file() {
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-i|--input)
|
||||
if [ $# -ge 2 ]; then
|
||||
echo "$2"
|
||||
return
|
||||
fi
|
||||
;;
|
||||
-i*)
|
||||
echo "${1#-i}"
|
||||
return
|
||||
;;
|
||||
--input=*)
|
||||
echo "${1#--input=}"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
return
|
||||
}
|
||||
|
||||
tar_input_file() {
|
||||
case "$1" in
|
||||
*C*f*)
|
||||
echo "$3"
|
||||
;;
|
||||
*f*)
|
||||
echo "$2"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
tar_opt_C() {
|
||||
case "$1" in
|
||||
*C*f*)
|
||||
echo "$2"
|
||||
return ;;
|
||||
esac
|
||||
}
|
||||
|
||||
tmpdir=${RPM_BUILD_DIR%/*}
|
||||
rm -f $tmpdir/data
|
||||
case "${0##*/}" in
|
||||
patch)
|
||||
inputfile=$(patch_input_file "$@")
|
||||
;;
|
||||
tar)
|
||||
inputfile=$(tar_input_file "$@")
|
||||
# For tar, file - means read from stdin
|
||||
[ "$inputfile" = "-" ] && inputfile=
|
||||
;;
|
||||
esac
|
||||
if [ -z "$inputfile" ]; then
|
||||
# put data from stdin into tmpfile
|
||||
cat > $tmpdir/data
|
||||
fi
|
||||
|
||||
unpackfile="$(original_file ${inputfile:-$tmpdir/data})"
|
||||
if [ -n "$unpackfile" ]
|
||||
then
|
||||
case "${0##*/}" in
|
||||
patch)
|
||||
echo -n p >&4
|
||||
subdir=$(patch_opt_d "$@")
|
||||
if [ -n "$subdir" ]
|
||||
then
|
||||
dir=$(cd "$subdir" && echo $PWD)
|
||||
else
|
||||
dir=$PWD
|
||||
fi
|
||||
dir=${dir/$RPM_BUILD_DIR}
|
||||
dir=${dir##/}
|
||||
dir=${dir// /\\ }
|
||||
echo "${0##*/} ${dir:-.} $unpackfile" \
|
||||
$(strip_option "$@") $(reverse_option "$@") >&3
|
||||
;;
|
||||
tar)
|
||||
echo -n t >&4
|
||||
subdir=$(tar_opt_C "$@")
|
||||
if [ -n "$subdir" ]
|
||||
then
|
||||
dir=$(cd "$subdir" && echo $PWD)
|
||||
else
|
||||
dir=$PWD
|
||||
fi
|
||||
dir=${dir/$RPM_BUILD_DIR}
|
||||
dir=${dir##/}
|
||||
dir=${dir// /\\ }
|
||||
echo "${0##*/} ${dir:-.} $unpackfile" >&3
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
PATH=${PATH#*:}
|
||||
if [ -n "$inputfile" ]; then
|
||||
${0##*/} "$@"
|
||||
else
|
||||
${0##*/} "$@" < $tmpdir/data
|
||||
fi
|
||||
|
||||
EOF
|
||||
|
||||
chmod 755 $tmpdir/bin/wrapper
|
||||
# If $TMPDIR is mounted with noexec, rpmbuild won't be able to execute
|
||||
# our wrapper script
|
||||
if [ ! -x $tmpdir/bin/wrapper ]
|
||||
then
|
||||
printf "Cannot execute %s; filesystem mounted with noexec?\n" \
|
||||
$tmpdir/bin/wrapper >&2
|
||||
printf "Setting %s in ~/.quiltrc may help\n" "VARTMPDIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ln -s wrapper $tmpdir/bin/patch
|
||||
ln -s wrapper $tmpdir/bin/tar
|
||||
|
||||
# let rpm do all the dirty specfile stuff ...
|
||||
echo -n "### rpmbuild: " >&4
|
||||
|
||||
export PATH="$tmpdir/bin:$PATH"
|
||||
rpmbuild --eval "%define _sourcedir $sourcedir" \
|
||||
--eval "%define _specdir $specdir" \
|
||||
--eval "%define _builddir $tmpdir/build" \
|
||||
--eval "%define __patch $tmpdir/bin/patch" \
|
||||
--eval "%define __tar $tmpdir/bin/tar" \
|
||||
--eval "$DEFINE_FUZZ" \
|
||||
--nodeps \
|
||||
-bp "$specdir/$specfile" < /dev/null >&5 2>&5
|
||||
status=$?
|
||||
echo >&4
|
||||
exit $status
|
||||
### Local Variables:
|
||||
### mode: shell-script
|
||||
### End:
|
||||
# vim:filetype=sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user