Rebase to FSF GDB 7.5.50.20130118 (pre-7.6 snapshot).

This commit is contained in:
Jan Kratochvil 2013-01-19 23:41:55 +01:00
parent ab816baf60
commit 556378e101
56 changed files with 1615 additions and 14568 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
/gdb-libstdc++-v3-python-r155978.tar.bz2
/gdb-7.5.1.tar.bz2
/gdb-7.5.50.20130118.tar.bz2

View File

@ -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>

View File

@ -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))
{

View File

@ -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.20130118/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.20130118.orig/gdb/doc/gdb.texinfo 2013-01-18 22:54:22.521155527 +0100
+++ gdb-7.5.50.20130118/gdb/doc/gdb.texinfo 2013-01-18 22:58:15.064596580 +0100
@@ -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.20130118/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.20130118.orig/gdb/main.c 2013-01-18 22:54:22.523155531 +0100
+++ gdb-7.5.50.20130118/gdb/main.c 2013-01-18 22:58:15.065596598 +0100
@@ -445,6 +445,7 @@ captured_main (void *data)
{"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\
@@ -1164,6 +1165,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.20130118/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.20130118.orig/gdb/symfile.c 2013-01-18 22:58:15.065596598 +0100
+++ gdb-7.5.50.20130118/gdb/symfile.c 2013-01-18 22:58:31.249619597 +0100
@@ -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.20130118/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"
--- gdb-7.5.50.20130118.orig/gdb/dwarf2read.c 2013-01-18 22:54:22.528155545 +0100
+++ gdb-7.5.50.20130118/gdb/dwarf2read.c 2013-01-18 22:59:08.940674035 +0100
@@ -67,6 +67,7 @@
#include <ctype.h>
#include "gdb_bfd.h"
#include "f-lang.h"
+#include "top.h"
#include <fcntl.h>
#include "gdb_string.h"
@@ -1587,8 +1588,9 @@ dwarf2_has_info (struct objfile *objfile
@@ -1782,8 +1783,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.20130118/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.20130118.orig/gdb/top.h 2013-01-18 22:54:22.528155545 +0100
+++ gdb-7.5.50.20130118/gdb/top.h 2013-01-18 22:58:15.069596657 +0100
@@ -58,6 +58,7 @@ extern void set_prompt (const char *s);
/* From random places. */
extern int readnow_symbol_files;

View File

@ -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);

View File

@ -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"

View File

@ -1,8 +1,8 @@
Index: gdb-7.4.50.20120602/bfd/elf-bfd.h
Index: gdb-7.5.50.20130118/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
--- gdb-7.5.50.20130118.orig/bfd/elf-bfd.h 2013-01-18 23:02:54.809004473 +0100
+++ gdb-7.5.50.20130118/bfd/elf-bfd.h 2013-01-18 23:02:59.316010755 +0100
@@ -2242,8 +2242,10 @@ extern Elf_Internal_Phdr * _bfd_elf_find
/* Exported interface for writing elf corefile notes. */
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
@ -14,11 +14,11 @@ Index: gdb-7.4.50.20120602/bfd/elf-bfd.h
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
Index: gdb-7.5.50.20130118/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 *
--- gdb-7.5.50.20130118.orig/bfd/elf.c 2013-01-18 23:02:54.812004479 +0100
+++ gdb-7.5.50.20130118/bfd/elf.c 2013-01-18 23:02:59.319010836 +0100
@@ -9103,56 +9103,61 @@ char *
elfcore_write_prpsinfo (bfd *abfd,
char *buf,
int *bufsiz,
@ -103,11 +103,11 @@ Index: gdb-7.4.50.20120602/bfd/elf.c
free (buf);
return NULL;
Index: gdb-7.4.50.20120602/gdb/procfs.c
Index: gdb-7.5.50.20130118/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
--- gdb-7.5.50.20130118.orig/gdb/procfs.c 2013-01-18 23:02:54.815004487 +0100
+++ gdb-7.5.50.20130118/gdb/procfs.c 2013-01-18 23:02:59.320010861 +0100
@@ -5502,6 +5502,7 @@ procfs_make_note_section (bfd *obfd, int
note_data = (char *) elfcore_write_prpsinfo (obfd,
note_data,
note_size,
@ -115,19 +115,19 @@ Index: gdb-7.4.50.20120602/gdb/procfs.c
fname,
psargs);
Index: gdb-7.4.50.20120602/gdb/linux-tdep.c
Index: gdb-7.5.50.20130118/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"
--- gdb-7.5.50.20130118.orig/gdb/linux-tdep.c 2013-01-18 23:02:54.816004489 +0100
+++ gdb-7.5.50.20130118/gdb/linux-tdep.c 2013-01-18 23:03:10.727027317 +0100
@@ -32,6 +32,7 @@
#include "cli/cli-utils.h"
#include "arch-utils.h"
#include "gdb_obstack.h"
+#include <sys/procfs.h>
#include <ctype.h>
@@ -769,6 +770,131 @@ linux_corefile_thread_callback (struct t
@@ -1153,6 +1154,131 @@ linux_corefile_thread_callback (struct t
return !args->note_data;
}
@ -259,7 +259,7 @@ Index: gdb-7.4.50.20120602/gdb/linux-tdep.c
/* 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
@@ -1168,16 +1294,9 @@ linux_make_corefile_notes (struct gdbarc
/* Process information. */
if (get_exec_file (0))
{

View File

@ -1,72 +0,0 @@
We may abort the process of detaching threads with multiple SIGINTs - which are
being sent during a testcase terminating its child GDB.
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
===================================================================
--- 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;
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
===================================================================
--- 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)
qt.args = args;
qt.from_tty = from_tty;
- /* We want to handle any quit errors and exit regardless. */
+ /* We want to handle any quit errors and exit regardless but we should never
+ get user-interrupted to properly detach the inferior. */
+ quit_flag_cleanup = 1;
catch_errors (quit_target, &qt,
"Quitting: ", RETURN_MASK_ALL);
Index: gdb-7.2.50.20110117/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;
int quit_flag;
+/* 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

View File

@ -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. */

View File

@ -1,9 +1,9 @@
Index: gdb-7.4.50.20120602/gdb/breakpoint.c
Index: gdb-7.5.50.20130118/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.20130118.orig/gdb/breakpoint.c 2013-01-18 23:09:53.727597584 +0100
+++ gdb-7.5.50.20130118/gdb/breakpoint.c 2013-01-18 23:10:20.158635065 +0100
@@ -15993,6 +15993,50 @@ initialize_breakpoint_ops (void)
static struct cmd_list_element *enablebreaklist = NULL;
void
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
@ -53,11 +53,11 @@ 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.20130118/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.20130118.orig/gdb/breakpoint.h 2013-01-18 23:09:51.671594585 +0100
+++ gdb-7.5.50.20130118/gdb/breakpoint.h 2013-01-18 23:09:53.728597586 +0100
@@ -1550,4 +1550,7 @@ extern struct gdbarch *get_sal_arch (str
extern void handle_solib_event (void);
@ -65,11 +65,11 @@ Index: gdb-7.4.50.20120602/gdb/breakpoint.h
+ struct section_offsets *delta);
+
#endif /* !defined (BREAKPOINT_H) */
Index: gdb-7.4.50.20120602/gdb/objfiles.c
Index: gdb-7.5.50.20130118/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.20130118.orig/gdb/objfiles.c 2013-01-18 23:09:51.671594585 +0100
+++ gdb-7.5.50.20130118/gdb/objfiles.c 2013-01-18 23:09:53.729597588 +0100
@@ -826,6 +826,11 @@ objfile_relocate1 (struct objfile *objfi
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
new_offsets, delta);

View File

@ -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),

File diff suppressed because it is too large Load Diff

View File

@ -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.20130118/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.20130118.orig/gdb/common/linux-ptrace.c 2013-01-18 23:18:47.313360065 +0100
+++ gdb-7.5.50.20130118/gdb/common/linux-ptrace.c 2013-01-18 23:19:27.269417051 +0100
@@ -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.20130118/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.20130118.orig/gdb/common/linux-ptrace.h 2013-01-18 23:18:47.313360065 +0100
+++ gdb-7.5.50.20130118/gdb/common/linux-ptrace.h 2013-01-18 23:19:04.990385360 +0100
@@ -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.20130118/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.20130118.orig/gdb/configure.ac 2013-01-18 23:18:47.315360069 +0100
+++ gdb-7.5.50.20130118/gdb/configure.ac 2013-01-18 23:19:04.991385362 +0100
@@ -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.20130118/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.20130118.orig/gdb/gdbserver/configure.ac 2013-01-18 23:18:47.315360069 +0100
+++ gdb-7.5.50.20130118/gdb/gdbserver/configure.ac 2013-01-18 23:19:04.991385362 +0100
@@ -451,6 +451,10 @@ if $want_ipa ; then
fi
fi
@ -122,10 +122,10 @@ 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.20130118/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
--- gdb-7.5.50.20130118.orig/gdb/gdbserver/linux-low.c 2013-01-18 23:18:47.317360073 +0100
+++ gdb-7.5.50.20130118/gdb/gdbserver/linux-low.c 2013-01-18 23:19:04.993385366 +0100
@@ -601,6 +601,28 @@ add_lwp (ptid_t ptid)
return lwp;
}
@ -164,7 +164,7 @@ Index: gdb-7.5.0.20120926/gdb/gdbserver/linux-low.c
#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)
@@ -4574,7 +4596,7 @@ linux_tracefork_grandchild (void *arg)
static int
linux_tracefork_child (void *arg)
{
@ -173,11 +173,11 @@ Index: gdb-7.5.0.20120926/gdb/gdbserver/linux-low.c
kill (getpid (), SIGSTOP);
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
Index: gdb-7.5.0.20120926/gdb/inf-ptrace.c
Index: gdb-7.5.50.20130118/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.20130118.orig/gdb/inf-ptrace.c 2013-01-18 23:18:47.318360076 +0100
+++ gdb-7.5.50.20130118/gdb/inf-ptrace.c 2013-01-18 23:19:04.993385366 +0100
@@ -104,7 +104,15 @@ static void
inf_ptrace_me (void)
{
/* "Trace me, Dr. Memory!" */
@ -193,11 +193,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.20130118/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.20130118.orig/gdb/linux-nat.c 2013-01-18 23:18:47.320360083 +0100
+++ gdb-7.5.50.20130118/gdb/linux-nat.c 2013-01-18 23:19:04.994385369 +0100
@@ -1578,6 +1578,7 @@ linux_nat_create_inferior (struct target
#ifdef HAVE_PERSONALITY
int personality_orig = 0, personality_set = 0;
#endif /* HAVE_PERSONALITY */
@ -205,7 +205,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
@@ -1602,7 +1603,10 @@ linux_nat_create_inferior (struct target
/* Make sure we report all signals during startup. */
linux_nat_pass_signals (0, NULL);
@ -217,7 +217,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
@@ -1614,6 +1618,24 @@ linux_nat_create_inferior (struct target
safe_strerror (errno));
}
#endif /* HAVE_PERSONALITY */

View File

@ -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.
+

View File

@ -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"

File diff suppressed because it is too large Load Diff

60
gdb-commonblock-pie.patch Normal file
View File

@ -0,0 +1,60 @@
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7a58c45..364e6af 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -16071,7 +16071,7 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
list_to_add = &global_symbols;
break;
case DW_TAG_common_block:
- SYMBOL_CLASS (sym) = LOC_STATIC;
+ SYMBOL_CLASS (sym) = LOC_COMMON_BLOCK;
SYMBOL_DOMAIN (sym) = COMMON_BLOCK_DOMAIN;
add_symbol_to_list (sym, cu->list_in_scope);
break;
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 22cca83..d01d6ec 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -427,7 +427,7 @@ info_common_command_for_block (struct block *block, const char *comname,
struct common_block *common = SYMBOL_VALUE_COMMON_BLOCK (sym);
size_t index;
- gdb_assert (SYMBOL_CLASS (sym) == LOC_STATIC);
+ gdb_assert (SYMBOL_CLASS (sym) == LOC_COMMON_BLOCK);
if (comname && (!SYMBOL_LINKAGE_NAME (sym)
|| strcmp (comname, SYMBOL_LINKAGE_NAME (sym)) != 0))
diff --git a/gdb/symtab.h b/gdb/symtab.h
index c334a3a..b992266 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -120,7 +120,7 @@ struct general_symbol_info
CORE_ADDR address;
- /* A common block. Used with COMMON_BLOCK_DOMAIN. */
+ /* A common block. Used with LOC_COMMON_BLOCK. */
struct common_block *common_block;
@@ -414,7 +414,8 @@ typedef enum domain_enum_tag
LABEL_DOMAIN,
- /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN. */
+ /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN.
+ They also always use LOC_COMMON_BLOCK. */
COMMON_BLOCK_DOMAIN
} domain_enum;
@@ -533,6 +534,10 @@ enum address_class
/* The variable's address is computed by a set of location
functions (see "struct symbol_computed_ops" below). */
LOC_COMPUTED,
+
+ /* The variable uses general_symbol_info->value->common_block field.
+ It also always uses COMMON_BLOCK_DOMAIN. */
+ LOC_COMMON_BLOCK,
};
/* The methods needed to implement LOC_COMPUTED. These methods can

View File

@ -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"

View File

@ -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);

View File

@ -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);
}

View File

@ -81,11 +81,11 @@ 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.20130118/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.20130118.orig/gdb/breakpoint.h 2013-01-18 23:57:14.782978485 +0100
+++ gdb-7.5.50.20130118/gdb/breakpoint.h 2013-01-18 23:57:50.511792890 +0100
@@ -1548,8 +1548,6 @@ extern int user_breakpoint_p (struct bre
/* Attempt to determine architecture of location identified by SAL. */
extern struct gdbarch *get_sal_arch (struct symtab_and_line sal);
@ -94,11 +94,11 @@ Index: gdb-7.4.91.20120814/gdb/breakpoint.h
extern void breakpoints_relocate (struct objfile *objfile,
struct section_offsets *delta);
Index: gdb-7.4.91.20120814/gdb/breakpoint.c
Index: gdb-7.5.50.20130118/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.20130118.orig/gdb/breakpoint.c 2013-01-18 23:57:14.782978485 +0100
+++ gdb-7.5.50.20130118/gdb/breakpoint.c 2013-01-18 23:57:50.514792879 +0100
@@ -5254,7 +5254,7 @@ bpstat_stop_status (struct address_space
{
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)
@@ -5350,25 +5350,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.20130118/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.20130118.orig/gdb/solib.h 2013-01-18 23:57:14.782978485 +0100
+++ gdb-7.5.50.20130118/gdb/solib.h 2013-01-18 23:57:50.515792875 +0100
@@ -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.20130118/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.20130118.orig/gdb/solib.c 2013-01-18 23:57:14.782978485 +0100
+++ gdb-7.5.50.20130118/gdb/solib.c 2013-01-18 23:58:09.144716601 +0100
@@ -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.20130118/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.20130118.orig/gdb/solist.h 2013-01-18 23:57:14.782978485 +0100
+++ gdb-7.5.50.20130118/gdb/solist.h 2013-01-18 23:57:50.515792875 +0100
@@ -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.20130118/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.20130118.orig/gdb/infrun.c 2013-01-18 23:57:14.782978485 +0100
+++ gdb-7.5.50.20130118/gdb/infrun.c 2013-01-18 23:57:50.517792865 +0100
@@ -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_
@@ -3347,7 +3357,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.
@@ -7327,7 +7337,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.20130118/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.20130118.orig/gdb/solib-svr4.c 2013-01-18 23:57:45.430815943 +0100
+++ gdb-7.5.50.20130118/gdb/solib-svr4.c 2013-01-18 23:57:50.519792858 +0100
@@ -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)
@@ -1163,15 +1290,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
@@ -1188,7 +1317,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));
@@ -1199,7 +1328,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
@@ -1294,20 +1423,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)
@@ -1330,6 +1500,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)
@@ -1339,35 +1513,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);
@@ -1452,6 +1603,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
@@ -1504,6 +2147,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
@@ -1535,7 +2181,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
@@ -1573,7 +2219,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
@@ -1731,7 +2377,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,
@@ -1757,7 +2404,7 @@ enable_break (struct svr4_info *info, in
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (),
sym_addr,
&current_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,
@@ -1773,7 +2420,7 @@ enable_break (struct svr4_info *info, in
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (),
sym_addr,
&current_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
@@ -2269,6 +2916,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)
@@ -2510,4 +3160,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.20130118/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.20130118/gdb/testsuite/gdb.base/break-dlmopen-solib.c 2013-01-18 23:57:50.519792858 +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.20130118/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.20130118/gdb/testsuite/gdb.base/break-dlmopen.c 2013-01-18 23:57:50.519792858 +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.20130118/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.20130118/gdb/testsuite/gdb.base/break-dlmopen.exp 2013-01-18 23:57:50.519792858 +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.20130118/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.20130118.orig/gdb/testsuite/gdb.base/break-interp.exp 2013-01-18 23:57:14.782978485 +0100
+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp 2013-01-18 23:57:50.520792854 +0100
@@ -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.20130118/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.20130118/gdb/testsuite/gdb.base/break-probes-solib.c 2013-01-18 23:57:50.520792854 +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.20130118/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.20130118/gdb/testsuite/gdb.base/break-probes.c 2013-01-18 23:57:50.520792854 +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.20130118/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.20130118/gdb/testsuite/gdb.base/break-probes.exp 2013-01-18 23:57:50.520792854 +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.20130118/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.20130118/gdb/testsuite/gdb.base/info-shared-solib1.c 2013-01-18 23:57:50.520792854 +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.20130118/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.20130118/gdb/testsuite/gdb.base/info-shared-solib2.c 2013-01-18 23:57:50.520792854 +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.20130118/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.20130118/gdb/testsuite/gdb.base/info-shared.c 2013-01-18 23:57:50.520792854 +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.20130118/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.20130118/gdb/testsuite/gdb.base/info-shared.exp 2013-01-18 23:57:50.521792850 +0100
@@ -0,0 +1,139 @@
+# Copyright 2012 Free Software Foundation, Inc.
+

View File

@ -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"));

View File

@ -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"

View File

@ -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)
{

View File

@ -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

View File

@ -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

View File

@ -1,350 +0,0 @@
http://sourceware.org/ml/gdb-patches/2012-12/msg00030.html
Subject: Re: RFC: fix bug in DW_OP_GNU_implicit_pointer
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> And how it is implemented in GCC?
Correctly.
>> I updated the implptr-64bit test case to test the new code as well.
Jan> This is .S test so GCC is not tested there.
Yeah, I considered this, but I did not want to add a new test that would
be exposed to gcc version differences -- and testing gcc's output is
more properly done in the gcc test suite anyway.
Jan> Maybe to call them now for example:
Jan> dwarf2_fetch_die_loc_cu_off
Jan> dwarf2_fetch_die_loc_sect_off
Ok.
Jan> Missing added TWO_CU here.
Added.
Tom
2012-11-30 Tom Tromey <tromey@redhat.com>
* dwarf2read.c (dwarf2_fetch_die_loc_sect_off): New function.
(dwarf2_fetch_die_loc_cu_off): Rename from
dwarf2_fetch_die_location_block. Rewrite to use
dwarf2_fetch_die_loc_sect_off.
* dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Declare.
(dwarf2_fetch_die_loc_cu_off): Rename.
* dwarf2loc.c (indirect_pieced_value): Use
dwarf2_fetch_die_loc_sect_off.
* dwarf2expr.h (struct dwarf_expr_context) <len, data>: Update
comment.
(struct dwarf_expr_piece) <v.ptr.die>: Now a sect_offset.
* dwarf2expr.c (add_piece): Update.
(execute_stack_op) <DW_OP_GNU_implicit_pointer>: Update comment.
2012-11-30 Tom Tromey <tromey@redhat.com>
* gdb.dwarf2/implptr-64bit.exp: Run tests with two CUs as well.
(test): Add "two_cu" argument.
* gdb.dwarf2/implptr-64bit.S: Move subprogram later; use ref_addr
for types; allow two CUs.
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 214b371..877add4 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -342,7 +342,7 @@ add_piece (struct dwarf_expr_context *ctx, ULONGEST size, ULONGEST offset)
}
else if (p->location == DWARF_VALUE_IMPLICIT_POINTER)
{
- p->v.ptr.die.cu_off = ctx->len;
+ p->v.ptr.die.sect_off = ctx->len;
p->v.ptr.offset = value_as_long (dwarf_expr_fetch (ctx, 0));
}
else if (p->location == DWARF_VALUE_REGISTER)
@@ -872,7 +872,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
error (_("DWARF-2 expression error: DW_OP_GNU_implicit_pointer "
"is not allowed in frame context"));
- /* The referred-to DIE of cu_offset kind. */
+ /* The referred-to DIE of sect_offset kind. */
ctx->len = extract_unsigned_integer (op_ptr, ctx->ref_addr_size,
byte_order);
op_ptr += ctx->ref_addr_size;
diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
index 19efbfd..1b890dc 100644
--- a/gdb/dwarf2expr.h
+++ b/gdb/dwarf2expr.h
@@ -165,7 +165,7 @@ struct dwarf_expr_context
/* For DWARF_VALUE_LITERAL, the current literal value's length and
data. For DWARF_VALUE_IMPLICIT_POINTER, LEN is the offset of the
- target DIE of cu_offset kind. */
+ target DIE of sect_offset kind. */
ULONGEST len;
const gdb_byte *data;
@@ -236,7 +236,7 @@ struct dwarf_expr_piece
struct
{
/* The referent DIE from DW_OP_GNU_implicit_pointer. */
- cu_offset die;
+ sect_offset die;
/* The byte offset into the resulting data. */
LONGEST offset;
} ptr;
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index cadcc17..94a03ca 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -425,8 +425,7 @@ per_cu_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset,
{
struct dwarf2_locexpr_baton block;
- block = dwarf2_fetch_die_location_block (die_offset, per_cu,
- get_frame_pc, baton);
+ block = dwarf2_fetch_die_loc_cu_off (die_offset, per_cu, get_frame_pc, baton);
/* DW_OP_call_ref is currently not supported. */
gdb_assert (block.per_cu == per_cu);
@@ -2034,9 +2033,10 @@ indirect_pieced_value (struct value *value)
byte_offset = value_as_address (value);
gdb_assert (piece);
- baton = dwarf2_fetch_die_location_block (piece->v.ptr.die, c->per_cu,
- get_frame_address_in_block_wrapper,
- frame);
+ baton
+ = dwarf2_fetch_die_loc_sect_off (piece->v.ptr.die, c->per_cu,
+ get_frame_address_in_block_wrapper,
+ frame);
return dwarf2_evaluate_loc_desc_full (TYPE_TARGET_TYPE (type), frame,
baton.data, baton.size, baton.per_cu,
@@ -3201,8 +3201,8 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
op_ptr += size;
offset.cu_off = uoffset;
- block = dwarf2_fetch_die_location_block (offset, per_cu,
- get_ax_pc, expr);
+ block = dwarf2_fetch_die_loc_cu_off (offset, per_cu,
+ get_ax_pc, expr);
/* DW_OP_call_ref is currently not supported. */
gdb_assert (block.per_cu == per_cu);
diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h
index 0f10767..6a8b3c8 100644
--- a/gdb/dwarf2loc.h
+++ b/gdb/dwarf2loc.h
@@ -62,7 +62,12 @@ const gdb_byte *dwarf2_find_location_expression
size_t *locexpr_length,
CORE_ADDR pc);
-struct dwarf2_locexpr_baton dwarf2_fetch_die_location_block
+struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_sect_off
+ (sect_offset offset_in_cu, struct dwarf2_per_cu_data *per_cu,
+ CORE_ADDR (*get_frame_pc) (void *baton),
+ void *baton);
+
+struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_cu_off
(cu_offset offset_in_cu, struct dwarf2_per_cu_data *per_cu,
CORE_ADDR (*get_frame_pc) (void *baton),
void *baton);
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index f4bd7a9..59dea05 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -17343,12 +17343,11 @@ follow_die_ref (struct die_info *src_die, struct attribute *attr,
dwarf2_locexpr_baton->data has lifetime of PER_CU->OBJFILE. */
struct dwarf2_locexpr_baton
-dwarf2_fetch_die_location_block (cu_offset offset_in_cu,
- struct dwarf2_per_cu_data *per_cu,
- CORE_ADDR (*get_frame_pc) (void *baton),
- void *baton)
+dwarf2_fetch_die_loc_sect_off (sect_offset offset,
+ struct dwarf2_per_cu_data *per_cu,
+ CORE_ADDR (*get_frame_pc) (void *baton),
+ void *baton)
{
- sect_offset offset = { per_cu->offset.sect_off + offset_in_cu.cu_off };
struct dwarf2_cu *cu;
struct die_info *die;
struct attribute *attr;
@@ -17403,6 +17402,20 @@ dwarf2_fetch_die_location_block (cu_offset offset_in_cu,
return retval;
}
+/* Like dwarf2_fetch_die_loc_sect_off, but take a CU
+ offset. */
+
+struct dwarf2_locexpr_baton
+dwarf2_fetch_die_loc_cu_off (cu_offset offset_in_cu,
+ struct dwarf2_per_cu_data *per_cu,
+ CORE_ADDR (*get_frame_pc) (void *baton),
+ void *baton)
+{
+ sect_offset offset = { per_cu->offset.sect_off + offset_in_cu.cu_off };
+
+ return dwarf2_fetch_die_loc_sect_off (offset, per_cu, get_frame_pc, baton);
+}
+
/* Return the type of the DIE at DIE_OFFSET in the CU named by
PER_CU. */
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.S b/gdb/testsuite/gdb.dwarf2/implptr-64bit.S
index be8db5c..d0d870a 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-64bit.S
+++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.S
@@ -18,11 +18,12 @@ d:
/* Length of Compilation Unit Info */
#if OFFSET_SIZE == 4
# define OFFSET .4byte
- .4byte debug_end - 1f
+# define HEADER_LINE1
+# define HEADER_LINE2(END) .4byte END - 1f
#elif OFFSET_SIZE == 8
# define OFFSET .8byte
- .4byte 0xffffffff
- .8byte debug_end - 1f
+# define HEADER_LINE1 .4byte 0xffffffff
+# define HEADER_LINE2(END) .8byte END - 1f
#else
# error
#endif
@@ -40,6 +41,16 @@ d:
#else
# error
#endif
+
+#if TWO_CU
+# define END1 .Lcu_end_1
+#else
+# define END1 debug_end
+#endif
+
+ HEADER_LINE1
+ HEADER_LINE2(END1)
+
1:
.2byte DWARF_VERSION /* DWARF version number */
OFFSET .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
@@ -68,13 +79,6 @@ d:
.byte 0x0 /* end of children of DW_TAG_structure_type */
- .uleb128 6 /* Abbrev: DW_TAG_subprogram */
- .ascii "main\0" /* DW_AT_name */
- ADDR main /* DW_AT_low_pc */
- ADDR main + 0x100 /* DW_AT_high_pc */
- .4byte .Ltype_int - d /* DW_AT_type */
- .byte 1 /* DW_AT_external */
-
.Ltype_structptr:
.uleb128 0x5 /* DW_TAG_pointer_type */
.byte ADDR_SIZE /* DW_AT_byte_size */
@@ -90,7 +94,32 @@ d:
3:
.byte 1, 1, 1, 1
2:
- .4byte .Ltype_struct - d /* DW_AT_type */
+ REF_ADDR .Ltype_struct - d /* DW_AT_type */
+
+#if TWO_CU
+ .byte 0x0 /* end of children of CU */
+.Lcu_end_1:
+
+ HEADER_LINE1
+ HEADER_LINE2 (debug_end)
+
+1:
+ .2byte DWARF_VERSION /* DWARF version number */
+ OFFSET .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
+ .byte ADDR_SIZE /* Pointer Size (in bytes) */
+
+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */
+ .ascii "GNU C 4.4.3\0" /* DW_AT_producer */
+ .byte 0x1 /* DW_AT_language */
+ .ascii "1.c\0" /* DW_AT_name */
+#endif
+
+ .uleb128 6 /* Abbrev: DW_TAG_subprogram */
+ .ascii "main\0" /* DW_AT_name */
+ ADDR main /* DW_AT_low_pc */
+ ADDR main + 0x100 /* DW_AT_high_pc */
+ REF_ADDR .Ltype_int - d /* DW_AT_type */
+ .byte 1 /* DW_AT_external */
.uleb128 0x4 /* (DW_TAG_variable) */
.ascii "p\0" /* DW_AT_name */
@@ -100,7 +129,7 @@ d:
REF_ADDR .Lvar_out - d /* referenced DIE */
.sleb128 0 /* offset */
2:
- .4byte .Ltype_structptr - d /* DW_AT_type */
+ REF_ADDR .Ltype_structptr - d /* DW_AT_type */
.byte 0x0 /* end of children of main */
@@ -152,7 +181,7 @@ debug_end:
.uleb128 0x02 /* (DW_AT_location) */
.uleb128 0xa /* (DW_FORM_block1) */
.uleb128 0x49 /* (DW_AT_type) */
- .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x10 /* (DW_FORM_ref_addr) */
.byte 0x0
.byte 0x0
@@ -176,7 +205,7 @@ debug_end:
.uleb128 0x12 /* DW_AT_high_pc */
.uleb128 0x1 /* DW_FORM_addr */
.uleb128 0x49 /* DW_AT_type */
- .uleb128 0x13 /* DW_FORM_ref4 */
+ .uleb128 0x10 /* DW_FORM_ref_addr */
.uleb128 0x3f /* DW_AT_external */
.uleb128 0xc /* DW_FORM_flag */
.byte 0x0 /* Terminator */
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
index 78f1594..066cf78 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
@@ -22,16 +22,16 @@ if {![dwarf2_support]} {
standard_testfile .S
set mainfile main.c
-proc test { dwarf_version offset_size addr_size ref_addr_size } {
+proc test { dwarf_version offset_size addr_size ref_addr_size two_cu } {
global testfile srcfile mainfile
# 32-bit targets do not support any of the testcases; keep quiet there.
set opts {quiet}
- foreach n { dwarf_version offset_size addr_size ref_addr_size } {
+ foreach n { dwarf_version offset_size addr_size ref_addr_size two_cu } {
lappend opts "additional_flags=-D[string toupper $n]=[expr "\$$n"]"
}
- set name "d${dwarf_version}o${offset_size}a${addr_size}r${ref_addr_size}"
+ set name "d${dwarf_version}o${offset_size}a${addr_size}r${ref_addr_size}t${two_cu}"
set executable ${testfile}-${name}
if [prepare_for_testing ${testfile}.exp $executable "${srcfile} ${mainfile}" $opts] {
return -1
@@ -44,8 +44,12 @@ proc test { dwarf_version offset_size addr_size ref_addr_size } {
gdb_test "p/x p->f" " = 0x1010101" $name
}
-# DWARF_VERSION OFFSET_SIZE ADDR_SIZE REF_ADDR_SIZE
-test 2 8 4 4
-test 2 4 8 8
-test 3 8 4 8
-test 3 4 8 4
+# DWARF_VERSION OFFSET_SIZE ADDR_SIZE REF_ADDR_SIZE TWO_CU
+test 2 8 4 4 0
+test 2 4 8 8 0
+test 3 8 4 8 0
+test 3 4 8 4 0
+test 2 8 4 4 1
+test 2 4 8 8 1
+test 3 8 4 8 1
+test 3 4 8 4 1

File diff suppressed because it is too large Load Diff

View File

@ -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}"

View File

@ -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;

View File

@ -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
{

View File

@ -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;

View File

@ -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 *

View File

@ -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);

View File

@ -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

View File

@ -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)

View File

@ -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 (&current_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)"

View File

@ -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. */

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);
+

View File

@ -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.20130118/gdb/arm-linux-nat.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/arm-linux-nat.c 2013-01-18 23:34:43.930106839 +0100
+++ gdb-7.5.50.20130118/gdb/arm-linux-nat.c 2013-01-18 23:34:51.206116513 +0100
@@ -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.20130118/gdb/i386-nat.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/i386-nat.c 2013-01-18 23:34:43.931106841 +0100
+++ gdb-7.5.50.20130118/gdb/i386-nat.c 2013-01-18 23:34:51.206116513 +0100
@@ -591,7 +591,7 @@ i386_update_inferior_debug_regs (struct
of the type TYPE. Return 0 on success, -1 on failure. */
static int
@ -140,7 +140,7 @@ index 76c51a8..9e293fe 100644
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,
@@ -628,7 +628,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
@ -149,10 +149,10 @@ index 76c51a8..9e293fe 100644
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
Index: gdb-7.5.50.20130118/gdb/ia64-linux-nat.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/ia64-linux-nat.c 2013-01-18 23:34:43.931106841 +0100
+++ gdb-7.5.50.20130118/gdb/ia64-linux-nat.c 2013-01-18 23:34:51.206116513 +0100
@@ -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.20130118/gdb/inf-ttrace.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/inf-ttrace.c 2013-01-18 23:34:43.932106844 +0100
+++ gdb-7.5.50.20130118/gdb/inf-ttrace.c 2013-01-18 23:34:51.206116513 +0100
@@ -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.20130118/gdb/mips-linux-nat.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/mips-linux-nat.c 2013-01-18 23:34:43.932106844 +0100
+++ gdb-7.5.50.20130118/gdb/mips-linux-nat.c 2013-01-18 23:34:51.208116518 +0100
@@ -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.20130118/gdb/nto-procfs.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/nto-procfs.c 2013-01-18 23:34:43.933106847 +0100
+++ gdb-7.5.50.20130118/gdb/nto-procfs.c 2013-01-18 23:34:51.208116518 +0100
@@ -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.20130118/gdb/ppc-linux-nat.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/ppc-linux-nat.c 2013-01-18 23:34:43.934106849 +0100
+++ gdb-7.5.50.20130118/gdb/ppc-linux-nat.c 2013-01-18 23:34:51.208116518 +0100
@@ -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.20130118/gdb/procfs.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/procfs.c 2013-01-18 23:34:43.937106855 +0100
+++ gdb-7.5.50.20130118/gdb/procfs.c 2013-01-18 23:35:12.598145073 +0100
@@ -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.20130118/gdb/remote-m32r-sdi.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/remote-m32r-sdi.c 2013-01-18 23:34:51.211116523 +0100
+++ gdb-7.5.50.20130118/gdb/remote-m32r-sdi.c 2013-01-18 23:36:50.004276296 +0100
@@ -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.20130118/gdb/remote-mips.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/remote-mips.c 2013-01-18 23:34:43.939106860 +0100
+++ gdb-7.5.50.20130118/gdb/remote-mips.c 2013-01-18 23:34:51.212116525 +0100
@@ -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.20130118/gdb/remote.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/remote.c 2013-01-18 23:34:43.943106869 +0100
+++ gdb-7.5.50.20130118/gdb/remote.c 2013-01-18 23:34:51.214116529 +0100
@@ -8093,7 +8093,7 @@ watchpoint_to_Z_packet (int type)
}
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,
@@ -8108,7 +8108,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,
@@ -8128,7 +8128,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,
@@ -8137,7 +8137,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,
@@ -8152,7 +8152,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.20130118/gdb/s390-nat.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/s390-nat.c 2013-01-18 23:34:43.944106871 +0100
+++ gdb-7.5.50.20130118/gdb/s390-nat.c 2013-01-18 23:34:51.215116531 +0100
@@ -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.20130118/gdb/target.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/target.c 2013-01-18 23:34:43.947106878 +0100
+++ gdb-7.5.50.20130118/gdb/target.c 2013-01-18 23:34:51.216116533 +0100
@@ -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)
@@ -3560,7 +3562,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)
@@ -4267,7 +4269,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,
@@ -4277,8 +4279,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)
@@ -4313,7 +4315,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,
@@ -4321,9 +4323,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,
@@ -4358,7 +4360,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,
@@ -4366,14 +4368,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,
@@ -4381,8 +4383,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.20130118/gdb/target.h
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/target.h 2013-01-18 23:34:43.947106878 +0100
+++ gdb-7.5.50.20130118/gdb/target.h 2013-01-18 23:34:51.217116536 +0100
@@ -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--

View File

@ -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))

View File

@ -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);

View File

@ -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])

View File

@ -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.
+

View File

@ -1,228 +0,0 @@
http://sourceware.org/ml/binutils/2012-11/msg00352.html
Subject: Re: [PATCH] Fix gdb disassemble for power6/power7 instructions
On Wed, Nov 14, 2012 at 10:16:38AM +1030, Alan Modra wrote:
> What I think should happen is that the default handling, ie. the block
> that starts with
> if ((dialect & ~(ppc_cpu_t) PPC_OPCODE_64) == 0)
> should be deleted and a switch on info->mach setting up dialect added
> before we parse disassembler_options. That way -m32 and -m64 can
> override the default as they are supposed to. See bfd/archures.c for
> values of bfd_mach_ppc_*.
Well that idea didn't turn out to be simple. If we want to bring the
default up to something more up-to-date than the current ppc601, then
you run into difficulty with "retain_mask" in ppc_parse_cpu. Choosing
any of the bits in that mask as a default, eg. PPC_OPCODE_VSX, results
in not being able to get rid of those bits.
Now the idea of "retain_mask" was to cover cases where people pass
something like -mppc -maltivec (or even -maltivec -mppc) to the
assembler. Historically that has resulted in both PPC_OPCODE_PPC and
PPC_OPCODE_ALTIVEC being set; Some options accumulate. So I've
redone code handling these sticky options to just keep track of the
bits selected by ppc_opts.sticky. Any default selection won't make
these bits sticky, you'll only get that effect from -maltivec, -many,
-mspe, -mvle and -mvsx on the command line or in .machine directives
(and similarly for the corresponding -M disassembler options). I'm
not sure why PPC_OPCODE_PMR was ever in "retain_mask". People
interested in VLE might need to investigate that.
One of the effects of updating to a power7 default is that conditional
branch hints are displayed for "at" style hints rather than the older
"y" hints. When using "y" hints the disassembler always showed the
hint, eg. "bne-" or "bne+". Now you'll see "bne" most times. This
meant updating the testsuite. I made one gas test disassemble for
plain ppc just to ensure the older "y" hints continue to be available.
Committed.
include/opcode/
* ppc.h (ppc_parse_cpu): Update prototype.
opcodes/
* ppc-dis.c (ppc_parse_cpu): Add "sticky" param. Track bits
set from ppc_opts.sticky in it. Delete "retain_mask".
(powerpc_init_dialect): Choose default dialect from info->mach
before parsing -M options. Handle more bfd_mach_ppc variants.
Update common default to power7.
gas/
* config/tc-ppc.c (sticky): New var.
(md_parse_option, ppc_machine): Update ppc_parse_cpu calls.
gas/testsuite/
* gas/ppc/astest2.d: Pass -Mppc to objdump.
ld/testsuite/
* ld-powerpc/plt1.d: Update for default "at" branch hints.
* ld-powerpc/tlsexe.d: Likewise.
* ld-powerpc/tlsexetoc.d: Likewise.
* ld-powerpc/tlsopt1.d: Likewise.
* ld-powerpc/tlsopt1_32.d: Likewise.
* ld-powerpc/tlsopt2.d: Likewise.
* ld-powerpc/tlsopt2_32.d: Likewise.
* ld-powerpc/tlsopt4.d: Likewise.
* ld-powerpc/tlsopt4_32.d: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlstocso.d: Likewise.
Index: include/opcode/ppc.h
===================================================================
RCS file: /cvs/src/src/include/opcode/ppc.h,v
retrieving revision 1.44
diff -u -p -r1.44 ppc.h
--- ./include/opcode/ppc.h 14 May 2012 19:45:27 -0000 1.44
+++ ./include/opcode/ppc.h 22 Nov 2012 22:45:18 -0000
@@ -400,6 +400,6 @@ struct powerpc_macro
extern const struct powerpc_macro powerpc_macros[];
extern const int powerpc_num_macros;
-extern ppc_cpu_t ppc_parse_cpu (ppc_cpu_t, const char *);
+extern ppc_cpu_t ppc_parse_cpu (ppc_cpu_t, ppc_cpu_t *, const char *);
#endif /* PPC_H */
Index: opcodes/ppc-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-dis.c,v
retrieving revision 1.60
diff -u -p -r1.60 ppc-dis.c
--- ./opcodes/ppc-dis.c 5 Oct 2012 14:06:20 -0000 1.60
+++ ./opcodes/ppc-dis.c 22 Nov 2012 22:45:19 -0000
@@ -211,13 +211,8 @@ get_powerpc_dialect (struct disassemble_
/* Handle -m and -M options that set cpu type, and .machine arg. */
ppc_cpu_t
-ppc_parse_cpu (ppc_cpu_t ppc_cpu, const char *arg)
+ppc_parse_cpu (ppc_cpu_t ppc_cpu, ppc_cpu_t *sticky, const char *arg)
{
- const ppc_cpu_t retain_mask = (PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX
- | PPC_OPCODE_SPE | PPC_OPCODE_ANY
- | PPC_OPCODE_VLE | PPC_OPCODE_PMR);
- /* Sticky bits. */
- ppc_cpu_t retain_flags = ppc_cpu & retain_mask;
unsigned int i;
for (i = 0; i < sizeof (ppc_opts) / sizeof (ppc_opts[0]); i++)
@@ -225,8 +220,8 @@ ppc_parse_cpu (ppc_cpu_t ppc_cpu, const
{
if (ppc_opts[i].sticky)
{
- retain_flags |= ppc_opts[i].sticky;
- if ((ppc_cpu & ~retain_mask) != 0)
+ *sticky |= ppc_opts[i].sticky;
+ if ((ppc_cpu & ~*sticky) != 0)
break;
}
ppc_cpu = ppc_opts[i].cpu;
@@ -235,7 +230,7 @@ ppc_parse_cpu (ppc_cpu_t ppc_cpu, const
if (i >= sizeof (ppc_opts) / sizeof (ppc_opts[0]))
return 0;
- ppc_cpu |= retain_flags;
+ ppc_cpu |= *sticky;
return ppc_cpu;
}
@@ -245,12 +240,75 @@ static void
powerpc_init_dialect (struct disassemble_info *info)
{
ppc_cpu_t dialect = 0;
+ ppc_cpu_t sticky = 0;
char *arg;
struct dis_private *priv = calloc (sizeof (*priv), 1);
if (priv == NULL)
priv = &private;
+ switch (info->mach)
+ {
+ case bfd_mach_ppc_403:
+ case bfd_mach_ppc_403gc:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_403);
+ break;
+ case bfd_mach_ppc_405:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_403 | PPC_OPCODE_405);
+ break;
+ case bfd_mach_ppc_601:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_601);
+ break;
+ case bfd_mach_ppc_a35:
+ case bfd_mach_ppc_rs64ii:
+ case bfd_mach_ppc_rs64iii:
+ dialect = (PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_64);
+ break;
+ case bfd_mach_ppc_e500:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE
+ | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
+ | PPC_OPCODE_E500);
+ break;
+ case bfd_mach_ppc_e500mc:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
+ | PPC_OPCODE_E500MC);
+ break;
+ case bfd_mach_ppc_e500mc64:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
+ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER5
+ | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7);
+ break;
+ case bfd_mach_ppc_e5500:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
+ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER4
+ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
+ | PPC_OPCODE_POWER7);
+ break;
+ case bfd_mach_ppc_e6500:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
+ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_ALTIVEC
+ | PPC_OPCODE_ALTIVEC2 | PPC_OPCODE_E6500 | PPC_OPCODE_POWER4
+ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7);
+ break;
+ case bfd_mach_ppc_titan:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_PMR
+ | PPC_OPCODE_RFMCI | PPC_OPCODE_TITAN);
+ break;
+ case bfd_mach_ppc_vle:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_VLE);
+ break;
+ default:
+ dialect = (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64
+ | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
+ | PPC_OPCODE_POWER7 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX
+ | PPC_OPCODE_ANY);
+ }
+
arg = info->disassembler_options;
while (arg != NULL)
{
@@ -260,7 +318,7 @@ powerpc_init_dialect (struct disassemble
if (end != NULL)
*end = 0;
- if ((new_cpu = ppc_parse_cpu (dialect, arg)) != 0)
+ if ((new_cpu = ppc_parse_cpu (dialect, &sticky, arg)) != 0)
dialect = new_cpu;
else if (strcmp (arg, "32") == 0)
dialect &= ~(ppc_cpu_t) PPC_OPCODE_64;
@@ -274,20 +332,6 @@ powerpc_init_dialect (struct disassemble
arg = end;
}
- if ((dialect & ~(ppc_cpu_t) PPC_OPCODE_64) == 0)
- {
- if (info->mach == bfd_mach_ppc64)
- dialect |= PPC_OPCODE_64;
- else
- dialect &= ~(ppc_cpu_t) PPC_OPCODE_64;
- if (info->mach == bfd_mach_ppc_vle)
- dialect |= PPC_OPCODE_PPC | PPC_OPCODE_VLE;
- else
- /* Choose a reasonable default. */
- dialect |= (PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_601
- | PPC_OPCODE_ALTIVEC);
- }
-
info->private_data = priv;
POWERPC_DIALECT(info) = dialect;
}

View File

@ -1,60 +0,0 @@
http://sourceware.org/ml/gdb-patches/2012-11/msg00624.html
Subject: Re: [PATCH] Fix gdb disassemble for power6/power7 instructions
On 11/23/2012 01:28 AM, Alan Modra wrote:
> One of the effects of updating to a power7 default is that conditional
> branch hints are displayed for "at" style hints rather than the older
> "y" hints. When using "y" hints the disassembler always showed the
> hint, eg. "bne-" or "bne+". Now you'll see "bne" most times. This
> meant updating the testsuite. I made one gas test disassemble for
> plain ppc just to ensure the older "y" hints continue to be available.
>
> Committed.
Thanks a lot for the patch, Alan. This also fixes the issues with gdb
disassemble for power6 and power7 instructions.
With these changes on powerpc_init_dialect(), I'd suggest to remove the info->mach
checking from gdb. Ok?
--
Edjunior
2012-11-23 Edjunior Machado <emachado@linux.vnet.ibm.com>
* rs6000-tdep.c (gdb_print_insn_powerpc): Remove info->mach checking,
since now it is being done in binutils' powerpc_init_dialect().
---
gdb/rs6000-tdep.c | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 1797cc5..07b81bc 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -3084,21 +3084,6 @@ find_variant_by_arch (enum bfd_architecture arch, unsigned long mach)
static int
gdb_print_insn_powerpc (bfd_vma memaddr, disassemble_info *info)
{
- if (!info->disassembler_options)
- {
- /* When debugging E500 binaries and disassembling code containing
- E500-specific (SPE) instructions, one sometimes sees AltiVec
- instructions instead. The opcode spaces for SPE instructions
- and AltiVec instructions overlap, and specifiying the "any" cpu
- looks for AltiVec instructions first. If we know we're
- debugging an E500 binary, however, we can specify the "e500x2"
- cpu and get much more sane disassembly output. */
- if (info->mach == bfd_mach_ppc_e500)
- info->disassembler_options = "e500x2";
- else
- info->disassembler_options = "any";
- }
-
if (info->endian == BFD_ENDIAN_BIG)
return print_insn_big_powerpc (memaddr, info);
else
--
1.7.1

View File

@ -1,10 +1,10 @@
Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
the default gcc and gfortran binaries are from gcc-4.1.
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/vla.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/vla.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.base/vla.exp 2012-07-03 17:30:07.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.base/vla.exp 2012-07-03 17:50:57.999207540 +0200
--- 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
@ -32,10 +32,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/vla.exp
untested "Couldn't compile test program"
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/break-interp.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/break-interp.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.base/break-interp.exp 2012-07-03 17:44:45.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.base/break-interp.exp 2012-07-03 17:50:58.000207539 +0200
--- 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
}
@ -67,15 +67,16 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/break-interp.exp
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/common-block.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/common-block.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/common-block.exp 2012-07-03 17:36:21.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/common-block.exp 2012-07-03 17:50:58.001207537 +0200
@@ -20,7 +20,25 @@ set testfile "common-block"
set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile}
--- 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]} {
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
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]
@ -87,21 +88,21 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/common-block.exp
+}
+set_board_info f90compiler gfortran44
+
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
+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 != "" } {
untested "Couldn't compile ${srcfile}"
+if {$err} {
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dwarf-stride.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dwarf-stride.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2012-07-03 17:30:07.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2012-07-03 17:50:58.002207535 +0200
--- 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
@ -129,10 +130,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dwarf-stride.exp
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dynamic.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/dynamic.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2012-07-03 17:30:07.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dynamic.exp 2012-07-03 17:50:58.002207535 +0200
--- 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}
@ -160,10 +161,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dynamic.exp
untested "Couldn't compile ${srcfile}"
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/library-module.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/library-module.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/library-module.exp 2012-06-25 22:51:35.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/library-module.exp 2012-07-03 17:52:57.666062981 +0200
--- 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
}
@ -203,10 +204,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/library-module.exp
untested "Couldn't compile ${srcfile}"
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/module.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/module.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/module.exp 2012-06-25 22:51:35.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/module.exp 2012-07-03 17:53:56.464992086 +0200
--- 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
@ -234,10 +235,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/module.exp
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/string.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/string.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/string.exp 2012-07-03 17:30:07.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/string.exp 2012-07-03 17:50:58.005207532 +0200
--- 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}
@ -265,10 +266,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/string.exp
untested "Couldn't compile ${srcfile}"
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/omp-step.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2012-07-03 17:36:21.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/omp-step.exp 2012-07-03 17:50:58.006207531 +0200
--- 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"
@ -297,10 +298,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/omp-step.exp
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/derived-type.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/derived-type.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2012-06-25 22:51:35.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/derived-type.exp 2012-07-03 17:55:46.583858849 +0200
--- 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
@ -328,10 +329,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/derived-type.exp
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/subarray.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/subarray.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/subarray.exp 2012-06-25 22:51:35.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/subarray.exp 2012-07-03 17:56:20.454818198 +0200
--- 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
@ -359,10 +360,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/subarray.exp
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/tls-sepdebug.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.threads/tls-sepdebug.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2012-07-03 17:32:05.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2012-07-03 17:50:58.007207530 +0200
--- 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).
@ -390,10 +391,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/tls-sepdebug.exp
untested "Couldn't compile test library"
return -1
}
Index: gdb-7.4.50.20120703/gdb/testsuite/lib/prelink-support.exp
Index: gdb-7.5.50.20130118/gdb/testsuite/lib/prelink-support.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/lib/prelink-support.exp 2012-07-03 17:44:45.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/lib/prelink-support.exp 2012-07-03 17:50:58.008207529 +0200
--- 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

View File

@ -1,26 +0,0 @@
FYI: set dwz_file in dwarf2read.c
http://sourceware.org/ml/gdb-patches/2012-12/msg00354.html
http://sourceware.org/ml/gdb-cvs/2012-12/msg00058.html
### src/gdb/ChangeLog 2012/12/11 18:45:23 1.14904
### src/gdb/ChangeLog 2012/12/11 19:50:52 1.14905
## -1,5 +1,9 @@
2012-12-11 Tom Tromey <tromey@redhat.com>
+ * dwarf2read.c (dwarf2_get_dwz_file): Set 'dwz_file'.
+
+2012-12-11 Tom Tromey <tromey@redhat.com>
+
* dsrec.c (report_transfer_performance): Don't declare.
(load_srec): Use gettimeofday, print_transfer_performance.
* symfile.c (report_transfer_performance): Remove.
--- src/gdb/dwarf2read.c 2012/12/10 22:02:34 1.720
+++ src/gdb/dwarf2read.c 2012/12/11 19:50:53 1.721
@@ -2112,6 +2112,7 @@
do_cleanups (cleanup);
+ dwarf2_per_objfile->dwz_file = result;
return result;
}

132
gdb.spec
View File

@ -30,11 +30,11 @@ Name: %{?scl_prefix}gdb
%global snap 20120817
# See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20120623
Version: 7.5.1
Version: 7.5.50.20130118
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 35%{?dist}
Release: 1%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers
@ -261,7 +261,7 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
# Backported fixups post the source tarball.
#Xdrop: Just backports.
Patch232: gdb-upstream.patch
#Patch232: gdb-upstream.patch
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
#=fedoratest+ppc
@ -374,10 +374,6 @@ Patch329: gdb-6.8-bz254229-gcore-prpsinfo.patch
#=push+work: This fix is incorrect.
Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
# Make the GDB quit processing non-abortable to cleanup everything properly.
#=push: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
Patch331: gdb-6.8-quit-never-aborts.patch
# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
#=fedora
Patch335: gdb-rhel5-compat.patch
@ -433,12 +429,6 @@ Patch397: gdb-follow-child-stale-parent.patch
#=fedoratest: ccache is rarely used and it is even fixed now.
Patch403: gdb-ccache-workaround.patch
# Implement `info common' for Fortran.
#=push
Patch404: gdb-fortran-common-reduce.patch
#=push
Patch405: gdb-fortran-common.patch
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
#=fedoratest
Patch407: gdb-lineno-makeup-test.patch
@ -476,10 +466,6 @@ Patch491: gdb-gdb-add-index-script.patch
#=drop+work: Inferior objects should be read in parts, then this patch gets obsoleted.
Patch496: gdb-bz568248-oom-is-error.patch
# Fix gcore writer for -Wl,-z,relro (PR corefiles/11804).
#=push: There is different patch on gdb-patches, waiting now for resolution in kernel.
Patch504: gdb-bz623749-gcore-relro.patch
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
#=fedoratest
Patch526: gdb-bz634108-solib_address.patch
@ -512,8 +498,6 @@ Patch579: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
# Fix dlopen of libpthread.so, patched glibc required (Gary Benson, BZ 669432).
#=push
Patch618: gdb-dlopen-stap-probe-1of7.patch
Patch717: gdb-dlopen-stap-probe-2of7.patch
Patch718: gdb-dlopen-stap-probe-3of7.patch
Patch719: gdb-dlopen-stap-probe-4of7.patch
Patch720: gdb-dlopen-stap-probe-5of7.patch
@ -550,7 +534,7 @@ Patch657: gdb-attach-fail-reasons-5of5configure.patch
Patch661: gdb-stale-frame_info.patch
# Workaround PR libc/14166 for inferior calls of strstr.
#=push+work: But push it to glibc.
#=fedora: Compatibility with RHELs (unchecked which ones).
Patch690: gdb-glibc-strstr-workaround.patch
# Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
@ -562,50 +546,18 @@ Patch698: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
#=fedoratest
Patch703: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
# Implement MiniDebugInfo F-18 Feature consumer (Alexander Larsson, BZ 834068).
#=fedora
Patch716: gdb-minidebuginfo.patch
# Fix crash printing classes (BZ 849357, Tom Tromey).
Patch726: gdb-print-class.patch
# Permit passing pointers as address number even for C++ methods (Keith Seitz).
Patch728: gdb-check-type.patch
# entry values: Fix resolving in inlined frames.
Patch729: gdb-entryval-inlined.patch
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
# (RH BZ 795424).
Patch797: gdb-rhbz795424-bitpos-06of25.patch
Patch798: gdb-rhbz795424-bitpos-07of25.patch
Patch799: gdb-rhbz795424-bitpos-08of25.patch
Patch800: gdb-rhbz795424-bitpos-09of25.patch
Patch801: gdb-rhbz795424-bitpos-10of25.patch
Patch802: gdb-rhbz795424-bitpos-11of25.patch
Patch803: gdb-rhbz795424-bitpos-12of25.patch
Patch804: gdb-rhbz795424-bitpos-13of25.patch
Patch805: gdb-rhbz795424-bitpos-14of25.patch
Patch806: gdb-rhbz795424-bitpos-15of25.patch
Patch807: gdb-rhbz795424-bitpos-16of25.patch
Patch808: gdb-rhbz795424-bitpos-17of25.patch
Patch809: gdb-rhbz795424-bitpos-18of25.patch
Patch810: gdb-rhbz795424-bitpos-19of25.patch
Patch811: gdb-rhbz795424-bitpos-20of25.patch
Patch812: gdb-rhbz795424-bitpos-21of25.patch
Patch813: gdb-rhbz795424-bitpos-22of25.patch
Patch814: gdb-rhbz795424-bitpos-23of25.patch
Patch815: gdb-rhbz795424-bitpos-24of25.patch
Patch816: gdb-rhbz795424-bitpos-25of25.patch
Patch817: gdb-rhbz795424-bitpos-25of25-test.patch
Patch818: gdb-rhbz795424-bitpos-lazyvalue.patch
# Fix DW_OP_GNU_implicit_pointer offset bug (Tom Tromey).
Patch819: gdb-implicitpointer-offset.patch
# [ppc*] Fix PowerPC disassembly regression (Alan Modra, Edjunior Machado).
Patch820: gdb-rhbz890900-ppc-dis-1of2.patch
Patch821: gdb-rhbz890900-ppc-dis-2of2.patch
# Fix gdb.fortran/common-block.exp in PIE mode.
Patch823: gdb-commonblock-pie.patch
%if 0%{!?rhel:1} || 0%{?rhel} > 6
# RL_STATE_FEDORA_GDB would not be found for:
@ -806,7 +758,7 @@ find -name "*.info*"|xargs rm -f
%patch2 -p1
%patch349 -p1
%patch232 -p1
#patch232 -p1
%patch1 -p1
%patch3 -p1
@ -869,7 +821,6 @@ find -name "*.info*"|xargs rm -f
%patch320 -p1
%patch329 -p1
%patch330 -p1
%patch331 -p1
%patch343 -p1
%patch348 -p1
%patch360 -p1
@ -879,8 +830,6 @@ find -name "*.info*"|xargs rm -f
%patch392 -p1
%patch397 -p1
%patch403 -p1
%patch404 -p1
%patch405 -p1
%patch389 -p1
%patch394 -p1
%patch407 -p1
@ -894,14 +843,11 @@ find -name "*.info*"|xargs rm -f
%patch490 -p1
%patch491 -p1
%patch496 -p1
%patch504 -p1
%patch526 -p1
%patch542 -p1
%patch547 -p1
%patch548 -p1
%patch579 -p1
%patch618 -p1
%patch717 -p1
%patch718 -p1
%patch719 -p1
%patch720 -p1
@ -919,35 +865,14 @@ find -name "*.info*"|xargs rm -f
%patch690 -p1
%patch698 -p1
%patch703 -p1
%patch716 -p1
%patch726 -p1
%patch728 -p1
%patch729 -p1
%patch797 -p1
%patch798 -p1
%patch799 -p1
%patch800 -p1
%patch801 -p1
%patch802 -p1
%patch803 -p1
%patch804 -p1
%patch805 -p1
%patch806 -p1
%patch807 -p1
%patch808 -p1
%patch809 -p1
%patch810 -p1
%patch811 -p1
%patch812 -p1
%patch813 -p1
%patch814 -p1
%patch815 -p1
%patch816 -p1
%patch817 -p1
%patch818 -p1
%patch819 -p1
%patch820 -p1
%patch821 -p1
%patch823 -p1
%patch393 -p1
%if 0%{!?el5:1} || 0%{?scl:1}
@ -1446,6 +1371,9 @@ fi
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
%changelog
* Sat Jan 19 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.50.20130118-1.fc19
- Rebase to FSF GDB 7.5.50.20130118 (pre-7.6 snapshot).
* Sun Jan 13 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.1-35.fc18
- [testsuite] Fix gdb-orphanripper.c lockup on F-17 (/dev/pts/* glibc chown).
@ -3014,7 +2942,7 @@ fi
* Sun Oct 14 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.6-36
- Fix hardware watchpoints after inferior forks-off some process.
* Fri Oct 13 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.6-35
* Sat Oct 13 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.6-35
- Fix non-threaded watchpoints CTRL-C regression on `set follow child'.
* Fri Oct 12 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.6-34
@ -3161,7 +3089,7 @@ fi
* Mon Jan 15 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-27
- Fix the testsuite results broken in 6.5-26, stop invalid testsuite runs.
* Fri Jan 13 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-26
* Sat Jan 13 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-26
- Fix unwinding of non-debug (.eh_frame) PPC code, Andreas Schwab (BZ 140532).
- Fix unwinding of debug (.debug_frame) PPC code, workaround GCC (BZ 140532).
- Fix missing testsuite .log output of testcases using get_compiler_info().
@ -3195,16 +3123,16 @@ fi
* Sat Nov 25 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-18
- Fix readline history for input mode commands like `command' (BZ 215816).
* Wed Nov 16 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-17
* Thu Nov 16 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-17
- Bugfix testcase typo of gdb-6.5-16.
* Wed Nov 16 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-16
* Thu Nov 16 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-16
- Provide testcase for accessing the last address space byte.
* Wed Nov 9 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-15
* Thu Nov 9 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-15
- Fix readline segfault on excessively long hand-typed lines.
* Sat Nov 2 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-14
* Thu Nov 2 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-14
- Fix "??" resolving of symbols from (non-prelinked) debuginfo packages.
- Fix "??" resolving of symbols from overlapping functions (nanosleep(3)).
- Also disable testcase "checkpoint.exp" for a possible kernel Bug 207002.
@ -3227,7 +3155,7 @@ fi
- Support IPv6 for gdbserver (BZ 198365).
- Temporarily disable testcase "chng-syms.exp" for a possible kernel Bug 207002.
* Wed Sep 21 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-9
* Thu Sep 21 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-9
- Fix crash on C++ symbol failing to be demangled (BZ 206813).
- Fix attach to stopped process, supersede `gdb-6.3-attach-stop-20051011.patch'.
- Fix TLS symbols resolving for objects with separate .debug file (-debuginfo).
@ -3762,11 +3690,11 @@ Bugzilla 135633
- For 64-bit PPC, convert _dl_debug_state descriptor into a code address.
- Fix --ignore option.
* Mon Oct 10 2004 Andrew Cagney <cagney@redhat.com> - 1.200400607.40
* Sun Oct 10 2004 Andrew Cagney <cagney@redhat.com> - 1.200400607.40
- Disable attach-pie.exp test, hangs on amd64 without auxv.
- Move pie tests to pie.
* Mon Oct 10 2004 Andrew Cagney <cagney@redhat.com> - 1.200400607.39
* Sun Oct 10 2004 Andrew Cagney <cagney@redhat.com> - 1.200400607.39
- Fix comment bug in sigstep.exp.
* Thu Oct 07 2004 Jeff Johnston <jjohnstn@redhat.com> - 1.200400607.38
@ -3939,17 +3867,17 @@ Bugzilla 135633
* Tue Mar 30 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.13
- Fix testsuite glitches.
* Thu Mar 24 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.12
* Wed Mar 24 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.12
- Fix typo.
* Thu Mar 24 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.11
* Wed Mar 24 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.11
- Make gdb compile w/o warnings with gcc-3.4.
- Reenable PIE support code.
* Wed Mar 23 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.10
* Tue Mar 23 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.10
- Bump version number
* Wed Mar 23 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.9
* Tue Mar 23 2004 Elena Zannoni <ezannoni@redhat.com> - 0.20040223.9
- temporarily disable PIE support.
- Add section to obsolete gdb64 package.
@ -4138,7 +4066,7 @@ to pointers when the address is in the ".opd" section.
* Wed Aug 06 2003 Andrew Cagney <cagney@redhat.com> - 0.20030710.10
- Sync to gdb-5.3.90-sync-20030806.patch.
* Wed Jul 29 2003 Andrew Cagney <cagney@redhat.com> - 0.20030710.9
* Tue Jul 29 2003 Andrew Cagney <cagney@redhat.com> - 0.20030710.9
- add x86-64 i386 fixes
* Tue Jul 29 2003 Elena Zannoni <ezannoni@redhat.com> - 0.20030710.8
@ -4525,7 +4453,7 @@ General revamp.
* Fri Mar 16 2001 Trond Eivind Glomsrod <teg@redhat.com>
- build with old headers, new compiler
* Wed Mar 16 2001 Trond Eivind Glomsrod <teg@redhat.com>
* Fri Mar 16 2001 Trond Eivind Glomsrod <teg@redhat.com>
- new snapshot
* Mon Feb 26 2001 Trond Eivind Glomsrod <teg@redhat.com>
@ -4548,7 +4476,7 @@ General revamp.
* Fri Jan 19 2001 Trond Eivind Glomsrod <teg@redhat.com>
- new snapshot
* Thu Dec 20 2000 Trond Eivind Glomsrod <teg@redhat.com>
* Wed Dec 20 2000 Trond Eivind Glomsrod <teg@redhat.com>
- new snapshot
* Mon Dec 04 2000 Trond Eivind Glomsrod <teg@redhat.com>
@ -4568,7 +4496,7 @@ General revamp.
* Wed Aug 09 2000 Trond Eivind Glomsrod <teg@redhat.com>
- added patch from GDB team for C++ symbol handling
* Mon Jul 25 2000 Trond Eivind Glomsrod <teg@redhat.com>
* Tue Jul 25 2000 Trond Eivind Glomsrod <teg@redhat.com>
- upgrade to CVS snapshot
- excludearch SPARC, build on IA61
@ -4581,7 +4509,7 @@ General revamp.
* Sun Jul 02 2000 Trond Eivind Glomsrod <teg@redhat.com>
- rebuild
* Fri Jun 08 2000 Trond Eivind Glomsrod <teg@redhat.com>
* Thu Jun 08 2000 Trond Eivind Glomsrod <teg@redhat.com>
- use %%configure, %%makeinstall, %%{_infodir}, %%{_mandir},
and %%{_tmppath}
- the install scripts for info are broken(they don't care about
@ -4620,7 +4548,7 @@ sigtramp, sparc, xref, and threads patches. Update sparcmin patch.
* Mon Aug 23 1999 Jim Kingdon
- Omit readline manpage.
* Tue Aug 7 1999 Jim Kingdon
* Sat Aug 7 1999 Jim Kingdon
- Remove H.J. Lu's patches (they had been commented out).
- Add sigtramp patch (from gdb.cygnus.com) and threads patch (adapted
from code fusion CD-ROM).

View File

@ -1,2 +1,2 @@
4981307aa9619bbec5b73261e4e41c8d gdb-libstdc++-v3-python-r155978.tar.bz2
3f48f468b24447cf24820054ff6e85b1 gdb-7.5.1.tar.bz2
889f62ad99a041daf5143c61a559cf2f gdb-7.5.50.20130118.tar.bz2