diff --git a/.gitignore b/.gitignore index 7564965..52b042b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /gdb-libstdc++-v3-python-r155978.tar.bz2 -/gdb-7.6.tar.bz2 +/gdb-7.6.50.20130624.tar.bz2 +/gdb-7.6.50.20130731-cvs.tar.bz2 diff --git a/gdb-6.3-mapping-zero-inode-test.patch b/gdb-6.3-mapping-zero-inode-test.patch index 73d2446..2c3f05a 100644 --- a/gdb-6.3-mapping-zero-inode-test.patch +++ b/gdb-6.3-mapping-zero-inode-test.patch @@ -1,8 +1,8 @@ -Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp 2009-06-29 16:24:36.000000000 +0200 -@@ -0,0 +1,96 @@ ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.exp 2013-08-02 22:24:04.747745133 +0200 +@@ -0,0 +1,101 @@ +# Copyright 2007, 2009 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -46,16 +46,21 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp +gdb_breakpoint "initialized" +gdb_breakpoint "unresolved" + ++set oldtimeout $timeout ++set timeout [expr $oldtimeout + 120] ++ +set test "Continue to initialized." +gdb_test_multiple "continue" $test { + -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" { + pass $test + } + -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" { ++ set timeout $oldtimeout + unsupported $test + return -1 + } +} ++set timeout $oldtimeout + +set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore-shmid0.test] + @@ -99,11 +104,11 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp + fail $test + } +} -Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c 2009-06-29 16:22:49.000000000 +0200 -@@ -0,0 +1,123 @@ ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c 2013-08-02 22:22:17.573599496 +0200 +@@ -0,0 +1,127 @@ +/* Copyright 2007, 2009 Free Software Foundation, Inc. + + This file is part of GDB. @@ -140,14 +145,18 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c + +#define TIMEOUT_SEC 10 + ++static volatile int v; ++ +static void +initialized (void) +{ ++ v++; +} + +static void +unresolved (void) +{ ++ v++; +} + +int @@ -189,7 +198,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c + } + + printf ("Problem is not reproducible on this kernel (attempt %d, " -+ "round %d))\n", attempt, round); ++ "round %d)\n", attempt, round); + unresolved (); + exit (1); + } diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch index 5fb51b2..944e104 100644 --- a/gdb-6.3-readnever-20050907.patch +++ b/gdb-6.3-readnever-20050907.patch @@ -11,11 +11,11 @@ * gdb.texinfo (File Options): Document --readnever. -Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo +Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo 2013-02-15 22:34:22.381165443 +0100 -@@ -1026,6 +1026,12 @@ Read each symbol file's entire symbol ta +--- gdb-7.6.50.20130731-cvs.orig/gdb/doc/gdb.texinfo 2013-08-02 16:12:54.970085942 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo 2013-08-02 16:20:21.164687886 +0200 +@@ -1030,6 +1030,12 @@ Read each symbol file's entire symbol ta the default, which is to read it incrementally as it is needed. This makes startup slower, but makes future operations faster. @@ -28,11 +28,11 @@ Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo @end table @node Mode Options -Index: gdb-7.5.50.20130215/gdb/main.c +Index: gdb-7.6.50.20130731-cvs/gdb/main.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/main.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/main.c 2013-02-15 22:34:22.382165445 +0100 -@@ -447,6 +447,7 @@ captured_main (void *data) +--- gdb-7.6.50.20130731-cvs.orig/gdb/main.c 2013-08-02 16:12:54.974085948 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/main.c 2013-08-02 16:20:53.704731449 +0200 +@@ -459,6 +459,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,19 +40,19 @@ Index: gdb-7.5.50.20130215/gdb/main.c {"r", no_argument, &readnow_symbol_files, 1}, {"quiet", no_argument, &quiet, 1}, {"q", no_argument, &quiet, 1}, -@@ -1165,6 +1166,7 @@ Options:\n\n\ - fputs_unfiltered (_("\ - --quiet Do not print version number on startup.\n\ +@@ -1154,6 +1155,7 @@ Selection of debuggee and its files:\n\n + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ --readnow Fully read symbol files on first access.\n\ + --readnever Do not read symbol files.\n\ + --write Set writing into executable and core files.\n\n\ "), stream); fputs_unfiltered (_("\ - --se=FILE Use FILE as symbol file and executable file.\n\ -Index: gdb-7.5.50.20130215/gdb/symfile.c +Index: gdb-7.6.50.20130731-cvs/gdb/symfile.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/symfile.c 2013-02-01 20:39:03.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/symfile.c 2013-02-15 22:34:22.383165447 +0100 -@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup ( +--- gdb-7.6.50.20130731-cvs.orig/gdb/symfile.c 2013-08-02 16:12:54.975085949 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symfile.c 2013-08-02 16:20:21.165687888 +0200 +@@ -82,6 +82,7 @@ static void clear_symtab_users_cleanup ( /* Global variables owned by this file. */ int readnow_symbol_files; /* Read full symbols immediately. */ @@ -60,19 +60,19 @@ Index: gdb-7.5.50.20130215/gdb/symfile.c /* Functions this file defines. */ -Index: gdb-7.5.50.20130215/gdb/dwarf2read.c +Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/dwarf2read.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/dwarf2read.c 2013-02-15 22:34:34.479181584 +0100 -@@ -68,6 +68,7 @@ - #include "gdb_bfd.h" +--- gdb-7.6.50.20130731-cvs.orig/gdb/dwarf2read.c 2013-08-02 16:12:54.979085954 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c 2013-08-02 16:20:37.190709689 +0200 +@@ -69,6 +69,7 @@ #include "f-lang.h" #include "source.h" + #include "filestuff.h" +#include "top.h" #include #include "gdb_string.h" -@@ -1793,8 +1794,9 @@ dwarf2_has_info (struct objfile *objfile +@@ -1834,8 +1835,9 @@ dwarf2_has_info (struct objfile *objfile (void *) names); dwarf2_per_objfile->objfile = objfile; } @@ -84,11 +84,11 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2read.c } /* When loading sections, we look either for uncompressed section or for -Index: gdb-7.5.50.20130215/gdb/top.h +Index: gdb-7.6.50.20130731-cvs/gdb/top.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/top.h 2013-01-07 17:40:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/top.h 2013-02-15 22:34:22.389165459 +0100 -@@ -58,6 +58,7 @@ extern void set_prompt (const char *s); +--- gdb-7.6.50.20130731-cvs.orig/gdb/top.h 2013-08-02 16:12:54.980085956 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/top.h 2013-08-02 16:20:21.169687893 +0200 +@@ -59,6 +59,7 @@ extern void set_prompt (const char *s); /* From random places. */ extern int readnow_symbol_files; diff --git a/gdb-6.3-test-self-20050110.patch b/gdb-6.3-test-self-20050110.patch index a3ada08..3a5745b 100644 --- a/gdb-6.3-test-self-20050110.patch +++ b/gdb-6.3-test-self-20050110.patch @@ -6,96 +6,30 @@ * gdb.gdb/xfullpath.exp: Ditto. * gdb.gdb/observer.exp: Ditto. -Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/complaints.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/selftest-support.exp =================================================================== ---- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/complaints.exp 2009-01-03 06:58:04.000000000 +0100 -+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/complaints.exp 2009-02-26 22:10:48.000000000 +0100 -@@ -302,13 +302,13 @@ proc find_gdb { arg } { - set GDB_FULLPATH [find_gdb $GDB] +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/selftest-support.exp 2013-08-02 16:11:29.195971922 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/selftest-support.exp 2013-08-02 16:12:20.404040378 +0200 +@@ -130,18 +130,18 @@ proc do_self_tests {function body} { + set GDB_FULLPATH [find_gdb $GDB] - # Remove any old copy lying around. --remote_file host delete x$tool -+#remote_file host delete x$tool + # Remove any old copy lying around. +- remote_file host delete x$tool ++ #remote_file host delete x$tool - gdb_start + gdb_start +- set file [remote_download host $GDB_FULLPATH x$tool] ++ #set file [remote_download host $GDB_FULLPATH x$tool] --set file [remote_download host $GDB_FULLPATH x$tool] -+#set file [remote_download host $GDB_FULLPATH x$tool] +- set result [selftest_setup $file $function] ++ set result [selftest_setup $GDB_FULLPATH $function] + if {$result == 0} then { + set result [uplevel $body] + } --set setup_result [setup_test $file ] -+set setup_result [setup_test $GDB_FULLPATH ] - if {$setup_result <0} then { - return -1 - } -@@ -319,4 +319,4 @@ test_short_complaints - test_empty_complaints + gdb_exit +- catch "remote_file host delete $file" ++ #catch "remote_file host delete $file" - gdb_exit; --catch "remote_file host delete $file"; -+#catch "remote_file host delete $file"; -Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/observer.exp -=================================================================== ---- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/observer.exp 2009-02-17 20:52:27.000000000 +0100 -+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/observer.exp 2009-02-26 22:11:40.000000000 +0100 -@@ -258,13 +258,13 @@ proc find_gdb { arg } { - set GDB_FULLPATH [find_gdb $GDB] - - # Remove any old copy lying around. --remote_file host delete x$tool -+#remote_file host delete x$tool - - gdb_start --set file [remote_download host $GDB_FULLPATH x$tool] --set result [test_observer $file]; -+#set file [remote_download host $GDB_FULLPATH x$tool] -+set result [test_observer $GDB_FULLPATH]; - gdb_exit; --catch "remote_file host delete $file"; -+#catch "remote_file host delete $file"; - - if {$result <0} then { - warning "Couldn't test self" -Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/selftest.exp -=================================================================== ---- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/selftest.exp 2009-02-26 22:09:59.000000000 +0100 -+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/selftest.exp 2009-02-26 22:10:48.000000000 +0100 -@@ -551,13 +551,13 @@ proc find_gdb { arg } { - set GDB_FULLPATH [find_gdb $GDB] - - # Remove any old copy lying around. --remote_file host delete x$tool -+#remote_file host delete x$tool - - gdb_start --set file [remote_download host $GDB_FULLPATH x$tool] --set result [test_with_self $file]; -+#set file [remote_download host $GDB_FULLPATH x$tool] -+set result [test_with_self $GDB_FULLPATH]; - gdb_exit; --catch "remote_file host delete $file"; -+#catch "remote_file host delete $file"; - - if {$result <0} then { - warning "Couldn't test self" -Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/xfullpath.exp -=================================================================== ---- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/xfullpath.exp 2009-01-03 06:58:04.000000000 +0100 -+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/xfullpath.exp 2009-02-26 22:10:48.000000000 +0100 -@@ -179,13 +179,13 @@ proc find_gdb { arg } { - set GDB_FULLPATH [find_gdb $GDB] - - # Remove any old copy lying around. --remote_file host delete x$tool -+#remote_file host delete x$tool - - gdb_start --set file [remote_download host $GDB_FULLPATH x$tool] --set result [test_with_self $file]; -+#set file [remote_download host $GDB_FULLPATH x$tool] -+set result [test_with_self $GDB_FULLPATH]; - gdb_exit; --catch "remote_file host delete $file"; -+#catch "remote_file host delete $file"; - - if {$result <0} then { - warning "Couldn't test self" + if {$result < 0} then { + warning "Couldn't test self" diff --git a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch index fa2f4ed..1c8f99b 100644 --- a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +++ b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -32,21 +32,23 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug: <81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location <81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location ---- a/gdb/printcmd.c -+++ b/gdb/printcmd.c -@@ -967,6 +967,8 @@ print_command_1 (char *exp, int inspect, int voidprint) +Index: gdb-7.6.50.20130731-cvs/gdb/printcmd.c +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/printcmd.c 2013-08-02 16:21:13.665758324 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/printcmd.c 2013-08-02 16:22:24.367853322 +0200 +@@ -982,6 +982,8 @@ print_command_1 (const char *exp, int vo if (exp && *exp) { + if (strcmp (exp, "errno") == 0) + exp = "*((int *(*) (void)) __errno_location) ()"; expr = parse_expression (exp); - old_chain = make_cleanup (free_current_contents, &expr); - cleanup = 1; -Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c + make_cleanup (free_current_contents, &expr); + val = evaluate_expression (expr); +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2011-03-29 10:55:35.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2013-08-02 16:21:13.665758324 +0200 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -76,10 +78,10 @@ Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c + + return 0; /* breakpoint */ +} -Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2011-03-29 10:55:35.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2013-08-02 16:21:13.665758324 +0200 @@ -0,0 +1,60 @@ +# Copyright 2007 Free Software Foundation, Inc. + diff --git a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch index 6839678..0b3931f 100644 --- a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch +++ b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch @@ -1,11 +1,11 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379 -Index: gdb-7.5.50.20130118/gdb/symtab.c +Index: gdb-7.6.50.20130731-cvs/gdb/symtab.c =================================================================== ---- 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 +--- gdb-7.6.50.20130731-cvs.orig/gdb/symtab.c 2013-08-02 17:06:19.854663801 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symtab.c 2013-08-02 17:07:04.317721471 +0200 +@@ -2327,6 +2327,13 @@ find_pc_sect_line (CORE_ADDR pc, struct SYMBOL_LINKAGE_NAME (msymbol)); */ ; /* fall through */ @@ -14,7 +14,7 @@ Index: gdb-7.5.50.20130118/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.minsym), paddress (target_gdbarch (), pc)); + /* fall through */ else return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0); diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index efacab5..dfd5a1e 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -58,10 +58,10 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html * exec.c (exec_file_attach): Print a more useful error message if the user did "gdb core". -Index: gdb-7.5.91.20130323/gdb/exceptions.h +Index: gdb-7.6.50.20130731-cvs/gdb/exceptions.h =================================================================== ---- gdb-7.5.91.20130323.orig/gdb/exceptions.h 2013-03-22 21:41:45.000000000 +0100 -+++ gdb-7.5.91.20130323/gdb/exceptions.h 2013-03-23 19:49:05.738459185 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/exceptions.h 2013-08-02 16:29:44.770440262 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/exceptions.h 2013-08-02 16:30:06.197468727 +0200 @@ -90,6 +90,9 @@ enum errors { aborted as the inferior state is no longer valid. */ TARGET_CLOSE_ERROR, @@ -72,10 +72,10 @@ Index: gdb-7.5.91.20130323/gdb/exceptions.h /* Add more errors here. */ NR_ERRORS }; -Index: gdb-7.5.91.20130323/gdb/exec.c +Index: gdb-7.6.50.20130731-cvs/gdb/exec.c =================================================================== ---- gdb-7.5.91.20130323.orig/gdb/exec.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.91.20130323/gdb/exec.c 2013-03-23 19:48:53.284575912 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/exec.c 2013-08-02 16:29:44.771440264 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/exec.c 2013-08-02 16:31:30.100618657 +0200 @@ -34,6 +34,7 @@ #include "gdbthread.h" #include "progspace.h" @@ -84,7 +84,7 @@ Index: gdb-7.5.91.20130323/gdb/exec.c #include #include "readline/readline.h" -@@ -240,12 +241,27 @@ exec_file_attach (char *filename, int fr +@@ -217,12 +218,27 @@ exec_file_attach (char *filename, int fr if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) { @@ -114,12 +114,12 @@ Index: gdb-7.5.91.20130323/gdb/exec.c + gdb_bfd_errmsg (bfd_get_error (), matching)); } - /* FIXME - This should only be run for RS6000, but the ifdef is a poor -Index: gdb-7.5.91.20130323/gdb/main.c + if (build_section_table (exec_bfd, §ions, §ions_end)) +Index: gdb-7.6.50.20130731-cvs/gdb/main.c =================================================================== ---- gdb-7.5.91.20130323.orig/gdb/main.c 2013-03-23 19:48:18.000000000 +0100 -+++ gdb-7.5.91.20130323/gdb/main.c 2013-03-23 19:48:53.285575901 +0100 -@@ -296,6 +296,36 @@ typedef struct cmdarg { +--- gdb-7.6.50.20130731-cvs.orig/gdb/main.c 2013-08-02 16:29:44.772440265 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/main.c 2013-08-02 16:30:06.199468730 +0200 +@@ -300,6 +300,36 @@ typedef struct cmdarg { /* Define type VEC (cmdarg_s). */ DEF_VEC_O (cmdarg_s); @@ -156,7 +156,7 @@ Index: gdb-7.5.91.20130323/gdb/main.c static int captured_main (void *data) { -@@ -796,6 +826,8 @@ captured_main (void *data) +@@ -810,6 +840,8 @@ captured_main (void *data) { symarg = argv[optind]; execarg = argv[optind]; @@ -165,7 +165,7 @@ Index: gdb-7.5.91.20130323/gdb/main.c optind++; } -@@ -951,11 +983,25 @@ captured_main (void *data) +@@ -975,11 +1007,25 @@ captured_main (void *data) && symarg != NULL && strcmp (execarg, symarg) == 0) { diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index 8289bae..01e560d 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -1,16 +1,16 @@ -Index: gdb-7.6/gdb/event-top.c +Index: gdb-7.6.50.20130731-cvs/gdb/event-top.c =================================================================== ---- gdb-7.6.orig/gdb/event-top.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.6/gdb/event-top.c 2013-07-17 19:51:02.679357656 +0200 -@@ -36,6 +36,7 @@ - #include "continuations.h" +--- gdb-7.6.50.20130731-cvs.orig/gdb/event-top.c 2013-08-02 16:25:24.968094398 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/event-top.c 2013-08-02 16:25:38.638112874 +0200 +@@ -37,6 +37,7 @@ #include "gdbcmd.h" /* for dont_repeat() */ #include "annotate.h" + #include "maint.h" +#include "symfile.h" /* readline include files. */ #include "readline/readline.h" -@@ -170,6 +171,8 @@ rl_callback_read_char_wrapper (gdb_clien +@@ -171,6 +172,8 @@ rl_callback_read_char_wrapper (gdb_clien void cli_command_loop (void) { @@ -19,7 +19,7 @@ Index: gdb-7.6/gdb/event-top.c display_gdb_prompt (0); /* Now it's time to start the event loop. */ -@@ -237,6 +240,8 @@ display_gdb_prompt (char *new_prompt) +@@ -238,6 +241,8 @@ display_gdb_prompt (char *new_prompt) /* Reset the nesting depth used when trace-commands is set. */ reset_command_nest_depth (); @@ -28,10 +28,10 @@ Index: gdb-7.6/gdb/event-top.c /* Each interpreter has its own rules on displaying the command prompt. */ if (!current_interp_display_prompt_p ()) -Index: gdb-7.6/gdb/elfread.c +Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c =================================================================== ---- gdb-7.6.orig/gdb/elfread.c 2013-07-17 19:51:02.639357629 +0200 -+++ gdb-7.6/gdb/elfread.c 2013-07-17 19:51:50.738390068 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/elfread.c 2013-08-02 16:25:24.970094401 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/elfread.c 2013-08-02 16:25:27.336097557 +0200 @@ -49,6 +49,7 @@ #include "gdbcore.h" #include "gdbcmd.h" @@ -40,7 +40,7 @@ Index: gdb-7.6/gdb/elfread.c #include extern void _initialize_elfread (void); -@@ -1682,8 +1683,360 @@ build_id_to_filename (const struct elf_b +@@ -1701,8 +1702,360 @@ build_id_to_filename (const struct elf_b return retval; } @@ -402,7 +402,7 @@ Index: gdb-7.6/gdb/elfread.c avoidance. */ struct missing_filepair -@@ -1737,11 +2090,17 @@ missing_filepair_change (void) +@@ -1756,11 +2109,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -420,7 +420,7 @@ Index: gdb-7.6/gdb/elfread.c missing_filepair_change (); } -@@ -1808,14 +2167,34 @@ debug_print_missing (const char *binary, +@@ -1827,14 +2186,34 @@ debug_print_missing (const char *binary, *slot = missing_filepair; @@ -462,11 +462,11 @@ Index: gdb-7.6/gdb/elfread.c } static char * -Index: gdb-7.6/gdb/symfile.h +Index: gdb-7.6.50.20130731-cvs/gdb/symfile.h =================================================================== ---- gdb-7.6.orig/gdb/symfile.h 2013-07-17 19:51:02.639357629 +0200 -+++ gdb-7.6/gdb/symfile.h 2013-07-17 19:51:02.687357661 +0200 -@@ -598,6 +598,8 @@ extern struct elf_build_id *build_id_add +--- gdb-7.6.50.20130731-cvs.orig/gdb/symfile.h 2013-08-02 16:25:24.971094402 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symfile.h 2013-08-02 16:25:27.336097557 +0200 +@@ -602,6 +602,8 @@ extern struct elf_build_id *build_id_add extern char *build_id_to_filename (const struct elf_build_id *build_id, char **link_return, int add_debug_suffix); extern void debug_print_missing (const char *binary, const char *debug); @@ -475,10 +475,10 @@ Index: gdb-7.6/gdb/symfile.h /* From dwarf2read.c */ -Index: gdb-7.6/gdb/testsuite/lib/gdb.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.6.orig/gdb/testsuite/lib/gdb.exp 2013-07-17 19:51:02.640357629 +0200 -+++ gdb-7.6/gdb/testsuite/lib/gdb.exp 2013-07-17 19:51:02.688357662 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/gdb.exp 2013-08-02 16:25:24.972094404 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp 2013-08-02 16:25:27.337097559 +0200 @@ -1482,7 +1482,7 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } @@ -488,10 +488,10 @@ Index: gdb-7.6/gdb/testsuite/lib/gdb.exp send_gdb "set build-id-verbose 0\n" gdb_expect 10 { -re "$gdb_prompt $" { -Index: gdb-7.6/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.6.orig/gdb/testsuite/lib/mi-support.exp 2013-07-17 19:51:02.656357640 +0200 -+++ gdb-7.6/gdb/testsuite/lib/mi-support.exp 2013-07-17 19:51:02.689357663 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/mi-support.exp 2013-08-02 16:25:24.973094405 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp 2013-08-02 16:25:27.338097560 +0200 @@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } { warning "Couldn't set the width to 0." } @@ -501,10 +501,10 @@ Index: gdb-7.6/gdb/testsuite/lib/mi-support.exp send_gdb "190-gdb-set build-id-verbose 0\n" gdb_expect 10 { -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" { -Index: gdb-7.6/gdb/tui/tui-interp.c +Index: gdb-7.6.50.20130731-cvs/gdb/tui/tui-interp.c =================================================================== ---- gdb-7.6.orig/gdb/tui/tui-interp.c 2013-01-01 07:41:30.000000000 +0100 -+++ gdb-7.6/gdb/tui/tui-interp.c 2013-07-17 19:51:02.689357663 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/tui/tui-interp.c 2013-08-02 16:25:24.974094406 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/tui/tui-interp.c 2013-08-02 16:25:27.338097560 +0200 @@ -30,6 +30,7 @@ #include "tui/tui.h" #include "tui/tui-io.h" @@ -513,10 +513,10 @@ Index: gdb-7.6/gdb/tui/tui-interp.c /* Set to 1 when the TUI mode must be activated when we first start gdb. */ -Index: gdb-7.6/gdb/aclocal.m4 +Index: gdb-7.6.50.20130731-cvs/gdb/aclocal.m4 =================================================================== ---- gdb-7.6.orig/gdb/aclocal.m4 2013-01-17 12:06:26.000000000 +0100 -+++ gdb-7.6/gdb/aclocal.m4 2013-07-17 19:51:02.689357663 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/aclocal.m4 2013-08-02 16:25:24.974094406 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/aclocal.m4 2013-08-02 16:25:27.339097561 +0200 @@ -11,6 +11,164 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @@ -682,10 +682,10 @@ Index: gdb-7.6/gdb/aclocal.m4 # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -Index: gdb-7.6/gdb/config.in +Index: gdb-7.6.50.20130731-cvs/gdb/config.in =================================================================== ---- gdb-7.6.orig/gdb/config.in 2012-12-09 19:39:58.000000000 +0100 -+++ gdb-7.6/gdb/config.in 2013-07-17 19:51:02.689357663 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/config.in 2013-08-02 16:25:24.975094407 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/config.in 2013-08-02 16:25:27.339097561 +0200 @@ -33,6 +33,9 @@ /* Define to BFD's default target vector. */ #undef DEFAULT_BFD_VEC @@ -696,7 +696,7 @@ Index: gdb-7.6/gdb/config.in /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -@@ -210,6 +213,9 @@ +@@ -219,6 +222,9 @@ /* Define if Python 2.7 is being used. */ #undef HAVE_LIBPYTHON2_7 @@ -706,11 +706,11 @@ Index: gdb-7.6/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -Index: gdb-7.6/gdb/configure +Index: gdb-7.6.50.20130731-cvs/gdb/configure =================================================================== ---- gdb-7.6.orig/gdb/configure 2013-07-17 19:51:01.665356963 +0200 -+++ gdb-7.6/gdb/configure 2013-07-17 19:51:02.691357664 +0200 -@@ -686,6 +686,11 @@ PKGVERSION +--- gdb-7.6.50.20130731-cvs.orig/gdb/configure 2013-08-02 16:25:24.981094415 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/configure 2013-08-02 16:25:27.343097567 +0200 +@@ -689,6 +689,11 @@ PKGVERSION HAVE_NATIVE_GCORE_TARGET TARGET_OBS subdirs @@ -722,7 +722,7 @@ Index: gdb-7.6/gdb/configure GDB_DATADIR DEBUGDIR MAKEINFO_EXTRA_FLAGS -@@ -786,6 +791,7 @@ with_gdb_datadir +@@ -789,6 +794,7 @@ with_gdb_datadir with_relocated_sources with_auto_load_dir with_auto_load_safe_path @@ -730,7 +730,7 @@ Index: gdb-7.6/gdb/configure enable_targets enable_64_bit_bfd enable_gdbcli -@@ -834,6 +840,11 @@ CPPFLAGS +@@ -839,6 +845,11 @@ CPPFLAGS CPP MAKEINFO MAKEINFOFLAGS @@ -742,7 +742,7 @@ Index: gdb-7.6/gdb/configure YACC YFLAGS XMKMF' -@@ -1504,6 +1515,8 @@ Optional Packages: +@@ -1509,6 +1520,8 @@ Optional Packages: [--with-auto-load-dir] --without-auto-load-safe-path do not restrict auto-loaded files locations @@ -751,7 +751,7 @@ Index: gdb-7.6/gdb/configure --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-curses use the curses library instead of the termcap library -@@ -1548,6 +1561,13 @@ Some influential environment variables: +@@ -1556,6 +1569,13 @@ Some influential environment variables: MAKEINFO Parent configure detects if it is of sufficient version. MAKEINFOFLAGS Parameters for MAKEINFO. @@ -765,7 +765,7 @@ Index: gdb-7.6/gdb/configure YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. -@@ -5033,6 +5053,491 @@ _ACEOF +@@ -5039,6 +5059,491 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 $as_echo "$with_auto_load_safe_path" >&6; } @@ -1257,11 +1257,11 @@ Index: gdb-7.6/gdb/configure subdirs="$subdirs testsuite" -Index: gdb-7.6/gdb/configure.ac +Index: gdb-7.6.50.20130731-cvs/gdb/configure.ac =================================================================== ---- gdb-7.6.orig/gdb/configure.ac 2013-07-17 19:51:01.666356964 +0200 -+++ gdb-7.6/gdb/configure.ac 2013-07-17 19:51:02.692357665 +0200 -@@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap +--- gdb-7.6.50.20130731-cvs.orig/gdb/configure.ac 2013-08-02 16:25:24.983094418 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/configure.ac 2013-08-02 16:25:27.344097568 +0200 +@@ -164,6 +164,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap [Directories safe to hold auto-loaded files.]) AC_MSG_RESULT([$with_auto_load_safe_path]) @@ -1461,11 +1461,11 @@ Index: gdb-7.6/gdb/configure.ac AC_CONFIG_SUBDIRS(testsuite) # Check whether to support alternative target configurations -Index: gdb-7.6/gdb/corelow.c +Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c =================================================================== ---- gdb-7.6.orig/gdb/corelow.c 2013-07-17 19:51:02.608357607 +0200 -+++ gdb-7.6/gdb/corelow.c 2013-07-17 19:51:02.692357665 +0200 -@@ -314,7 +314,7 @@ build_id_locate_exec (int from_tty) +--- gdb-7.6.50.20130731-cvs.orig/gdb/corelow.c 2013-08-02 16:25:24.984094419 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/corelow.c 2013-08-02 16:25:27.344097568 +0200 +@@ -316,7 +316,7 @@ build_id_locate_exec (int from_tty) symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; } else diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 30b4375..2a5517f 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -1,18 +1,18 @@ -Index: gdb-7.6/gdb/corelow.c +Index: gdb-7.6.50.20130731-cvs/gdb/corelow.c =================================================================== ---- gdb-7.6.orig/gdb/corelow.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.6/gdb/corelow.c 2013-07-17 05:28:49.277203536 +0200 -@@ -46,6 +46,9 @@ - #include "progspace.h" - #include "objfiles.h" +--- gdb-7.6.50.20130731-cvs.orig/gdb/corelow.c 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/corelow.c 2013-08-02 17:07:28.434753293 +0200 +@@ -48,6 +48,9 @@ #include "gdb_bfd.h" + #include "completer.h" + #include "filestuff.h" +#include "auxv.h" +#include "elf/common.h" +#include "gdbcmd.h" #ifndef O_LARGEFILE #define O_LARGEFILE 0 -@@ -271,6 +274,53 @@ add_to_thread_list (bfd *abfd, asection +@@ -273,6 +276,53 @@ add_to_thread_list (bfd *abfd, asection inferior_ptid = ptid; /* Yes, make it current. */ } @@ -66,7 +66,7 @@ Index: gdb-7.6/gdb/corelow.c /* This routine opens and sets up the core file bfd. */ static void -@@ -409,6 +459,14 @@ core_open (char *filename, int from_tty) +@@ -411,6 +461,14 @@ core_open (char *filename, int from_tty) switch_to_thread (thread->ptid); } @@ -81,10 +81,10 @@ Index: gdb-7.6/gdb/corelow.c post_create_inferior (&core_ops, from_tty); /* Now go through the target stack looking for threads since there -@@ -978,4 +1036,11 @@ _initialize_corelow (void) +@@ -974,4 +1032,11 @@ _initialize_corelow (void) init_core_ops (); - add_target (&core_ops); + add_target_with_completer (&core_ops, filename_completer); + + add_setshow_boolean_cmd ("build-id-core-loads", class_files, + &build_id_core_loads, _("\ @@ -93,11 +93,11 @@ Index: gdb-7.6/gdb/corelow.c + NULL, NULL, NULL, + &setlist, &showlist); } -Index: gdb-7.6/gdb/doc/gdb.texinfo +Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.6.orig/gdb/doc/gdb.texinfo 2013-07-17 05:28:48.882203384 +0200 -+++ gdb-7.6/gdb/doc/gdb.texinfo 2013-07-17 05:28:49.286203539 +0200 -@@ -16831,6 +16831,27 @@ information files. +--- gdb-7.6.50.20130731-cvs.orig/gdb/doc/gdb.texinfo 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo 2013-08-02 17:07:28.443753304 +0200 +@@ -17119,6 +17119,27 @@ information files. @end table @@ -125,11 +125,11 @@ Index: gdb-7.6/gdb/doc/gdb.texinfo @cindex @code{.gnu_debuglink} sections @cindex debug link sections A debug link is a special section of the executable file named -Index: gdb-7.6/gdb/solib-svr4.c +Index: gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c =================================================================== ---- gdb-7.6.orig/gdb/solib-svr4.c 2013-01-31 14:52:52.000000000 +0100 -+++ gdb-7.6/gdb/solib-svr4.c 2013-07-17 05:28:49.287203539 +0200 -@@ -1224,9 +1224,52 @@ svr4_read_so_list (CORE_ADDR lm, struct +--- gdb-7.6.50.20130731-cvs.orig/gdb/solib-svr4.c 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c 2013-08-02 17:07:28.444753305 +0200 +@@ -1365,9 +1365,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD continue; } @@ -185,10 +185,10 @@ Index: gdb-7.6/gdb/solib-svr4.c xfree (buffer); /* If this entry has no name, or its name matches the name -Index: gdb-7.6/gdb/elfread.c +Index: gdb-7.6.50.20130731-cvs/gdb/elfread.c =================================================================== ---- gdb-7.6.orig/gdb/elfread.c 2013-03-18 10:20:02.000000000 +0100 -+++ gdb-7.6/gdb/elfread.c 2013-07-17 05:31:21.242256141 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/elfread.c 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/elfread.c 2013-08-02 17:09:06.460881503 +0200 @@ -45,6 +45,11 @@ #include "regcache.h" #include "bcache.h" @@ -201,7 +201,7 @@ Index: gdb-7.6/gdb/elfread.c extern void _initialize_elfread (void); -@@ -1068,10 +1073,59 @@ elf_gnu_ifunc_resolver_return_stop (stru +@@ -1087,10 +1092,59 @@ elf_gnu_ifunc_resolver_return_stop (stru update_breakpoint_locations (b, sals, sals_end); } @@ -233,7 +233,7 @@ Index: gdb-7.6/gdb/elfread.c + Elf_External_Note *xnp = (Elf_External_Note *) p; + size_t namesz = H_GET_32 (templ, xnp->namesz); + size_t descsz = H_GET_32 (templ, xnp->descsz); -+ bfd_byte *descdata = xnp->name + BFD_ALIGN (namesz, 4); ++ bfd_byte *descdata = (gdb_byte *) xnp->name + BFD_ALIGN (namesz, 4); + + if (H_GET_32 (templ, xnp->type) == NT_GNU_BUILD_ID + && namesz == sizeof "GNU" @@ -263,7 +263,7 @@ Index: gdb-7.6/gdb/elfread.c { if (!bfd_check_format (abfd, bfd_object) || bfd_get_flavour (abfd) != bfd_target_elf_flavour -@@ -1081,6 +1135,348 @@ build_id_bfd_get (bfd *abfd) +@@ -1100,6 +1154,348 @@ build_id_bfd_get (bfd *abfd) return elf_tdata (abfd)->build_id; } @@ -612,7 +612,7 @@ Index: gdb-7.6/gdb/elfread.c /* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */ static int -@@ -1095,7 +1491,7 @@ build_id_verify (const char *filename, c +@@ -1114,7 +1510,7 @@ build_id_verify (const char *filename, c if (abfd == NULL) return 0; @@ -621,7 +621,7 @@ Index: gdb-7.6/gdb/elfread.c if (found == NULL) warning (_("File \"%s\" has no build-id, file skipped"), filename); -@@ -1112,16 +1508,53 @@ build_id_verify (const char *filename, c +@@ -1131,16 +1527,53 @@ build_id_verify (const char *filename, c } static char * @@ -678,7 +678,7 @@ Index: gdb-7.6/gdb/elfread.c /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will cause "/.build-id/..." lookups. */ -@@ -1134,7 +1567,10 @@ build_id_to_debug_filename (const struct +@@ -1153,7 +1586,10 @@ build_id_to_debug_filename (const struct size_t debugdir_len = strlen (debugdir); const gdb_byte *data = build_id->data; size_t size = build_id->size; @@ -690,7 +690,7 @@ Index: gdb-7.6/gdb/elfread.c memcpy (link, debugdir, debugdir_len); s = &link[debugdir_len]; -@@ -1148,37 +1584,256 @@ build_id_to_debug_filename (const struct +@@ -1167,37 +1603,256 @@ build_id_to_debug_filename (const struct *s++ = '/'; while (size-- > 0) s += sprintf (s, "%02x", (unsigned) *data++); @@ -958,7 +958,7 @@ Index: gdb-7.6/gdb/elfread.c /* Prevent looping on a stripped .debug file. */ if (build_id_name != NULL && filename_cmp (build_id_name, objfile->name) == 0) -@@ -1188,7 +1843,7 @@ find_separate_debug_file_by_buildid (str +@@ -1207,7 +1862,7 @@ find_separate_debug_file_by_buildid (str xfree (build_id_name); } else if (build_id_name != NULL) @@ -967,7 +967,7 @@ Index: gdb-7.6/gdb/elfread.c } return NULL; } -@@ -1426,9 +2081,10 @@ elf_symfile_read (struct objfile *objfil +@@ -1445,9 +2100,10 @@ elf_symfile_read (struct objfile *objfil && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { @@ -980,7 +980,7 @@ Index: gdb-7.6/gdb/elfread.c if (debugfile == NULL) debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1442,6 +2098,12 @@ elf_symfile_read (struct objfile *objfil +@@ -1461,6 +2117,12 @@ elf_symfile_read (struct objfile *objfil symbol_file_add_separate (abfd, symfile_flags, objfile); do_cleanups (cleanup); } @@ -993,7 +993,7 @@ Index: gdb-7.6/gdb/elfread.c } } -@@ -1761,4 +2423,16 @@ _initialize_elfread (void) +@@ -1790,4 +2452,16 @@ _initialize_elfread (void) elf_objfile_gnu_ifunc_cache_data = register_objfile_data (); gnu_ifunc_fns_p = &elf_gnu_ifunc_fns; @@ -1010,11 +1010,11 @@ Index: gdb-7.6/gdb/elfread.c + + observer_attach_executable_changed (debug_print_executable_changed); } -Index: gdb-7.6/gdb/symfile.h +Index: gdb-7.6.50.20130731-cvs/gdb/symfile.h =================================================================== ---- gdb-7.6.orig/gdb/symfile.h 2013-02-03 17:20:18.000000000 +0100 -+++ gdb-7.6/gdb/symfile.h 2013-07-17 05:28:49.291203541 +0200 -@@ -593,6 +593,12 @@ void free_symfile_segment_data (struct s +--- gdb-7.6.50.20130731-cvs.orig/gdb/symfile.h 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symfile.h 2013-08-02 17:07:28.446753308 +0200 +@@ -597,6 +597,12 @@ void free_symfile_segment_data (struct s extern struct cleanup *increment_reading_symtab (void); @@ -1027,10 +1027,10 @@ Index: gdb-7.6/gdb/symfile.h /* From dwarf2read.c */ /* Names for a dwarf2 debugging section. The field NORMAL is the normal -Index: gdb-7.6/gdb/testsuite/lib/gdb.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.6.orig/gdb/testsuite/lib/gdb.exp 2013-07-17 05:28:48.334203172 +0200 -+++ gdb-7.6/gdb/testsuite/lib/gdb.exp 2013-07-17 05:28:49.292203541 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/gdb.exp 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/gdb.exp 2013-08-02 17:07:28.446753308 +0200 @@ -1482,6 +1482,16 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } @@ -1045,13 +1045,13 @@ Index: gdb-7.6/gdb/testsuite/lib/gdb.exp + warning "Could not disable the missing debug infos warnings.." + } + } - return 0; + return 0 } -Index: gdb-7.6/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.6.orig/gdb/testsuite/lib/mi-support.exp 2013-01-22 00:57:59.000000000 +0100 -+++ gdb-7.6/gdb/testsuite/lib/mi-support.exp 2013-07-17 05:28:49.292203541 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/lib/mi-support.exp 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/lib/mi-support.exp 2013-08-02 17:07:28.447753310 +0200 @@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } { warning "Couldn't set the width to 0." } @@ -1069,11 +1069,11 @@ Index: gdb-7.6/gdb/testsuite/lib/mi-support.exp # If allowing the inferior to have its own PTY then assign the inferior # its own terminal device here. if { $separate_inferior_pty } { -Index: gdb-7.6/gdb/objfiles.h +Index: gdb-7.6.50.20130731-cvs/gdb/objfiles.h =================================================================== ---- gdb-7.6.orig/gdb/objfiles.h 2013-02-28 20:00:31.000000000 +0100 -+++ gdb-7.6/gdb/objfiles.h 2013-07-17 05:28:49.293203542 +0200 -@@ -432,6 +432,10 @@ struct objfile +--- gdb-7.6.50.20130731-cvs.orig/gdb/objfiles.h 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/objfiles.h 2013-08-02 17:07:28.447753310 +0200 +@@ -429,6 +429,10 @@ struct objfile #define OBJF_MAINLINE (1 << 5) @@ -1084,11 +1084,11 @@ Index: gdb-7.6/gdb/objfiles.h /* The object file that contains the runtime common minimal symbols for SunOS4. Note that this objfile has no associated BFD. */ -Index: gdb-7.6/gdb/testsuite/gdb.base/corefile.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp =================================================================== ---- gdb-7.6.orig/gdb/testsuite/gdb.base/corefile.exp 2013-01-01 07:33:25.000000000 +0100 -+++ gdb-7.6/gdb/testsuite/gdb.base/corefile.exp 2013-07-17 05:28:49.293203542 +0200 -@@ -256,3 +256,33 @@ if ![is_remote target] { +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/corefile.exp 2013-08-02 17:07:17.886739513 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp 2013-08-02 17:07:28.447753310 +0200 +@@ -255,3 +255,33 @@ if ![is_remote target] { gdb_exit } diff --git a/gdb-6.6-testsuite-timeouts.patch b/gdb-6.6-testsuite-timeouts.patch index 00f5d85..b7b62ea 100644 --- a/gdb-6.6-testsuite-timeouts.patch +++ b/gdb-6.6-testsuite-timeouts.patch @@ -1,23 +1,23 @@ -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota1.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/testsuite/gdb.base/annota1.exp 2012-03-16 17:47:33.000000000 +0100 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota1.exp 2012-06-02 18:27:46.623210711 +0200 -@@ -45,6 +45,8 @@ gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/annota1.exp 2013-08-02 16:23:26.559936258 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp 2013-08-02 16:23:56.590976418 +0200 +@@ -41,6 +41,8 @@ if { [gdb_compile "${srcdir}/${subdir}/ + + clean_restart ${binfile} +gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions" + # The commands we test here produce many lines of output; disable "press # to continue" prompts. gdb_test_no_output "set height 0" -Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota3.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp =================================================================== ---- gdb-7.4.50.20120602.orig/gdb/testsuite/gdb.base/annota3.exp 2012-02-28 23:40:48.000000000 +0100 -+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota3.exp 2012-06-02 18:28:00.375206457 +0200 -@@ -45,6 +45,8 @@ gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/annota3.exp 2013-08-02 16:23:26.560936259 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp 2013-08-02 16:24:11.654996267 +0200 +@@ -40,6 +40,8 @@ if { [gdb_compile "${srcdir}/${subdir}/ + + clean_restart ${binfile} +gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions" + diff --git a/gdb-6.7-testsuite-stable-results.patch b/gdb-6.7-testsuite-stable-results.patch index 7e2fb39..397c061 100644 --- a/gdb-6.7-testsuite-stable-results.patch +++ b/gdb-6.7-testsuite-stable-results.patch @@ -20,10 +20,10 @@ random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp: frames-invalid can happen asynchronously. -Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.c =================================================================== ---- gdb-7.4.50.20120103.orig/gdb/testsuite/gdb.base/fileio.c 2009-10-01 17:39:13.000000000 +0200 -+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c 2012-01-03 15:21:28.122729249 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/fileio.c 2013-08-02 16:25:49.466127074 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.c 2013-08-02 16:26:11.724156750 +0200 @@ -58,6 +58,8 @@ system (const char * string); 1) Invalid string/command. - returns 127. */ static const char *strerrno (int err); @@ -71,12 +71,12 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c /* Don't change the order of the calls. They partly depend on each other */ test_open (); test_write (); -Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.exp =================================================================== ---- gdb-7.4.50.20120103.orig/gdb/testsuite/gdb.base/fileio.exp 2011-12-26 12:24:55.000000000 +0100 -+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp 2012-01-03 15:22:02.716601956 +0100 -@@ -42,8 +42,8 @@ if [get_compiler_info ${binfile}] { - return -1; +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/fileio.exp 2013-08-02 16:25:49.467127075 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/fileio.exp 2013-08-02 16:27:10.142234618 +0200 +@@ -35,8 +35,8 @@ if [get_compiler_info] { + return -1 } -remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test} @@ -86,7 +86,7 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp set oldtimeout $timeout set timeout [expr "$timeout + 60"] -@@ -85,7 +85,7 @@ gdb_test continue \ +@@ -78,7 +78,7 @@ gdb_test continue \ gdb_test "continue" ".*" "" @@ -95,7 +95,7 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp gdb_test continue \ "Continuing\\..*open 5:.*EACCES$stop_msg" \ -@@ -251,8 +251,8 @@ gdb_exit +@@ -244,8 +244,8 @@ gdb_exit # Wait till GDB really exits. sleep 1 diff --git a/gdb-6.8-quit-never-aborts.patch b/gdb-6.8-quit-never-aborts.patch index 74535be..f45c707 100644 --- a/gdb-6.8-quit-never-aborts.patch +++ b/gdb-6.8-quit-never-aborts.patch @@ -5,11 +5,11 @@ 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.5.50.20130118/gdb/defs.h +Index: gdb-7.6.50.20130731-cvs/gdb/defs.h =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/defs.h 2013-01-01 07:32:41.000000000 +0100 -+++ gdb-7.5.50.20130118/gdb/defs.h 2013-01-21 16:40:29.889256633 +0100 -@@ -176,6 +176,7 @@ extern int check_quit_flag (void); +--- gdb-7.6.50.20130731-cvs.orig/gdb/defs.h 2013-08-02 16:58:31.453016573 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/defs.h 2013-08-02 16:58:41.221030412 +0200 +@@ -177,6 +177,7 @@ extern int check_quit_flag (void); /* Set the quit flag. */ extern void set_quit_flag (void); @@ -17,26 +17,26 @@ Index: gdb-7.5.50.20130118/gdb/defs.h extern int immediate_quit; extern void quit (void); -Index: gdb-7.5.50.20130118/gdb/top.c +Index: gdb-7.6.50.20130731-cvs/gdb/top.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/top.c 2013-01-21 14:56:12.000000000 +0100 -+++ gdb-7.5.50.20130118/gdb/top.c 2013-01-21 14:56:16.385710056 +0100 -@@ -1329,7 +1329,9 @@ quit_force (char *args, int from_tty) - qt.args = args; - qt.from_tty = from_tty; +--- gdb-7.6.50.20130731-cvs.orig/gdb/top.c 2013-08-02 16:58:41.222030414 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/top.c 2013-08-02 16:59:06.321066228 +0200 +@@ -1415,7 +1415,9 @@ quit_force (char *args, int from_tty) + if (ex.reason < 0) \ + exception_print (gdb_stderr, ex) - /* 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.5.50.20130118/gdb/utils.c + /* Get out of tfind mode, and kill or detach all inferiors. */ + DO_TRY +Index: gdb-7.6.50.20130731-cvs/gdb/utils.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/utils.c 2013-01-21 14:56:12.000000000 +0100 -+++ gdb-7.5.50.20130118/gdb/utils.c 2013-01-21 16:41:02.225233493 +0100 -@@ -141,6 +141,11 @@ int quit_flag; +--- gdb-7.6.50.20130731-cvs.orig/gdb/utils.c 2013-08-02 16:58:31.455016575 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/utils.c 2013-08-02 16:58:41.223030415 +0200 +@@ -136,6 +136,11 @@ int quit_flag; int immediate_quit; @@ -48,7 +48,7 @@ Index: gdb-7.5.50.20130118/gdb/utils.c #ifndef HAVE_PYTHON /* Clear the quit flag. */ -@@ -164,6 +169,9 @@ set_quit_flag (void) +@@ -159,6 +164,9 @@ set_quit_flag (void) int check_quit_flag (void) { @@ -58,11 +58,11 @@ Index: gdb-7.5.50.20130118/gdb/utils.c /* This is written in a particular way to avoid races. */ if (quit_flag) { -Index: gdb-7.5.50.20130118/gdb/python/python.c +Index: gdb-7.6.50.20130731-cvs/gdb/python/python.c =================================================================== ---- gdb-7.5.50.20130118.orig/gdb/python/python.c 2013-01-21 16:39:03.000000000 +0100 -+++ gdb-7.5.50.20130118/gdb/python/python.c 2013-01-21 16:39:30.698299142 +0100 -@@ -181,6 +181,9 @@ set_quit_flag (void) +--- gdb-7.6.50.20130731-cvs.orig/gdb/python/python.c 2013-08-02 16:58:31.456016577 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/python/python.c 2013-08-02 16:58:41.224030416 +0200 +@@ -191,6 +191,9 @@ set_quit_flag (void) int check_quit_flag (void) { diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch index e67c336..68a6a1a 100644 --- a/gdb-archer-pie-addons-keep-disabled.patch +++ b/gdb-archer-pie-addons-keep-disabled.patch @@ -1,8 +1,8 @@ -Index: gdb-7.5.50.20130215/gdb/breakpoint.c +Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:37:08.216381988 +0100 -@@ -16020,6 +16020,50 @@ initialize_breakpoint_ops (void) +--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.c 2013-08-02 16:29:16.065402116 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.c 2013-08-02 16:29:17.073403456 +0200 +@@ -15963,6 +15963,50 @@ initialize_breakpoint_ops (void) static struct cmd_list_element *enablebreaklist = NULL; void @@ -53,23 +53,23 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.c _initialize_breakpoint (void) { struct cmd_list_element *c; -Index: gdb-7.5.50.20130215/gdb/breakpoint.h +Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-03 16:57:06.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:37:19.025395693 +0100 -@@ -1556,4 +1556,7 @@ extern void handle_solib_event (void); +--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.h 2013-08-02 16:29:17.074403457 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.h 2013-08-02 16:29:30.221420896 +0200 +@@ -1555,4 +1555,7 @@ extern void breakpoint_free_objfile (str - extern void breakpoint_free_objfile (struct objfile *objfile); + extern char *ep_parse_optional_if_clause (char **arg); +extern void breakpoints_relocate (struct objfile *objfile, + struct section_offsets *delta); + #endif /* !defined (BREAKPOINT_H) */ -Index: gdb-7.5.50.20130215/gdb/objfiles.c +Index: gdb-7.6.50.20130731-cvs/gdb/objfiles.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/objfiles.c 2013-02-03 16:57:07.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/objfiles.c 2013-02-15 22:37:08.217381990 +0100 -@@ -831,6 +831,11 @@ objfile_relocate1 (struct objfile *objfi +--- gdb-7.6.50.20130731-cvs.orig/gdb/objfiles.c 2013-08-02 16:29:16.068402120 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/objfiles.c 2013-08-02 16:29:17.075403458 +0200 +@@ -851,6 +851,11 @@ objfile_relocate1 (struct objfile *objfi objfile->sf->sym_probe_fns->sym_relocate_probe (objfile, new_offsets, delta); diff --git a/gdb-archer.patch b/gdb-archer.patch index ab0657f..98ff0f6 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -2,20 +2,20 @@ http://sourceware.org/gdb/wiki/ProjectArcher http://sourceware.org/gdb/wiki/ArcherBranchManagement GIT snapshot: -commit b1f8c6821303f6eb087fb7f57405483ac8812227 +commit a980be3b9cc66774adfb9a25da805f65cfed4245 -branch jankratochvil/fedora19 - the merge of branches: +branch jankratochvil/fedora20 - the merge of branches: jankratochvil/vla tromey/python diff --git a/README.archer b/README.archer new file mode 100644 -index 0000000..1f7ab48 +index 0000000..21357e4 --- /dev/null +++ b/README.archer @@ -0,0 +1,13 @@ -+Merge for Fedora 19: http://pkgs.fedoraproject.org/cgit/gdb.git/ ++Merge for Fedora 20: http://pkgs.fedoraproject.org/cgit/gdb.git/ + +jankratochvil/vla +tromey/python @@ -29,10 +29,10 @@ index 0000000..1f7ab48 +implementation plan: http://sourceware.org/ml/gdb/2012-11/msg00094.html +explanation of its merge status: http://sourceware.org/ml/gdb/2011-03/msg00021.html diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index ed30db5..4356be7 100644 +index 8f4ee9e..e914dfb 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -1313,6 +1313,12 @@ stamp-h: $(srcdir)/config.in config.status +@@ -1351,6 +1351,12 @@ stamp-h: $(srcdir)/config.in config.status CONFIG_LINKS= \ $(SHELL) config.status @@ -42,14 +42,14 @@ index ed30db5..4356be7 100644 + CONFIG_HEADERS= \ + $(SHELL) config.status + - config.status: $(srcdir)/configure configure.tgt configure.host + config.status: $(srcdir)/configure configure.tgt configure.host development.sh $(SHELL) config.status --recheck diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c -index 75f1c3d..6243818 100644 +index dc5f2b6..5feac49 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c -@@ -12287,6 +12287,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp, +@@ -12309,6 +12309,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp, static int ada_operator_check (struct expression *exp, int pos, @@ -57,7 +57,7 @@ index 75f1c3d..6243818 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) { -@@ -12301,12 +12302,15 @@ ada_operator_check (struct expression *exp, int pos, +@@ -12323,12 +12324,15 @@ ada_operator_check (struct expression *exp, int pos, break; default: @@ -76,10 +76,10 @@ index 75f1c3d..6243818 100644 return 1; diff --git a/gdb/block.c b/gdb/block.c -index 2638de8..b296ae0 100644 +index 643e144..74c516b 100644 --- a/gdb/block.c +++ b/gdb/block.c -@@ -692,3 +692,21 @@ block_iter_match_next (const char *name, +@@ -693,3 +693,21 @@ block_iter_match_next (const char *name, return block_iter_match_step (iterator, name, compare, 0); } @@ -113,10 +113,10 @@ index 02e7e8b..2931401 100644 + #endif /* BLOCK_H */ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index d6f8bc5..8a14224 100644 +index 1e89407..1f4de33 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -15653,6 +15653,24 @@ all_tracepoints (void) +@@ -15605,6 +15605,24 @@ all_tracepoints (void) return tp_vec; } @@ -141,7 +141,7 @@ index d6f8bc5..8a14224 100644 /* This help string is used for the break, hbreak, tbreak and thbreak commands. It is defined as a macro to prevent duplication. -@@ -16636,4 +16654,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\ +@@ -16568,4 +16586,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\ automatic_hardware_breakpoints = 1; observer_attach_about_to_proceed (breakpoint_about_to_proceed); @@ -150,7 +150,7 @@ index d6f8bc5..8a14224 100644 +#endif } diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c -index ca8d89b..811ad72 100644 +index bf4564f..e8d0281 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -689,7 +689,13 @@ c_type_print_varspec_suffix (struct type *type, @@ -168,20 +168,33 @@ index ca8d89b..811ad72 100644 fprintf_filtered (stream, "%s", plongest (high_bound - low_bound + 1)); fprintf_filtered (stream, (is_vector ? ")))" : "]")); +diff --git a/gdb/cleanups.c b/gdb/cleanups.c +index 898e526..18ebaee 100644 +--- a/gdb/cleanups.c ++++ b/gdb/cleanups.c +@@ -261,9 +261,11 @@ save_final_cleanups (void) + static void + restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain) + { ++#if 0 /* archer-jankratochvil-vla */ + if (*pmy_chain != SENTINEL_CLEANUP) + internal_warning (__FILE__, __LINE__, + _("restore_my_cleanups has found a stale cleanup")); ++#endif + + *pmy_chain = chain; + } diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in -index d98ac77..f6a4b99 100644 +index dec6207..fbb4dc0 100644 --- a/gdb/data-directory/Makefile.in +++ b/gdb/data-directory/Makefile.in -@@ -53,16 +53,21 @@ PYTHON_DIR = python - PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR) - PYTHON_FILES = \ - gdb/__init__.py \ -- gdb/types.py \ -- gdb/printing.py \ -- gdb/prompt.py \ +@@ -61,13 +61,21 @@ PYTHON_FILES = \ + gdb/printing.py \ + gdb/prompt.py \ gdb/command/__init__.py \ + gdb/command/ignore_errors.py \ + gdb/command/pahole.py \ + gdb/command/frame_filters.py \ gdb/command/type_printers.py \ gdb/command/pretty_printers.py \ gdb/command/prompt.py \ @@ -196,13 +209,13 @@ index d98ac77..f6a4b99 100644 + gdb/prompt.py \ + gdb/types.py - FLAGS_TO_PASS = \ - "prefix=$(prefix)" \ + SYSTEM_GDBINIT_DIR = system-gdbinit + SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo -index a607166..6913628 100644 +index cb393e8..1dfca22 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -1216,6 +1216,16 @@ for remote debugging. +@@ -1221,6 +1221,16 @@ for remote debugging. Run using @var{device} for your program's standard input and output. @c FIXME: kingdon thinks there is more to -tty. Investigate. @@ -219,7 +232,7 @@ index a607166..6913628 100644 @c resolve the situation of these eventually @item -tui @cindex @code{--tui} -@@ -22804,8 +22814,6 @@ containing @code{end}. For example: +@@ -23189,8 +23199,6 @@ containing @code{end}. For example: @smallexample (@value{GDBP}) python @@ -228,7 +241,7 @@ index a607166..6913628 100644 >print 23 >end 23 -@@ -22819,6 +22827,14 @@ controlled using @code{set python print-stack}: if @code{full}, then +@@ -23204,6 +23212,14 @@ controlled using @code{set python print-stack}: if @code{full}, then full Python stack printing is enabled; if @code{none}, then Python stack and message printing is disabled; if @code{message}, the default, only the message component of the error is printed. @@ -243,26 +256,11 @@ index a607166..6913628 100644 @end table It is also possible to execute a Python script from the @value{GDBN} -@@ -22840,6 +22856,14 @@ and thus is always available. - @cindex python api - @cindex programming in python - -+You can get quick online help for @value{GDBN}'s Python API by issuing -+the command @w{@kbd{python help (gdb)}}. -+ -+Functions and methods which have two or more optional arguments allow -+them to be specified using keyword syntax. This allows passing some -+optional arguments while skipping others. Example: -+@w{@code{gdb.some_function ('foo', bar = 1, baz = 2)}}. -+ - @cindex python stdout - @cindex python pagination - At startup, @value{GDBN} overrides Python's @code{sys.stdout} and diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo -index 4a75c26..91446fe 100644 +index 60805ad..5411012 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo -@@ -2101,6 +2101,18 @@ time, and so we attempt to handle symbols incrementally. For instance, +@@ -2146,6 +2146,18 @@ time, and so we attempt to handle symbols incrementally. For instance, we create @dfn{partial symbol tables} consisting of only selected symbols, and only expand them to full symbol tables when necessary. @@ -281,7 +279,7 @@ index 4a75c26..91446fe 100644 @section Symbol Reading @cindex symbol reading -@@ -2193,6 +2205,7 @@ symtab. Upon return, @code{pst->readin} should have been set to 1, and +@@ -2238,6 +2250,7 @@ symtab. Upon return, @code{pst->readin} should have been set to 1, and zero if there were no symbols in that part of the symbol file. @end table @@ -289,7 +287,7 @@ index 4a75c26..91446fe 100644 @section Partial Symbol Tables @value{GDBN} has three types of symbol tables: -@@ -2294,6 +2307,7 @@ and partial symbol tables behind a set of function pointers known as +@@ -2339,6 +2352,7 @@ and partial symbol tables behind a set of function pointers known as the @dfn{quick symbol functions}. These are documented in @file{symfile.h}. @@ -297,7 +295,7 @@ index 4a75c26..91446fe 100644 @section Types @unnumberedsubsec Fundamental Types (e.g., @code{FT_VOID}, @code{FT_BOOLEAN}). -@@ -2316,6 +2330,7 @@ types map to one @code{TYPE_CODE_*} type, and are distinguished by +@@ -2361,6 +2375,7 @@ types map to one @code{TYPE_CODE_*} type, and are distinguished by other members of the type struct, such as whether the type is signed or unsigned, and how many bits it uses. @@ -305,7 +303,7 @@ index 4a75c26..91446fe 100644 @unnumberedsubsec Builtin Types (e.g., @code{builtin_type_void}, @code{builtin_type_char}). These are instances of type structs that roughly correspond to -@@ -2330,6 +2345,7 @@ only one instance exists, while @file{c-lang.c} builds as many +@@ -2375,6 +2390,7 @@ only one instance exists, while @file{c-lang.c} builds as many @code{TYPE_CODE_INT} types as needed, with each one associated with some particular objfile. @@ -313,7 +311,7 @@ index 4a75c26..91446fe 100644 @section Object File Formats @cindex object file formats -@@ -2415,6 +2431,7 @@ SOM, which is a cross-language ABI). +@@ -2460,6 +2476,7 @@ SOM, which is a cross-language ABI). The SOM reader is in @file{somread.c}. @@ -321,7 +319,7 @@ index 4a75c26..91446fe 100644 @section Debugging File Formats This section describes characteristics of debugging information that -@@ -2486,6 +2503,7 @@ DWARF 3 is an improved version of DWARF 2. +@@ -2531,6 +2548,7 @@ DWARF 3 is an improved version of DWARF 2. @cindex SOM debugging info Like COFF, the SOM definition includes debugging information. @@ -329,7 +327,7 @@ index 4a75c26..91446fe 100644 @section Adding a New Symbol Reader to @value{GDBN} @cindex adding debugging info reader -@@ -2508,6 +2526,7 @@ will only ever be implemented by one object file format may be called +@@ -2553,6 +2571,7 @@ will only ever be implemented by one object file format may be called directly. This interface should be described in a file @file{bfd/lib@var{xyz}.h}, which is included by @value{GDBN}. @@ -337,7 +335,7 @@ index 4a75c26..91446fe 100644 @section Memory Management for Symbol Files Most memory associated with a loaded symbol file is stored on -@@ -2519,10 +2538,45 @@ released when the objfile is unloaded or reloaded. Therefore one +@@ -2564,10 +2583,45 @@ released when the objfile is unloaded or reloaded. Therefore one objfile must not reference symbol or type data from another objfile; they could be unloaded at different times. @@ -440,10 +438,10 @@ index e85486a..e7ac799 100644 /* The location of a value. */ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index 8a61ae6..451a759 100644 +index 02afcdf..5a21629 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -298,6 +298,9 @@ struct dwarf_expr_baton +@@ -306,6 +306,9 @@ struct dwarf_expr_baton { struct frame_info *frame; struct dwarf2_per_cu_data *per_cu; @@ -453,42 +451,7 @@ index 8a61ae6..451a759 100644 }; /* Helper functions for dwarf2_evaluate_loc_desc. */ -@@ -361,16 +364,14 @@ static void - dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, - const gdb_byte **start, size_t *length) - { -- if (SYMBOL_LOCATION_BATON (framefunc) == NULL) -- *length = 0; -- else if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_loclist_funcs) -+ if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_loclist_funcs) - { - struct dwarf2_loclist_baton *symbaton; - - symbaton = SYMBOL_LOCATION_BATON (framefunc); - *start = dwarf2_find_location_expression (symbaton, length, pc); - } -- else -+ else if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_locexpr_funcs) - { - struct dwarf2_locexpr_baton *symbaton; - -@@ -383,10 +384,23 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, - else - *length = 0; - } -+ else if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_missing_funcs) -+ { -+ struct dwarf2_locexpr_baton *symbaton; -+ -+ symbaton = SYMBOL_LOCATION_BATON (framefunc); -+ gdb_assert (symbaton == NULL); -+ *length = 0; -+ } -+ else -+ internal_error (__FILE__, __LINE__, -+ _("Unsupported SYMBOL_COMPUTED_OPS %p for \"%s\""), -+ SYMBOL_COMPUTED_OPS (framefunc), -+ SYMBOL_PRINT_NAME (framefunc)); +@@ -421,7 +424,7 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, if (*length == 0) error (_("Could not find the frame base for \"%s\"."), @@ -497,7 +460,7 @@ index 8a61ae6..451a759 100644 } /* Helper function for dwarf2_evaluate_loc_desc. Computes the CFA for -@@ -453,6 +467,85 @@ dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset) +@@ -488,6 +491,85 @@ dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset) ctx->funcs->get_frame_pc, ctx->baton); } @@ -583,7 +546,7 @@ index 8a61ae6..451a759 100644 /* Callback function for dwarf2_evaluate_loc_desc. */ static struct type * -@@ -1156,10 +1249,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, +@@ -1202,10 +1284,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, saved_ctx.gdbarch = ctx->gdbarch; saved_ctx.addr_size = ctx->addr_size; @@ -596,7 +559,7 @@ index 8a61ae6..451a759 100644 ctx->offset = dwarf2_per_cu_text_offset (baton_local.per_cu); ctx->baton = &baton_local; -@@ -1167,10 +1262,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, +@@ -1213,10 +1297,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx, ctx->gdbarch = saved_ctx.gdbarch; ctx->addr_size = saved_ctx.addr_size; @@ -692,9 +655,9 @@ index 8a61ae6..451a759 100644 /* Callback function for dwarf2_evaluate_loc_desc. Fetch the address indexed by DW_OP_GNU_addr_index. */ -@@ -2106,22 +2286,6 @@ invalid_synthetic_pointer (void) - "referenced via synthetic pointer")); - } +@@ -2177,22 +2346,6 @@ static const struct lval_funcs pieced_value_funcs = { + free_pieced_value_closure + }; -/* Virtual method table for dwarf2_evaluate_loc_desc_full below. */ - @@ -715,7 +678,7 @@ index 8a61ae6..451a759 100644 /* Evaluate a location description, starting at DATA and with length SIZE, to find the current location of variable of TYPE in the context of FRAME. BYTE_OFFSET is applied after the contents are -@@ -2134,7 +2298,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2205,7 +2358,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, LONGEST byte_offset) { struct value *retval; @@ -723,7 +686,7 @@ index 8a61ae6..451a759 100644 struct dwarf_expr_context *ctx; struct cleanup *old_chain, *value_chain; struct objfile *objfile = dwarf2_per_cu_objfile (per_cu); -@@ -2146,29 +2309,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2217,29 +2369,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, if (size == 0) return allocate_optimized_out_value (type); @@ -754,7 +717,7 @@ index 8a61ae6..451a759 100644 retval = allocate_value (type); mark_value_bytes_unavailable (retval, 0, TYPE_LENGTH (type)); return retval; -@@ -2232,6 +2384,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2303,6 +2444,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); do_cleanups (value_chain); @@ -771,7 +734,7 @@ index 8a61ae6..451a759 100644 retval = allocate_value_lazy (type); VALUE_LVAL (retval) = lval_memory; if (in_stack_memory) -@@ -4148,8 +4310,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, +@@ -4204,8 +4355,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, dlbaton->per_cu); } @@ -781,60 +744,11 @@ index 8a61ae6..451a759 100644 const struct symbol_computed_ops dwarf2_loclist_funcs = { loclist_read_variable, loclist_read_variable_at_entry, -@@ -4158,6 +4319,48 @@ const struct symbol_computed_ops dwarf2_loclist_funcs = { - loclist_tracepoint_var_ref - }; - -+static struct value * -+missing_read_variable (struct symbol *symbol, struct frame_info *frame) -+{ -+ struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol); -+ -+ gdb_assert (dlbaton == NULL); -+ error (_("Unable to resolve variable \"%s\""), SYMBOL_PRINT_NAME (symbol)); -+} -+ -+static int -+missing_read_needs_frame (struct symbol *symbol) -+{ -+ return 0; -+} -+ -+static void -+missing_describe_location (struct symbol *symbol, CORE_ADDR addr, -+ struct ui_file *stream) -+{ -+ fprintf_filtered (stream, _("a variable we are unable to resolve")); -+} -+ -+static void -+missing_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, -+ struct agent_expr *ax, struct axs_value *value) -+{ -+ struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol); -+ -+ gdb_assert (dlbaton == NULL); -+ error (_("Unable to resolve variable \"%s\""), SYMBOL_PRINT_NAME (symbol)); -+} -+ -+/* The set of location functions used with the DWARF-2 evaluator when we are -+ unable to resolve the symbols. */ -+const struct symbol_computed_ops dwarf2_missing_funcs = { -+ missing_read_variable, -+ missing_read_variable, /* read_variable_at_entry */ -+ missing_read_needs_frame, -+ missing_describe_location, -+ missing_tracepoint_var_ref -+}; -+ - /* Provide a prototype to silence -Wmissing-prototypes. */ - extern initialize_file_ftype _initialize_dwarf2loc; - diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h -index 36641b3..1394578 100644 +index 9bc8ca5..28467dc 100644 --- a/gdb/dwarf2loc.h +++ b/gdb/dwarf2loc.h -@@ -132,6 +132,15 @@ struct dwarf2_loclist_baton +@@ -137,6 +137,15 @@ struct dwarf2_loclist_baton extern const struct symbol_computed_ops dwarf2_locexpr_funcs; extern const struct symbol_computed_ops dwarf2_loclist_funcs; @@ -848,23 +762,23 @@ index 36641b3..1394578 100644 +extern int dwarf_loclist_baton_eval (struct dwarf2_loclist_baton *dllbaton, + struct type *type, CORE_ADDR *addrp); - /* Compile a DWARF location expression to an agent expression. - + extern const struct symbol_block_ops dwarf2_block_frame_base_locexpr_funcs; + extern const struct symbol_block_ops dwarf2_block_frame_base_loclist_funcs; diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index df6298b..b11abf0 100644 +index d18eaed..91c476c 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -1624,6 +1624,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu, +@@ -1661,6 +1661,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu, struct dwarf2_loclist_baton *baton, - struct attribute *attr); + const struct attribute *attr); +static struct dwarf2_loclist_baton *dwarf2_attr_to_loclist_baton -+ (struct attribute *attr, struct dwarf2_cu *cu); ++ (const struct attribute *attr, struct dwarf2_cu *cu); + - static void dwarf2_symbol_mark_computed (struct attribute *attr, + static void dwarf2_symbol_mark_computed (const struct attribute *attr, struct symbol *sym, - struct dwarf2_cu *cu); -@@ -1656,6 +1659,9 @@ static void age_cached_comp_units (void); + struct dwarf2_cu *cu, +@@ -1694,6 +1697,9 @@ static void age_cached_comp_units (void); static void free_one_cached_comp_unit (struct dwarf2_per_cu_data *); @@ -874,17 +788,17 @@ index df6298b..b11abf0 100644 static struct type *set_die_type (struct die_info *, struct type *, struct dwarf2_cu *); -@@ -1684,6 +1690,9 @@ static struct type *get_die_type_at_offset (sect_offset, +@@ -1722,6 +1728,9 @@ static struct type *get_die_type_at_offset (sect_offset, static struct type *get_die_type (struct die_info *die, struct dwarf2_cu *cu); +static struct dwarf2_locexpr_baton *dwarf2_attr_to_locexpr_baton -+ (struct attribute *attr, struct dwarf2_cu *cu); ++ (const struct attribute *attr, struct dwarf2_cu *cu); + static void dwarf2_release_queue (void *dummy); static void queue_comp_unit (struct dwarf2_per_cu_data *per_cu, -@@ -11702,6 +11711,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -12263,6 +12272,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) new_symbol (die, this_type, cu); } @@ -914,7 +828,7 @@ index df6298b..b11abf0 100644 /* Extract all information from a DW_TAG_array_type DIE and put it in the DIE's type field. For now, this only handles one dimensional arrays. */ -@@ -11715,7 +11747,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -12276,7 +12308,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) struct type *element_type, *range_type, *index_type; struct type **range_types = NULL; struct attribute *attr; @@ -923,7 +837,7 @@ index df6298b..b11abf0 100644 struct cleanup *back_to; const char *name; -@@ -11768,17 +11800,19 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -12329,17 +12361,19 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) type = element_type; if (read_array_order (die, cu) == DW_ORD_col_major) @@ -954,7 +868,7 @@ index df6298b..b11abf0 100644 /* Understand Dwarf2 support for vector types (like they occur on the PowerPC w/ AltiVec). Gcc just adds another attribute to the -@@ -12413,29 +12447,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -12973,29 +13007,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -1082,7 +996,7 @@ index df6298b..b11abf0 100644 char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -12739,7 +12858,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -13320,7 +13439,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -1091,14 +1005,14 @@ index df6298b..b11abf0 100644 int low_default_is_valid; const char *name; LONGEST negative_mask; -@@ -12798,42 +12917,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -13379,42 +13498,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) "- DIE at 0x%x [in module %s]"), die->offset.sect_off, cu->objfile->name); - attr = dwarf2_attr (die, DW_AT_upper_bound, cu); - if (attr) - { -- if (attr_form_is_block (attr) || is_ref_attr (attr)) +- if (attr_form_is_block (attr) || attr_form_is_ref (attr)) - { - /* GCC encodes arrays with unspecified or dynamic length - with a DW_FORM_block1 attribute or a reference attribute. @@ -1134,7 +1048,7 @@ index df6298b..b11abf0 100644 /* Dwarf-2 specifications explicitly allows to create subrange types without specifying a base type. In that case, the base type must be set to the type of -@@ -12872,24 +12955,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -13453,24 +13536,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) } } @@ -1171,7 +1085,7 @@ index df6298b..b11abf0 100644 + /* For setting a default if DW_AT_UPPER_BOUND would be missing. */ + low = 0; + } -+ else if (attr && is_ref_attr (attr) && cu->language != language_ada) ++ else if (attr && attr_form_is_ref (attr) && cu->language != language_ada) + { + struct die_info *target_die; + struct dwarf2_cu *target_cu = cu; @@ -1220,7 +1134,7 @@ index df6298b..b11abf0 100644 - TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1; + attr = dwarf2_attr (die, DW_AT_upper_bound, cu); + if (!attr || (!attr_form_is_block (attr) && !attr_form_is_constant (attr) -+ && !is_ref_attr (attr))) ++ && !attr_form_is_ref (attr))) + { + attr = dwarf2_attr (die, DW_AT_count, cu); + /* It does not hurt but it is needlessly ineffective in check_typedef. */ @@ -1239,7 +1153,7 @@ index df6298b..b11abf0 100644 + dwarf2_attr_to_locexpr_baton (attr, cu); + TYPE_DYNAMIC (range_type) = 1; + } -+ else if (attr && is_ref_attr (attr) && cu->language != language_ada) ++ else if (attr && attr_form_is_ref (attr) && cu->language != language_ada) + { + struct die_info *target_die; + struct dwarf2_cu *target_cu = cu; @@ -1284,7 +1198,7 @@ index df6298b..b11abf0 100644 + dwarf2_attr_to_locexpr_baton (attr, cu); + TYPE_DYNAMIC (range_type) = 1; + } -+ else if (attr && is_ref_attr (attr) && cu->language != language_ada) ++ else if (attr && attr_form_is_ref (attr) && cu->language != language_ada) + { + struct die_info *target_die; + struct dwarf2_cu *target_cu = cu; @@ -1312,7 +1226,7 @@ index df6298b..b11abf0 100644 name = dwarf2_name (die, cu); if (name) -@@ -15749,10 +15971,12 @@ var_decode_location (struct attribute *attr, struct symbol *sym, +@@ -16380,11 +16602,14 @@ var_decode_location (struct attribute *attr, struct symbol *sym, (i.e. when the value of a register or memory location is referenced, or a thread-local block, etc.). Then again, it might not be worthwhile. I'm assuming that it isn't unless performance @@ -1321,22 +1235,15 @@ index df6298b..b11abf0 100644 + + SYMBOL_CLASS may get overriden by dwarf2_symbol_mark_computed. */ -- dwarf2_symbol_mark_computed (attr, sym, cu); - SYMBOL_CLASS (sym) = LOC_COMPUTED; -+ dwarf2_symbol_mark_computed (attr, sym, cu); + dwarf2_symbol_mark_computed (attr, sym, cu, 0); - if (SYMBOL_COMPUTED_OPS (sym) == &dwarf2_loclist_funcs) +- if (SYMBOL_COMPUTED_OPS (sym)->location_has_loclist) ++ if (SYMBOL_COMPUTED_OPS (sym) != NULL ++ && SYMBOL_COMPUTED_OPS (sym)->location_has_loclist) cu->has_loclist = 1; -@@ -15793,6 +16017,8 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu, - else - sym = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symbol); - OBJSTAT (objfile, n_syms++); -+ /* Some methods are called w/o checking SYMBOL_COMPUTED_OPS validity. */ -+ SYMBOL_COMPUTED_OPS (sym) = &dwarf2_missing_funcs; + } - /* Cache this symbol's name and the name's demangled form (if any). */ - SYMBOL_SET_LANGUAGE (sym, cu->language); -@@ -16602,6 +16828,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu) +@@ -17225,6 +17450,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -1346,23 +1253,24 @@ index df6298b..b11abf0 100644 return this_type; } -@@ -19046,62 +19275,100 @@ fill_in_loclist_baton (struct dwarf2_cu *cu, +@@ -19910,66 +20138,109 @@ fill_in_loclist_baton (struct dwarf2_cu *cu, baton->from_dwo = cu->dwo_unit != NULL; } -static void --dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, -- struct dwarf2_cu *cu) +-dwarf2_symbol_mark_computed (const struct attribute *attr, struct symbol *sym, +- struct dwarf2_cu *cu, int is_block) +/* Convert DW_BLOCK into struct dwarf2_locexpr_baton. ATTR must be a DW_BLOCK + attribute type. */ + +static struct dwarf2_locexpr_baton * -+dwarf2_attr_to_locexpr_baton (struct attribute *attr, struct dwarf2_cu *cu) ++dwarf2_attr_to_locexpr_baton (const struct attribute *attr, ++ struct dwarf2_cu *cu) +{ + struct objfile *objfile = dwarf2_per_objfile->objfile; + struct dwarf2_locexpr_baton *baton; + -+ gdb_assert (attr_form_is_block (attr)); ++ gdb_assert (attr == NULL || attr_form_is_block (attr)); + + baton = obstack_alloc (&objfile->objfile_obstack, sizeof (*baton)); + baton->per_cu = cu->per_cu; @@ -1373,15 +1281,24 @@ index df6298b..b11abf0 100644 + info_buffer for SYM's objfile; right now we never release + that buffer, but when we do clean up properly this may + need to change. */ -+ baton->size = DW_BLOCK (attr)->size; -+ baton->data = DW_BLOCK (attr)->data; ++ if (attr != NULL) ++ { ++ baton->size = DW_BLOCK (attr)->size; ++ baton->data = DW_BLOCK (attr)->data; ++ } ++ else ++ { ++ baton->size = 0; ++ baton->data = NULL; ++ } + gdb_assert (baton->size == 0 || baton->data != NULL); + + return baton; +} + +static struct dwarf2_loclist_baton * -+dwarf2_attr_to_loclist_baton (struct attribute *attr, struct dwarf2_cu *cu) ++dwarf2_attr_to_loclist_baton (const struct attribute *attr, ++ struct dwarf2_cu *cu) { struct objfile *objfile = dwarf2_per_objfile->objfile; struct dwarf2_section_info *section = cu_debug_loc_section (cu); @@ -1428,35 +1345,36 @@ index df6298b..b11abf0 100644 +/* SYM may get its SYMBOL_CLASS overriden on invalid ATTR content. */ + +static void -+dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, -+ struct dwarf2_cu *cu) ++dwarf2_symbol_mark_computed (const struct attribute *attr, struct symbol *sym, ++ struct dwarf2_cu *cu, int is_block) +{ + struct dwarf2_loclist_baton *loclist_baton; + loclist_baton = dwarf2_attr_to_loclist_baton (attr, cu); + if (loclist_baton) + { - SYMBOL_COMPUTED_OPS (sym) = &dwarf2_loclist_funcs; + SYMBOL_ACLASS_INDEX (sym) = (is_block + ? dwarf2_loclist_block_index + : dwarf2_loclist_index); - SYMBOL_LOCATION_BATON (sym) = baton; + SYMBOL_LOCATION_BATON (sym) = loclist_baton; + } + else if (attr_form_is_block (attr)) + { -+ SYMBOL_COMPUTED_OPS (sym) = &dwarf2_locexpr_funcs; ++ SYMBOL_ACLASS_INDEX (sym) = (is_block ++ ? dwarf2_locexpr_block_index ++ : dwarf2_locexpr_index); + SYMBOL_LOCATION_BATON (sym) = dwarf2_attr_to_locexpr_baton (attr, cu); } else { - struct dwarf2_locexpr_baton *baton; -+ dwarf2_invalid_attrib_class_complaint ("location description", -+ SYMBOL_NATURAL_NAME (sym)); - +- - baton = obstack_alloc (&objfile->objfile_obstack, - sizeof (struct dwarf2_locexpr_baton)); - baton->per_cu = cu->per_cu; - gdb_assert (baton->per_cu); -+ /* Some methods are called w/o checking SYMBOL_COMPUTED_OPS validity. */ - +- - if (attr_form_is_block (attr)) - { - /* Note that we're just copying the block's data pointer @@ -1473,19 +1391,18 @@ index df6298b..b11abf0 100644 - SYMBOL_NATURAL_NAME (sym)); - baton->size = 0; - } -+ SYMBOL_COMPUTED_OPS (sym) = &dwarf2_missing_funcs; -+ SYMBOL_LOCATION_BATON (sym) = NULL; ++ dwarf2_invalid_attrib_class_complaint ("location description", ++ SYMBOL_NATURAL_NAME (sym)); -- SYMBOL_COMPUTED_OPS (sym) = &dwarf2_locexpr_funcs; + SYMBOL_ACLASS_INDEX (sym) = (is_block + ? dwarf2_locexpr_block_index + : dwarf2_locexpr_index); - SYMBOL_LOCATION_BATON (sym) = baton; -+ /* For functions a missing DW_AT_frame_base does not optimize out the -+ whole function definition, only its frame base resolving. */ -+ if (attr->name == DW_AT_location) -+ SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT; ++ SYMBOL_LOCATION_BATON (sym) = dwarf2_attr_to_locexpr_baton (NULL, cu); } } -@@ -19472,6 +19739,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs) +@@ -20342,6 +20613,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs) && ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off); } @@ -1511,7 +1428,7 @@ index df6298b..b11abf0 100644 /* Set the type associated with DIE to TYPE. Save it in CU's hash table if necessary. For convenience, return TYPE. -@@ -19496,6 +19782,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -20366,6 +20656,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) struct dwarf2_per_cu_offset_and_type **slot, ofs; struct objfile *objfile = cu->objfile; @@ -1521,7 +1438,7 @@ index df6298b..b11abf0 100644 initialized (if not already set). There are a few types where we should not be doing so, because the type-specific area is diff --git a/gdb/eval.c b/gdb/eval.c -index d7f80e2..8eca4c8 100644 +index 539489f..13ba1a9 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -41,6 +41,7 @@ @@ -1532,7 +1449,7 @@ index d7f80e2..8eca4c8 100644 #include "gdb_assert.h" -@@ -393,27 +394,217 @@ init_array_element (struct value *array, struct value *element, +@@ -393,27 +394,221 @@ init_array_element (struct value *array, struct value *element, } static struct value * @@ -1652,11 +1569,11 @@ index d7f80e2..8eca4c8 100644 + else + { + struct value *val; -+ -+ index->kind = SUBSCRIPT_NUMBER; - if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) - high_bound = TYPE_HIGH_BOUND (range); ++ index->kind = SUBSCRIPT_NUMBER; ++ + /* Evaluate each subscript; it must be a legal integer in F77. */ + val = evaluate_subexp_with_coercion (exp, pos, noside); + index->number = value_as_long (val); @@ -1750,23 +1667,27 @@ index d7f80e2..8eca4c8 100644 + if (VALUE_LVAL (array) != lval_internalvar) + set_value_address (array, value_byte_address + value_byte_offset); + -+ if (!value_lazy (saved_array)) ++ if (!value_lazy (saved_array) ++ && TYPE_LENGTH (value_type (saved_array)) > 0 ++ && TYPE_LENGTH (new_array_type) > 0) + { ++ gdb_assert (TYPE_LENGTH (new_array_type) ++ <= TYPE_LENGTH (value_type (saved_array))); + allocate_value_contents (array); + set_value_lazy (array, 0); - -- return value_slice (array, low_bound, high_bound - low_bound + 1); ++ + memcpy (value_contents_writeable (array), + value_contents (saved_array) + value_byte_offset, + TYPE_LENGTH (new_array_type)); + } -+ + +- return value_slice (array, low_bound, high_bound - low_bound + 1); + do_cleanups (old_chain); + return array; } -@@ -710,6 +901,7 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -710,6 +905,7 @@ evaluate_subexp_standard (struct type *expect_type, int save_pos1; struct symbol *function = NULL; char *function_name = NULL; @@ -1774,7 +1695,7 @@ index d7f80e2..8eca4c8 100644 pc = (*pos)++; op = exp->elts[pc].opcode; -@@ -1776,6 +1968,8 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1776,6 +1972,8 @@ evaluate_subexp_standard (struct type *expect_type, /* First determine the type code we are dealing with. */ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); @@ -1783,7 +1704,7 @@ index d7f80e2..8eca4c8 100644 type = check_typedef (value_type (arg1)); code = TYPE_CODE (type); -@@ -1796,23 +1990,13 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1796,23 +1994,13 @@ evaluate_subexp_standard (struct type *expect_type, code = TYPE_CODE (type); } } @@ -1809,7 +1730,7 @@ index d7f80e2..8eca4c8 100644 case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2239,49 +2423,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2225,49 +2413,6 @@ evaluate_subexp_standard (struct type *expect_type, } return (arg1); @@ -1859,7 +1780,7 @@ index d7f80e2..8eca4c8 100644 case BINOP_LOGICAL_AND: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -2513,15 +2654,23 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2499,15 +2644,23 @@ evaluate_subexp_standard (struct type *expect_type, if (expect_type && TYPE_CODE (expect_type) == TYPE_CODE_PTR) expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type)); arg1 = evaluate_subexp (expect_type, exp, pos, noside); @@ -1885,7 +1806,7 @@ index d7f80e2..8eca4c8 100644 else if (noside == EVAL_AVOID_SIDE_EFFECTS) { type = check_typedef (value_type (arg1)); -@@ -2530,12 +2679,18 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2516,12 +2669,18 @@ evaluate_subexp_standard (struct type *expect_type, /* In C you can dereference an array to get the 1st elt. */ || TYPE_CODE (type) == TYPE_CODE_ARRAY ) @@ -1909,7 +1830,7 @@ index d7f80e2..8eca4c8 100644 else error (_("Attempt to take contents of a non-pointer value.")); } -@@ -2545,9 +2700,14 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2531,9 +2690,14 @@ evaluate_subexp_standard (struct type *expect_type, do. "long long" variables are rare enough that BUILTIN_TYPE_LONGEST would seem to be a mistake. */ if (TYPE_CODE (type) == TYPE_CODE_INT) @@ -1927,7 +1848,7 @@ index d7f80e2..8eca4c8 100644 case UNOP_ADDR: /* C++: check for and handle pointer to members. */ -@@ -2960,7 +3120,7 @@ evaluate_subexp_with_coercion (struct expression *exp, +@@ -2963,7 +3127,7 @@ evaluate_subexp_with_coercion (struct expression *exp, { enum exp_opcode op; int pc; @@ -1936,7 +1857,7 @@ index d7f80e2..8eca4c8 100644 struct symbol *var; struct type *type; -@@ -2971,13 +3131,18 @@ evaluate_subexp_with_coercion (struct expression *exp, +@@ -2974,13 +3138,18 @@ evaluate_subexp_with_coercion (struct expression *exp, { case OP_VAR_VALUE: var = exp->elts[pc + 2].symbol; @@ -1956,7 +1877,7 @@ index d7f80e2..8eca4c8 100644 return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)), val); } -@@ -3035,9 +3200,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos) +@@ -3038,9 +3207,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos) case OP_VAR_VALUE: (*pos) += 4; @@ -1973,7 +1894,7 @@ index d7f80e2..8eca4c8 100644 default: val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS); -@@ -3068,18 +3237,25 @@ parse_and_eval_type (char *p, int length) +@@ -3071,18 +3244,25 @@ parse_and_eval_type (char *p, int length) int calc_f77_array_dims (struct type *array_type) { @@ -2247,7 +2168,7 @@ index d01d6ec..8a21149 100644 switch (TYPE_CODE (type)) { diff --git a/gdb/findvar.c b/gdb/findvar.c -index fb66e0f..45684f0 100644 +index f586ce2..8fd5a08 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -34,6 +34,7 @@ @@ -2258,7 +2179,7 @@ index fb66e0f..45684f0 100644 /* Basic byte-swapping routines. All 'extract' functions return a host-format integer from a target-format integer at ADDR which is -@@ -437,7 +438,10 @@ minsym_lookup_iterator_cb (struct objfile *objfile, void *cb_data) +@@ -443,7 +444,10 @@ minsym_lookup_iterator_cb (struct objfile *objfile, void *cb_data) } /* A default implementation for the "la_read_var_value" hook in @@ -2270,7 +2191,7 @@ index fb66e0f..45684f0 100644 struct value * default_read_var_value (struct symbol *var, struct frame_info *frame) -@@ -446,13 +450,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -452,13 +456,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) struct type *type = SYMBOL_TYPE (var); CORE_ADDR addr; @@ -2284,15 +2205,15 @@ index fb66e0f..45684f0 100644 if (symbol_read_needs_frame (var)) gdb_assert (frame); -@@ -492,7 +489,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -502,7 +499,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) return v; case LOC_STATIC: - v = allocate_value_lazy (type); if (overlay_debugging) addr = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var), - SYMBOL_OBJ_SECTION (var)); -@@ -506,7 +502,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) + SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (var), +@@ -517,7 +513,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) error (_("Unknown argument list address for `%s'."), SYMBOL_PRINT_NAME (var)); addr += SYMBOL_VALUE (var); @@ -2300,7 +2221,7 @@ index fb66e0f..45684f0 100644 break; case LOC_REF_ARG: -@@ -521,14 +516,12 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -532,14 +527,12 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) argref += SYMBOL_VALUE (var); ref = value_at (lookup_pointer_type (type), argref); addr = value_as_address (ref); @@ -2315,15 +2236,15 @@ index fb66e0f..45684f0 100644 break; case LOC_TYPEDEF: -@@ -537,7 +530,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -548,7 +541,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) break; case LOC_BLOCK: - v = allocate_value_lazy (type); if (overlay_debugging) addr = symbol_overlayed_address - (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (var)); -@@ -563,7 +555,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) + (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (var), +@@ -575,7 +567,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) SYMBOL_PRINT_NAME (var)); addr = value_as_address (regval); @@ -2331,7 +2252,7 @@ index fb66e0f..45684f0 100644 } else { -@@ -612,7 +603,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -620,7 +611,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) if (obj_section && (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0) addr = target_translate_tls_address (obj_section->objfile, addr); @@ -2339,7 +2260,7 @@ index fb66e0f..45684f0 100644 } break; -@@ -625,6 +615,10 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) +@@ -633,6 +623,10 @@ default_read_var_value (struct symbol *var, struct frame_info *frame) break; } @@ -2350,7 +2271,7 @@ index fb66e0f..45684f0 100644 VALUE_LVAL (v) = lval_memory; set_value_address (v, addr); return v; -@@ -729,10 +723,11 @@ struct value * +@@ -737,10 +731,11 @@ struct value * value_from_register (struct type *type, int regnum, struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2364,7 +2285,7 @@ index fb66e0f..45684f0 100644 { int optim, unavail, ok; -@@ -747,7 +742,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) +@@ -755,7 +750,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) VALUE_LVAL (v) = lval_register; VALUE_FRAME_ID (v) = get_frame_id (frame); VALUE_REGNUM (v) = regnum; @@ -2394,20 +2315,20 @@ index 05a38b2..9801fdf 100644 set variable $gdb_init_done = 1 diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index 12730d7..5a614e0 100644 +index d19c593..3995913 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -37,6 +37,9 @@ - #include "gdb_assert.h" +@@ -38,6 +38,9 @@ #include "hashtab.h" #include "exceptions.h" + #include "cp-support.h" +#include "observer.h" +#include "dwarf2expr.h" +#include "dwarf2loc.h" /* Initialize BADNESS constants. */ -@@ -185,6 +188,43 @@ alloc_type (struct objfile *objfile) +@@ -186,6 +189,43 @@ alloc_type (struct objfile *objfile) return type; } @@ -2451,7 +2372,7 @@ index 12730d7..5a614e0 100644 /* Allocate a new GDBARCH-associated type structure and fill it with some defaults. Space for the type structure is allocated on the heap. */ -@@ -310,7 +350,7 @@ make_pointer_type (struct type *type, struct type **typeptr) +@@ -311,7 +351,7 @@ make_pointer_type (struct type *type, struct type **typeptr) if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */ { @@ -2460,7 +2381,7 @@ index 12730d7..5a614e0 100644 if (typeptr) *typeptr = ntype; } -@@ -383,7 +423,7 @@ make_reference_type (struct type *type, struct type **typeptr) +@@ -384,7 +424,7 @@ make_reference_type (struct type *type, struct type **typeptr) if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */ { @@ -2469,7 +2390,7 @@ index 12730d7..5a614e0 100644 if (typeptr) *typeptr = ntype; } -@@ -806,6 +846,7 @@ create_range_type (struct type *result_type, struct type *index_type, +@@ -807,6 +847,7 @@ create_range_type (struct type *result_type, struct type *index_type, TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); TYPE_LOW_BOUND (result_type) = low_bound; TYPE_HIGH_BOUND (result_type) = high_bound; @@ -2477,7 +2398,7 @@ index 12730d7..5a614e0 100644 if (low_bound >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -926,6 +967,10 @@ get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound) +@@ -927,6 +968,10 @@ get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound) return 1; } @@ -2488,7 +2409,7 @@ index 12730d7..5a614e0 100644 /* Create an array type using either a blank type supplied in RESULT_TYPE, or creating a new type, inheriting the objfile from RANGE_TYPE. -@@ -949,26 +994,31 @@ create_array_type (struct type *result_type, +@@ -950,26 +995,31 @@ create_array_type (struct type *result_type, TYPE_CODE (result_type) = TYPE_CODE_ARRAY; TYPE_TARGET_TYPE (result_type) = element_type; @@ -2533,7 +2454,7 @@ index 12730d7..5a614e0 100644 return result_type; } -@@ -1489,6 +1539,105 @@ stub_noname_complaint (void) +@@ -1490,6 +1540,105 @@ stub_noname_complaint (void) complaint (&symfile_complaints, _("stub type has NULL name")); } @@ -2639,7 +2560,7 @@ index 12730d7..5a614e0 100644 /* Find the real type of TYPE. This function returns the real type, after removing all layers of typedefs, and completing opaque or stub types. Completion changes the TYPE argument, but stripping of -@@ -1655,52 +1804,37 @@ check_typedef (struct type *type) +@@ -1656,52 +1805,37 @@ check_typedef (struct type *type) } } @@ -2713,7 +2634,7 @@ index 12730d7..5a614e0 100644 TYPE_TARGET_STUB (type) = 0; } else if (TYPE_CODE (type) == TYPE_CODE_RANGE) -@@ -1708,6 +1842,7 @@ check_typedef (struct type *type) +@@ -1709,6 +1843,7 @@ check_typedef (struct type *type) TYPE_LENGTH (type) = TYPE_LENGTH (target_type); TYPE_TARGET_STUB (type) = 0; } @@ -2721,7 +2642,7 @@ index 12730d7..5a614e0 100644 } type = make_qualified_type (type, instance_flags, NULL); -@@ -3384,33 +3519,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs) +@@ -3404,33 +3539,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs) } /* Allocate the hash table used by copy_type_recursive to walk @@ -2779,7 +2700,7 @@ index 12730d7..5a614e0 100644 return type; /* This type shouldn't be pointing to any types in other objfiles; -@@ -3425,9 +3569,10 @@ copy_type_recursive (struct objfile *objfile, +@@ -3445,9 +3589,10 @@ copy_type_recursive (struct objfile *objfile, new_type = alloc_type_arch (get_type_arch (type)); /* We must add the new type to the hash table immediately, in case @@ -2793,7 +2714,7 @@ index 12730d7..5a614e0 100644 stored->old = type; stored->new = new_type; *slot = stored; -@@ -3438,6 +3583,21 @@ copy_type_recursive (struct objfile *objfile, +@@ -3458,6 +3603,21 @@ copy_type_recursive (struct objfile *objfile, TYPE_OBJFILE_OWNED (new_type) = 0; TYPE_OWNER (new_type).gdbarch = get_type_arch (type); @@ -2815,7 +2736,7 @@ index 12730d7..5a614e0 100644 if (TYPE_NAME (type)) TYPE_NAME (new_type) = xstrdup (TYPE_NAME (type)); if (TYPE_TAG_NAME (type)) -@@ -3446,12 +3606,48 @@ copy_type_recursive (struct objfile *objfile, +@@ -3466,12 +3626,48 @@ copy_type_recursive (struct objfile *objfile, TYPE_INSTANCE_FLAGS (new_type) = TYPE_INSTANCE_FLAGS (type); TYPE_LENGTH (new_type) = TYPE_LENGTH (type); @@ -2864,7 +2785,7 @@ index 12730d7..5a614e0 100644 TYPE_FIELDS (new_type) = XCALLOC (nfields, struct field); for (i = 0; i < nfields; i++) { -@@ -3460,8 +3656,8 @@ copy_type_recursive (struct objfile *objfile, +@@ -3480,8 +3676,8 @@ copy_type_recursive (struct objfile *objfile, TYPE_FIELD_BITSIZE (new_type, i) = TYPE_FIELD_BITSIZE (type, i); if (TYPE_FIELD_TYPE (type, i)) TYPE_FIELD_TYPE (new_type, i) @@ -2875,7 +2796,7 @@ index 12730d7..5a614e0 100644 if (TYPE_FIELD_NAME (type, i)) TYPE_FIELD_NAME (new_type, i) = xstrdup (TYPE_FIELD_NAME (type, i)); -@@ -3492,24 +3688,184 @@ copy_type_recursive (struct objfile *objfile, +@@ -3512,24 +3708,184 @@ copy_type_recursive (struct objfile *objfile, } } @@ -3067,7 +2988,7 @@ index 12730d7..5a614e0 100644 /* Maybe copy the type_specific bits. NOTE drow/2005-12-09: We do not copy the C++-specific bits like -@@ -3526,6 +3882,17 @@ copy_type_recursive (struct objfile *objfile, +@@ -3546,6 +3902,17 @@ copy_type_recursive (struct objfile *objfile, return new_type; } @@ -3085,7 +3006,7 @@ index 12730d7..5a614e0 100644 /* Make a copy of the given TYPE, except that the pointer & reference types are not preserved. -@@ -4090,6 +4457,13 @@ void +@@ -4110,6 +4477,13 @@ void _initialize_gdbtypes (void) { gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init); @@ -3332,7 +3253,7 @@ index 0ca7a87..c6029dc 100644 extern struct type *copy_type (const struct type *type); diff --git a/gdb/main.c b/gdb/main.c -index 06f3feb..141a01b 100644 +index 677f587..30b849e 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -37,6 +37,7 @@ @@ -3343,7 +3264,7 @@ index 06f3feb..141a01b 100644 #include "source.h" #include "cli/cli-cmds.h" #include "python/python.h" -@@ -314,6 +315,8 @@ captured_main (void *data) +@@ -318,6 +319,8 @@ captured_main (void *data) char *cdarg = NULL; char *ttyarg = NULL; @@ -3352,7 +3273,7 @@ index 06f3feb..141a01b 100644 /* These are static so that we can take their address in an initializer. */ static int print_help; -@@ -504,10 +507,14 @@ captured_main (void *data) +@@ -517,10 +520,14 @@ captured_main (void *data) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, @@ -3368,7 +3289,7 @@ index 06f3feb..141a01b 100644 { int option_index; -@@ -525,6 +532,9 @@ captured_main (void *data) +@@ -538,6 +545,9 @@ captured_main (void *data) case 0: /* Long option that just sets a flag. */ break; @@ -3378,7 +3299,7 @@ index 06f3feb..141a01b 100644 case OPT_SE: symarg = optarg; execarg = optarg; -@@ -733,7 +743,31 @@ captured_main (void *data) +@@ -747,7 +757,31 @@ captured_main (void *data) /* Now that gdb_init has created the initial inferior, we're in position to set args for that inferior. */ @@ -3411,7 +3332,7 @@ index 06f3feb..141a01b 100644 { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1013,7 +1047,8 @@ captured_main (void *data) +@@ -1037,7 +1071,8 @@ captured_main (void *data) /* Read in the old history after all the command files have been read. */ @@ -3421,7 +3342,7 @@ index 06f3feb..141a01b 100644 if (batch_flag) { -@@ -1024,13 +1059,25 @@ captured_main (void *data) +@@ -1048,13 +1083,25 @@ captured_main (void *data) /* Show time and/or space usage. */ do_cleanups (pre_stat_chain); @@ -3453,37 +3374,35 @@ index 06f3feb..141a01b 100644 } /* No exit -- exit is through quit_command. */ } -@@ -1062,7 +1109,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1089,6 +1136,12 @@ print_gdb_help (struct ui_file *stream) fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ -- gdb [options] --args executable-file [inferior-arguments ...]\n\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n"), stream); +#if HAVE_PYTHON + fputs_unfiltered (_("\ + gdb [options] [--python|-P] script-file [script-arguments ...]\n"), stream); +#endif + fputs_unfiltered (_("\n\ - Options:\n\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1104,7 +1156,13 @@ Options:\n\n\ - fputs_unfiltered (_(" files.\n\ - --nh Do not read "), stream); - fputs_unfiltered (gdbinit, stream); -- fputs_unfiltered (_(" file from home directory.\n\ -+ fputs_unfiltered (_(" file from home directory.\n"), stream); +@@ -1134,6 +1187,13 @@ Output and user interface control:\n\n\ + fputs_unfiltered (_("\ + --dbx DBX compatibility mode.\n\ + --xdb XDB compatibility mode.\n\ ++"), stream); +#if HAVE_PYTHON + fputs_unfiltered (_("\ + --python, -P Following argument is Python script file; remaining\n\ + arguments are passed to script.\n"), stream); +#endif + fputs_unfiltered (_("\ - --quiet Do not print version number on startup.\n\ - --readnow Fully read symbol files on first access.\n\ + --quiet Do not print version number on startup.\n\n\ "), stream); + fputs_unfiltered (_("\ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c -index bcc055e..8a9d645 100644 +index 05d4c6f..acec2a2 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -38,6 +38,7 @@ @@ -3546,7 +3465,7 @@ index bcc055e..8a9d645 100644 return; } -@@ -270,6 +295,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, +@@ -271,6 +296,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, } } @@ -3554,7 +3473,7 @@ index bcc055e..8a9d645 100644 return; case TYPE_CODE_REF: -@@ -410,6 +436,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, +@@ -411,6 +437,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, TYPE_CODE (type)); } gdb_flush (stream); @@ -3563,10 +3482,10 @@ index bcc055e..8a9d645 100644 void diff --git a/gdb/parse.c b/gdb/parse.c -index 09c378b..93c434f 100644 +index 13699a8..7b930c1 100644 --- a/gdb/parse.c +++ b/gdb/parse.c -@@ -1757,6 +1757,7 @@ parser_fprintf (FILE *x, const char *y, ...) +@@ -1780,6 +1780,7 @@ parser_fprintf (FILE *x, const char *y, ...) int operator_check_standard (struct expression *exp, int pos, @@ -3574,7 +3493,7 @@ index 09c378b..93c434f 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) -@@ -1796,7 +1797,7 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1819,7 +1820,7 @@ operator_check_standard (struct expression *exp, int pos, struct type *type = elts[pos + 2 + arg].type; struct objfile *objfile = TYPE_OBJFILE (type); @@ -3583,7 +3502,7 @@ index 09c378b..93c434f 100644 return 1; } } -@@ -1814,7 +1815,8 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1837,7 +1838,8 @@ operator_check_standard (struct expression *exp, int pos, /* Check objfile where the variable itself is placed. SYMBOL_OBJ_SECTION (symbol) may be NULL. */ @@ -3593,7 +3512,7 @@ index 09c378b..93c434f 100644 return 1; /* Check objfile where is placed the code touching the variable. */ -@@ -1827,24 +1829,27 @@ operator_check_standard (struct expression *exp, int pos, +@@ -1850,24 +1852,27 @@ operator_check_standard (struct expression *exp, int pos, /* Invoke callbacks for TYPE and OBJFILE if they were set as non-NULL. */ @@ -3629,7 +3548,7 @@ index 09c378b..93c434f 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) { -@@ -1859,7 +1864,9 @@ exp_iterate (struct expression *exp, +@@ -1882,7 +1887,9 @@ exp_iterate (struct expression *exp, pos = endpos - oplen; if (exp->language_defn->la_exp_desc->operator_check (exp, pos, @@ -3640,7 +3559,7 @@ index 09c378b..93c434f 100644 return 1; endpos = pos; -@@ -1890,8 +1897,29 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile) +@@ -1913,8 +1920,29 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile) { gdb_assert (objfile->separate_debug_objfile_backlink == NULL); @@ -3672,10 +3591,10 @@ index 09c378b..93c434f 100644 void _initialize_parse (void) diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h -index 8d25311..233ed46 100644 +index 5fbae0d..1fdad46 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h -@@ -244,6 +244,8 @@ extern void operator_length_standard (const struct expression *, int, int *, +@@ -245,6 +245,8 @@ extern void operator_length_standard (const struct expression *, int, int *, int *); extern int operator_check_standard (struct expression *exp, int pos, @@ -3684,7 +3603,7 @@ index 8d25311..233ed46 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data); -@@ -330,6 +332,7 @@ struct exp_descriptor +@@ -331,6 +333,7 @@ struct exp_descriptor value should be immediately returned to the caller. Otherwise zero should be returned. */ int (*operator_check) (struct expression *exp, int pos, @@ -3693,7 +3612,7 @@ index 8d25311..233ed46 100644 void *data), void *data); diff --git a/gdb/printcmd.c b/gdb/printcmd.c -index 155703d..545a615 100644 +index 1cc248d..eef0c66 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -51,6 +51,7 @@ @@ -3704,7 +3623,7 @@ index 155703d..545a615 100644 #ifdef TUI #include "tui/tui.h" /* For tui_active et al. */ -@@ -967,6 +968,11 @@ print_command_1 (char *exp, int voidprint) +@@ -980,6 +981,11 @@ print_command_1 (const char *exp, int voidprint) else val = access_value_history (0); @@ -3716,7 +3635,7 @@ index 155703d..545a615 100644 if (voidprint || (val && value_type (val) && TYPE_CODE (value_type (val)) != TYPE_CODE_VOID)) { -@@ -1039,6 +1045,9 @@ output_command (char *exp, int from_tty) +@@ -1061,6 +1067,9 @@ output_command_const (const char *exp, int from_tty) val = evaluate_expression (expr); @@ -3726,7 +3645,7 @@ index 155703d..545a615 100644 annotate_value_begin (value_type (val)); get_formatted_print_options (&opts, format); -@@ -1467,6 +1476,24 @@ x_command (char *exp, int from_tty) +@@ -1495,6 +1504,24 @@ x_command (char *exp, int from_tty) set_internalvar (lookup_internalvar ("__"), last_examine_value); } } @@ -3751,7 +3670,7 @@ index 155703d..545a615 100644 /* Add an expression to the auto-display chain. -@@ -1964,6 +1991,10 @@ print_variable_and_value (const char *name, struct symbol *var, +@@ -1993,6 +2020,10 @@ print_variable_and_value (const char *name, struct symbol *var, struct value_print_options opts; val = read_var_value (var, frame); @@ -3762,7 +3681,7 @@ index 155703d..545a615 100644 get_user_print_options (&opts); opts.deref_ref = 1; common_val_print (val, stream, indent, &opts, current_language); -@@ -2613,4 +2644,8 @@ Show printing of source filename and line number with ."), NULL, +@@ -2648,4 +2679,8 @@ Show printing of source filename and line number with ."), NULL, add_com ("eval", no_class, eval_command, _("\ Convert \"printf format string\", arg1, arg2, arg3, ..., argn to\n\ a command line, and call it.")); @@ -4019,7 +3938,7 @@ index 0000000..debb3bb + +InScope () diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c -index 051cff0..e2f2ebe 100644 +index 337e307..be91c5a 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -31,6 +31,8 @@ @@ -4049,10 +3968,10 @@ index 051cff0..e2f2ebe 100644 +static type_object *pyty_objects_discardable; +#endif + - static PyTypeObject type_object_type; + static PyTypeObject type_object_type + CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("type_object"); - /* A Field object. */ -@@ -1192,8 +1202,63 @@ typy_richcompare (PyObject *self, PyObject *other, int op) +@@ -1180,8 +1190,63 @@ typy_richcompare (PyObject *self, PyObject *other, int op) @@ -4116,7 +4035,7 @@ index 051cff0..e2f2ebe 100644 static void save_objfile_types (struct objfile *objfile, void *datum) { -@@ -1211,12 +1276,13 @@ save_objfile_types (struct objfile *objfile, void *datum) +@@ -1202,12 +1267,13 @@ save_objfile_types (struct objfile *objfile, void *datum) { type_object *next = obj->next; @@ -4134,7 +4053,7 @@ index 051cff0..e2f2ebe 100644 obj = next; } -@@ -1227,43 +1293,28 @@ save_objfile_types (struct objfile *objfile, void *datum) +@@ -1218,43 +1284,28 @@ save_objfile_types (struct objfile *objfile, void *datum) } static void @@ -4192,7 +4111,7 @@ index 051cff0..e2f2ebe 100644 /* Return number of fields ("length" of the field dictionary). */ -@@ -1483,7 +1534,10 @@ type_to_type_object (struct type *type) +@@ -1474,7 +1525,10 @@ type_to_type_object (struct type *type) type_obj = PyObject_New (type_object, &type_object_type); if (type_obj) @@ -4204,19 +4123,8 @@ index 051cff0..e2f2ebe 100644 return (PyObject *) type_obj; } -@@ -1563,6 +1617,10 @@ gdbpy_initialize_types (void) - - Py_INCREF (&field_object_type); - PyModule_AddObject (gdb_module, "Field", (PyObject *) &field_object_type); -+ -+#if 0 -+ observer_attach_mark_used (typy_types_mark_used); -+#endif - } - - diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c -index 11cc038..ef238f6 100644 +index 0d87219..c019184 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -29,6 +29,7 @@ @@ -4227,7 +4135,7 @@ index 11cc038..ef238f6 100644 #ifdef HAVE_PYTHON -@@ -1385,6 +1386,19 @@ gdbpy_is_value_object (PyObject *obj) +@@ -1385,12 +1386,28 @@ gdbpy_is_value_object (PyObject *obj) return PyObject_TypeCheck (obj, &value_object_type); } @@ -4244,22 +4152,20 @@ index 11cc038..ef238f6 100644 +} +#endif + - void + int gdbpy_initialize_values (void) { -@@ -1395,6 +1409,10 @@ gdbpy_initialize_values (void) - PyModule_AddObject (gdb_module, "Value", (PyObject *) &value_object_type); + if (PyType_Ready (&value_object_type) < 0) + return -1; - values_in_python = NULL; -+ +#if 0 + observer_attach_mark_used (python_types_mark_used); +#endif + return gdb_pymodule_addobject (gdb_module, "Value", + (PyObject *) &value_object_type); } - - diff --git a/gdb/python/python.c b/gdb/python/python.c -index cd8ddfb..e906c4f 100644 +index 00092c7..ec49fc9 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -67,6 +67,8 @@ static const char *gdbpy_should_print_stack = python_excp_message; @@ -4271,7 +4177,7 @@ index cd8ddfb..e906c4f 100644 #include "target.h" #include "gdbthread.h" #include "observer.h" -@@ -1099,6 +1101,53 @@ gdbpy_print_stack (void) +@@ -1116,6 +1118,53 @@ gdbpy_print_stack (void) /* Return the current Progspace. There always is one. */ @@ -4325,7 +4231,7 @@ index cd8ddfb..e906c4f 100644 static PyObject * gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) -@@ -1749,6 +1798,8 @@ static PyMethodDef GdbMethods[] = +@@ -1826,6 +1875,8 @@ static PyMethodDef GdbMethods[] = "Get a value from history" }, { "execute", (PyCFunction) execute_gdb_command, METH_VARARGS | METH_KEYWORDS, "Execute a gdb command" }, @@ -4335,10 +4241,10 @@ index cd8ddfb..e906c4f 100644 "Return a gdb parameter's value" }, diff --git a/gdb/python/python.h b/gdb/python/python.h -index 24e3077..0443087 100644 +index 1a1e5c2..312be94 100644 --- a/gdb/python/python.h +++ b/gdb/python/python.h -@@ -34,6 +34,8 @@ void eval_python_from_control_command (struct command_line *); +@@ -95,6 +95,8 @@ void eval_python_from_control_command (struct command_line *); void source_python_script (FILE *file, const char *filename); @@ -4348,10 +4254,10 @@ index 24e3077..0443087 100644 int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, diff --git a/gdb/stack.c b/gdb/stack.c -index f2aeb10..d20b2f1 100644 +index d89ff89..301d569 100644 --- a/gdb/stack.c +++ b/gdb/stack.c -@@ -509,6 +509,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame, +@@ -511,6 +511,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame, stb = mem_fileopen (); old_chain = make_cleanup_ui_file_delete (stb); @@ -5561,10 +5467,10 @@ index 2cc935b..30c7f85 100644 main (void) { diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp -index 387b34f..d5956ce 100644 +index 37ed4c3..82f30cb 100644 --- a/gdb/testsuite/gdb.base/arrayidx.exp +++ b/gdb/testsuite/gdb.base/arrayidx.exp -@@ -53,4 +53,12 @@ gdb_test "print array" \ +@@ -49,4 +49,12 @@ gdb_test "print array" \ "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \ "Print array with array-indexes on" @@ -7426,10 +7332,10 @@ index 0000000..4747ea9 + write (*,*) a ! break-static +end diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp -index 55e13cf..441c28b 100644 +index d700715..6ebca0a 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp -@@ -91,6 +91,10 @@ proc do_steps_and_nexts {} { +@@ -92,6 +92,10 @@ proc do_steps_and_nexts {} { set description "step over cmdarg_vec initialization" set command "step" } @@ -7873,7 +7779,7 @@ index 9142c72..2855220 100644 # Test either C or C++ values. test_subscript_regression "${binfile}" "c" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp -index 8b16b38..f6e59b0 100644 +index 70b797e..3588e1d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -143,6 +143,11 @@ proc gdb_unload {} { @@ -7889,7 +7795,7 @@ index 8b16b38..f6e59b0 100644 send_gdb "y\n" exp_continue diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp -index 569fb02..cacecf4 100644 +index 784ab6c..9e0a844 100644 --- a/gdb/testsuite/lib/pascal.exp +++ b/gdb/testsuite/lib/pascal.exp @@ -37,6 +37,9 @@ proc pascal_init {} { @@ -7924,10 +7830,10 @@ index 569fb02..cacecf4 100644 set pascal_init_done 1 } diff --git a/gdb/top.c b/gdb/top.c -index e9a40fc..de051c8 100644 +index 33a78da..22992ba 100644 --- a/gdb/top.c +++ b/gdb/top.c -@@ -350,6 +350,9 @@ prepare_execute_command (void) +@@ -342,6 +342,9 @@ prepare_execute_command (void) mark = value_mark (); cleanup = make_cleanup_value_free_to_mark (mark); @@ -7938,7 +7844,7 @@ index e9a40fc..de051c8 100644 /* With multiple threads running while the one we're examining is stopped, the dcache can get stale without us being able to detect diff --git a/gdb/typeprint.c b/gdb/typeprint.c -index 2d5a6af..5251e3f 100644 +index 4e70593..e8402a2 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -34,6 +34,7 @@ @@ -7976,10 +7882,10 @@ index 2d5a6af..5251e3f 100644 get_user_print_options (&opts); diff --git a/gdb/utils.c b/gdb/utils.c -index 4c2f08c..d1c8710 100644 +index 94ebce8..23a4986 100644 --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -1805,6 +1805,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void) +@@ -1725,6 +1725,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void) return back_to; } @@ -8017,12 +7923,12 @@ index 4c2f08c..d1c8710 100644 static void diff --git a/gdb/utils.h b/gdb/utils.h -index 52bcaff..6ab417b 100644 +index 0f6bb06..283137e 100644 --- a/gdb/utils.h +++ b/gdb/utils.h -@@ -375,4 +375,6 @@ extern int myread (int, char *, int); - extern ULONGEST align_up (ULONGEST v, int n); - extern ULONGEST align_down (ULONGEST v, int n); +@@ -384,4 +384,6 @@ extern ULONGEST align_down (ULONGEST v, int n); + + extern LONGEST gdb_sign_extend (LONGEST value, int bit); +extern struct cleanup *make_cleanup_restore_selected_frame (void); + @@ -8055,10 +7961,10 @@ index 18c14fc..0a3a3aa 100644 } diff --git a/gdb/valops.c b/gdb/valops.c -index 93c09d8..aef0991 100644 +index a3ab24f..53af842 100644 --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -45,6 +45,7 @@ +@@ -44,6 +44,7 @@ #include "objfiles.h" #include "symtab.h" #include "exceptions.h" @@ -8066,7 +7972,7 @@ index 93c09d8..aef0991 100644 extern unsigned int overload_debug; /* Local functions. */ -@@ -903,6 +904,65 @@ value_one (struct type *type) +@@ -902,6 +903,65 @@ value_one (struct type *type) return val; } @@ -8132,48 +8038,7 @@ index 93c09d8..aef0991 100644 /* Helper function for value_at, value_at_lazy, and value_at_lazy_stack. */ static struct value * -@@ -965,7 +1025,8 @@ int - value_fetch_lazy (struct value *val) - { - gdb_assert (value_lazy (val)); -- allocate_value_contents (val); -+ if (VALUE_LVAL (val) != lval_memory) -+ allocate_value_contents (val); - if (value_bitsize (val)) - { - /* To read a lazy bitfield, read the entire enclosing value. This -@@ -998,13 +1059,24 @@ value_fetch_lazy (struct value *val) - } - else if (VALUE_LVAL (val) == lval_memory) - { -- CORE_ADDR addr = value_address (val); -- struct type *type = check_typedef (value_enclosing_type (val)); -+ CORE_ADDR addr = value_raw_address (val); - -- if (TYPE_LENGTH (type)) -- read_value_memory (val, 0, value_stack (val), -- addr, value_contents_all_raw (val), -- TYPE_LENGTH (type)); -+ if (object_address_get_data (value_type (val), &addr)) -+ { -+ struct type *type = value_enclosing_type (val); -+ int length = TYPE_LENGTH (check_typedef (type)); -+ -+ if (length) -+ { -+ /* 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); -+ } -+ } -+ /* Just to be sure it has been called. */ -+ allocate_value_contents (val); - } - else if (VALUE_LVAL (val) == lval_register) - { -@@ -1529,7 +1601,18 @@ address_of_variable (struct symbol *var, const struct block *b) +@@ -1366,7 +1426,18 @@ address_of_variable (struct symbol *var, const struct block *b) if ((VALUE_LVAL (val) == lval_memory && value_lazy (val)) || TYPE_CODE (type) == TYPE_CODE_FUNC) { @@ -8193,7 +8058,7 @@ index 93c09d8..aef0991 100644 return value_from_pointer (lookup_pointer_type (type), addr); } -@@ -1636,6 +1719,7 @@ struct value * +@@ -1473,6 +1544,7 @@ struct value * value_coerce_array (struct value *arg1) { struct type *type = check_typedef (value_type (arg1)); @@ -8201,7 +8066,7 @@ index 93c09d8..aef0991 100644 /* If the user tries to do something requiring a pointer with an array that has not yet been pushed to the target, then this would -@@ -1645,8 +1729,12 @@ value_coerce_array (struct value *arg1) +@@ -1482,8 +1554,12 @@ value_coerce_array (struct value *arg1) if (VALUE_LVAL (arg1) != lval_memory) error (_("Attempt to take address of value not located in memory.")); @@ -8215,7 +8080,7 @@ index 93c09d8..aef0991 100644 } /* Given a value which is a function, return a value which is a pointer -@@ -3721,6 +3809,8 @@ value_slice (struct value *array, int lowbound, int length) +@@ -3558,6 +3634,8 @@ value_slice (struct value *array, int lowbound, int length) TYPE_TARGET_TYPE (range_type), lowbound, lowbound + length - 1); @@ -8225,7 +8090,7 @@ index 93c09d8..aef0991 100644 { struct type *element_type = TYPE_TARGET_TYPE (array_type); diff --git a/gdb/valprint.c b/gdb/valprint.c -index 18cff49..89cb01a 100644 +index 753ae34..6d87d9c 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -37,6 +37,7 @@ @@ -8236,7 +8101,7 @@ index 18cff49..89cb01a 100644 #include -@@ -287,7 +288,6 @@ scalar_type_p (struct type *type) +@@ -290,7 +291,6 @@ scalar_type_p (struct type *type) case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: case TYPE_CODE_SET: @@ -8244,7 +8109,7 @@ index 18cff49..89cb01a 100644 return 0; default: return 1; -@@ -1604,6 +1604,7 @@ val_print_array_elements (struct type *type, +@@ -1607,6 +1607,7 @@ val_print_array_elements (struct type *type, { unsigned int things_printed = 0; unsigned len; @@ -8252,7 +8117,7 @@ index 18cff49..89cb01a 100644 struct type *elttype, *index_type; unsigned eltlen; /* Position of the array element we are examining to see -@@ -1612,9 +1613,33 @@ val_print_array_elements (struct type *type, +@@ -1615,9 +1616,33 @@ val_print_array_elements (struct type *type, /* Number of repetitions we have detected so far. */ unsigned int reps; LONGEST low_bound, high_bound; @@ -8288,7 +8153,7 @@ index 18cff49..89cb01a 100644 index_type = TYPE_INDEX_TYPE (type); if (get_array_bounds (type, &low_bound, &high_bound)) -@@ -1701,6 +1726,8 @@ val_print_array_elements (struct type *type, +@@ -1704,6 +1729,8 @@ val_print_array_elements (struct type *type, { fprintf_filtered (stream, "..."); } @@ -8298,18 +8163,18 @@ index 18cff49..89cb01a 100644 /* Read LEN bytes of target memory at address MEMADDR, placing the diff --git a/gdb/value.c b/gdb/value.c -index 4b70ece..7449c2a 100644 +index 8d635c7..cce87c6 100644 --- a/gdb/value.c +++ b/gdb/value.c -@@ -42,6 +42,7 @@ - #include +@@ -43,6 +43,7 @@ #include "tracepoint.h" #include "cp-abi.h" + #include "user-regs.h" +#include "observer.h" /* Prototypes for exported functions. */ -@@ -1435,12 +1436,15 @@ void +@@ -1448,12 +1449,15 @@ void set_value_component_location (struct value *component, const struct value *whole) { @@ -8325,7 +8190,7 @@ index 4b70ece..7449c2a 100644 if (whole->lval == lval_computed) { const struct lval_funcs *funcs = whole->location.computed.funcs; -@@ -1448,6 +1452,12 @@ set_value_component_location (struct value *component, +@@ -1461,6 +1465,12 @@ set_value_component_location (struct value *component, if (funcs->copy_closure) component->location.computed.closure = funcs->copy_closure (whole); } @@ -8338,7 +8203,7 @@ index 4b70ece..7449c2a 100644 } -@@ -1581,6 +1591,31 @@ show_values (char *num_exp, int from_tty) +@@ -1594,6 +1604,31 @@ show_values (char *num_exp, int from_tty) num_exp[1] = '\0'; } } @@ -8370,7 +8235,7 @@ index 4b70ece..7449c2a 100644 /* Internal variables. These are variables within the debugger that hold values assigned by debugger commands. -@@ -2116,6 +2151,38 @@ call_internal_function (struct gdbarch *gdbarch, +@@ -2129,6 +2164,38 @@ call_internal_function (struct gdbarch *gdbarch, return (*ifn->handler) (gdbarch, language, ifn->cookie, argc, argv); } @@ -8409,7 +8274,7 @@ index 4b70ece..7449c2a 100644 /* The 'function' command. This does nothing -- it is just a placeholder to let "help function NAME" work. This is also used as the implementation of the sub-command that is created when -@@ -2163,11 +2230,10 @@ preserve_one_value (struct value *value, struct objfile *objfile, +@@ -2176,11 +2243,10 @@ preserve_one_value (struct value *value, struct objfile *objfile, htab_t copied_types) { if (TYPE_OBJFILE (value->type) == objfile) @@ -8423,7 +8288,7 @@ index 4b70ece..7449c2a 100644 copied_types); } -@@ -2182,7 +2248,7 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile, +@@ -2195,7 +2261,7 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile, case INTERNALVAR_INTEGER: if (var->u.integer.type && TYPE_OBJFILE (var->u.integer.type) == objfile) var->u.integer.type @@ -8432,7 +8297,7 @@ index 4b70ece..7449c2a 100644 break; case INTERNALVAR_VALUE: -@@ -3280,10 +3346,27 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type, +@@ -3308,10 +3374,27 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type, struct value * coerce_ref (struct value *arg) { @@ -8461,7 +8326,48 @@ index 4b70ece..7449c2a 100644 retval = coerce_ref_if_computed (arg); if (retval) return retval; -@@ -3405,4 +3488,10 @@ VARIABLE is already initialized.")); +@@ -3419,7 +3502,8 @@ int + value_fetch_lazy (struct value *val) + { + gdb_assert (value_lazy (val)); +- allocate_value_contents (val); ++ if (VALUE_LVAL (val) != lval_memory) ++ allocate_value_contents (val); + if (value_bitsize (val)) + { + /* To read a lazy bitfield, read the entire enclosing value. This +@@ -3454,13 +3538,24 @@ value_fetch_lazy (struct value *val) + } + else if (VALUE_LVAL (val) == lval_memory) + { +- CORE_ADDR addr = value_address (val); +- struct type *type = check_typedef (value_enclosing_type (val)); ++ CORE_ADDR addr = value_raw_address (val); ++ ++ if (object_address_get_data (value_type (val), &addr)) ++ { ++ struct type *type = value_enclosing_type (val); ++ int length = TYPE_LENGTH (check_typedef (type)); + +- if (TYPE_LENGTH (type)) +- read_value_memory (val, 0, value_stack (val), +- addr, value_contents_all_raw (val), +- TYPE_LENGTH (type)); ++ if (length) ++ { ++ /* 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); ++ } ++ } ++ /* Just to be sure it has been called. */ ++ allocate_value_contents (val); + } + else if (VALUE_LVAL (val) == lval_register) + { +@@ -3599,4 +3694,10 @@ VARIABLE is already initialized.")); add_prefix_cmd ("function", no_class, function_command, _("\ Placeholder command for showing help on convenience functions."), &functionlist, "function ", 0, &cmdlist); @@ -8473,10 +8379,10 @@ index 4b70ece..7449c2a 100644 +#endif } diff --git a/gdb/value.h b/gdb/value.h -index c10c3ec..8d07348 100644 +index 5e00c89..d9efe3e 100644 --- a/gdb/value.h +++ b/gdb/value.h -@@ -537,6 +537,10 @@ extern struct value *value_from_decfloat (struct type *type, +@@ -548,6 +548,10 @@ extern struct value *value_from_decfloat (struct type *type, const gdb_byte *decbytes); extern struct value *value_from_history_ref (char *, char **); diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index a98e256..73e3f97 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -37,10 +37,10 @@ gdb/gdbserver/ (linux_create_inferior, linux_tracefork_child): Call it instead of direct ptrace. -Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c +Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.c 2013-01-08 20:38:51.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.c 2013-02-15 22:38:05.782456279 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/common/linux-ptrace.c 2013-08-02 16:33:52.767872412 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c 2013-08-02 16:34:16.122910934 +0200 @@ -29,6 +29,10 @@ #include "gdb_assert.h" #include "gdb_wait.h" @@ -61,7 +61,7 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c } #if defined __i386__ || defined __x86_64__ -@@ -243,3 +249,19 @@ linux_ptrace_init_warnings (void) +@@ -236,3 +242,19 @@ linux_ptrace_init_warnings (void) linux_ptrace_test_ret_to_nx (); } @@ -81,10 +81,10 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c + "(gdb) shell sudo setsebool deny_ptrace=0")); +#endif /* HAVE_LIBSELINUX */ +} -Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.h +Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.h 2013-01-01 07:32:54.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.h 2013-02-15 22:38:05.782456279 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/common/linux-ptrace.h 2013-08-02 16:33:52.768872414 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.h 2013-08-02 16:34:16.122910934 +0200 @@ -69,5 +69,6 @@ struct buffer; extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer); @@ -92,13 +92,13 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.h +extern void linux_ptrace_create_warnings (struct buffer *buffer); #endif /* COMMON_LINUX_PTRACE_H */ -Index: gdb-7.5.50.20130215/gdb/configure.ac +Index: gdb-7.6.50.20130731-cvs/gdb/configure.ac =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-02-15 22:37:57.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:38:05.783456281 +0100 -@@ -2068,6 +2068,10 @@ then - [Define if you support the personality syscall.]) - fi +--- gdb-7.6.50.20130731-cvs.orig/gdb/configure.ac 2013-08-02 16:34:16.123910936 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/configure.ac 2013-08-02 16:34:46.519960063 +0200 +@@ -2071,6 +2071,10 @@ case $host_os in + esac + AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) +dnl Check security_get_boolean_active availability. +AC_CHECK_HEADERS(selinux/selinux.h) @@ -107,11 +107,11 @@ Index: gdb-7.5.50.20130215/gdb/configure.ac dnl Handle optional features that can be enabled. # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, -Index: gdb-7.5.50.20130215/gdb/gdbserver/configure.ac +Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure.ac =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gdbserver/configure.ac 2013-01-01 07:33:00.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gdbserver/configure.ac 2013-02-15 22:38:05.783456281 +0100 -@@ -451,6 +451,10 @@ if $want_ipa ; then +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/configure.ac 2013-08-02 16:34:16.124910938 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure.ac 2013-08-02 16:35:06.634991892 +0200 +@@ -471,6 +471,10 @@ if $want_ipa ; then fi fi @@ -121,12 +121,12 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/configure.ac + AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_LIBS) - AC_SUBST(USE_THREAD_DB) -Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c + AC_SUBST(srv_xmlbuiltin) +Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gdbserver/linux-low.c 2013-02-04 18:47:00.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c 2013-02-15 22:39:54.256591069 +0100 -@@ -602,6 +602,29 @@ add_lwp (ptid_t ptid) +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/linux-low.c 2013-08-02 16:33:52.772872421 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c 2013-08-02 16:34:16.126910941 +0200 +@@ -622,6 +622,29 @@ add_lwp (ptid_t ptid) return lwp; } @@ -156,7 +156,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c /* Start an inferior process and returns its pid. ALLARGS is a vector of program-name and args. */ -@@ -642,7 +665,7 @@ linux_create_inferior (char *program, ch +@@ -662,7 +685,7 @@ linux_create_inferior (char *program, ch if (pid == 0) { @@ -165,7 +165,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */ signal (__SIGRTMIN + 1, SIG_DFL); -@@ -4587,7 +4610,7 @@ linux_tracefork_grandchild (void *arg) +@@ -4685,7 +4708,7 @@ linux_tracefork_grandchild (void *arg) static int linux_tracefork_child (void *arg) { @@ -174,10 +174,10 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c kill (getpid (), SIGSTOP); #if !(defined(__UCLIBC__) && defined(HAS_NOMMU)) -Index: gdb-7.5.50.20130215/gdb/inf-ptrace.c +Index: gdb-7.6.50.20130731-cvs/gdb/inf-ptrace.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/inf-ptrace.c 2013-01-01 07:32:45.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/inf-ptrace.c 2013-02-15 22:38:05.786456289 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/inf-ptrace.c 2013-08-02 16:33:52.772872421 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/inf-ptrace.c 2013-08-02 16:34:16.126910941 +0200 @@ -104,7 +104,15 @@ static void inf_ptrace_me (void) { @@ -194,11 +194,11 @@ Index: gdb-7.5.50.20130215/gdb/inf-ptrace.c } /* Start a new inferior Unix child process. EXEC_FILE is the file to -Index: gdb-7.5.50.20130215/gdb/linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-15 22:34:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:38:05.787456291 +0100 -@@ -1557,6 +1557,7 @@ linux_nat_create_inferior (struct target +--- gdb-7.6.50.20130731-cvs.orig/gdb/linux-nat.c 2013-08-02 16:33:52.774872424 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/linux-nat.c 2013-08-02 16:34:16.128910944 +0200 +@@ -1554,6 +1554,7 @@ linux_nat_create_inferior (struct target #ifdef HAVE_PERSONALITY int personality_orig = 0, personality_set = 0; #endif /* HAVE_PERSONALITY */ @@ -206,7 +206,7 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c /* The fork_child mechanism is synchronous and calls target_wait, so we have to mask the async mode. */ -@@ -1581,7 +1582,10 @@ linux_nat_create_inferior (struct target +@@ -1578,7 +1579,10 @@ linux_nat_create_inferior (struct target /* Make sure we report all signals during startup. */ linux_nat_pass_signals (0, NULL); @@ -218,7 +218,7 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c #ifdef HAVE_PERSONALITY if (personality_set) -@@ -1593,6 +1597,24 @@ linux_nat_create_inferior (struct target +@@ -1590,6 +1594,24 @@ linux_nat_create_inferior (struct target safe_strerror (errno)); } #endif /* HAVE_PERSONALITY */ @@ -243,3 +243,192 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c } static void +Index: gdb-7.6.50.20130731-cvs/gdb/config.in +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/config.in 2013-08-02 16:25:27.339097561 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/config.in 2013-08-02 16:36:16.249099841 +0200 +@@ -225,6 +225,9 @@ + /* Define if librpm library is being used. */ + #undef HAVE_LIBRPM + ++/* Define to 1 if you have the `selinux' library (-lselinux). */ ++#undef HAVE_LIBSELINUX ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_LIBUNWIND_IA64_H + +@@ -372,6 +375,9 @@ + /* Define to 1 if you have the `sbrk' function. */ + #undef HAVE_SBRK + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SELINUX_SELINUX_H ++ + /* Define to 1 if you have the `setlocale' function. */ + #undef HAVE_SETLOCALE + +Index: gdb-7.6.50.20130731-cvs/gdb/configure +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/configure 2013-08-02 16:25:27.343097567 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/configure 2013-08-02 16:36:14.665097434 +0200 +@@ -12851,6 +12851,64 @@ cat >>confdefs.h <<_ACEOF + _ACEOF + + ++for ac_header in selinux/selinux.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" ++if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SELINUX_SELINUX_H 1 ++_ACEOF ++ ++fi ++ ++done ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5 ++$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; } ++if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lselinux $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char security_get_boolean_active (); ++int ++main () ++{ ++return security_get_boolean_active (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_selinux_security_get_boolean_active=yes ++else ++ ac_cv_lib_selinux_security_get_boolean_active=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5 ++$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; } ++if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBSELINUX 1 ++_ACEOF ++ ++ LIBS="-lselinux $LIBS" ++ ++fi ++ ++ + + # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, + # except that the argument to --with-sysroot is optional. +Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/config.in +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/config.in 2013-07-31 21:41:54.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/config.in 2013-08-02 16:36:21.719108141 +0200 +@@ -76,6 +76,12 @@ + /* Define to 1 if you have the `dl' library (-ldl). */ + #undef HAVE_LIBDL + ++/* Define to 1 if you have the `mcheck' library (-lmcheck). */ ++#undef HAVE_LIBMCHECK ++ ++/* Define to 1 if you have the `selinux' library (-lselinux). */ ++#undef HAVE_LIBSELINUX ++ + /* Define if the target supports branch tracing. */ + #undef HAVE_LINUX_BTRACE + +@@ -146,6 +152,9 @@ + /* Define to 1 if you have the `readlink' function. */ + #undef HAVE_READLINK + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SELINUX_SELINUX_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_SGTTY_H + +Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure +=================================================================== +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/configure 2013-07-31 21:41:54.000000000 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure 2013-08-02 16:36:20.237105894 +0200 +@@ -6003,6 +6003,64 @@ if $want_ipa ; then + fi + fi + ++for ac_header in selinux/selinux.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" ++if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SELINUX_SELINUX_H 1 ++_ACEOF ++ ++fi ++ ++done ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5 ++$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; } ++if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lselinux $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char security_get_boolean_active (); ++int ++main () ++{ ++return security_get_boolean_active (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_selinux_security_get_boolean_active=yes ++else ++ ac_cv_lib_selinux_security_get_boolean_active=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5 ++$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; } ++if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBSELINUX 1 ++_ACEOF ++ ++ LIBS="-lselinux $LIBS" ++ ++fi ++ ++ + + + diff --git a/gdb-attach-fail-reasons-5of5configure.patch b/gdb-attach-fail-reasons-5of5configure.patch deleted file mode 100644 index 76b80ee..0000000 --- a/gdb-attach-fail-reasons-5of5configure.patch +++ /dev/null @@ -1,186 +0,0 @@ -Index: gdb-7.5.91.20130323/gdb/config.in -=================================================================== ---- gdb-7.5.91.20130323.orig/gdb/config.in 2013-03-23 19:48:18.000000000 +0100 -+++ gdb-7.5.91.20130323/gdb/config.in 2013-03-23 19:50:53.300066378 +0100 -@@ -216,6 +216,9 @@ - /* Define if librpm library is being used. */ - #undef HAVE_LIBRPM - -+/* Define to 1 if you have the `selinux' library (-lselinux). */ -+#undef HAVE_LIBSELINUX -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_LIBUNWIND_IA64_H - -@@ -360,6 +363,9 @@ - /* Define to 1 if you have the `sbrk' function. */ - #undef HAVE_SBRK - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SELINUX_SELINUX_H -+ - /* Define to 1 if you have the `setlocale' function. */ - #undef HAVE_SETLOCALE - -Index: gdb-7.5.91.20130323/gdb/configure -=================================================================== ---- gdb-7.5.91.20130323.orig/gdb/configure 2013-03-23 19:48:18.000000000 +0100 -+++ gdb-7.5.91.20130323/gdb/configure 2013-03-23 19:50:53.303066376 +0100 -@@ -12814,6 +12814,64 @@ $as_echo "#define HAVE_PERSONALITY 1" >> - - fi - -+for ac_header in selinux/selinux.h -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" -+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_SELINUX_SELINUX_H 1 -+_ACEOF -+ -+fi -+ -+done -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5 -+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; } -+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lselinux $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char security_get_boolean_active (); -+int -+main () -+{ -+return security_get_boolean_active (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_selinux_security_get_boolean_active=yes -+else -+ ac_cv_lib_selinux_security_get_boolean_active=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5 -+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; } -+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBSELINUX 1 -+_ACEOF -+ -+ LIBS="-lselinux $LIBS" -+ -+fi -+ -+ - - # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, - # except that the argument to --with-sysroot is optional. -Index: gdb-7.5.91.20130323/gdb/gdbserver/config.in -=================================================================== ---- gdb-7.5.91.20130323.orig/gdb/gdbserver/config.in 2013-03-11 09:35:09.000000000 +0100 -+++ gdb-7.5.91.20130323/gdb/gdbserver/config.in 2013-03-23 19:51:14.323052419 +0100 -@@ -73,6 +73,9 @@ - /* Define to 1 if you have the `dl' library (-ldl). */ - #undef HAVE_LIBDL - -+/* Define to 1 if you have the `selinux' library (-lselinux). */ -+#undef HAVE_LIBSELINUX -+ - /* Define if the target supports branch tracing. */ - #undef HAVE_LINUX_BTRACE - -@@ -140,6 +143,9 @@ - /* Define to 1 if you have the `readlink' function. */ - #undef HAVE_READLINK - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SELINUX_SELINUX_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_SGTTY_H - -Index: gdb-7.5.91.20130323/gdb/gdbserver/configure -=================================================================== ---- gdb-7.5.91.20130323.orig/gdb/gdbserver/configure 2013-03-11 09:35:09.000000000 +0100 -+++ gdb-7.5.91.20130323/gdb/gdbserver/configure 2013-03-23 19:50:53.305066374 +0100 -@@ -5911,6 +5911,64 @@ if $want_ipa ; then - fi - fi - -+for ac_header in selinux/selinux.h -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" -+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_SELINUX_SELINUX_H 1 -+_ACEOF -+ -+fi -+ -+done -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5 -+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; } -+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lselinux $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char security_get_boolean_active (); -+int -+main () -+{ -+return security_get_boolean_active (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_selinux_security_get_boolean_active=yes -+else -+ ac_cv_lib_selinux_security_get_boolean_active=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5 -+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; } -+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBSELINUX 1 -+_ACEOF -+ -+ LIBS="-lselinux $LIBS" -+ -+fi -+ -+ - - - diff --git a/gdb-bz533176-fortran-omp-step.patch b/gdb-bz533176-fortran-omp-step.patch index 0725ad2..1978d5e 100644 --- a/gdb-bz533176-fortran-omp-step.patch +++ b/gdb-bz533176-fortran-omp-step.patch @@ -21,16 +21,16 @@ debugging problem of GOMP outside of the scope of this Bug. -Index: gdb-7.5.50.20130118/gdb/infrun.c +Index: gdb-7.6.50.20130731-cvs/gdb/infrun.c =================================================================== ---- 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: +--- gdb-7.6.50.20130731-cvs.orig/gdb/infrun.c 2013-08-02 17:10:08.446962958 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/infrun.c 2013-08-02 17:10:49.109016685 +0200 +@@ -4930,6 +4930,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); ++ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc).minsym; + + if ((stop_fn == NULL + || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL) @@ -42,7 +42,7 @@ Index: gdb-7.5.50.20130118/gdb/infrun.c /* We're doing a "next". Normal (forward) execution: set a breakpoint at the -@@ -4953,6 +4963,7 @@ process_event_stop_test: +@@ -4965,6 +4975,7 @@ process_event_stop_test: keep_going (ecs); return; @@ -50,10 +50,10 @@ Index: gdb-7.5.50.20130118/gdb/infrun.c } /* If we are in a function call trampoline (a stub between the -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp 2013-01-19 23:38:23.213372622 +0100 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.exp 2013-08-02 17:10:37.063000571 +0200 @@ -0,0 +1,31 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -86,10 +86,10 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.exp + +gdb_breakpoint [gdb_get_line_number "success"] +gdb_continue_to_breakpoint "success" ".*success.*" -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.f90 +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.50.20130118/gdb/testsuite/gdb.fortran/omp-step.f90 2013-01-19 23:38:23.213372622 +0100 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.f90 2013-08-02 17:10:37.063000571 +0200 @@ -0,0 +1,32 @@ +! Copyright 2009 Free Software Foundation, Inc. + diff --git a/gdb-core-open-vdso-warning.patch b/gdb-core-open-vdso-warning.patch index cafd844..6c42e5a 100644 --- a/gdb-core-open-vdso-warning.patch +++ b/gdb-core-open-vdso-warning.patch @@ -3,11 +3,11 @@ Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Inp [ New patch variant. ] -Index: gdb-7.5.50.20130118/gdb/solib-svr4.c +Index: gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c =================================================================== ---- 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 +--- gdb-7.6.50.20130731-cvs.orig/gdb/solib-svr4.c 2013-08-02 16:27:28.831259468 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/solib-svr4.c 2013-08-02 16:27:47.871284813 +0200 +@@ -1359,8 +1359,17 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD SO_NAME_MAX_PATH_SIZE - 1, &errcode); if (errcode != 0) { @@ -27,20 +27,20 @@ Index: gdb-7.5.50.20130118/gdb/solib-svr4.c do_cleanups (old_chain); continue; } -Index: gdb-7.5.50.20130118/gdb/solib.c +Index: gdb-7.6.50.20130731-cvs/gdb/solib.c =================================================================== ---- 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 +--- gdb-7.6.50.20130731-cvs.orig/gdb/solib.c 2013-08-02 16:27:28.832259470 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/solib.c 2013-08-02 16:28:50.421367694 +0200 +@@ -669,7 +669,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 ()); + const struct target_so_ops *ops = solib_ops (target_gdbarch ()); struct so_list *inferior = ops->current_sos(); -@@ -837,6 +837,21 @@ Do you need \"set solib-search-path\" or +@@ -840,6 +840,21 @@ Do you need \"set solib-search-path\" or } } @@ -62,11 +62,11 @@ Index: gdb-7.5.50.20130118/gdb/solib.c /* Return non-zero if NAME is the libpthread shared library. -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/corefile.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp =================================================================== ---- 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-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/corefile.exp 2013-08-02 16:27:28.833259471 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/corefile.exp 2013-08-02 16:27:47.872284814 +0200 +@@ -285,3 +285,19 @@ if {$buildid == ""} { gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*" pass $wholetest } @@ -86,20 +86,18 @@ Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/corefile.exp + pass $test + } +} -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/solib-symbol.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp =================================================================== ---- 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" +--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:27:28.833259471 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:28:22.549330973 +0200 +@@ -29,6 +29,7 @@ set testfile "solib-symbol-main" set srcfile ${srcdir}/${subdir}/${testfile}.c --set binfile ${objdir}/${subdir}/${testfile} -+set executable ${testfile} -+set binfile ${objdir}/${subdir}/${executable} + set binfile [standard_output_file ${testfile}] set bin_flags [list debug shlib=${binfile_lib}] ++set executable ${testfile} if [get_compiler_info] { + return -1 @@ -72,8 +73,26 @@ gdb_test "br foo2" \ "Breakpoint.*: foo2. .2 locations..*" \ "foo2 in mdlib" diff --git a/gdb-cxx-performance-1of2.patch b/gdb-cxx-performance-1of2.patch deleted file mode 100644 index 90773ec..0000000 --- a/gdb-cxx-performance-1of2.patch +++ /dev/null @@ -1,209 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00034.html - -### src/gdb/ChangeLog 2013/06/05 20:43:53 1.15689 -### src/gdb/ChangeLog 2013/06/05 22:28:51 1.15690 -## -1,3 +1,14 @@ -+2013-06-05 Doug Evans -+ Keith Seitz -+ -+ PR 15519 -+ * cp-namespace.c (find_symbol_in_baseclass): Call -+ cp_lookup_symbol_in_namespace instead of cp_lookup_symbol_namespace. -+ Check result of call to lookup_symbol_static. -+ Call lookup_static_symbol_aux unconditionally. -+ Call check_typedef on base types before accessing them. -+ (cp_lookup_nested_symbol): Fix comment. -+ - 2013-06-05 Luis Machado - - * gnu-v3-abi.c (gnuv3_skip_trampoline): Handle thunk ---- src/gdb/cp-namespace.c 2013/05/30 17:29:06 1.67 -+++ src/gdb/cp-namespace.c 2013/06/05 22:28:51 1.68 -@@ -720,36 +720,40 @@ - for (i = 0; i < TYPE_N_BASECLASSES (parent_type); ++i) - { - size_t len; -+ struct type *base_type = TYPE_BASECLASS (parent_type, i); - const char *base_name = TYPE_BASECLASS_NAME (parent_type, i); - - if (base_name == NULL) - continue; - - /* Search this particular base class. */ -- sym = cp_lookup_symbol_namespace (base_name, name, block, VAR_DOMAIN); -+ sym = cp_lookup_symbol_in_namespace (base_name, name, block, -+ VAR_DOMAIN, 0); - if (sym != NULL) - break; - -+ /* Now search all static file-level symbols. We have to do this for -+ things like typedefs in the class. First search in this symtab, -+ what we want is possibly there. */ - len = strlen (base_name) + 2 + strlen (name) + 1; - concatenated_name = xrealloc (concatenated_name, len); - xsnprintf (concatenated_name, len, "%s::%s", base_name, name); - sym = lookup_symbol_static (concatenated_name, block, VAR_DOMAIN); -+ if (sym != NULL) -+ break; - -- /* If there is currently no BLOCK, e.g., the inferior hasn't yet -- been started, then try searching all STATIC_BLOCK symbols in -- all objfiles. */ -- if (block == NULL) -- { -- sym = lookup_static_symbol_aux (concatenated_name, VAR_DOMAIN); -- if (sym != NULL) -- break; -- } -+ /* Nope. We now have to search all static blocks in all objfiles, -+ even if block != NULL, because there's no guarantees as to which -+ symtab the symbol we want is in. */ -+ sym = lookup_static_symbol_aux (concatenated_name, VAR_DOMAIN); -+ if (sym != NULL) -+ break; - - /* If this class has base classes, search them next. */ -- if (TYPE_N_BASECLASSES (TYPE_BASECLASS (parent_type, i)) > 0) -+ CHECK_TYPEDEF (base_type); -+ if (TYPE_N_BASECLASSES (base_type) > 0) - { -- sym = find_symbol_in_baseclass (TYPE_BASECLASS (parent_type, i), -- name, block); -+ sym = find_symbol_in_baseclass (base_type, name, block); - if (sym != NULL) - break; - } -@@ -797,8 +801,8 @@ - if (sym != NULL) - return sym; - -- /* Now search all static file-level symbols. Not strictly -- correct, but more useful than an error. We do not try to -+ /* Now search all static file-level symbols. We have to do this -+ for things like typedefs in the class. We do not try to - guess any imported namespace as even the fully specified - namespace search is already not C++ compliant and more - assumptions could make it too magic. */ -### src/gdb/testsuite/ChangeLog 2013/06/05 20:38:37 1.3685 -### src/gdb/testsuite/ChangeLog 2013/06/05 22:28:51 1.3686 -## -1,3 +1,11 @@ -+2013-06-05 Doug Evans -+ Keith Seitz -+ -+ * gdb.cp/derivation2.cc: New file. -+ * gdb.cp/derivation.cc (main): Call foo2. -+ * gdb.cp/derivation.exp: Add tests for typedefs in another -+ file, and when there's an active block. -+ - 2013-06-05 Luis Machado - - * gdb.cp/virtfunc.exp (make_one_vtable_result): Handle extra output ---- src/gdb/testsuite/gdb.cp/derivation2.cc -+++ src/gdb/testsuite/gdb.cp/derivation2.cc 2013-06-10 12:35:14.881272247 +0000 -@@ -0,0 +1,49 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2013 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 . -+ */ -+ -+/* A copy of some classes in derivation.cc so that we can test symbol lookup -+ in other CUs. */ -+ -+class A2 { -+public: -+ typedef int value_type; -+ value_type a; -+ -+ A2() -+ { -+ a=1; -+ } -+}; -+ -+class D2 : public A2 { -+public: -+ value_type d; -+ -+ D2() -+ { -+ d=7; -+ } -+}; -+ -+void -+foo2 () -+{ -+ D2 d2_instance; -+ d2_instance.a = 42; -+ d2_instance.d = 43; -+} ---- src/gdb/testsuite/gdb.cp/derivation.cc 2013/01/01 06:33:27 1.5 -+++ src/gdb/testsuite/gdb.cp/derivation.cc 2013/06/05 22:28:51 1.6 -@@ -16,6 +16,8 @@ - along with this program. If not, see . - */ - -+extern void foo2 (); /* from derivation2.cc */ -+ - namespace N { - typedef double value_type; - struct Base { typedef int value_type; }; -@@ -306,9 +308,7 @@ - N::Derived::value_type d = 1; - N::value_type n = 3.0; - dobj.doit (); -+ foo2 (); - return 0; - - } -- -- -- ---- src/gdb/testsuite/gdb.cp/derivation.exp 2013/01/01 06:33:27 1.24 -+++ src/gdb/testsuite/gdb.cp/derivation.exp 2013/06/05 22:28:51 1.25 -@@ -32,14 +32,15 @@ - - load_lib "cp-support.exp" - --standard_testfile .cc -+standard_testfile derivation.cc derivation2.cc - --if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { -+if {[prepare_for_testing $testfile.exp $testfile \ -+ [list $srcfile $srcfile2] {debug c++}]} { - return -1 - } - - # Check inheritance of typedefs. --foreach klass {"A" "D" "E" "F"} { -+foreach klass {"A" "D" "E" "F" "A2" "D2"} { - gdb_test "ptype ${klass}::value_type" "type = int" - gdb_test "whatis ${klass}::value_type" "type = int" - gdb_test "p (${klass}::value_type) 0" " = 0" -@@ -57,6 +58,13 @@ - continue - } - -+# Check inheritance of typedefs again, but this time with an active block. -+foreach klass {"A" "D" "A2" "D2"} { -+ gdb_test "ptype ${klass}::value_type" "type = int" -+ gdb_test "whatis ${klass}::value_type" "type = int" -+ gdb_test "p (${klass}::value_type) 0" " = 0" -+} -+ - gdb_test "up" ".*main.*" "up from marker1" - - # Print class types and values. diff --git a/gdb-cxx-performance-2of2.patch b/gdb-cxx-performance-2of2.patch deleted file mode 100644 index 205698d..0000000 --- a/gdb-cxx-performance-2of2.patch +++ /dev/null @@ -1,58 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00044.html - -### src/gdb/testsuite/ChangeLog 2013/06/06 19:00:13 1.3688 -### src/gdb/testsuite/ChangeLog 2013/06/06 19:02:26 1.3689 -## -1,3 +1,7 @@ -+2013-06-06 Doug Evans -+ -+ * gdb.cp/derivation.exp: Make tests have unique names. -+ - 2013-06-06 Tom Tromey - - * gdb.base/dump.exp (capture_value): Don't put expression into ---- src/gdb/testsuite/gdb.cp/derivation.exp 2013/06/05 22:28:51 1.25 -+++ src/gdb/testsuite/gdb.cp/derivation.exp 2013/06/06 19:02:27 1.26 -@@ -40,15 +40,17 @@ - } - - # Check inheritance of typedefs. --foreach klass {"A" "D" "E" "F" "A2" "D2"} { -- gdb_test "ptype ${klass}::value_type" "type = int" -- gdb_test "whatis ${klass}::value_type" "type = int" -- gdb_test "p (${klass}::value_type) 0" " = 0" --} --foreach klass {"Z" "ZZ"} { -- gdb_test "ptype ${klass}::value_type" "type = float" -- gdb_test "whatis ${klass}::value_type" "type = float" -- gdb_test "p (${klass}::value_type) 0" " = 0" -+with_test_prefix "before run" { -+ foreach klass {"A" "D" "E" "F" "A2" "D2"} { -+ gdb_test "ptype ${klass}::value_type" "type = int" -+ gdb_test "whatis ${klass}::value_type" "type = int" -+ gdb_test "p (${klass}::value_type) 0" " = 0" -+ } -+ foreach klass {"Z" "ZZ"} { -+ gdb_test "ptype ${klass}::value_type" "type = float" -+ gdb_test "whatis ${klass}::value_type" "type = float" -+ gdb_test "p (${klass}::value_type) 0" " = 0" -+ } - } - - # Set it up at a breakpoint so we can play with the variable values. -@@ -59,10 +61,12 @@ - } - - # Check inheritance of typedefs again, but this time with an active block. --foreach klass {"A" "D" "A2" "D2"} { -- gdb_test "ptype ${klass}::value_type" "type = int" -- gdb_test "whatis ${klass}::value_type" "type = int" -- gdb_test "p (${klass}::value_type) 0" " = 0" -+with_test_prefix "at marker1" { -+ foreach klass {"A" "D" "A2" "D2"} { -+ gdb_test "ptype ${klass}::value_type" "type = int" -+ gdb_test "whatis ${klass}::value_type" "type = int" -+ gdb_test "p (${klass}::value_type) 0" " = 0" -+ } - } - - gdb_test "up" ".*main.*" "up from marker1" diff --git a/gdb-dlopen-stap-probe-1of9.patch b/gdb-dlopen-stap-probe-1of9.patch deleted file mode 100644 index 2419dc9..0000000 --- a/gdb-dlopen-stap-probe-1of9.patch +++ /dev/null @@ -1,102 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00012.html - -### src/gdb/ChangeLog 2013/06/04 02:44:34 1.15680 -### src/gdb/ChangeLog 2013/06/04 12:50:20 1.15681 -## -1,3 +1,11 @@ -+2013-06-04 Gary Benson -+ -+ * probe.h (get_probe_argument_count): New declaration. -+ (evaluate_probe_argument): Likewise. -+ * probe.c (get_probe_argument_count): New function. -+ (evaluate_probe_argument): Likewise. -+ (probe_safe_evaluate_at_pc): Use the above new functions. -+ - 2013-06-04 Alan Modra - - * ppc-tdep.h (ppc_insns_match_pattern): Update prototype. ---- src/gdb/probe.c 2013/05/30 17:39:34 1.8 -+++ src/gdb/probe.c 2013/06/04 12:50:20 1.9 -@@ -611,28 +611,55 @@ - - /* See comments in probe.h. */ - -+unsigned -+get_probe_argument_count (struct probe *probe) -+{ -+ const struct sym_probe_fns *probe_fns; -+ -+ gdb_assert (probe->objfile != NULL); -+ gdb_assert (probe->objfile->sf != NULL); -+ -+ probe_fns = probe->objfile->sf->sym_probe_fns; -+ -+ gdb_assert (probe_fns != NULL); -+ -+ return probe_fns->sym_get_probe_argument_count (probe); -+} -+ -+/* See comments in probe.h. */ -+ -+struct value * -+evaluate_probe_argument (struct probe *probe, unsigned n) -+{ -+ const struct sym_probe_fns *probe_fns; -+ -+ gdb_assert (probe->objfile != NULL); -+ gdb_assert (probe->objfile->sf != NULL); -+ -+ probe_fns = probe->objfile->sf->sym_probe_fns; -+ -+ gdb_assert (probe_fns != NULL); -+ -+ return probe_fns->sym_evaluate_probe_argument (probe, n); -+} -+ -+/* See comments in probe.h. */ -+ - struct value * - probe_safe_evaluate_at_pc (struct frame_info *frame, unsigned n) - { - struct probe *probe; -- const struct sym_probe_fns *probe_fns; - unsigned n_args; - - probe = find_probe_by_pc (get_frame_pc (frame)); - if (!probe) - return NULL; - -- 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_args = probe_fns->sym_get_probe_argument_count (probe); -- -+ n_args = get_probe_argument_count (probe); - if (n >= n_args) - return NULL; - -- return probe_fns->sym_evaluate_probe_argument (probe, n); -+ return evaluate_probe_argument (probe, n); - } - - /* See comment in probe.h. */ ---- src/gdb/probe.h 2013/01/01 06:32:49 1.4 -+++ src/gdb/probe.h 2013/06/04 12:50:21 1.5 -@@ -214,6 +214,16 @@ - - extern struct cmd_list_element **info_probes_cmdlist_get (void); - -+/* Return the argument count of the specified probe. */ -+ -+extern unsigned get_probe_argument_count (struct probe *probe); -+ -+/* Evaluate argument N of the specified probe. N must be between 0 -+ inclusive and get_probe_argument_count exclusive. */ -+ -+extern struct value *evaluate_probe_argument (struct probe *probe, -+ unsigned n); -+ - /* A convenience function that finds a probe at the PC in FRAME and - evaluates argument N, with 0 <= N < number_of_args. If there is no - probe at that location, or if the probe does not have enough arguments, diff --git a/gdb-dlopen-stap-probe-2of9.patch b/gdb-dlopen-stap-probe-2of9.patch deleted file mode 100644 index 131a79a..0000000 --- a/gdb-dlopen-stap-probe-2of9.patch +++ /dev/null @@ -1,181 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00013.html - -### src/gdb/ChangeLog 2013/06/04 12:50:20 1.15681 -### src/gdb/ChangeLog 2013/06/04 12:53:33 1.15682 -## -1,5 +1,24 @@ - 2013-06-04 Gary Benson - -+ * objfiles.h (inhibit_section_map_updates): New function -+ declaration. -+ (resume_section_map_updates): Likewise. -+ (resume_section_map_updates_cleanup): Likewise. -+ * objfiles.c (objfile_pspace_info): Removed field -+ "objfiles_changed_p". New fields "new_objfiles_available", -+ "section_map_dirty" and "inhibit_updates". -+ (allocate_objfile): Set new_objfiles_available. -+ (free_objfile): Set section_map_dirty. -+ (objfile_relocate1): Likewise. -+ (in_plt_section): Likewise. -+ (find_pc_section): Update the conditions under which the -+ section map will be updated. -+ (inhibit_section_map_updates): New function. -+ (resume_section_map_updates): Likewise. -+ (resume_section_map_updates_cleanup): Likewise. -+ -+2013-06-04 Gary Benson -+ - * probe.h (get_probe_argument_count): New declaration. - (evaluate_probe_argument): Likewise. - * probe.c (get_probe_argument_count): New function. ---- src/gdb/objfiles.c 2013/05/06 19:15:17 1.160 -+++ src/gdb/objfiles.c 2013/06/04 12:53:34 1.161 -@@ -67,9 +67,18 @@ - - struct objfile_pspace_info - { -- int objfiles_changed_p; - struct obj_section **sections; - int num_sections; -+ -+ /* Nonzero if object files have been added since the section map -+ was last updated. */ -+ int new_objfiles_available; -+ -+ /* Nonzero if the section map MUST be updated before use. */ -+ int section_map_dirty; -+ -+ /* Nonzero if section map updates should be inhibited if possible. */ -+ int inhibit_updates; - }; - - /* Per-program-space data key. */ -@@ -317,7 +326,7 @@ - objfile->flags |= flags; - - /* Rebuild section map next time we need it. */ -- get_objfile_pspace_data (objfile->pspace)->objfiles_changed_p = 1; -+ get_objfile_pspace_data (objfile->pspace)->new_objfiles_available = 1; - - return objfile; - } -@@ -646,7 +655,7 @@ - obstack_free (&objfile->objfile_obstack, 0); - - /* Rebuild section map next time we need it. */ -- get_objfile_pspace_data (objfile->pspace)->objfiles_changed_p = 1; -+ get_objfile_pspace_data (objfile->pspace)->section_map_dirty = 1; - - xfree (objfile); - } -@@ -826,7 +835,7 @@ - } - - /* Rebuild section map next time we need it. */ -- get_objfile_pspace_data (objfile->pspace)->objfiles_changed_p = 1; -+ get_objfile_pspace_data (objfile->pspace)->section_map_dirty = 1; - - /* Update the table in exec_ops, used to read memory. */ - ALL_OBJFILE_OSECTIONS (objfile, s) -@@ -1291,11 +1300,14 @@ - update_section_map (struct program_space *pspace, - struct obj_section ***pmap, int *pmap_size) - { -+ struct objfile_pspace_info *pspace_info; - int alloc_size, map_size, i; - struct obj_section *s, **map; - struct objfile *objfile; - -- gdb_assert (get_objfile_pspace_data (pspace)->objfiles_changed_p != 0); -+ pspace_info = get_objfile_pspace_data (pspace); -+ gdb_assert (pspace_info->section_map_dirty != 0 -+ || pspace_info->new_objfiles_available != 0); - - map = *pmap; - xfree (map); -@@ -1365,7 +1377,9 @@ - return s; - - pspace_info = get_objfile_pspace_data (current_program_space); -- if (pspace_info->objfiles_changed_p != 0) -+ if (pspace_info->section_map_dirty -+ || (pspace_info->new_objfiles_available -+ && !pspace_info->inhibit_updates)) - { - update_section_map (current_program_space, - &pspace_info->sections, -@@ -1373,7 +1387,8 @@ - - /* Don't need updates to section map until objfiles are added, - removed or relocated. */ -- pspace_info->objfiles_changed_p = 0; -+ pspace_info->new_objfiles_available = 0; -+ pspace_info->section_map_dirty = 0; - } - - /* The C standard (ISO/IEC 9899:TC2) requires the BASE argument to -@@ -1414,14 +1429,38 @@ - } - - --/* Set objfiles_changed_p so section map will be rebuilt next time it -+/* Set section_map_dirty so section map will be rebuilt next time it - is used. Called by reread_symbols. */ - - void - objfiles_changed (void) - { - /* Rebuild section map next time we need it. */ -- get_objfile_pspace_data (current_program_space)->objfiles_changed_p = 1; -+ get_objfile_pspace_data (current_program_space)->section_map_dirty = 1; -+} -+ -+/* See comments in objfiles.h. */ -+ -+void -+inhibit_section_map_updates (struct program_space *pspace) -+{ -+ get_objfile_pspace_data (pspace)->inhibit_updates = 1; -+} -+ -+/* See comments in objfiles.h. */ -+ -+void -+resume_section_map_updates (struct program_space *pspace) -+{ -+ get_objfile_pspace_data (pspace)->inhibit_updates = 0; -+} -+ -+/* See comments in objfiles.h. */ -+ -+void -+resume_section_map_updates_cleanup (void *arg) -+{ -+ resume_section_map_updates (arg); - } - - /* The default implementation for the "iterate_over_objfiles_in_search_order" ---- src/gdb/objfiles.h 2013/05/06 19:15:17 1.106 -+++ src/gdb/objfiles.h 2013/06/04 12:53:34 1.107 -@@ -501,6 +501,22 @@ - 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 -+ called. Calling inhibit_section_map_updates will inhibit this -+ behavior until resume_section_map_updates is called. If you call -+ inhibit_section_map_updates you must ensure that every call to -+ find_pc_section in the inhibited region relates to a section that -+ is already in the section map and has not since been removed or -+ relocated. */ -+extern void inhibit_section_map_updates (struct program_space *pspace); -+ -+/* Resume automatically rebuilding the section map as required. */ -+extern void resume_section_map_updates (struct program_space *pspace); -+ -+/* Version of the above suitable for use as a cleanup. */ -+extern void resume_section_map_updates_cleanup (void *arg); -+ - extern void default_iterate_over_objfiles_in_search_order - (struct gdbarch *gdbarch, - iterate_over_objfiles_in_search_order_cb_ftype *cb, diff --git a/gdb-dlopen-stap-probe-3of9.patch b/gdb-dlopen-stap-probe-3of9.patch deleted file mode 100644 index 951f4bd..0000000 --- a/gdb-dlopen-stap-probe-3of9.patch +++ /dev/null @@ -1,298 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00014.html - -### src/gdb/gdbserver/ChangeLog 2013/05/31 19:14:33 1.720 -### src/gdb/gdbserver/ChangeLog 2013/06/04 12:59:20 1.721 -## -1,3 +1,12 @@ -+2013-06-04 Gary Benson -+ -+ * server.c (handle_query): Add "augmented-libraries-svr4-read+" -+ to qSupported response when appropriate. -+ (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read -+ with nonzero-length annex. -+ * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle -+ arguments supplied in annex. -+ - 2013-05-31 Doug Evans - - * linux-x86-low.c (ps_get_thread_area): Properly extend address to ---- src/gdb/gdbserver/linux-low.c 2013/05/23 17:17:50 1.237 -+++ src/gdb/gdbserver/linux-low.c 2013/06/04 12:59:21 1.238 -@@ -5728,6 +5728,12 @@ - }; - const struct link_map_offsets *lmo; - unsigned int machine; -+ int ptr_size; -+ CORE_ADDR lm_addr = 0, lm_prev = 0; -+ int allocated = 1024; -+ char *p; -+ CORE_ADDR l_name, l_addr, l_ld, l_next, l_prev; -+ int header_done = 0; - - if (writebuf != NULL) - return -2; -@@ -5738,128 +5744,144 @@ - xsnprintf (filename, sizeof filename, "/proc/%d/exe", pid); - is_elf64 = elf_64_file_p (filename, &machine); - lmo = is_elf64 ? &lmo_64bit_offsets : &lmo_32bit_offsets; -+ ptr_size = is_elf64 ? 8 : 4; - -- if (priv->r_debug == 0) -- priv->r_debug = get_r_debug (pid, is_elf64); -- -- /* We failed to find DT_DEBUG. Such situation will not change for this -- inferior - do not retry it. Report it to GDB as E01, see for the reasons -- at the GDB solib-svr4.c side. */ -- if (priv->r_debug == (CORE_ADDR) -1) -- return -1; -- -- if (priv->r_debug == 0) -+ while (annex[0] != '\0') - { -- document = xstrdup ("\n"); -+ const char *sep; -+ CORE_ADDR *addrp; -+ int len; -+ -+ sep = strchr (annex, '='); -+ if (sep == NULL) -+ break; -+ -+ len = sep - annex; -+ if (len == 5 && strncmp (annex, "start", 5) == 0) -+ addrp = &lm_addr; -+ else if (len == 4 && strncmp (annex, "prev", 4) == 0) -+ addrp = &lm_prev; -+ else -+ { -+ annex = strchr (sep, ';'); -+ if (annex == NULL) -+ break; -+ annex++; -+ continue; -+ } -+ -+ annex = decode_address_to_semicolon (addrp, sep + 1); - } -- else -+ -+ if (lm_addr == 0) - { -- int allocated = 1024; -- char *p; -- const int ptr_size = is_elf64 ? 8 : 4; -- CORE_ADDR lm_addr, lm_prev, l_name, l_addr, l_ld, l_next, l_prev; -- int r_version, header_done = 0; -- -- document = xmalloc (allocated); -- strcpy (document, "r_debug + lmo->r_version_offset, -- (unsigned char *) &r_version, -- sizeof (r_version)) != 0 -- || r_version != 1) -+ int r_version = 0; -+ -+ if (priv->r_debug == 0) -+ priv->r_debug = get_r_debug (pid, is_elf64); -+ -+ /* We failed to find DT_DEBUG. Such situation will not change -+ for this inferior - do not retry it. Report it to GDB as -+ E01, see for the reasons at the GDB solib-svr4.c side. */ -+ if (priv->r_debug == (CORE_ADDR) -1) -+ return -1; -+ -+ if (priv->r_debug != 0) - { -- warning ("unexpected r_debug version %d", r_version); -- goto done; -+ if (linux_read_memory (priv->r_debug + lmo->r_version_offset, -+ (unsigned char *) &r_version, -+ sizeof (r_version)) != 0 -+ || r_version != 1) -+ { -+ warning ("unexpected r_debug version %d", r_version); -+ } -+ else if (read_one_ptr (priv->r_debug + lmo->r_map_offset, -+ &lm_addr, ptr_size) != 0) -+ { -+ warning ("unable to read r_map from 0x%lx", -+ (long) priv->r_debug + lmo->r_map_offset); -+ } - } -+ } -+ -+ document = xmalloc (allocated); -+ strcpy (document, "l_name_offset, -+ &l_name, ptr_size) == 0 -+ && read_one_ptr (lm_addr + lmo->l_addr_offset, -+ &l_addr, ptr_size) == 0 -+ && read_one_ptr (lm_addr + lmo->l_ld_offset, -+ &l_ld, ptr_size) == 0 -+ && read_one_ptr (lm_addr + lmo->l_prev_offset, -+ &l_prev, ptr_size) == 0 -+ && read_one_ptr (lm_addr + lmo->l_next_offset, -+ &l_next, ptr_size) == 0) -+ { -+ unsigned char libname[PATH_MAX]; - -- if (read_one_ptr (priv->r_debug + lmo->r_map_offset, -- &lm_addr, ptr_size) != 0) -+ if (lm_prev != l_prev) - { -- warning ("unable to read r_map from 0x%lx", -- (long) priv->r_debug + lmo->r_map_offset); -- goto done; -+ warning ("Corrupted shared library list: 0x%lx != 0x%lx", -+ (long) lm_prev, (long) l_prev); -+ break; - } - -- lm_prev = 0; -- while (read_one_ptr (lm_addr + lmo->l_name_offset, -- &l_name, ptr_size) == 0 -- && read_one_ptr (lm_addr + lmo->l_addr_offset, -- &l_addr, ptr_size) == 0 -- && read_one_ptr (lm_addr + lmo->l_ld_offset, -- &l_ld, ptr_size) == 0 -- && read_one_ptr (lm_addr + lmo->l_prev_offset, -- &l_prev, ptr_size) == 0 -- && read_one_ptr (lm_addr + lmo->l_next_offset, -- &l_next, ptr_size) == 0) -+ /* Not checking for error because reading may stop before -+ we've got PATH_MAX worth of characters. */ -+ libname[0] = '\0'; -+ linux_read_memory (l_name, libname, sizeof (libname) - 1); -+ libname[sizeof (libname) - 1] = '\0'; -+ if (libname[0] != '\0') - { -- unsigned char libname[PATH_MAX]; -+ /* 6x the size for xml_escape_text below. */ -+ size_t len = 6 * strlen ((char *) libname); -+ char *name; - -- if (lm_prev != l_prev) -+ if (!header_done) - { -- warning ("Corrupted shared library list: 0x%lx != 0x%lx", -- (long) lm_prev, (long) l_prev); -- break; -+ /* Terminate `", -- name, (unsigned long) lm_addr, -- (unsigned long) l_addr, (unsigned long) l_ld); -- free (name); -- } -- else if (lm_prev == 0) -- { -- sprintf (p, " main-lm=\"0x%lx\"", (unsigned long) lm_addr); -- p = p + strlen (p); -- } -+ /* Expand to guarantee sufficient storage. */ -+ uintptr_t document_len = p - document; - -- if (l_next == 0) -- break; -+ document = xrealloc (document, 2 * allocated); -+ allocated *= 2; -+ p = document + document_len; -+ } - -- lm_prev = lm_addr; -- lm_addr = l_next; -+ name = xml_escape_text ((char *) libname); -+ p += sprintf (p, "", -+ name, (unsigned long) lm_addr, -+ (unsigned long) l_addr, (unsigned long) l_ld); -+ free (name); - } -- done: -- if (!header_done) -+ else if (lm_prev == 0) - { -- /* Empty list; terminate `"); -+ sprintf (p, " main-lm=\"0x%lx\"", (unsigned long) lm_addr); -+ p = p + strlen (p); - } -- else -- strcpy (p, ""); -+ -+ lm_prev = lm_addr; -+ lm_addr = l_next; - } - -+ if (!header_done) -+ { -+ /* Empty list; terminate `"); -+ } -+ else -+ strcpy (p, ""); -+ - document_len = strlen (document); - if (offset < document_len) - document_len -= offset; ---- src/gdb/gdbserver/server.c 2013/05/24 11:28:06 1.191 -+++ src/gdb/gdbserver/server.c 2013/06/04 12:59:21 1.192 -@@ -1115,8 +1115,7 @@ - if (writebuf != NULL) - return -2; - -- if (annex[0] != '\0' || !target_running () -- || the_target->qxfer_libraries_svr4 == NULL) -+ if (!target_running () || the_target->qxfer_libraries_svr4 == NULL) - return -1; - - return the_target->qxfer_libraries_svr4 (annex, readbuf, writebuf, offset, len); -@@ -1743,7 +1742,8 @@ - PBUFSIZ - 1); - - if (the_target->qxfer_libraries_svr4 != NULL) -- strcat (own_buf, ";qXfer:libraries-svr4:read+"); -+ strcat (own_buf, ";qXfer:libraries-svr4:read+" -+ ";augmented-libraries-svr4-read+"); - else - { - /* We do not have any hook to indicate whether the non-SVR4 target diff --git a/gdb-dlopen-stap-probe-4of9.patch b/gdb-dlopen-stap-probe-4of9.patch deleted file mode 100644 index 859c581..0000000 --- a/gdb-dlopen-stap-probe-4of9.patch +++ /dev/null @@ -1,35 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00015.html - -### src/gdb/ChangeLog 2013/06/04 12:53:33 1.15682 -### src/gdb/ChangeLog 2013/06/04 13:02:15 1.15683 -## -1,5 +1,9 @@ - 2013-06-04 Gary Benson - -+ * NEWS: Update. -+ -+2013-06-04 Gary Benson -+ - * objfiles.h (inhibit_section_map_updates): New function - declaration. - (resume_section_map_updates): Likewise. -Index: gdb-7.6/gdb/NEWS -=================================================================== ---- gdb-7.6.orig/gdb/NEWS 2013-06-10 14:27:02.071184153 +0200 -+++ gdb-7.6/gdb/NEWS 2013-06-10 14:28:34.391145339 +0200 -@@ -4,6 +4,16 @@ - * Newly installed $prefix/bin/gcore acts as a shell interface for the - GDB command gcore. - -+* New remote packets -+ -+qXfer:libraries-svr4:read's annex -+ The previously unused annex of the qXfer:libraries-svr4:read packet -+ is now used to support passing an argument list. The remote stub -+ reports support for this argument list to GDB's qSupported query. -+ The defined arguments are "start" and "prev", used to reduce work -+ necessary for library list updating, resulting in significant -+ speedup. -+ - *** Changes in GDB 7.6 - - * Target record has been renamed to record-full. diff --git a/gdb-dlopen-stap-probe-5of9.patch b/gdb-dlopen-stap-probe-5of9.patch deleted file mode 100644 index aab598f..0000000 --- a/gdb-dlopen-stap-probe-5of9.patch +++ /dev/null @@ -1,91 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00016.html - -### src/gdb/doc/ChangeLog 2013/05/24 04:50:26 1.1463 -### src/gdb/doc/ChangeLog 2013/06/04 13:07:45 1.1464 -## -1,3 +1,12 @@ -+2013-06-04 Gary Benson -+ -+ * gdb.texinfo (General Query Packets/qSupported): Added -+ "qXfer:libraries-svr4:read" and "augmented-libraries-svr4-read". -+ to the table of currently defined stub features. -+ Added a more detailed entry for "augmented-libraries-svr4-read". -+ (General Query Packets/qXfer:libraries-svr4:read): Documented -+ the augmented form of this packet. -+ - 2013-05-23 Joel Brobecker - - * gdb.texinfo (System-wide Configuration Scripts): Renames ---- src/gdb/doc/gdb.texinfo 2013/05/24 04:50:26 1.1093 -+++ src/gdb/doc/gdb.texinfo 2013/06/04 13:07:45 1.1094 -@@ -38594,6 +38594,16 @@ - @tab @samp{-} - @tab Yes - -+@item @samp{qXfer:libraries-svr4:read} -+@tab No -+@tab @samp{-} -+@tab Yes -+ -+@item @samp{augmented-libraries-svr4-read} -+@tab No -+@tab @samp{-} -+@tab No -+ - @item @samp{qXfer:memory-map:read} - @tab No - @tab @samp{-} -@@ -38770,6 +38780,11 @@ - The remote stub understands the @samp{qXfer:libraries-svr4:read} packet - (@pxref{qXfer svr4 library list read}). - -+@item augmented-libraries-svr4-read -+The remote stub understands the augmented form of the -+@samp{qXfer:libraries-svr4:read} packet -+(@pxref{qXfer svr4 library list read}). -+ - @item qXfer:memory-map:read - The remote stub understands the @samp{qXfer:memory-map:read} packet - (@pxref{qXfer memory map read}). -@@ -39065,7 +39080,10 @@ - @anchor{qXfer svr4 library list read} - Access the target's list of loaded libraries when the target is an SVR4 - platform. @xref{Library List Format for SVR4 Targets}. The annex part --of the generic @samp{qXfer} packet must be empty (@pxref{qXfer read}). -+of the generic @samp{qXfer} packet must be empty unless the remote -+stub indicated it supports the augmented form of this packet -+by supplying an appropriate @samp{qSupported} response -+(@pxref{qXfer read}, @ref{qSupported}). - - This packet is optional for better performance on SVR4 targets. - @value{GDBN} uses memory read packets to read the SVR4 library list otherwise. -@@ -39073,6 +39091,30 @@ - This packet is not probed by default; the remote stub must request it, - by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). - -+If the remote stub indicates it supports the augmented form of this -+packet then the annex part of the generic @samp{qXfer} packet may -+contain a semicolon-separated list of @samp{@var{name}=@var{value}} -+arguments. The currently supported arguments are: -+ -+@table @code -+@item start=@var{address} -+A hexadecimal number specifying the address of the @samp{struct -+link_map} to start reading the library list from. If unset or zero -+then the first @samp{struct link_map} in the library list will be -+chosen as the starting point. -+ -+@item prev=@var{address} -+A hexadecimal number specifying the address of the @samp{struct -+link_map} immediately preceding the @samp{struct link_map} -+specified by the @samp{start} argument. If unset or zero then -+the remote stub will expect that no @samp{struct link_map} -+exists prior to the starting point. -+ -+@end table -+ -+Arguments that are not understood by the remote stub will be silently -+ignored. -+ - @item qXfer:memory-map:read::@var{offset},@var{length} - @anchor{qXfer memory map read} - Access the target's @dfn{memory-map}. @xref{Memory Map Format}. The diff --git a/gdb-dlopen-stap-probe-6of9.patch b/gdb-dlopen-stap-probe-6of9.patch deleted file mode 100644 index 1a1c338..0000000 --- a/gdb-dlopen-stap-probe-6of9.patch +++ /dev/null @@ -1,132 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00017.html - -### src/gdb/ChangeLog 2013/06/04 13:02:15 1.15683 -### src/gdb/ChangeLog 2013/06/04 13:10:53 1.15684 -## -1,5 +1,21 @@ - 2013-06-04 Gary Benson - -+ * target.h (target_ops): New field -+ "to_augmented_libraries_svr4_read". -+ (target_augmented_libraries_svr4_read): New macro. -+ * target.c (update_current_target): Handle -+ to_augmented_libraries_svr4_read. -+ * remote.c (remote_state): New field -+ "augmented_libraries_svr4_read". -+ (remote_augmented_libraries_svr4_read_feature): New function. -+ (remote_protocol_features): Add entry for -+ "augmented-libraries-svr4-read". -+ (remote_augmented_libraries_svr4_read): New function. -+ (init_remote_ops): Initialize -+ remote_ops.to_augmented_libraries_svr4_read. -+ -+2013-06-04 Gary Benson -+ - * NEWS: Update. - - 2013-06-04 Gary Benson ---- src/gdb/remote.c 2013/05/30 09:29:18 1.552 -+++ src/gdb/remote.c 2013/06/04 13:10:53 1.553 -@@ -361,6 +361,10 @@ - /* True if the stub can collect strings using tracenz bytecode. */ - int string_tracing; - -+ /* True if the stub supports qXfer:libraries-svr4:read with a -+ non-empty annex. */ -+ int augmented_libraries_svr4_read; -+ - /* Nonzero if the user has pressed Ctrl-C, but the target hasn't - responded to that. */ - int ctrlc_pending_p; -@@ -3949,6 +3953,16 @@ - rs->string_tracing = (support == PACKET_ENABLE); - } - -+static void -+remote_augmented_libraries_svr4_read_feature -+ (const struct protocol_feature *feature, -+ enum packet_support support, const char *value) -+{ -+ struct remote_state *rs = get_remote_state (); -+ -+ rs->augmented_libraries_svr4_read = (support == PACKET_ENABLE); -+} -+ - static struct protocol_feature remote_protocol_features[] = { - { "PacketSize", PACKET_DISABLE, remote_packet_size, -1 }, - { "qXfer:auxv:read", PACKET_DISABLE, remote_supported_packet, -@@ -3959,6 +3973,8 @@ - PACKET_qXfer_libraries }, - { "qXfer:libraries-svr4:read", PACKET_DISABLE, remote_supported_packet, - PACKET_qXfer_libraries_svr4 }, -+ { "augmented-libraries-svr4-read", PACKET_DISABLE, -+ remote_augmented_libraries_svr4_read_feature, -1 }, - { "qXfer:memory-map:read", PACKET_DISABLE, remote_supported_packet, - PACKET_qXfer_memory_map }, - { "qXfer:spu:read", PACKET_DISABLE, remote_supported_packet, -@@ -11439,6 +11455,14 @@ - return btrace; - } - -+static int -+remote_augmented_libraries_svr4_read (void) -+{ -+ struct remote_state *rs = get_remote_state (); -+ -+ return rs->augmented_libraries_svr4_read; -+} -+ - static void - init_remote_ops (void) - { -@@ -11561,6 +11585,8 @@ - remote_ops.to_disable_btrace = remote_disable_btrace; - remote_ops.to_teardown_btrace = remote_teardown_btrace; - remote_ops.to_read_btrace = remote_read_btrace; -+ remote_ops.to_augmented_libraries_svr4_read = -+ remote_augmented_libraries_svr4_read; - } - - /* Set up the extended remote vector by making a copy of the standard ---- src/gdb/target.c 2013/05/14 20:33:36 1.335 -+++ src/gdb/target.c 2013/06/04 13:10:53 1.336 -@@ -731,6 +731,7 @@ - INHERIT (to_traceframe_info, t); - INHERIT (to_use_agent, t); - INHERIT (to_can_use_agent, t); -+ INHERIT (to_augmented_libraries_svr4_read, t); - INHERIT (to_magic, t); - INHERIT (to_supports_evaluation_of_breakpoint_conditions, t); - INHERIT (to_can_run_breakpoint_commands, t); -@@ -975,6 +976,9 @@ - de_fault (to_can_use_agent, - (int (*) (void)) - return_zero); -+ de_fault (to_augmented_libraries_svr4_read, -+ (int (*) (void)) -+ return_zero); - de_fault (to_execution_direction, default_execution_direction); - - #undef de_fault ---- src/gdb/target.h 2013/05/14 20:33:36 1.262 -+++ src/gdb/target.h 2013/06/04 13:10:53 1.263 -@@ -941,6 +941,10 @@ - (inclusive) to function END (exclusive). */ - void (*to_call_history_range) (ULONGEST begin, ULONGEST end, int flags); - -+ /* Nonzero if TARGET_OBJECT_LIBRARIES_SVR4 may be read with a -+ non-empty annex. */ -+ int (*to_augmented_libraries_svr4_read) (void); -+ - int to_magic; - /* Need sub-structure for target machine related rather than comm related? - */ -@@ -1809,6 +1813,9 @@ - #define target_can_use_agent() \ - (*current_target.to_can_use_agent) () - -+#define target_augmented_libraries_svr4_read() \ -+ (*current_target.to_augmented_libraries_svr4_read) () -+ - /* Command logging facility. */ - - #define target_log_command(p) \ diff --git a/gdb-dlopen-stap-probe-7of9.patch b/gdb-dlopen-stap-probe-7of9.patch deleted file mode 100644 index 9cd5f56..0000000 --- a/gdb-dlopen-stap-probe-7of9.patch +++ /dev/null @@ -1,1107 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00018.html - -### src/gdb/ChangeLog 2013/06/04 13:10:53 1.15684 -### src/gdb/ChangeLog 2013/06/04 13:17:05 1.15685 -## -1,5 +1,58 @@ - 2013-06-04 Gary Benson - -+ * breakpoint.h (handle_solib_event): Moved function declaration -+ to solib.h. -+ * breakpoint.c (handle_solib_event): Moved function to solib.c. -+ (bpstat_stop_status): Pass new argument to handle_solib_event. -+ * solib.h (update_solib_breakpoints): New function declaration. -+ (handle_solib_event): Moved function declaration from -+ breakpoint.h. -+ * solib.c (update_solib_breakpoints): New function. -+ (handle_solib_event): Moved function from breakpoint.c. -+ Updated to call solib_ops->handle_event if not NULL. -+ * solist.h (target_so_ops): New fields "update_breakpoints" and -+ "handle_event". -+ * infrun.c (set_stop_on_solib_events): New function. -+ (_initialize_infrun): Use the above for "set -+ stop-on-solib-events". -+ (handle_inferior_event): Pass new argument to handle_solib_event. -+ * solib-svr4.c (probe.h): New include. -+ (svr4_free_library_list): New forward declaration. -+ (probe_action): New enum. -+ (probe_info): New struct. -+ (probe_info): New static variable. -+ (NUM_PROBES): New definition. -+ (svr4_info): New fields "using_xfer", "probes_table" and -+ "solib_list". -+ (free_probes_table): New function. -+ (free_solib_list): New function. -+ (svr4_pspace_data_cleanup): Free probes table and solib list. -+ (svr4_copy_library_list): New function. -+ (svr4_current_sos_via_xfer_libraries): New parameter "annex". -+ (svr4_read_so_list): New parameter "prev_lm". -+ (svr4_current_sos_direct): Renamed from "svr4_current_sos". -+ (svr4_current_sos): New function. -+ (probe_and_action): New struct. -+ (hash_probe_and_action): New function. -+ (equal_probe_and_action): Likewise. -+ (register_solib_event_probe): Likewise. -+ (solib_event_probe_at): Likewise. -+ (solib_event_probe_action): Likewise. -+ (solist_update_full): Likewise. -+ (solist_update_incremental): Likewise. -+ (disable_probes_interface_cleanup): Likewise. -+ (svr4_handle_solib_event): Likewise. -+ (svr4_update_solib_event_breakpoint): Likewise. -+ (svr4_update_solib_event_breakpoints): Likewise. -+ (svr4_create_solib_event_breakpoints): Likewise. -+ (enable_break): Free probes table before creating breakpoints. -+ Use svr4_create_solib_event_breakpoints to create breakpoints. -+ (svr4_solib_create_inferior_hook): Free the solib list. -+ (_initialize_svr4_solib): Initialise -+ svr4_so_ops.handle_solib_event and svr4_so_ops.update_breakpoints. -+ -+2013-06-04 Gary Benson -+ - * target.h (target_ops): New field - "to_augmented_libraries_svr4_read". - (target_augmented_libraries_svr4_read): New macro. -Index: gdb-7.6/gdb/breakpoint.h -=================================================================== ---- gdb-7.6.orig/gdb/breakpoint.h 2013-06-10 14:44:37.455812656 +0200 -+++ gdb-7.6/gdb/breakpoint.h 2013-06-10 14:44:37.709812579 +0200 -@@ -1552,8 +1552,6 @@ extern int user_breakpoint_p (struct bre - /* Attempt to determine architecture of location identified by SAL. */ - extern struct gdbarch *get_sal_arch (struct symtab_and_line sal); - --extern void handle_solib_event (void); -- - extern void breakpoint_free_objfile (struct objfile *objfile); - - extern void breakpoints_relocate (struct objfile *objfile, -Index: gdb-7.6/gdb/infrun.c -=================================================================== ---- gdb-7.6.orig/gdb/infrun.c 2013-06-10 14:44:37.427812664 +0200 -+++ gdb-7.6/gdb/infrun.c 2013-06-10 14:44:37.711812579 +0200 -@@ -370,6 +370,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; -+ -+/* Enable or disable optional shared library event breakpoints -+ as appropriate when the above flag is changed. */ -+ -+static void -+set_stop_on_solib_events (char *args, int from_tty, struct cmd_list_element *c) -+{ -+ update_solib_breakpoints (); -+} -+ - static void - show_stop_on_solib_events (struct ui_file *file, int from_tty, - struct cmd_list_element *c, const char *value) -@@ -7335,7 +7345,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."), -- NULL, -+ set_stop_on_solib_events, - show_stop_on_solib_events, - &setlist, &showlist); - -Index: gdb-7.6/gdb/solib-svr4.c -=================================================================== ---- gdb-7.6.orig/gdb/solib-svr4.c 2013-06-10 14:44:37.392812675 +0200 -+++ gdb-7.6/gdb/solib-svr4.c 2013-06-10 14:44:37.712812578 +0200 -@@ -46,10 +46,12 @@ - #include "auxv.h" - #include "exceptions.h" - #include "gdb_bfd.h" -+#include "probe.h" - - static struct link_map_offsets *svr4_fetch_link_map_offsets (void); - static int svr4_have_link_map_offsets (void); - static void svr4_relocate_main_executable (void); -+static void svr4_free_library_list (void *p_list); - - /* Link map info to include in an allocated so_list entry. */ - -@@ -106,6 +108,55 @@ static const char * const main_name_lis - NULL - }; - -+/* What to do when a probe stop occurs. */ -+ -+enum probe_action -+{ -+ /* Something went seriously wrong. Stop using probes and -+ revert to using the older interface. */ -+ PROBES_INTERFACE_FAILED, -+ -+ /* No action is required. The shared object list is still -+ valid. */ -+ DO_NOTHING, -+ -+ /* The shared object list should be reloaded entirely. */ -+ FULL_RELOAD, -+ -+ /* Attempt to incrementally update the shared object list. If -+ the update fails or is not possible, fall back to reloading -+ the list in full. */ -+ UPDATE_OR_RELOAD, -+}; -+ -+/* A probe's name and its associated action. */ -+ -+struct probe_info -+{ -+ /* The name of the probe. */ -+ const char *name; -+ -+ /* What to do when a probe stop occurs. */ -+ enum probe_action action; -+}; -+ -+/* A list of named probes and their associated actions. If all -+ probes are present in the dynamic linker then the probes-based -+ interface will be used. */ -+ -+static const struct probe_info probe_info[] = -+{ -+ { "init_start", DO_NOTHING }, -+ { "init_complete", FULL_RELOAD }, -+ { "map_start", DO_NOTHING }, -+ { "map_failed", DO_NOTHING }, -+ { "reloc_complete", UPDATE_OR_RELOAD }, -+ { "unmap_start", DO_NOTHING }, -+ { "unmap_complete", FULL_RELOAD }, -+}; -+ -+#define NUM_PROBES ARRAY_SIZE (probe_info) -+ - /* Return non-zero if GDB_SO_NAME and INFERIOR_SO_NAME represent - the same shared library. */ - -@@ -313,17 +364,58 @@ struct svr4_info - CORE_ADDR interp_text_sect_high; - CORE_ADDR interp_plt_sect_low; - CORE_ADDR interp_plt_sect_high; -+ -+ /* Nonzero if the list of objects was last obtained from the target -+ via qXfer:libraries-svr4:read. */ -+ int using_xfer; -+ -+ /* Table of struct probe_and_action instances, used by the -+ probes-based interface to map breakpoint addresses to probes -+ and their associated actions. Lookup is performed using -+ probe_and_action->probe->address. */ -+ htab_t probes_table; -+ -+ /* List of objects loaded into the inferior, used by the probes- -+ based interface. */ -+ struct so_list *solib_list; - }; - - /* Per-program-space data key. */ - static const struct program_space_data *solib_svr4_pspace_data; - -+/* Free the probes table. */ -+ -+static void -+free_probes_table (struct svr4_info *info) -+{ -+ if (info->probes_table == NULL) -+ return; -+ -+ htab_delete (info->probes_table); -+ info->probes_table = NULL; -+} -+ -+/* Free the solib list. */ -+ -+static void -+free_solib_list (struct svr4_info *info) -+{ -+ svr4_free_library_list (&info->solib_list); -+ info->solib_list = NULL; -+} -+ - static void - svr4_pspace_data_cleanup (struct program_space *pspace, void *arg) - { - struct svr4_info *info; - - info = program_space_data (pspace, solib_svr4_pspace_data); -+ if (info == NULL) -+ return; -+ -+ free_probes_table (info); -+ free_solib_list (info); -+ - xfree (info); - } - -@@ -982,6 +1074,34 @@ svr4_free_library_list (void *p_list) - } - } - -+/* Copy library list. */ -+ -+static struct so_list * -+svr4_copy_library_list (struct so_list *src) -+{ -+ struct so_list *dst = NULL; -+ struct so_list **link = &dst; -+ -+ while (src != NULL) -+ { -+ struct so_list *new; -+ -+ new = xmalloc (sizeof (struct so_list)); -+ memcpy (new, src, sizeof (struct so_list)); -+ -+ new->lm_info = xmalloc (sizeof (struct lm_info)); -+ memcpy (new->lm_info, src->lm_info, sizeof (struct lm_info)); -+ -+ new->next = NULL; -+ *link = new; -+ link = &new->next; -+ -+ src = src->next; -+ } -+ -+ return dst; -+} -+ - #ifdef HAVE_LIBEXPAT - - #include "xml-support.h" -@@ -1097,23 +1217,30 @@ svr4_parse_libraries (const char *docume - return 0; - } - --/* Attempt to get so_list from target via qXfer:libraries:read packet. -+/* Attempt to get so_list from target via qXfer:libraries-svr4:read packet. - - Return 0 if packet not supported, *SO_LIST_RETURN is not modified in such - case. Return 1 if *SO_LIST_RETURN contains the library list, it may be -- empty, caller is responsible for freeing all its entries. */ -+ empty, caller is responsible for freeing all its entries. -+ -+ Note that ANNEX must be NULL if the remote does not explicitly allow -+ qXfer:libraries-svr4:read packets with non-empty annexes. Support for -+ this can be checked using target_augmented_libraries_svr4_read (). */ - - static int --svr4_current_sos_via_xfer_libraries (struct svr4_library_list *list) -+svr4_current_sos_via_xfer_libraries (struct svr4_library_list *list, -+ const char *annex) - { - char *svr4_library_document; - int result; - struct cleanup *back_to; - -+ gdb_assert (annex == NULL || target_augmented_libraries_svr4_read ()); -+ - /* Fetch the list of shared libraries. */ - svr4_library_document = target_read_stralloc (¤t_target, - TARGET_OBJECT_LIBRARIES_SVR4, -- NULL); -+ annex); - if (svr4_library_document == NULL) - return 0; - -@@ -1127,7 +1254,8 @@ svr4_current_sos_via_xfer_libraries (str - #else - - static int --svr4_current_sos_via_xfer_libraries (struct svr4_library_list *list) -+svr4_current_sos_via_xfer_libraries (struct svr4_library_list *list, -+ const char *annex) - { - return 0; - } -@@ -1161,15 +1289,19 @@ svr4_default_sos (void) - return new; - } - --/* Read the whole inferior libraries chain starting at address LM. Add the -- entries to the tail referenced by LINK_PTR_PTR. Ignore the first entry if -- IGNORE_FIRST and set global MAIN_LM_ADDR according to it. */ -+/* Read the whole inferior libraries chain starting at address LM. -+ Expect the first entry in the chain's previous entry to be PREV_LM. -+ Add the entries to the tail referenced by LINK_PTR_PTR. Ignore the -+ first entry if IGNORE_FIRST and set global MAIN_LM_ADDR according -+ to it. Returns nonzero upon success. If zero is returned the -+ entries stored to LINK_PTR_PTR are still valid although they may -+ represent only part of the inferior library list. */ - --static void --svr4_read_so_list (CORE_ADDR lm, struct so_list ***link_ptr_ptr, -- int ignore_first) -+static int -+svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, -+ struct so_list ***link_ptr_ptr, int ignore_first) - { -- CORE_ADDR prev_lm = 0, next_lm; -+ CORE_ADDR next_lm; - - for (; lm != 0; prev_lm = lm, lm = next_lm) - { -@@ -1185,7 +1317,7 @@ svr4_read_so_list (CORE_ADDR lm, struct - if (new->lm_info == NULL) - { - do_cleanups (old_chain); -- break; -+ return 0; - } - - next_lm = new->lm_info->l_next; -@@ -1196,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 -@@ -1291,17 +1423,21 @@ svr4_read_so_list (CORE_ADDR lm, struct - **link_ptr_ptr = new; - *link_ptr_ptr = &new->next; - } -+ -+ return 1; - } - --/* Implement the "current_sos" target_so_ops method. */ -+/* Read the full list of currently loaded shared objects directly -+ from the inferior, without referring to any libraries read and -+ stored by the probes interface. Handle special cases relating -+ to the first elements of the list. */ - - static struct so_list * --svr4_current_sos (void) -+svr4_current_sos_direct (struct svr4_info *info) - { - CORE_ADDR lm; - struct so_list *head = NULL; - struct so_list **link_ptr = &head; -- struct svr4_info *info; - struct cleanup *back_to; - int ignore_first; - struct svr4_library_list library_list; -@@ -1314,19 +1450,16 @@ svr4_current_sos (void) - Unfortunately statically linked inferiors will also fall back through this - suboptimal code path. */ - -- if (svr4_current_sos_via_xfer_libraries (&library_list)) -+ info->using_xfer = svr4_current_sos_via_xfer_libraries (&library_list, -+ NULL); -+ if (info->using_xfer) - { - if (library_list.main_lm) -- { -- info = get_svr4_info (); -- info->main_lm_addr = library_list.main_lm; -- } -+ info->main_lm_addr = library_list.main_lm; - - return library_list.head ? library_list.head : svr4_default_sos (); - } - -- info = get_svr4_info (); -- - /* Always locate the debug struct, in case it has moved. */ - info->debug_base = 0; - locate_base (info); -@@ -1349,7 +1482,7 @@ svr4_current_sos (void) - `struct so_list' nodes. */ - lm = solib_svr4_r_map (info); - if (lm) -- svr4_read_so_list (lm, &link_ptr, ignore_first); -+ svr4_read_so_list (lm, 0, &link_ptr, ignore_first); - - /* On Solaris, the dynamic linker is not in the normal list of - shared objects, so make sure we pick it up too. Having -@@ -1357,7 +1490,7 @@ svr4_current_sos (void) - for skipping dynamic linker resolver code. */ - lm = solib_svr4_r_ldsomap (info); - if (lm) -- svr4_read_so_list (lm, &link_ptr, 0); -+ svr4_read_so_list (lm, 0, &link_ptr, 0); - - discard_cleanups (back_to); - -@@ -1367,6 +1500,22 @@ svr4_current_sos (void) - return head; - } - -+/* Implement the "current_sos" target_so_ops method. */ -+ -+static struct so_list * -+svr4_current_sos (void) -+{ -+ struct svr4_info *info = get_svr4_info (); -+ -+ /* If the solib list has been read and stored by the probes -+ interface then we return a copy of the stored list. */ -+ if (info->solib_list != NULL) -+ return svr4_copy_library_list (info->solib_list); -+ -+ /* Otherwise obtain the solib list directly from the inferior. */ -+ return svr4_current_sos_direct (info); -+} -+ - /* Get the address of the link_map for a given OBJFILE. */ - - CORE_ADDR -@@ -1449,6 +1598,476 @@ exec_entry_point (struct bfd *abfd, stru - return gdbarch_addr_bits_remove (target_gdbarch (), addr); - } - -+/* A probe and its associated action. */ -+ -+struct probe_and_action -+{ -+ /* The probe. */ -+ struct probe *probe; -+ -+ /* The action. */ -+ enum probe_action action; -+}; -+ -+/* Returns a hash code for the probe_and_action referenced by p. */ -+ -+static hashval_t -+hash_probe_and_action (const void *p) -+{ -+ const struct probe_and_action *pa = p; -+ -+ return (hashval_t) pa->probe->address; -+} -+ -+/* Returns non-zero if the probe_and_actions referenced by p1 and p2 -+ are equal. */ -+ -+static int -+equal_probe_and_action (const void *p1, const void *p2) -+{ -+ const struct probe_and_action *pa1 = p1; -+ const struct probe_and_action *pa2 = p2; -+ -+ return pa1->probe->address == pa2->probe->address; -+} -+ -+/* Register a solib event probe and its associated action in the -+ probes table. */ -+ -+static void -+register_solib_event_probe (struct probe *probe, enum probe_action action) -+{ -+ struct svr4_info *info = get_svr4_info (); -+ struct probe_and_action lookup, *pa; -+ void **slot; -+ -+ /* Create the probes table, if necessary. */ -+ if (info->probes_table == NULL) -+ info->probes_table = htab_create_alloc (1, hash_probe_and_action, -+ equal_probe_and_action, -+ xfree, xcalloc, xfree); -+ -+ lookup.probe = probe; -+ slot = htab_find_slot (info->probes_table, &lookup, INSERT); -+ gdb_assert (*slot == HTAB_EMPTY_ENTRY); -+ -+ pa = XCNEW (struct probe_and_action); -+ pa->probe = probe; -+ pa->action = action; -+ -+ *slot = pa; -+} -+ -+/* Get the solib event probe at the specified location, and the -+ action associated with it. Returns NULL if no solib event probe -+ was found. */ -+ -+static struct probe_and_action * -+solib_event_probe_at (struct svr4_info *info, CORE_ADDR address) -+{ -+ struct probe lookup_probe; -+ struct probe_and_action lookup; -+ void **slot; -+ -+ lookup_probe.address = address; -+ lookup.probe = &lookup_probe; -+ slot = htab_find_slot (info->probes_table, &lookup, NO_INSERT); -+ -+ if (slot == NULL) -+ return NULL; -+ -+ return (struct probe_and_action *) *slot; -+} -+ -+/* Decide what action to take when the specified solib event probe is -+ hit. */ -+ -+static enum probe_action -+solib_event_probe_action (struct probe_and_action *pa) -+{ -+ enum probe_action action; -+ unsigned probe_argc; -+ -+ action = pa->action; -+ if (action == DO_NOTHING || action == PROBES_INTERFACE_FAILED) -+ return action; -+ -+ gdb_assert (action == FULL_RELOAD || action == UPDATE_OR_RELOAD); -+ -+ /* Check that an appropriate number of arguments has been supplied. -+ We expect: -+ arg0: Lmid_t lmid (mandatory) -+ arg1: struct r_debug *debug_base (mandatory) -+ arg2: struct link_map *new (optional, for incremental updates) */ -+ probe_argc = get_probe_argument_count (pa->probe); -+ if (probe_argc == 2) -+ action = FULL_RELOAD; -+ else if (probe_argc < 2) -+ action = PROBES_INTERFACE_FAILED; -+ -+ return action; -+} -+ -+/* Populate the shared object list by reading the entire list of -+ shared objects from the inferior. Handle special cases relating -+ to the first elements of the list. Returns nonzero on success. */ -+ -+static int -+solist_update_full (struct svr4_info *info) -+{ -+ free_solib_list (info); -+ info->solib_list = svr4_current_sos_direct (info); -+ -+ return 1; -+} -+ -+/* Update the shared object list starting from the link-map entry -+ passed by the linker in the probe's third argument. Returns -+ nonzero if the list was successfully updated, or zero to indicate -+ failure. */ -+ -+static int -+solist_update_incremental (struct svr4_info *info, CORE_ADDR lm) -+{ -+ struct so_list *tail; -+ CORE_ADDR prev_lm; -+ -+ /* svr4_current_sos_direct contains logic to handle a number of -+ special cases relating to the first elements of the list. To -+ avoid duplicating this logic we defer to solist_update_full -+ if the list is empty. */ -+ if (info->solib_list == NULL) -+ return 0; -+ -+ /* Fall back to a full update if we are using a remote target -+ that does not support incremental transfers. */ -+ if (info->using_xfer && !target_augmented_libraries_svr4_read ()) -+ return 0; -+ -+ /* Walk to the end of the list. */ -+ for (tail = info->solib_list; tail->next != NULL; tail = tail->next) -+ /* Nothing. */; -+ prev_lm = tail->lm_info->lm_addr; -+ -+ /* Read the new objects. */ -+ if (info->using_xfer) -+ { -+ struct svr4_library_list library_list; -+ char annex[64]; -+ -+ xsnprintf (annex, sizeof (annex), "start=%s;prev=%s", -+ phex_nz (lm, sizeof (lm)), -+ phex_nz (prev_lm, sizeof (prev_lm))); -+ if (!svr4_current_sos_via_xfer_libraries (&library_list, annex)) -+ return 0; -+ -+ tail->next = library_list.head; -+ } -+ else -+ { -+ struct so_list **link = &tail->next; -+ -+ /* IGNORE_FIRST may safely be set to zero here because the -+ above check and deferral to solist_update_full ensures -+ that this call to svr4_read_so_list will never see the -+ first element. */ -+ if (!svr4_read_so_list (lm, prev_lm, &link, 0)) -+ return 0; -+ } -+ -+ return 1; -+} -+ -+/* Disable the probes-based linker interface and revert to the -+ original interface. We don't reset the breakpoints as the -+ ones set up for the probes-based interface are adequate. */ -+ -+static void -+disable_probes_interface_cleanup (void *arg) -+{ -+ struct svr4_info *info = get_svr4_info (); -+ -+ warning (_("Probes-based dynamic linker interface failed.\n" -+ "Reverting to original interface.\n")); -+ -+ free_probes_table (info); -+ free_solib_list (info); -+} -+ -+/* Update the solib list as appropriate when using the -+ probes-based linker interface. Do nothing if using the -+ standard interface. */ -+ -+static void -+svr4_handle_solib_event (void) -+{ -+ struct svr4_info *info = get_svr4_info (); -+ struct probe_and_action *pa; -+ enum probe_action action; -+ struct cleanup *old_chain, *usm_chain; -+ struct value *val; -+ CORE_ADDR pc, debug_base, lm = 0; -+ int is_initial_ns; -+ -+ /* Do nothing if not using the probes interface. */ -+ if (info->probes_table == NULL) -+ return; -+ -+ /* If anything goes wrong we revert to the original linker -+ interface. */ -+ old_chain = make_cleanup (disable_probes_interface_cleanup, NULL); -+ -+ pc = regcache_read_pc (get_current_regcache ()); -+ pa = solib_event_probe_at (info, pc); -+ if (pa == NULL) -+ { -+ do_cleanups (old_chain); -+ return; -+ } -+ -+ action = solib_event_probe_action (pa); -+ if (action == PROBES_INTERFACE_FAILED) -+ { -+ do_cleanups (old_chain); -+ return; -+ } -+ -+ if (action == DO_NOTHING) -+ { -+ discard_cleanups (old_chain); -+ return; -+ } -+ -+ /* evaluate_probe_argument looks up symbols in the dynamic linker -+ using find_pc_section. find_pc_section is accelerated by a cache -+ called the section map. The section map is invalidated every -+ time a shared library is loaded or unloaded, and if the inferior -+ is generating a lot of shared library events then the section map -+ will be updated every time svr4_handle_solib_event is called. -+ We called find_pc_section in svr4_create_solib_event_breakpoints, -+ so we can guarantee that the dynamic linker's sections are in the -+ section map. We can therefore inhibit section map updates across -+ these calls to evaluate_probe_argument and save a lot of time. */ -+ inhibit_section_map_updates (current_program_space); -+ usm_chain = make_cleanup (resume_section_map_updates_cleanup, -+ current_program_space); -+ -+ val = evaluate_probe_argument (pa->probe, 1); -+ if (val == NULL) -+ { -+ do_cleanups (old_chain); -+ return; -+ } -+ -+ debug_base = value_as_address (val); -+ if (debug_base == 0) -+ { -+ do_cleanups (old_chain); -+ return; -+ } -+ -+ /* Always locate the debug struct, in case it moved. */ -+ info->debug_base = 0; -+ if (locate_base (info) == 0) -+ { -+ do_cleanups (old_chain); -+ return; -+ } -+ -+ /* GDB does not currently support libraries loaded via dlmopen -+ into namespaces other than the initial one. We must ignore -+ any namespace other than the initial namespace here until -+ support for this is added to GDB. */ -+ if (debug_base != info->debug_base) -+ action = DO_NOTHING; -+ -+ if (action == UPDATE_OR_RELOAD) -+ { -+ val = evaluate_probe_argument (pa->probe, 2); -+ if (val != NULL) -+ lm = value_as_address (val); -+ -+ if (lm == 0) -+ action = FULL_RELOAD; -+ } -+ -+ /* Resume section map updates. */ -+ do_cleanups (usm_chain); -+ -+ if (action == UPDATE_OR_RELOAD) -+ { -+ if (!solist_update_incremental (info, lm)) -+ action = FULL_RELOAD; -+ } -+ -+ if (action == FULL_RELOAD) -+ { -+ if (!solist_update_full (info)) -+ { -+ do_cleanups (old_chain); -+ return; -+ } -+ } -+ -+ discard_cleanups (old_chain); -+} -+ -+/* Helper function for svr4_update_solib_event_breakpoints. */ -+ -+static int -+svr4_update_solib_event_breakpoint (struct breakpoint *b, void *arg) -+{ -+ struct bp_location *loc; -+ -+ if (b->type != bp_shlib_event) -+ { -+ /* Continue iterating. */ -+ return 0; -+ } -+ -+ for (loc = b->loc; loc != NULL; loc = loc->next) -+ { -+ struct svr4_info *info; -+ struct probe_and_action *pa; -+ -+ info = program_space_data (loc->pspace, solib_svr4_pspace_data); -+ if (info == NULL || info->probes_table == NULL) -+ continue; -+ -+ pa = solib_event_probe_at (info, loc->address); -+ if (pa == NULL) -+ continue; -+ -+ if (pa->action == DO_NOTHING) -+ { -+ if (b->enable_state == bp_disabled && stop_on_solib_events) -+ enable_breakpoint (b); -+ else if (b->enable_state == bp_enabled && !stop_on_solib_events) -+ disable_breakpoint (b); -+ } -+ -+ break; -+ } -+ -+ /* Continue iterating. */ -+ return 0; -+} -+ -+/* Enable or disable optional solib event breakpoints as appropriate. -+ Called whenever stop_on_solib_events is changed. */ -+ -+static void -+svr4_update_solib_event_breakpoints (void) -+{ -+ iterate_over_breakpoints (svr4_update_solib_event_breakpoint, NULL); -+} -+ -+/* Create and register solib event breakpoints. PROBES is an array -+ of NUM_PROBES elements, each of which is vector of probes. A -+ solib event breakpoint will be created and registered for each -+ probe. */ -+ -+static void -+svr4_create_probe_breakpoints (struct gdbarch *gdbarch, -+ VEC (probe_p) **probes) -+{ -+ int i; -+ -+ for (i = 0; i < NUM_PROBES; i++) -+ { -+ enum probe_action action = probe_info[i].action; -+ struct probe *probe; -+ int ix; -+ -+ for (ix = 0; -+ VEC_iterate (probe_p, probes[i], ix, probe); -+ ++ix) -+ { -+ create_solib_event_breakpoint (gdbarch, probe->address); -+ register_solib_event_probe (probe, action); -+ } -+ } -+ -+ svr4_update_solib_event_breakpoints (); -+} -+ -+/* Both the SunOS and the SVR4 dynamic linkers call a marker function -+ before and after mapping and unmapping shared libraries. The sole -+ purpose of this method is to allow debuggers to set a breakpoint so -+ they can track these changes. -+ -+ Some versions of the glibc dynamic linker contain named probes -+ to allow more fine grained stopping. Given the address of the -+ original marker function, this function attempts to find these -+ probes, and if found, sets breakpoints on those instead. If the -+ probes aren't found, a single breakpoint is set on the original -+ marker function. */ -+ -+static void -+svr4_create_solib_event_breakpoints (struct gdbarch *gdbarch, -+ CORE_ADDR address) -+{ -+ struct obj_section *os; -+ -+ os = find_pc_section (address); -+ if (os != NULL) -+ { -+ int with_prefix; -+ -+ for (with_prefix = 0; with_prefix <= 1; with_prefix++) -+ { -+ VEC (probe_p) *probes[NUM_PROBES]; -+ int all_probes_found = 1; -+ int i; -+ -+ memset (probes, 0, sizeof (probes)); -+ for (i = 0; i < NUM_PROBES; i++) -+ { -+ const char *name = probe_info[i].name; -+ char buf[32]; -+ -+ /* Fedora 17 and Red Hat Enterprise Linux 6.2-6.4 -+ shipped with an early version of the probes code in -+ which the probes' names were prefixed with "rtld_" -+ and the "map_failed" probe did not exist. The -+ locations of the probes are otherwise the same, so -+ we check for probes with prefixed names if probes -+ with unprefixed names are not present. */ -+ if (with_prefix) -+ { -+ xsnprintf (buf, sizeof (buf), "rtld_%s", name); -+ name = buf; -+ } -+ -+ probes[i] = find_probes_in_objfile (os->objfile, "rtld", name); -+ -+ /* The "map_failed" probe did not exist in early -+ versions of the probes code in which the probes' -+ names were prefixed with "rtld_". */ -+ if (strcmp (name, "rtld_map_failed") == 0) -+ continue; -+ -+ if (VEC_empty (probe_p, probes[i])) -+ { -+ all_probes_found = 0; -+ break; -+ } -+ } -+ -+ if (all_probes_found) -+ svr4_create_probe_breakpoints (gdbarch, probes); -+ -+ for (i = 0; i < NUM_PROBES; i++) -+ VEC_free (probe_p, probes[i]); -+ -+ if (all_probes_found) -+ return; -+ } -+ } -+ -+ create_solib_event_breakpoint (gdbarch, address); -+} -+ - /* Helper function for gdb_bfd_lookup_symbol. */ - - static int -@@ -1532,7 +2151,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 -- address to create_solib_event_breakpoint. The call to -+ address to svr4_create_solib_event_breakpoints. The call to - 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 -@@ -1570,7 +2189,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); - return 1; - } - } -@@ -1728,7 +2347,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 (), -+ load_addr + sym_addr); - xfree (interp_name); - return 1; - } -@@ -1754,7 +2374,7 @@ enable_break (struct svr4_info *info, in - sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (), - sym_addr, - ¤t_target); -- create_solib_event_breakpoint (target_gdbarch (), sym_addr); -+ svr4_create_solib_event_breakpoints (target_gdbarch (), sym_addr); - return 1; - } - } -@@ -1770,7 +2390,7 @@ enable_break (struct svr4_info *info, in - sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (), - sym_addr, - ¤t_target); -- create_solib_event_breakpoint (target_gdbarch (), sym_addr); -+ svr4_create_solib_event_breakpoints (target_gdbarch (), sym_addr); - return 1; - } - } -@@ -2266,6 +2886,10 @@ svr4_solib_create_inferior_hook (int fro - - info = get_svr4_info (); - -+ /* Clear the probes-based interface's state. */ -+ free_probes_table (info); -+ free_solib_list (info); -+ - /* Relocate the main executable if necessary. */ - svr4_relocate_main_executable (); - -@@ -2507,4 +3131,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.update_breakpoints = svr4_update_solib_event_breakpoints; -+ svr4_so_ops.handle_event = svr4_handle_solib_event; - } -Index: gdb-7.6/gdb/solib.c -=================================================================== ---- gdb-7.6.orig/gdb/solib.c 2013-06-10 14:44:37.392812675 +0200 -+++ gdb-7.6/gdb/solib.c 2013-06-10 14:44:37.713812578 +0200 -@@ -1221,6 +1221,37 @@ no_shared_libraries (char *ignored, int - objfile_purge_solibs (); - } - -+/* See solib.h. */ -+ -+void -+update_solib_breakpoints (void) -+{ -+ const struct target_so_ops *ops = solib_ops (target_gdbarch ()); -+ -+ if (ops->update_breakpoints != NULL) -+ ops->update_breakpoints (); -+} -+ -+/* See solib.h. */ -+ -+void -+handle_solib_event (void) -+{ -+ const struct target_so_ops *ops = solib_ops (target_gdbarch ()); -+ -+ if (ops->handle_event != NULL) -+ ops->handle_event (); -+ -+ clear_program_space_solib_cache (current_inferior ()->pspace); -+ -+ /* Check for any newly added shared libraries if we're supposed to -+ be adding them automatically. Switch terminal for any messages -+ produced by breakpoint_re_set. */ -+ target_terminal_ours_for_output (); -+ solib_add (NULL, 0, ¤t_target, auto_solib_add); -+ target_terminal_inferior (); -+} -+ - /* Reload shared libraries, but avoid reloading the same symbol file - we already have loaded. */ - -Index: gdb-7.6/gdb/solib.h -=================================================================== ---- gdb-7.6.orig/gdb/solib.h 2013-01-01 07:32:51.000000000 +0100 -+++ gdb-7.6/gdb/solib.h 2013-06-10 14:44:37.713812578 +0200 -@@ -90,4 +90,12 @@ extern CORE_ADDR gdb_bfd_lookup_symbol_f - void *), - void *data); - -+/* Enable or disable optional solib event breakpoints as appropriate. */ -+ -+extern void update_solib_breakpoints (void); -+ -+/* Handle an solib event by calling solib_add. */ -+ -+extern void handle_solib_event (void); -+ - #endif /* SOLIB_H */ -Index: gdb-7.6/gdb/solist.h -=================================================================== ---- gdb-7.6.orig/gdb/solist.h 2013-01-01 07:32:51.000000000 +0100 -+++ gdb-7.6/gdb/solist.h 2013-06-10 14:44:37.713812578 +0200 -@@ -148,6 +148,19 @@ struct target_so_ops - core file (in particular, for readonly sections). */ - int (*keep_data_in_core) (CORE_ADDR vaddr, - unsigned long size); -+ -+ /* Enable or disable optional solib event breakpoints as -+ appropriate. This should be called whenever -+ stop_on_solib_events is changed. This pointer can be -+ NULL, in which case no enabling or disabling is necessary -+ for this target. */ -+ void (*update_breakpoints) (void); -+ -+ /* Target-specific processing of solib events that will be -+ performed before solib_add is called. This pointer can be -+ NULL, in which case no specific preprocessing is necessary -+ for this target. */ -+ void (*handle_event) (void); - }; - - /* Free the memory associated with a (so_list *). */ -Index: gdb-7.6/gdb/breakpoint.c -=================================================================== ---- gdb-7.6.orig/gdb/breakpoint.c 2013-06-10 14:44:37.500812642 +0200 -+++ gdb-7.6/gdb/breakpoint.c 2013-06-10 14:44:57.301806708 +0200 -@@ -5348,25 +5348,6 @@ handle_jit_event (void) - target_terminal_inferior (); - } - --/* Handle an solib event by calling solib_add. */ -- --void --handle_solib_event (void) --{ -- clear_program_space_solib_cache (current_inferior ()->pspace); -- -- /* Check for any newly added shared libraries if we're supposed to -- be adding them automatically. Switch terminal for any messages -- produced by breakpoint_re_set. */ -- target_terminal_ours_for_output (); --#ifdef SOLIB_ADD -- SOLIB_ADD (NULL, 0, ¤t_target, auto_solib_add); --#else -- solib_add (NULL, 0, ¤t_target, auto_solib_add); --#endif -- target_terminal_inferior (); --} -- - /* Prepare WHAT final decision for infrun. */ - - /* Decide what infrun needs to do with this bpstat. */ diff --git a/gdb-dlopen-stap-probe-8of9.patch b/gdb-dlopen-stap-probe-8of9.patch deleted file mode 100644 index 3b6638a..0000000 --- a/gdb-dlopen-stap-probe-8of9.patch +++ /dev/null @@ -1,462 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00019.html - -### src/gdb/testsuite/ChangeLog 2013/05/30 00:25:16 1.3682 -### src/gdb/testsuite/ChangeLog 2013/06/04 13:23:31 1.3683 -## -1,3 +1,19 @@ -+2013-06-04 Jan Kratochvil -+ Gary Benson -+ -+ * lib/gdb.exp (build_executable_from_specs): Use gdb_compile_pthread, -+ gdb_compile_shlib or gdb_compile_shlib_pthreads where appropriate. -+ * lib/prelink-support.exp (build_executable_own_libs): Allow INTERP -+ to be set to "no" to indicate that no ld.so copy should be made. -+ * gdb.base/break-interp.exp (solib_bp): New constant. -+ (reach_1): Use the above instead of "_dl_debug_state". -+ (test_attach): Likewise. -+ (test_ld): Likewise. -+ * gdb.threads/dlopen-libpthread.exp: New file. -+ * gdb.threads/dlopen-libpthread.c: Likewise. -+ * gdb.threads/dlopen-libpthread-lib.c: Likewise. -+ * gdb.base/solib-corrupted.exp: Disable test if GDB is using probes. -+ - 2013-05-30 Yao Qi - - * gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed): -Index: gdb-7.6/gdb/testsuite/gdb.base/break-interp.exp -=================================================================== ---- gdb-7.6.orig/gdb/testsuite/gdb.base/break-interp.exp 2013-06-10 14:29:24.815123941 +0200 -+++ gdb-7.6/gdb/testsuite/gdb.base/break-interp.exp 2013-06-10 14:30:18.086102375 +0200 -@@ -109,12 +109,19 @@ proc strip_debug {dest} { - } - } - -+# The marker function for the standard runtime linker interface is -+# _dl_debug_state. The probes-based interface has no specific marker -+# function; the probe we will stop on (init_start) is in dl_main so we -+# check for that. -+ -+set solib_bp {(_dl_debug_state|dl_main)} -+ - # Implementation of reach. - - proc reach_1 {func command displacement} { -- global gdb_prompt expect_out -+ global gdb_prompt expect_out solib_bp - -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - # Breakpoint on _dl_debug_state can have problems due to its overlap - # with the existing internal breakpoint from GDB. - gdb_test_no_output "set stop-on-solib-events 1" -@@ -142,21 +149,21 @@ proc reach_1 {func command displacement} - exp_continue - } - -re "Breakpoint \[0-9\]+, \\.?(__GI_)?$func \\(.*\\) at .*:\[0-9\]+\r\n.*$gdb_prompt $" { -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - fail $test - } else { - pass $test - } - } - -re "Breakpoint \[0-9\]+, \[0-9xa-f\]+ in \\.?(__GI_)?$func \\(\\).*\r\n$gdb_prompt $" { -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - fail $test - } else { - pass $test - } - } - -re "Stopped due to (spurious )?shared library event.*\r\n$gdb_prompt $" { -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - if {$debug_state_count == 0} { - # First stop does not yet relocate the _start function - # descriptor on ppc64. -@@ -175,7 +182,7 @@ proc reach_1 {func command displacement} - fail $test_displacement - } - -- if {$func == "_dl_debug_state"} { -+ if {$func == $solib_bp} { - gdb_test_no_output "set stop-on-solib-events 0" - } - } -@@ -357,7 +364,7 @@ proc test_attach {file displacement {rel - } - - proc test_ld {file ifmain trynosym displacement} { -- global srcdir subdir gdb_prompt expect_out inferior_exited_re -+ global srcdir subdir gdb_prompt expect_out inferior_exited_re solib_bp - - # First test normal `file'-command loaded $FILE with symbols. - -@@ -385,9 +392,9 @@ proc test_ld {file ifmain trynosym displ - gdb_test_no_output "set args ${objdir}/${subdir}/$binfile_test" "set args OBJDIR/${subdir}/$binfile_test" - } - -- reach "_dl_debug_state" "run" $displacement -+ reach $solib_bp "run" $displacement - -- gdb_test "bt" "#0 +\[^\r\n\]*\\m(__GI_)?_dl_debug_state\\M.*" "dl bt" -+ gdb_test "bt" "#0 +\[^\r\n\]*\\m(__GI_)?$solib_bp\\M.*" "dl bt" - - if $ifmain { - reach "main" continue "NONE" -@@ -399,7 +406,7 @@ proc test_ld {file ifmain trynosym displ - - # Try re-run if the new PIE displacement takes effect. - gdb_test "kill" "" "kill" {Kill the program being debugged\? \(y or n\) } "y" -- reach "_dl_debug_state" "run" $displacement -+ reach $solib_bp "run" $displacement - - if $ifmain { - test_core $file $displacement -@@ -431,7 +438,7 @@ proc test_ld {file ifmain trynosym displ - gdb_test "exec-file $file" "exec-file $escapedfile" "load" - - if $ifmain { -- reach "_dl_debug_state" run $displacement -+ reach $solib_bp run $displacement - - # Use two separate gdb_test_multiple statements to avoid timeouts due - # to slow processing of wildcard capturing long output -Index: gdb-7.6/gdb/testsuite/gdb.base/solib-corrupted.exp -=================================================================== ---- gdb-7.6.orig/gdb/testsuite/gdb.base/solib-corrupted.exp 2013-06-10 14:29:24.816123941 +0200 -+++ gdb-7.6/gdb/testsuite/gdb.base/solib-corrupted.exp 2013-06-10 14:30:18.086102375 +0200 -@@ -36,6 +36,33 @@ if ![runto_main] { - return - } - -+# With probes interface GDB no longer scans the inferior library list so its -+# corruption cannot be tested. There is no way to disable the probes -+# interface. -+ -+set probes { init_start init_complete map_start reloc_complete unmap_start -+ unmap_complete } -+set test "info probes" -+gdb_test_multiple $test $test { -+ -re "^rtld\[ \t\]+(?:rtld_)?(\[a-z_\]+)\[ \t\]" { -+ set idx [lsearch -exact $probes $expect_out(1,string)] -+ if { $idx >= 0 } { -+ set probes [lreplace $probes $idx $idx] -+ } -+ exp_continue -+ } -+ -re "^\[^\r\n\]*\r\n" { -+ exp_continue -+ } -+ -re "^$gdb_prompt $" { -+ } -+} -+if { [llength $probes] == 0 } { -+ xfail $test -+ untested "GDB is using probes" -+ return -+} -+ - gdb_test "info sharedlibrary" "From * To .*" "normal list" - - # GDB checks there for matching L_PREV. -Index: gdb-7.6/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c 2013-06-10 14:30:18.086102375 +0200 -@@ -0,0 +1,40 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2011-2013 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 . */ -+ -+#include -+#include -+ -+static void * -+tfunc (void *arg) -+{ -+ void (*notifyp) (void) = arg; -+ -+ notifyp (); -+} -+ -+void -+f (void (*notifyp) (void)) -+{ -+ pthread_t t; -+ int i; -+ -+ i = pthread_create (&t, NULL, tfunc, notifyp); -+ assert (i == 0); -+ -+ i = pthread_join (t, NULL); -+ assert (i == 0); -+} -Index: gdb-7.6/gdb/testsuite/gdb.threads/dlopen-libpthread.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.threads/dlopen-libpthread.c 2013-06-10 14:30:18.087102375 +0200 -@@ -0,0 +1,46 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2011-2013 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 . */ -+ -+#include -+#include -+#include -+ -+static const char *volatile filename; -+ -+static void -+notify (void) -+{ -+ filename = NULL; /* notify-here */ -+} -+ -+int -+main (void) -+{ -+ void *h; -+ void (*fp) (void (*) (void)); -+ -+ assert (filename != NULL); -+ h = dlopen (filename, RTLD_LAZY); -+ assert (h != NULL); -+ -+ fp = dlsym (h, "f"); -+ assert (fp != NULL); -+ -+ fp (notify); -+ -+ return 0; -+} -Index: gdb-7.6/gdb/testsuite/gdb.threads/dlopen-libpthread.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.threads/dlopen-libpthread.exp 2013-06-10 14:30:18.087102375 +0200 -@@ -0,0 +1,74 @@ -+# Copyright 2011-2013 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 . -+ -+if {![istarget *-linux*] || [skip_shlib_tests]} { -+ return 0 -+} -+ -+load_lib prelink-support.exp -+ -+set testfile "dlopen-libpthread" -+set srcmainfile ${testfile}.c -+set srclibfile ${testfile}-lib.c -+set executable ${testfile} -+set binfile_lib ${objdir}/${subdir}/${executable}.so -+set binfile ${objdir}/${subdir}/${executable} -+set lib_dlopen [shlib_target_file ${executable}.so] -+ -+# Use build_executable_own_libs as prelinked libpthread.so can produce false -+# PASS - it is OK if GDB processes it still before relocation. -+ -+set relink_args [build_executable_own_libs ${testfile}.exp ${executable}.so $srclibfile {debug shlib_pthreads} no] -+if {$relink_args == "" || ![prelink_no $relink_args] -+ || [prepare_for_testing ${testfile}.exp ${executable} ${srcmainfile} {debug shlib_load}] } { -+ return -1 -+} -+gdb_load_shlibs $binfile_lib -+ -+if { ![runto_main] } { -+ return -1 -+} -+ -+set test "info probes all rtld rtld_map_complete" -+gdb_test_multiple $test $test { -+ -re "\[ \t\]rtld_map_complete\[ \t\]+0x\[0-9a-f\]+.*\r\n$gdb_prompt $" { -+ pass $test -+ } -+ -re "No probes matched\\.\r\n$gdb_prompt $" { -+ xfail $test -+ untested ${testfile}.exp -+ return -+ } -+} -+ -+set test "libpthread.so not found" -+gdb_test_multiple "info sharedlibrary" $test { -+ -re "/libpthread\\.so.*\r\n$gdb_prompt $" { -+ fail $test -+ } -+ -re "/libc\\.so.*\r\n$gdb_prompt $" { -+ pass $test -+ } -+} -+ -+gdb_test "set variable filename=\"$lib_dlopen\"" -+ -+gdb_breakpoint "notify" -+ -+# The error was: -+# Cannot find new threads: generic error -+gdb_continue_to_breakpoint "notify" ".* notify-here .*" -+ -+gdb_test "info sharedlibrary" {/libpthread\.so.*} "libpthread.so found" -Index: gdb-7.6/gdb/testsuite/lib/gdb.exp -=================================================================== ---- gdb-7.6.orig/gdb/testsuite/lib/gdb.exp 2013-06-10 14:29:24.819123940 +0200 -+++ gdb-7.6/gdb/testsuite/lib/gdb.exp 2013-06-10 14:30:44.654092140 +0200 -@@ -4011,22 +4011,6 @@ proc build_executable_from_specs {testna - - set binfile [standard_output_file $executable] - -- set objects {} -- set i 0 -- foreach {s local_options} $args { -- if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $local_options] != "" } { -- untested $testname -- return -1 -- } -- lappend objects "${binfile}${i}.o" -- incr i -- } -- -- if { [gdb_compile $objects "${binfile}" executable $options] != "" } { -- untested $testname -- return -1 -- } -- - set info_options "" - if { [lsearch -exact $options "c++"] >= 0 } { - set info_options "c++" -@@ -4034,6 +4018,42 @@ proc build_executable_from_specs {testna - if [get_compiler_info ${info_options}] { - return -1 - } -+ -+ set binfile [standard_output_file $executable] -+ -+ set func gdb_compile -+ set func_index [lsearch -regexp $options {^(pthreads|shlib|shlib_pthreads)$}] -+ if {$func_index != -1} { -+ set func "${func}_[lindex $options $func_index]" -+ } -+ -+ # gdb_compile_shlib and gdb_compile_shlib_pthreads do not use the 3rd -+ # parameter. They also requires $sources while gdb_compile and -+ # gdb_compile_pthreads require $objects. Moreover they ignore any options. -+ if [string match gdb_compile_shlib* $func] { -+ set sources_path {} -+ foreach {s local_options} $args { -+ lappend sources_path "${srcdir}/${subdir}/${s}" -+ } -+ set ret [$func $sources_path "${binfile}" $options] -+ } else { -+ set objects {} -+ set i 0 -+ foreach {s local_options} $args { -+ if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $local_options] != "" } { -+ untested $testname -+ return -1 -+ } -+ lappend objects "${binfile}${i}.o" -+ incr i -+ } -+ set ret [$func $objects "${binfile}" executable $options] -+ } -+ if { $ret != "" } { -+ untested $testname -+ return -1 -+ } -+ - return 0 - } - -Index: gdb-7.6/gdb/testsuite/lib/prelink-support.exp -=================================================================== ---- gdb-7.6.orig/gdb/testsuite/lib/prelink-support.exp 2013-06-10 14:29:24.819123940 +0200 -+++ gdb-7.6/gdb/testsuite/lib/prelink-support.exp 2013-06-10 14:30:18.089102374 +0200 -@@ -95,8 +95,9 @@ proc file_copy {src dest} { - # Wrap function build_executable so that the resulting executable is fully - # self-sufficient (without dependencies on system libraries). Parameter - # INTERP may be used to specify a loader (ld.so) to be used that is --# different from the default system one. Libraries on which the executable --# depends are copied into directory DIR. Default DIR value to -+# different from the default system one. INTERP can be set to "no" if no ld.so -+# copy should be made. Libraries on which the executable depends are copied -+# into directory DIR. Default DIR value to - # `${objdir}/${subdir}/${EXECUTABLE}.d'. - # - # In case of success, return a string containing the arguments to be used -@@ -151,8 +152,15 @@ proc build_executable_own_libs {testname - - if {$interp == ""} { - set interp_system [section_get $binfile .interp] -- set interp ${dir}/[file tail $interp_system] -- file_copy $interp_system $interp -+ if {$interp_system == ""} { -+ fail "$test could not find .interp" -+ } else { -+ set interp ${dir}/[file tail $interp_system] -+ file_copy $interp_system $interp -+ } -+ } -+ if {$interp == "no"} { -+ set interp "" - } - - set dests {} -@@ -164,13 +172,19 @@ proc build_executable_own_libs {testname - - # Do not lappend it so that "-rpath $dir" overrides any possible "-rpath"s - # specified by the caller to be able to link it for ldd" above. -- set options [linsert $options 0 "ldflags=-Wl,--dynamic-linker,$interp,-rpath,$dir"] -+ set options [linsert $options 0 "ldflags=-Wl,-rpath,$dir"] -+ if {$interp != ""} { -+ set options [linsert $options 0 "ldflags=-Wl,--dynamic-linker,$interp"] -+ } - - if {[build_executable $testname $executable $sources $options] == -1} { - return "" - } - -- set prelink_args "--dynamic-linker=$interp --ld-library-path=$dir $binfile $interp [concat $dests]" -+ set prelink_args "--ld-library-path=$dir $binfile [concat $dests]" -+ if {$interp != ""} { -+ set prelink_args "--dynamic-linker=$interp $prelink_args $interp" -+ } - return $prelink_args - } - diff --git a/gdb-dlopen-stap-probe-9of9.patch b/gdb-dlopen-stap-probe-9of9.patch deleted file mode 100644 index c2bb897..0000000 --- a/gdb-dlopen-stap-probe-9of9.patch +++ /dev/null @@ -1,415 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-06/msg00020.html - -### src/gdb/testsuite/ChangeLog 2013/06/04 13:23:31 1.3683 -### src/gdb/testsuite/ChangeLog 2013/06/04 13:31:00 1.3684 -## -1,3 +1,13 @@ -+2013-06-04 Gary Benson -+ -+ * gdb.base/break-probes.exp: New file. -+ * gdb.base/break-probes.c: Likewise. -+ * gdb.base/break-probes-solib.c: Likewise. -+ * gdb.base/info-shared.exp: New file. -+ * gdb.base/info-shared.c: Likewise. -+ * gdb.base/info-shared-solib1.c: Likewise. -+ * gdb.base/info-shared-solib2.c: Likewise. -+ - 2013-06-04 Jan Kratochvil - Gary Benson - ---- src/gdb/testsuite/gdb.base/break-probes-solib.c -+++ src/gdb/testsuite/gdb.base/break-probes-solib.c 2013-06-10 12:15:11.548935413 +0000 -@@ -0,0 +1,22 @@ -+/* Copyright 2012-2013 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 . */ -+ -+#include -+ -+int -+foo (int n) -+{ -+ return n * n / 17; -+} ---- src/gdb/testsuite/gdb.base/break-probes.c -+++ src/gdb/testsuite/gdb.base/break-probes.c 2013-06-10 12:15:12.047717383 +0000 -@@ -0,0 +1,30 @@ -+/* Copyright 2012-2013 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 . */ -+ -+#include -+#include -+#include -+ -+int -+main (void) -+{ -+ void *handle = dlopen (SHLIB_NAME, RTLD_LAZY); -+ -+ assert (handle != NULL); -+ -+ dlclose (handle); -+ -+ return 0; -+} ---- src/gdb/testsuite/gdb.base/break-probes.exp -+++ src/gdb/testsuite/gdb.base/break-probes.exp 2013-06-10 12:15:12.620368040 +0000 -@@ -0,0 +1,78 @@ -+# Copyright 2012-2013 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 . -+ -+if { [skip_shlib_tests] } { -+ return 0 -+} -+ -+standard_testfile -+ -+set libname $testfile-solib -+set srcfile_lib $srcdir/$subdir/$libname.c -+set binfile_lib [standard_output_file $libname.so] -+ -+set normal_bp "_dl_debug_state" -+set probes_bp "dl_main" -+ -+if { [gdb_compile_shlib $srcfile_lib $binfile_lib \ -+ [list additional_flags=-fPIC]] != "" } { -+ untested "Could not compile $binfile_lib." -+ return -1 -+} -+ -+if { [prepare_for_testing $testfile.exp $testfile $srcfile \ -+ [list additional_flags=-DSHLIB_NAME=\"$binfile_lib\" libs=-ldl]] } { -+ return -1 -+} -+ -+# Enable stop-on-solib-events -+gdb_test_no_output "set stop-on-solib-events 1" -+ -+# Start the inferior and run to the first stop -+gdb_run_cmd -+gdb_test "" ".*Stopped due to shared library event.*" -+ -+# XFAIL if we are not using probes -+set test "ensure using probes" -+set using_probes 0 -+gdb_test_multiple "bt" $test { -+ -re "#0 +\[^\r\n\]*\\m(__GI_)?$normal_bp\\M.*$gdb_prompt $" { -+ untested "probes not present on this system" -+ } -+ -re "#0 +\[^\r\n\]*\\m(__GI_)?$probes_bp\\M.*$gdb_prompt $" { -+ pass $test -+ set using_probes 1 -+ } -+} -+ -+if { $using_probes } { -+ # Run til it loads our library -+ set test "run til our library loads" -+ set not_loaded_library 1 -+ while { $not_loaded_library } { -+ set not_loaded_library 0 -+ gdb_test_multiple "c" $test { -+ -re "Inferior loaded $binfile_lib\\M.*$gdb_prompt $" { -+ pass $test -+ } -+ -re "Stopped due to shared library event\\M.*$gdb_prompt $" { -+ set not_loaded_library 1 -+ } -+ } -+ } -+ -+ # Call something to ensure that relocation occurred -+ gdb_test "call foo(23)" "\\\$.* = 31.*\\\M.*" -+} ---- src/gdb/testsuite/gdb.base/info-shared-solib1.c -+++ src/gdb/testsuite/gdb.base/info-shared-solib1.c 2013-06-10 12:15:14.399129288 +0000 -@@ -0,0 +1,24 @@ -+/* Copyright 2012-2013 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 . */ -+ -+#include -+ -+int -+foo (int n) -+{ -+ printf ("foo %d\n", n); -+ -+ return 0; -+} ---- src/gdb/testsuite/gdb.base/info-shared-solib2.c -+++ src/gdb/testsuite/gdb.base/info-shared-solib2.c 2013-06-10 12:15:14.930135742 +0000 -@@ -0,0 +1,24 @@ -+/* Copyright 2012-2013 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 . */ -+ -+#include -+ -+int -+bar (int n) -+{ -+ printf ("bar %d\n", n); -+ -+ return 0; -+} ---- src/gdb/testsuite/gdb.base/info-shared.c -+++ src/gdb/testsuite/gdb.base/info-shared.c 2013-06-10 12:15:15.395474819 +0000 -@@ -0,0 +1,52 @@ -+/* Copyright 2012-2013 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 . */ -+ -+#include -+#include -+#include -+ -+void -+stop (void) -+{ -+} -+ -+int -+main (void) -+{ -+ void *handle1, *handle2; -+ void (*func)(int); -+ -+ handle1 = dlopen (SHLIB1_NAME, RTLD_LAZY); -+ assert (handle1 != NULL); -+ stop (); -+ -+ handle2 = dlopen (SHLIB2_NAME, RTLD_LAZY); -+ assert (handle2 != NULL); -+ stop (); -+ -+ func = (void (*)(int)) dlsym (handle1, "foo"); -+ func (1); -+ -+ func = (void (*)(int)) dlsym (handle2, "bar"); -+ func (2); -+ -+ dlclose (handle1); -+ stop (); -+ -+ dlclose (handle2); -+ stop (); -+ -+ return 0; -+} ---- src/gdb/testsuite/gdb.base/info-shared.exp -+++ src/gdb/testsuite/gdb.base/info-shared.exp 2013-06-10 12:15:15.891450285 +0000 -@@ -0,0 +1,146 @@ -+# Copyright 2012-2013 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 . -+ -+if { [skip_shlib_tests] } { -+ return 0 -+} -+ -+standard_testfile -+ -+set lib1name $testfile-solib1 -+set srcfile_lib1 $srcdir/$subdir/$lib1name.c -+set binfile_lib1 [standard_output_file $lib1name.so] -+set define1 -DSHLIB1_NAME=\"$binfile_lib1\" -+ -+set lib2name $testfile-solib2 -+set srcfile_lib2 $srcdir/$subdir/$lib2name.c -+set binfile_lib2 [standard_output_file $lib2name.so] -+set define2 -DSHLIB2_NAME=\"$binfile_lib2\" -+ -+if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 \ -+ [list additional_flags=-fPIC]] != "" } { -+ untested "Could not compile $binfile_lib1." -+ return -1 -+} -+ -+if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 \ -+ [list additional_flags=-fPIC]] != "" } { -+ untested "Could not compile $binfile_lib2." -+ return -1 -+} -+ -+set cflags "$define1 $define2" -+if { [prepare_for_testing $testfile.exp $testfile $srcfile \ -+ [list additional_flags=$cflags libs=-ldl]] } { -+ return -1 -+} -+ -+# Run "info sharedlibrary" and check for the presence or absence of -+# our libraries. -+proc check_info_shared { test expect1 expect2 } { -+ global lib1name -+ global lib2name -+ global gdb_prompt -+ -+ set actual1 0 -+ set actual2 0 -+ -+ gdb_test_multiple "info sharedlibrary" $test { -+ -re $lib1name { -+ set actual1 1 -+ exp_continue -+ } -+ -re $lib2name { -+ set actual2 1 -+ exp_continue -+ } -+ -re "\r\n$gdb_prompt $" { -+ if { $actual1 == $expect1 && $actual2 == $expect2 } { -+ pass $test -+ } else { -+ fail $test -+ } -+ } -+ } -+} -+ -+# Start the inferior, and check neither of the libraries are loaded at -+# the start. -+if ![runto_main] { -+ return 0 -+} -+check_info_shared "info sharedlibrary #1" 0 0 -+ -+# Set up breakpoints. -+gdb_breakpoint "stop" -+gdb_breakpoint "foo" allow-pending -+gdb_breakpoint "bar" allow-pending -+ -+# Run to the first stop and check that only the first library is loaded. -+gdb_continue_to_breakpoint "library load #1" "stop .*" -+check_info_shared "info sharedlibrary #2" 1 0 -+ -+# Run to the second stop and check that both libraries are loaded. -+gdb_continue_to_breakpoint "library load #2" "stop .*" -+check_info_shared "info sharedlibrary #3" 1 1 -+ -+# Check that the next stop is in foo. -+gdb_continue_to_breakpoint "library function #1" "foo .*" -+ -+# Check that the next stop is in bar. -+gdb_continue_to_breakpoint "library function #2" "bar .*" -+ -+# Restart the inferior and make sure there are no breakpoint reset -+# errors. These can happen with the probes-based runtime linker -+# interface if the cache is not cleared correctly. -+set test "restart" -+gdb_run_cmd -+gdb_test_multiple "" $test { -+ -re {Start it from the beginning\? \(y or n\) $} { -+ send_gdb "y\n" -+ exp_continue -+ } -+ -re {Error in re-setting breakpoint} { -+ fail $test -+ } -+ -re "\r\n$gdb_prompt $" { -+ pass $test -+ } -+} -+ -+# Check that neither library is loaded. -+check_info_shared "info sharedlibrary #4" 0 0 -+ -+# Run to the first stop and check that only the first library is loaded. -+gdb_continue_to_breakpoint "library load #3" "stop .*" -+check_info_shared "info sharedlibrary #5" 1 0 -+ -+# Run to the second stop and check that both libraries are loaded. -+gdb_continue_to_breakpoint "library load #4" "stop .*" -+check_info_shared "info sharedlibrary #6" 1 1 -+ -+# Check that the next stop is in foo. -+gdb_continue_to_breakpoint "library function #3" "foo .*" -+ -+# Check that the next stop is in bar. -+gdb_continue_to_breakpoint "library function #4" "bar .*" -+ -+# Run to the next stop and check that the first library has been unloaded. -+gdb_continue_to_breakpoint "library unload #1" "stop .*" -+check_info_shared "info sharedlibrary #7" 0 1 -+ -+# Run to the last stop and check that both libraries are gone. -+gdb_continue_to_breakpoint "library unload #2" "stop .*" -+check_info_shared "info sharedlibrary #8" 0 0 diff --git a/gdb-gdb-add-index-script.patch b/gdb-gdb-add-index-script.patch index 1f447b1..81c197c 100644 --- a/gdb-gdb-add-index-script.patch +++ b/gdb-gdb-add-index-script.patch @@ -40,11 +40,11 @@ Subject: [PATCH 4/4] add gdb-add-index 5 files changed, 57 insertions(+), 1 deletions(-) create mode 100755 gdb/gdb-add-index -Index: gdb-7.5.91.20130407/gdb/Makefile.in +Index: gdb-7.6.50.20130731-cvs/gdb/Makefile.in =================================================================== ---- gdb-7.5.91.20130407.orig/gdb/Makefile.in 2013-04-11 16:52:51.000000000 +0200 -+++ gdb-7.5.91.20130407/gdb/Makefile.in 2013-04-11 16:53:59.199279388 +0200 -@@ -1053,6 +1053,15 @@ install-only: install-gstack $(CONFIG_IN +--- gdb-7.6.50.20130731-cvs.orig/gdb/Makefile.in 2013-08-02 16:31:59.603674194 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/Makefile.in 2013-08-02 16:32:08.260690156 +0200 +@@ -1070,6 +1070,15 @@ install-only: install-gstack $(CONFIG_IN $(INSTALL_PROGRAM) gcore \ $(DESTDIR)$(bindir)/$$transformed_name; \ fi @@ -60,11 +60,11 @@ Index: gdb-7.5.91.20130407/gdb/Makefile.in @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do install-python: -Index: gdb-7.5.91.20130407/gdb/doc/gdb.texinfo +Index: gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.5.91.20130407.orig/gdb/doc/gdb.texinfo 2013-04-11 16:53:00.000000000 +0200 -+++ gdb-7.5.91.20130407/gdb/doc/gdb.texinfo 2013-04-11 16:55:07.004278842 +0200 -@@ -17159,6 +17159,14 @@ There are currently some limitation on i +--- gdb-7.6.50.20130731-cvs.orig/gdb/doc/gdb.texinfo 2013-08-02 16:31:59.616674218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doc/gdb.texinfo 2013-08-02 16:32:08.271690176 +0200 +@@ -17447,6 +17447,14 @@ There are currently some limitation on i for DWARF debugging information, not stabs. And, they do not currently work for programs using Ada. @@ -79,7 +79,7 @@ Index: gdb-7.5.91.20130407/gdb/doc/gdb.texinfo @node Symbol Errors @section Errors Reading Symbol Files -@@ -41730,6 +41738,7 @@ switch (die->tag) +@@ -43044,6 +43052,7 @@ switch (die->tag) * gdbserver man:: Remote Server for the GNU Debugger man page * gcore man:: Generate a core file of a running program * gdbinit man:: gdbinit scripts @@ -87,7 +87,7 @@ Index: gdb-7.5.91.20130407/gdb/doc/gdb.texinfo @end menu @node gdb man -@@ -42382,6 +42391,54 @@ gdb(1), @code{info -f gdb -n Startup} +@@ -43696,6 +43705,54 @@ gdb(1), @code{info -f gdb -n Startup} The full documentation for @value{GDBN} is maintained as a Texinfo manual. If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo documentation are properly installed at your site, the command @@ -142,10 +142,10 @@ Index: gdb-7.5.91.20130407/gdb/doc/gdb.texinfo @smallexample info gdb -Index: gdb-7.5.91.20130407/gdb/gdb-add-index +Index: gdb-7.6.50.20130731-cvs/gdb/gdb-add-index =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.5.91.20130407/gdb/gdb-add-index 2013-04-11 16:53:21.524279909 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdb-add-index 2013-08-02 16:32:08.271690176 +0200 @@ -0,0 +1,30 @@ +#! /bin/sh + @@ -177,12 +177,12 @@ Index: gdb-7.5.91.20130407/gdb/gdb-add-index +fi + +exit 0 -Index: gdb-7.5.91.20130407/gdb/doc/Makefile.in +Index: gdb-7.6.50.20130731-cvs/gdb/doc/Makefile.in =================================================================== ---- gdb-7.5.91.20130407.orig/gdb/doc/Makefile.in 2013-04-11 16:50:33.202286928 +0200 -+++ gdb-7.5.91.20130407/gdb/doc/Makefile.in 2013-04-11 16:55:06.993279304 +0200 +--- gdb-7.6.50.20130731-cvs.orig/gdb/doc/Makefile.in 2013-08-02 16:31:59.618674222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doc/Makefile.in 2013-08-02 16:32:28.828727314 +0200 @@ -177,7 +177,7 @@ POD2MAN5 = pod2man --center="GNU Develop - --release="gdb-`sed q $(srcdir)/../version.in`" --section=5 + --release="gdb-`sed q version.subst`" --section=5 # List of man pages generated from gdb.texi -MAN1S = gdb.1 gdbserver.1 gcore.1 @@ -190,7 +190,7 @@ Index: gdb-7.5.91.20130407/gdb/doc/Makefile.in MAN5S = gdbinit.5 MANS = $(MAN1S) $(MAN5S) -@@ -626,6 +626,13 @@ gcore.1: $(GDB_DOC_FILES) +@@ -630,6 +630,13 @@ gcore.1: $(GDB_DOC_FILES) mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f gcore.pod diff --git a/gdb-glibc-strstr-workaround.patch b/gdb-glibc-strstr-workaround.patch index 83f6b09..dc9242e 100644 --- a/gdb-glibc-strstr-workaround.patch +++ b/gdb-glibc-strstr-workaround.patch @@ -1,10 +1,10 @@ -Index: gdb-7.5.50.20130118/gdb/dwarf2read.c +Index: gdb-7.6.50.20130731-cvs/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 +--- gdb-7.6.50.20130731-cvs.orig/gdb/dwarf2read.c 2013-08-02 16:37:51.619241696 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c 2013-08-02 16:38:16.159277461 +0200 +@@ -16654,6 +16654,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); + SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack); linkagename = dwarf2_physname (name, die, cu); + + /* Workaround for: @@ -28,10 +28,10 @@ Index: gdb-7.5.50.20130118/gdb/dwarf2read.c SYMBOL_SET_NAMES (sym, linkagename, strlen (linkagename), 0, objfile); /* Fortran does not have mangling standard and the mangling does differ -Index: gdb-7.5.50.20130118/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp +Index: gdb-7.6.50.20130731-cvs/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 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2013-08-02 16:37:51.620241697 +0200 @@ -0,0 +1,108 @@ +# Copyright (C) 2012 Free Software Foundation, Inc. + diff --git a/gdb-power8-1of2.patch b/gdb-power8-1of2.patch deleted file mode 100644 index 704d603..0000000 --- a/gdb-power8-1of2.patch +++ /dev/null @@ -1,731 +0,0 @@ -[PATCH] Full POWER8 binutils support -http://sourceware.org/ml/binutils/2013-05/msg00235.html -http://sourceware.org/ml/binutils-cvs/2013-05/msg00095.html - -### src/opcodes/ChangeLog 2013/05/17 12:57:15 1.1964 -### src/opcodes/ChangeLog 2013/05/21 01:36:46 1.1965 -## -1,3 +1,28 @@ -+2013-05-20 Peter Bergner -+ -+ * ppc-dis.c (powerpc_init_dialect): Set default dialect to power8. -+ * ppc-opc.c (BHRBE, ST, SIX, PS, SXL, VXPS_MASK, XX1RB_MASK, -+ XLS_MASK, PPCVSX2): New defines. -+ (powerpc_opcodes) : New instructions. -+ : New extended mnemonics. -+ - 2013-05-17 Alan Modra - - * ia64-raw.tbl: Replace non-ASCII char. ---- src/opcodes/ppc-dis.c 2013/01/11 02:25:36 1.62 -+++ src/opcodes/ppc-dis.c 2013/05/21 01:36:46 1.63 -@@ -315,10 +315,7 @@ - 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); -+ dialect = ppc_parse_cpu (dialect, &sticky, "power8") | PPC_OPCODE_ANY; - } - - arg = info->disassembler_options; ---- src/opcodes/ppc-opc.c 2013/05/09 04:32:55 1.159 -+++ src/opcodes/ppc-opc.c 2013/05/21 01:36:46 1.160 -@@ -315,14 +315,18 @@ - { 0xfffc, 0, NULL, NULL, - PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DS }, - -- /* The DUIS field in a XFX form instruction, 10 bits unsigned imediate */ -+ /* The DUIS or BHRBE fields in a XFX form instruction, 10 bits -+ unsigned imediate */ - #define DUIS DS + 1 -+#define BHRBE DUIS - { 0x3ff, 11, NULL, NULL, 0 }, - - /* The E field in a wrteei instruction. */ - /* And the W bit in the pair singles instructions. */ -+ /* And the ST field in a VX form instruction. */ - #define E DUIS + 1 - #define PSW E -+#define ST E - { 0x1, 15, NULL, NULL, 0 }, - - /* The FL1 field in a POWER SC form instruction. */ -@@ -695,8 +699,16 @@ - #define UIMM3 UIMM + 1 - { 0x7, 16, NULL, NULL, 0 }, - -+ /* The SIX field in a VX form instruction. */ -+#define SIX UIMM3 + 1 -+ { 0xf, 11, NULL, NULL, 0 }, -+ -+ /* The PS field in a VX form instruction. */ -+#define PS SIX + 1 -+ { 0x1, 9, NULL, NULL, 0 }, -+ - /* The SHB field in a VA form instruction. */ --#define SHB UIMM3 + 1 -+#define SHB PS + 1 - { 0xf, 6, NULL, NULL, 0 }, - - /* The other UIMM field in a half word EVX form instruction. */ -@@ -751,8 +763,12 @@ - #define S SP + 1 - { 0x1, 20, NULL, NULL, 0 }, - -+ /* The S field in a XL form instruction. */ -+#define SXL S + 1 -+ { 0x1, 11, NULL, NULL, PPC_OPERAND_OPTIONAL }, -+ - /* SH field starting at bit position 16. */ --#define SH16 S + 1 -+#define SH16 SXL + 1 - /* The DCM and DGM fields in a Z form instruction. */ - #define DCM SH16 - #define DGM DCM -@@ -2325,6 +2341,9 @@ - /* A VX_MASK with a UIMM2 field. */ - #define VXUIMM2_MASK (VX_MASK | (0x7 << 18)) - -+/* A VX_MASK with a PS field. */ -+#define VXPS_MASK (VX_MASK & ~(0x1 << 9)) -+ - /* A VA form instruction. */ - #define VXA(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x03f)) - -@@ -2379,6 +2398,9 @@ - /* The mask for an XX1 form instruction. */ - #define XX1_MASK X (0x3f, 0x3ff) - -+/* An XX1_MASK with the RB field fixed. */ -+#define XX1RB_MASK (XX1_MASK | RB_MASK) -+ - /* The mask for an XX2 form instruction. */ - #define XX2_MASK (XX2 (0x3f, 0x1ff) | (0x1f << 16)) - -@@ -2516,6 +2538,9 @@ - /* The mask for an XL form instruction. */ - #define XL_MASK XLLK (0x3f, 0x3ff, 1) - -+/* An XL_MASK with the RT, RA and RB fields fixed, but S bit clear. */ -+#define XLS_MASK ((XL_MASK | RT_MASK | RA_MASK | RB_MASK) & ~(1 << 11)) -+ - /* An XL form instruction which explicitly sets the BO field. */ - #define XLO(op, bo, xop, lk) \ - (XLLK ((op), (xop), (lk)) | ((((unsigned long)(bo)) & 0x1f) << 21)) -@@ -2699,6 +2724,7 @@ - #define PPCVEC PPC_OPCODE_ALTIVEC - #define PPCVEC2 PPC_OPCODE_ALTIVEC2 - #define PPCVSX PPC_OPCODE_VSX -+#define PPCVSX2 PPC_OPCODE_VSX - #define POWER PPC_OPCODE_POWER - #define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2 - #define PWR2COM PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_COMMON -@@ -2845,6 +2871,7 @@ - {"vperm", VXA(4, 43), VXA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB, VC}}, - {"vsldoi", VXA(4, 44), VXASHB_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB, SHB}}, - {"ps_sel", A (4, 23,0), A_MASK, PPCPS, PPCNONE, {FRT, FRA, FRC, FRB}}, -+{"vpermxor", VXA(4, 45), VXA_MASK, PPCVEC2, PPCNONE, {VD, VA, VB, VC}}, - {"vmaddfp", VXA(4, 46), VXA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VC, VB}}, - {"ps_sel.", A (4, 23,1), A_MASK, PPCPS, PPCNONE, {FRT, FRA, FRC, FRB}}, - {"vnmsubfp", VXA(4, 47), VXA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VC, VB}}, -@@ -2863,6 +2890,10 @@ - {"ps_nmadd", A (4, 31,0), A_MASK, PPCPS, PPCNONE, {FRT, FRA, FRC, FRB}}, - {"ps_nmadd.", A (4, 31,1), A_MASK, PPCPS, PPCNONE, {FRT, FRA, FRC, FRB}}, - {"ps_cmpo0", X (4, 32), X_MASK|(3<<21), PPCPS, PPCNONE, {BF, FRA, FRB}}, -+{"vaddeuqm", VXA(4, 60), VXA_MASK, PPCVEC2, PPCNONE, {VD, VA, VB, VC}}, -+{"vaddecuq", VXA(4, 61), VXA_MASK, PPCVEC2, PPCNONE, {VD, VA, VB, VC}}, -+{"vsubeuqm", VXA(4, 62), VXA_MASK, PPCVEC2, PPCNONE, {VD, VA, VB, VC}}, -+{"vsubecuq", VXA(4, 63), VXA_MASK, PPCVEC2, PPCNONE, {VD, VA, VB, VC}}, - {"vadduhm", VX (4, 64), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vmaxuh", VX (4, 66), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vrlh", VX (4, 68), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -@@ -2886,6 +2917,8 @@ - {"vmaxuw", VX (4, 130), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vrlw", VX (4, 132), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vcmpequw", VXR(4, 134,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vmulouw", VX (4, 136), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, -+{"vmuluwm", VX (4, 137), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vmrghw", VX (4, 140), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vpkuhus", VX (4, 142), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"ps_mr", XRC(4, 72,0), XRA_MASK, PPCPS, PPCNONE, {FRT, FRB}}, -@@ -2893,12 +2926,17 @@ - {"machhwsu", XO (4, 76,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"machhwsu.", XO (4, 76,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"ps_cmpo1", X (4, 96), X_MASK|(3<<21), PPCPS, PPCNONE, {BF, FRA, FRB}}, -+{"vaddudm", VX (4, 192), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, -+{"vmaxud", VX (4, 194), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, -+{"vrld", VX (4, 196), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vcmpeqfp", VXR(4, 198,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vcmpequd", VXR(4, 199,0), VXR_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vpkuwus", VX (4, 206), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"machhws", XO (4, 108,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"machhws.", XO (4, 108,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"nmachhws", XO (4, 110,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"nmachhws.", XO (4, 110,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, -+{"vadduqm", VX (4, 256), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vmaxsb", VX (4, 258), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vslb", VX (4, 260), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vmulosb", VX (4, 264), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -@@ -2911,6 +2949,7 @@ - {"mulchwu.", XRC(4, 136,1), X_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"macchwu", XO (4, 140,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"macchwu.", XO (4, 140,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, -+{"vaddcuq", VX (4, 320), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vmaxsh", VX (4, 322), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vslh", VX (4, 324), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vmulosh", VX (4, 328), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -@@ -2926,11 +2965,13 @@ - {"vaddcuw", VX (4, 384), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vmaxsw", VX (4, 386), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vslw", VX (4, 388), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vmulosw", VX (4, 392), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vexptefp", VX (4, 394), VXVA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB}}, - {"vmrglw", VX (4, 396), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vpkshss", VX (4, 398), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"macchwsu", XO (4, 204,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"macchwsu.", XO (4, 204,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, -+{"vmaxsd", VX (4, 450), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vsl", VX (4, 452), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vcmpgefp", VXR(4, 454,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vlogefp", VX (4, 458), VXVA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB}}, -@@ -3014,6 +3055,7 @@ - {"evfsnabs", VX (4, 645), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, - {"evfsneg", VX (4, 646), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, - {"vcmpgtuw", VXR(4, 646,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vmuleuw", VX (4, 648), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evfsmul", VX (4, 648), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evfsdiv", VX (4, 649), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vrfip", VX (4, 650), VXVA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB}}, -@@ -3039,11 +3081,13 @@ - {"cput", APU(4, 348,0), APU_RT_MASK, PPC405, PPCNONE, {RA, FSL}}, - {"efsadd", VX (4, 704), VX_MASK, PPCEFS|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"efssub", VX (4, 705), VX_MASK, PPCEFS|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vminud", VX (4, 706), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"efsabs", VX (4, 708), VX_MASK, PPCEFS|PPCVLE, PPCNONE, {RS, RA}}, - {"vsr", VX (4, 708), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"efsnabs", VX (4, 709), VX_MASK, PPCEFS|PPCVLE, PPCNONE, {RS, RA}}, - {"efsneg", VX (4, 710), VX_MASK, PPCEFS|PPCVLE, PPCNONE, {RS, RA}}, - {"vcmpgtfp", VXR(4, 710,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vcmpgtud", VXR(4, 711,0), VXR_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"efsmul", VX (4, 712), VX_MASK, PPCEFS|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"efsdiv", VX (4, 713), VX_MASK, PPCEFS|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vrfim", VX (4, 714), VXVA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB}}, -@@ -3163,12 +3207,16 @@ - {"vminsw", VX (4, 898), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vsraw", VX (4, 900), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vcmpgtsw", VXR(4, 902,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vmulesw", VX (4, 904), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vctuxs", VX (4, 906), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}}, - {"vcfpuxws", VX (4, 906), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}}, - {"vspltisw", VX (4, 908), VXVB_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, SIMM}}, - {"maclhwsu", XO (4, 460,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"maclhwsu.", XO (4, 460,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, -+{"vminsd", VX (4, 962), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, -+{"vsrad", VX (4, 964), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vcmpbfp", VXR(4, 966,0), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vcmpgtsd", VXR(4, 967,0), VXR_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vctsxs", VX (4, 970), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}}, - {"vcfpsxws", VX (4, 970), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB, UIMM}}, - {"vupklpx", VX (4, 974), VXVA_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VB}}, -@@ -3177,6 +3225,7 @@ - {"nmaclhws", XO (4, 494,0,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"nmaclhws.", XO (4, 494,0,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"vsububm", VX (4,1024), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"bcdadd.", VX (4,1025), VXPS_MASK, PPCVEC2, PPCNONE, {VD, VA, VB, PS}}, - {"vavgub", VX (4,1026), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vabsdub", VX (4,1027), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmhessf", VX (4,1027), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -@@ -3185,6 +3234,7 @@ - {"udi0fcm.", APU(4, 515,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"udi0fcm", APU(4, 515,1), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"evmhossf", VX (4,1031), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vpmsumb", VX (4,1032), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmheumi", VX (4,1032), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhesmi", VX (4,1033), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vmaxfp", VX (4,1034), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -@@ -3206,6 +3256,7 @@ - {"evmhosmia", VX (4,1069), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhosmfa", VX (4,1071), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vsubuhm", VX (4,1088), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"bcdsub.", VX (4,1089), VXPS_MASK, PPCVEC2, PPCNONE, {VD, VA, VB, PS}}, - {"vavguh", VX (4,1090), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"vabsduh", VX (4,1091), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vandc", VX (4,1092), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -@@ -3213,11 +3264,13 @@ - {"udi1fcm.", APU(4, 547,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"udi1fcm", APU(4, 547,1), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"evmwhssf", VX (4,1095), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vpmsumh", VX (4,1096), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmwlumi", VX (4,1096), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vminfp", VX (4,1098), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"evmwhumi", VX (4,1100), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vsro", VX (4,1100), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"evmwhsmi", VX (4,1101), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vpkudum", VX (4,1102), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmwhsmf", VX (4,1103), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmwssf", VX (4,1107), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"machhwo", XO (4, 44,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, -@@ -3243,6 +3296,7 @@ - {"vabsduw", VX (4,1155), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vmr", VX (4,1156), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VBA}}, - {"vor", VX (4,1156), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vpmsumw", VX (4,1160), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vcmpequw.", VXR(4, 134,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi2fcm.", APU(4, 579,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"udi2fcm", APU(4, 579,1), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, -@@ -3250,6 +3304,7 @@ - {"machhwsuo.", XO (4, 76,1,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"ps_merge10", XOPS(4,592,0), XOPS_MASK, PPCPS, PPCNONE, {FRT, FRA, FRB}}, - {"ps_merge10.", XOPS(4,592,1), XOPS_MASK, PPCPS, PPCNONE, {FRT, FRA, FRB}}, -+{"vsubudm", VX (4,1216), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evaddusiaaw", VX (4,1216), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, - {"evaddssiaaw", VX (4,1217), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, - {"evsubfusiaaw",VX (4,1218), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, -@@ -3259,18 +3314,22 @@ - {"evdivws", VX (4,1222), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vcmpeqfp.", VXR(4, 198,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi3fcm.", APU(4, 611,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, -+{"vcmpequd.", VXR(4, 199,1), VXR_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"udi3fcm", APU(4, 611,1), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"evdivwu", VX (4,1223), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vpmsumd", VX (4,1224), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evaddumiaaw", VX (4,1224), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, - {"evaddsmiaaw", VX (4,1225), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, - {"evsubfumiaaw",VX (4,1226), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, - {"evsubfsmiaaw",VX (4,1227), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA}}, -+{"vpkudus", VX (4,1230), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"machhwso", XO (4, 108,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"machhwso.", XO (4, 108,1,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"nmachhwso", XO (4, 110,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"nmachhwso.", XO (4, 110,1,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"ps_merge11", XOPS(4,624,0), XOPS_MASK, PPCPS, PPCNONE, {FRT, FRA, FRB}}, - {"ps_merge11.", XOPS(4,624,1), XOPS_MASK, PPCPS, PPCNONE, {FRT, FRA, FRB}}, -+{"vsubuqm", VX (4,1280), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmheusiaaw", VX (4,1280), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhessiaaw", VX (4,1281), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vavgsb", VX (4,1282), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -@@ -3283,8 +3342,11 @@ - {"udi4fcm", APU(4, 643,1), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"evmhossfaaw", VX (4,1287), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmheumiaaw", VX (4,1288), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vcipher", VX (4,1288), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, -+{"vcipherlast", VX (4,1289), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmhesmiaaw", VX (4,1289), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhesmfaaw", VX (4,1291), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vgbbd", VX (4,1292), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, - {"evmhoumiaaw", VX (4,1292), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhosmiaaw", VX (4,1293), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhosmfaaw", VX (4,1295), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -@@ -3296,13 +3358,19 @@ - {"evmhogumiaa", VX (4,1324), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhogsmiaa", VX (4,1325), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhogsmfaa", VX (4,1327), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vsubcuq", VX (4,1344), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmwlusiaaw", VX (4,1344), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmwlssiaaw", VX (4,1345), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vavgsh", VX (4,1346), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vorc", VX (4,1348), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"udi5fcm.", APU(4, 675,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"udi5fcm", APU(4, 675,1), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, -+{"vncipher", VX (4,1352), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmwlumiaaw", VX (4,1352), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vncipherlast",VX (4,1353), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmwlsmiaaw", VX (4,1353), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vbpermq", VX (4,1356), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, -+{"vpksdus", VX (4,1358), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmwssfaa", VX (4,1363), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"macchwo", XO (4, 172,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"evmwumiaa", VX (4,1368), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -@@ -3316,6 +3384,7 @@ - {"evmhessianw", VX (4,1409), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"vavgsw", VX (4,1410), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"evmhessfanw", VX (4,1411), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vnand", VX (4,1412), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmhousianw", VX (4,1412), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmhossianw", VX (4,1413), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"udi6fcm.", APU(4, 707,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, -@@ -3337,11 +3406,14 @@ - {"evmhogsmfan", VX (4,1455), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmwlusianw", VX (4,1472), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmwlssianw", VX (4,1473), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vsld", VX (4,1476), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vcmpgefp.", VXR(4, 454,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi7fcm.", APU(4, 739,0), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, - {"udi7fcm", APU(4, 739,1), APU_MASK, PPC405|PPC440, PPC476, {URT, URA, URB}}, -+{"vsbox", VX (4,1480), VXVB_MASK, PPCVEC2, PPCNONE, {VD, VA}}, - {"evmwlumianw", VX (4,1480), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"evmwlsmianw", VX (4,1481), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -+{"vpksdss", VX (4,1486), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"evmwssfan", VX (4,1491), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, - {"macchwso", XO (4, 236,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"evmwumian", VX (4,1496), VX_MASK, PPCSPE|PPCVLE, PPCNONE, {RS, RA, RB}}, -@@ -3362,15 +3434,25 @@ - {"vsum4shs", VX (4,1608), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi9fcm.", APU(4, 804,0), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, - {"udi9fcm", APU(4, 804,1), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, -+{"vupkhsw", VX (4,1614), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, - {"vsubuws", VX (4,1664), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vshasigmaw", VX (4,1666), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, ST, SIX}}, -+{"veqv", VX (4,1668), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vcmpgtuw.", VXR(4, 646,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi10fcm.", APU(4, 835,0), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, - {"udi10fcm", APU(4, 835,1), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, - {"vsum2sws", VX (4,1672), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vmrgow", VX (4,1676), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, -+{"vshasigmad", VX (4,1730), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, ST, SIX}}, -+{"vsrd", VX (4,1732), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"vcmpgtfp.", VXR(4, 710,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi11fcm.", APU(4, 867,0), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, -+{"vcmpgtud.", VXR(4, 711,1), VXR_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"udi11fcm", APU(4, 867,1), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, -+{"vupklsw", VX (4,1742), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, - {"vsubsbs", VX (4,1792), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vclzb", VX (4,1794), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, -+{"vpopcntb", VX (4,1795), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, - {"vcmpgtsb.", VXR(4, 774,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi12fcm.", APU(4, 899,0), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, - {"udi12fcm", APU(4, 899,1), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, -@@ -3378,6 +3460,8 @@ - {"maclhwuo", XO (4, 396,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"maclhwuo.", XO (4, 396,1,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"vsubshs", VX (4,1856), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vclzh", VX (4,1858), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, -+{"vpopcnth", VX (4,1859), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, - {"vcmpgtsh.", VXR(4, 838,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi13fcm.", APU(4, 931,0), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, - {"udi13fcm", APU(4, 931,1), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, -@@ -3386,14 +3470,20 @@ - {"nmaclhwo", XO (4, 430,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"nmaclhwo.", XO (4, 430,1,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"vsubsws", VX (4,1920), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vclzw", VX (4,1922), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, -+{"vpopcntw", VX (4,1923), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, - {"vcmpgtsw.", VXR(4, 902,1), VXR_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, - {"udi14fcm.", APU(4, 963,0), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, - {"udi14fcm", APU(4, 963,1), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, - {"vsumsws", VX (4,1928), VX_MASK, PPCVEC|PPCVLE, PPCNONE, {VD, VA, VB}}, -+{"vmrgew", VX (4,1932), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"maclhwsuo", XO (4, 460,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"maclhwsuo.", XO (4, 460,1,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, -+{"vclzd", VX (4,1986), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, -+{"vpopcntd", VX (4,1987), VXVA_MASK, PPCVEC2, PPCNONE, {VD, VB}}, - {"vcmpbfp.", VXR(4, 966,1), VXR_MASK, PPCVEC, PPCNONE, {VD, VA, VB}}, - {"udi15fcm.", APU(4, 995,0), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, -+{"vcmpgtsd.", VXR(4, 967,1), VXR_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}}, - {"udi15fcm", APU(4, 995,1), APU_MASK, PPC440, PPC476, {URT, URA, URB}}, - {"maclhwso", XO (4, 492,1,0),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"maclhwso.", XO (4, 492,1,1),XO_MASK, MULHW|PPCVLE, PPCNONE, {RT, RA, RB}}, -@@ -3965,6 +4055,8 @@ - - {"crandc", XL(19,129), XL_MASK, COM, PPCNONE, {BT, BA, BB}}, - -+{"rfebb", XL(19,146), XLS_MASK, POWER8, PPCNONE, {SXL}}, -+ - {"isync", XL(19,150), 0xffffffff, PPCCOM, PPCNONE, {0}}, - {"ics", XL(19,150), 0xffffffff, PWRCOM, PPCNONE, {0}}, - -@@ -4148,6 +4240,13 @@ - {"bcctrl", XLLK(19,528,1), XLBH_MASK, PPCCOM, PPCNONE, {BO, BI, BH}}, - {"bccl", XLLK(19,528,1), XLBB_MASK, PWRCOM, PPCNONE, {BO, BI}}, - -+{"bctar-", XLYLK(19,560,0,0), XLYBB_MASK, POWER8, PPCNONE, {BOE, BI}}, -+{"bctarl-", XLYLK(19,560,0,1), XLYBB_MASK, POWER8, PPCNONE, {BOE, BI}}, -+{"bctar+", XLYLK(19,560,1,0), XLYBB_MASK, POWER8, PPCNONE, {BOE, BI}}, -+{"bctarl+", XLYLK(19,560,1,1), XLYBB_MASK, POWER8, PPCNONE, {BOE, BI}}, -+{"bctar", XLLK(19,560,0), XLBH_MASK, POWER8, PPCNONE, {BO, BI, BH}}, -+{"bctarl", XLLK(19,560,1), XLBH_MASK, POWER8, PPCNONE, {BO, BI, BH}}, -+ - {"rlwimi", M(20,0), M_MASK, PPCCOM, PPCNONE, {RA, RS, SH, MBE, ME}}, - {"rlimi", M(20,0), M_MASK, PWRCOM, PPCNONE, {RA, RS, SH, MBE, ME}}, - -@@ -4276,6 +4375,8 @@ - {"mulhwu", XO(31,11,0,0), XO_MASK, PPC|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"mulhwu.", XO(31,11,0,1), XO_MASK, PPC|PPCVLE, PPCNONE, {RT, RA, RB}}, - -+{"lxsiwzx", X(31,12), XX1_MASK, PPCVSX2, PPCNONE, {XT6, RA0, RB}}, -+ - {"isellt", X(31,15), X_MASK, PPCISEL, PPCNONE, {RT, RA0, RB}}, - - {"tlbilxlpid", XTO(31,18,0), XTO_MASK, E500MC|PPCA2, PPCNONE, {0}}, -@@ -4316,6 +4417,9 @@ - {"maskg.", XRC(31,29,1), X_MASK, M601, PPCA2, {RA, RS, RB}}, - - {"ldepx", X(31,29), X_MASK, E500MC|PPCA2|PPCVLE, PPCNONE, {RT, RA0, RB}}, -+ -+{"waitasec", X(31,30), XRTRARB_MASK,POWER8, PPCNONE, {0}}, -+ - {"lwepx", X(31,31), X_MASK, E500MC|PPCA2|PPCVLE, PPCNONE, {RT, RA0, RB}}, - - {"cmplw", XOPL(31,32,0), XCMPL_MASK, PPCCOM|PPCVLE, PPCNONE, {OBF, RA, RB}}, -@@ -4335,6 +4439,8 @@ - - {"addg6s", XO(31,74,0,0), XO_MASK, POWER6, PPCNONE, {RT, RA, RB}}, - -+{"lxsiwax", X(31,76), XX1_MASK, PPCVSX2, PPCNONE, {XT6, RA0, RB}}, -+ - {"iseleq", X(31,79), X_MASK, PPCISEL, PPCNONE, {RT, RA0, RB}}, - - {"isel", XISEL(31,15), XISEL_MASK, PPCISEL|TITAN|PPCVLE, PPCNONE, {RT, RA0, RB, CRB}}, -@@ -4344,6 +4450,9 @@ - {"subf.", XO(31,40,0,1), XO_MASK, PPC|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"sub.", XO(31,40,0,1), XO_MASK, PPC|PPCVLE, PPCNONE, {RT, RB, RA}}, - -+{"mfvsrd", X(31,51), XX1RB_MASK, PPCVSX2, PPCNONE, {RA, XS6}}, -+{"mffprd", X(31,51), XX1RB_MASK|1, PPCVSX2, PPCNONE, {RA, FRS}}, -+{"mfvrd", X(31,51)|1, XX1RB_MASK|1, PPCVSX2, PPCNONE, {RA, VS}}, - {"eratilx", X(31,51), X_MASK, PPCA2, PPCNONE, {ERAT_T, RA, RB}}, - - {"lbarx", X(31,52), XEH_MASK, POWER7|PPCVLE, PPCNONE, {RT, RA0, RB, EH}}, -@@ -4421,6 +4530,10 @@ - - {"mtsrdin", X(31,114), XRA_MASK, PPC64, PPCNONE, {RS, RB}}, - -+{"mffprwz", X(31,115), XX1RB_MASK|1, PPCVSX2, PPCNONE, {RA, FRS}}, -+{"mfvrwz", X(31,115)|1, XX1RB_MASK|1, PPCVSX2, PPCNONE, {RA, VS}}, -+{"mfvsrwz", X(31,115), XX1RB_MASK, PPCVSX2, PPCNONE, {RA, XS6}}, -+ - {"lharx", X(31,116), XEH_MASK, POWER7|PPCVLE, PPCNONE, {RT, RA0, RB, EH}}, - - {"clf", X(31,118), XTO_MASK, POWER, PPCNONE, {RA, RB}}, -@@ -4453,6 +4566,9 @@ - {"adde.", XO(31,138,0,1), XO_MASK, PPCCOM|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"ae.", XO(31,138,0,1), XO_MASK, PWRCOM, PPCNONE, {RT, RA, RB}}, - -+{"stxsiwx", X(31,140), XX1_MASK, PPCVSX2, PPCNONE, {XS6, RA0, RB}}, -+ -+{"msgsndp", XRTRA(31,142,0,0), XRTRA_MASK, POWER8, PPCNONE, {RB}}, - {"dcbtstlse", X(31,142), X_MASK, PPCCHLK, E500MC, {CT, RA0, RB}}, - - {"mtcr", XFXM(31,144,0xff,0), XRARB_MASK, COM, PPCNONE, {RS}}, -@@ -4461,6 +4577,8 @@ - - {"mtmsr", X(31,146), XRLARB_MASK, COM|PPCVLE, PPCNONE, {RS, A_L}}, - -+{"mtsle", X(31,147), XRTLRARB_MASK, POWER8, PPCNONE, {L}}, -+ - {"eratsx", XRC(31,147,0), X_MASK, PPCA2, PPCNONE, {RT, RA0, RB}}, - {"eratsx.", XRC(31,147,1), X_MASK, PPCA2, PPCNONE, {RT, RA0, RB}}, - -@@ -4490,14 +4608,19 @@ - {"stvehx", X(31,167), X_MASK, PPCVEC, PPCNONE, {VS, RA0, RB}}, - {"sthfcmx", APU(31,167,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - -+{"msgclrp", XRTRA(31,174,0,0), XRTRA_MASK, POWER8, PPCNONE, {RB}}, - {"dcbtlse", X(31,174), X_MASK, PPCCHLK, E500MC, {CT, RA0, RB}}, - - {"mtmsrd", X(31,178), XRLARB_MASK, PPC64, PPCNONE, {RS, A_L}}, - -+{"mtvsrd", X(31,179), XX1RB_MASK, PPCVSX2, PPCNONE, {XT6, RA}}, -+{"mtfprd", X(31,179), XX1RB_MASK|1, PPCVSX2, PPCNONE, {FRT, RA}}, -+{"mtvrd", X(31,179)|1, XX1RB_MASK|1, PPCVSX2, PPCNONE, {VD, RA}}, - {"eratre", X(31,179), X_MASK, PPCA2, PPCNONE, {RT, RA, WS}}, - - {"stdux", X(31,181), X_MASK, PPC64|PPCVLE, PPCNONE, {RS, RAS, RB}}, - -+{"stqcx.", XRC(31,182,1), X_MASK, POWER8, PPCNONE, {RSQ, RA0, RB}}, - {"wchkall", X(31,182), X_MASK, PPCA2, PPCNONE, {OBF}}, - - {"stwux", X(31,183), X_MASK, PPCCOM|PPCVLE, PPCNONE, {RS, RAS, RB}}, -@@ -4527,6 +4650,9 @@ - - {"mtsr", X(31,210), XRB_MASK|(1<<20), COM, NON32, {SR, RS}}, - -+{"mtfprwa", X(31,211), XX1RB_MASK|1, PPCVSX2, PPCNONE, {FRT, RA}}, -+{"mtvrwa", X(31,211)|1, XX1RB_MASK|1, PPCVSX2, PPCNONE, {VD, RA}}, -+{"mtvsrwa", X(31,211), XX1RB_MASK, PPCVSX2, PPCNONE, {XT6, RA}}, - {"eratwe", X(31,211), X_MASK, PPCA2, PPCNONE, {RS, RA, WS}}, - - {"ldawx.", XRC(31,212,1), X_MASK, PPCA2, PPCNONE, {RT, RA0, RB}}, -@@ -4571,6 +4697,10 @@ - {"mtsrin", X(31,242), XRA_MASK, PPC, NON32, {RS, RB}}, - {"mtsri", X(31,242), XRA_MASK, POWER, NON32, {RS, RB}}, - -+{"mtfprwz", X(31,243), XX1RB_MASK|1, PPCVSX2, PPCNONE, {FRT, RA}}, -+{"mtvrwz", X(31,243)|1, XX1RB_MASK|1, PPCVSX2, PPCNONE, {VD, RA}}, -+{"mtvsrwz", X(31,243), XX1RB_MASK, PPCVSX2, PPCNONE, {XT6, RA}}, -+ - {"dcbtstt", XRT(31,246,0x10), XRT_MASK, POWER7, PPCNONE, {RA0, RB}}, - {"dcbtst", X(31,246), X_MASK, POWER4, PPCNONE, {RA0, RB, CT}}, - {"dcbtst", X(31,246), X_MASK, PPC|PPCVLE, POWER4, {CT, RA0, RB}}, -@@ -4608,6 +4738,8 @@ - - {"mfapidi", X(31,275), X_MASK, BOOKE, TITAN, {RT, RA}}, - -+{"lqarx", X(31,276), XEH_MASK, POWER8, PPCNONE, {RTQ, RAX, RBX, EH}}, -+ - {"lscbx", XRC(31,277,0), X_MASK, M601, PPCNONE, {RT, RA, RB}}, - {"lscbx.", XRC(31,277,1), X_MASK, M601, PPCNONE, {RT, RA, RB}}, - -@@ -4629,6 +4761,8 @@ - {"lvexhx", X(31,293), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}}, - {"lvepx", X(31,295), X_MASK, PPCVEC2|PPCVLE, PPCNONE, {VD, RA0, RB}}, - -+{"mfbhrbe", X(31,302), X_MASK, POWER8, PPCNONE, {RT, BHRBE}}, -+ - {"tlbie", X(31,306), XRTLRA_MASK, PPC, TITAN, {RB, L}}, - {"tlbi", X(31,306), XRT_MASK, POWER, PPCNONE, {RA0, RB}}, - -@@ -4937,6 +5071,8 @@ - - {"slbmte", X(31,402), XRA_MASK, PPC64, PPCNONE, {RS, RB}}, - -+{"pbt.", XRC(31,404,1), X_MASK, POWER8, PPCNONE, {RS, RA0, RB}}, -+ - {"icswx", XRC(31,406,0), X_MASK, POWER7|PPCA2, PPCNONE, {RS, RA, RB}}, - {"icswx.", XRC(31,406,1), X_MASK, POWER7|PPCA2, PPCNONE, {RS, RA, RB}}, - -@@ -4958,6 +5094,8 @@ - {"divwe", XO(31,427,0,0), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}}, - {"divwe.", XO(31,427,0,1), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}}, - -+{"clrbhrb", X(31,430), 0xffffffff, POWER8, PPCNONE, {0}}, -+ - {"slbie", X(31,434), XRTRA_MASK, PPC64, PPCNONE, {RB}}, - - {"ecowx", X(31,438), X_MASK, PPC, TITAN, {RT, RA0, RB}}, -@@ -5246,6 +5384,8 @@ - {"addco.", XO(31,10,1,1), XO_MASK, PPCCOM|PPCVLE, PPCNONE, {RT, RA, RB}}, - {"ao.", XO(31,10,1,1), XO_MASK, PWRCOM, PPCNONE, {RT, RA, RB}}, - -+{"lxsspx", X(31,524), XX1_MASK, PPCVSX2, PPCNONE, {XT6, RA0, RB}}, -+ - {"clcs", X(31,531), XRB_MASK, M601, PPCNONE, {RT, RA}}, - - {"ldbrx", X(31,532), X_MASK, CELL|POWER7|PPCA2, PPCNONE, {RT, RA0, RB}}, -@@ -5340,6 +5480,8 @@ - {"stvlx", X(31,647), X_MASK, CELL, PPCNONE, {VS, RA0, RB}}, - {"stbfcmux", APU(31,647,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}}, - -+{"stxsspx", X(31,652), XX1_MASK, PPCVSX2, PPCNONE, {XS6, RA0, RB}}, -+ - {"tbegin.", XRC(31,654,1), XRTLRARB_MASK,PPCHTM, PPCNONE, {HTM_R}}, - - {"subfeo", XO(31,136,1,0), XO_MASK, PPCCOM|PPCVLE, PPCNONE, {RT, RA, RB}}, -@@ -5525,6 +5667,7 @@ - {"divo.", XO(31,331,1,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}}, - - {"lxvd2x", X(31,844), XX1_MASK, PPCVSX, PPCNONE, {XT6, RA0, RB}}, -+{"lxvx", X(31,844), XX1_MASK, PPCVSX, PPCNONE, {XT6, RA0, RB}}, - - {"tabortwci.", XRC(31,846,1), X_MASK, PPCHTM, PPCNONE, {TO, RA, HTM_SI}}, - -@@ -5636,6 +5779,7 @@ - {"divwuo.", XO(31,459,1,1), XO_MASK, PPC|PPCVLE, PPCNONE, {RT, RA, RB}}, - - {"stxvd2x", X(31,972), XX1_MASK, PPCVSX, PPCNONE, {XS6, RA0, RB}}, -+{"stxvx", X(31,972), XX1_MASK, PPCVSX, PPCNONE, {XS6, RA0, RB}}, - - {"tlbld", X(31,978), XRTRA_MASK, PPC, PPC403|BOOKE|PPCA2|PPC476, {RB}}, - {"tlbwehi", XTLB(31,978,0), XTLB_MASK, PPC403, PPCNONE, {RT, RA}}, -@@ -5868,14 +6012,25 @@ - {"fcfidus", XRC(59,974,0), XRA_MASK, POWER7|PPCA2, PPCNONE, {FRT, FRB}}, - {"fcfidus.", XRC(59,974,1), XRA_MASK, POWER7|PPCA2, PPCNONE, {FRT, FRB}}, - -+{"xsaddsp", XX3(60,0), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, -+{"xsmaddasp", XX3(60,1), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xxsldwi", XX3(60,2), XX3SHW_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6, SHW}}, - {"xxsel", XX4(60,3), XX4_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6, XC6}}, -+{"xssubsp", XX3(60,8), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, -+{"xsmaddmsp", XX3(60,9), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xxspltd", XX3(60,10), XX3DM_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6S, DMEX}}, - {"xxmrghd", XX3(60,10), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xxswapd", XX3(60,10)|(2<<8), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6S}}, - {"xxmrgld", XX3(60,10)|(3<<8), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xxpermdi", XX3(60,10), XX3DM_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6, DM}}, -+{"xsrsqrtesp", XX2(60,10), XX2_MASK, PPCVSX2, PPCNONE, {XT6, XB6}}, -+{"xssqrtsp", XX2(60,11), XX2_MASK, PPCVSX2, PPCNONE, {XT6, XB6}}, -+{"xsmulsp", XX3(60,16), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, -+{"xsmsubasp", XX3(60,17), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xxmrghw", XX3(60,18), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, -+{"xsdivsp", XX3(60,24), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, -+{"xsmsubmsp", XX3(60,25), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, -+{"xsresp", XX2(60,26), XX2_MASK, PPCVSX2, PPCNONE, {XT6, XB6}}, - {"xsadddp", XX3(60,32), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xsmaddadp", XX3(60,33), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xscmpudp", XX3(60,35), XX3BF_MASK, PPCVSX, PPCNONE, {BF, XA6, XB6}}, -@@ -5929,14 +6084,18 @@ - {"xvmsubmdp", XX3(60,121), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xsrdpim", XX2(60,121), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xvtdivdp", XX3(60,125), XX3BF_MASK, PPCVSX, PPCNONE, {BF, XA6, XB6}}, -+{"xsnmaddasp", XX3(60,129), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xxland", XX3(60,130), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvcvspuxws", XX2(60,136), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, -+{"xsnmaddmsp", XX3(60,137), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xvrspi", XX2(60,137), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xxlandc", XX3(60,138), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvrsqrtesp", XX2(60,138), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xvsqrtsp", XX2(60,139), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, -+{"xsnmsubasp", XX3(60,145), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xxlor", XX3(60,146), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvcvspsxws", XX2(60,152), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, -+{"xsnmsubmsp", XX3(60,153), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xvrspiz", XX2(60,153), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xxlxor", XX3(60,154), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvresp", XX2(60,154), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, -@@ -5949,12 +6108,15 @@ - {"xsnmaddmdp", XX3(60,169), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvrspip", XX2(60,169), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xvtsqrtsp", XX2(60,170), XX2BF_MASK, PPCVSX, PPCNONE, {BF, XB6}}, -+{"xxlorc", XX3(60,170), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xvrspic", XX2(60,171), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xscpsgndp", XX3(60,176), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xsnmsubadp", XX3(60,177), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, -+{"xxlnand", XX3(60,178), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xvcvsxwsp", XX2(60,184), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xsnmsubmdp", XX3(60,185), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvrspim", XX2(60,185), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, -+{"xxleqv", XX3(60,186), XX3_MASK, PPCVSX2, PPCNONE, {XT6, XA6, XB6}}, - {"xvmaxsp", XX3(60,192), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvnmaddasp", XX3(60,193), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvminsp", XX3(60,200), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, -@@ -5985,8 +6147,13 @@ - {"xvnmsubmdp", XX3(60,249), XX3_MASK, PPCVSX, PPCNONE, {XT6, XA6, XB6}}, - {"xvrdpim", XX2(60,249), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xscvdpsp", XX2(60,265), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, -+{"xscvdpspn", XX2(60,267), XX2_MASK, PPCVSX2, PPCNONE, {XT6, XB6}}, -+{"xsrsp", XX2(60,281), XX2_MASK, PPCVSX2, PPCNONE, {XT6, XB6}}, -+{"xscvuxdsp", XX2(60,296), XX2_MASK, PPCVSX2, PPCNONE, {XT6, XB6}}, -+{"xscvsxdsp", XX2(60,312), XX2_MASK, PPCVSX2, PPCNONE, {XT6, XB6}}, - {"xscvdpuxds", XX2(60,328), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xscvspdp", XX2(60,329), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, -+{"xscvspdpn", XX2(60,331), XX2_MASK, PPCVSX2, PPCNONE, {XT6, XB6}}, - {"xscvdpsxds", XX2(60,344), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xsabsdp", XX2(60,345), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, - {"xscvuxddp", XX2(60,360), XX2_MASK, PPCVSX, PPCNONE, {XT6, XB6}}, -@@ -6222,6 +6389,8 @@ - {"denbcdq", XRC(63,834,0), X_MASK, POWER6, PPCNONE, {S, FRTp, FRBp}}, - {"denbcdq.", XRC(63,834,1), X_MASK, POWER6, PPCNONE, {S, FRTp, FRBp}}, - -+{"fmrgow", X(63,838), X_MASK, PPCVSX2, PPCNONE, {FRT, FRA, FRB}}, -+ - {"fcfid", XRC(63,846,0), XRA_MASK, PPC64, PPCNONE, {FRT, FRB}}, - {"fcfid", XRC(63,846,0), XRA_MASK, PPC476, PPCNONE, {FRT, FRB}}, - {"fcfid.", XRC(63,846,1), XRA_MASK, PPC64, PPCNONE, {FRT, FRB}}, -@@ -6236,6 +6405,8 @@ - {"fctiduz", XRC(63,943,0), XRA_MASK, POWER7|PPCA2, PPCNONE, {FRT, FRB}}, - {"fctiduz.", XRC(63,943,1), XRA_MASK, POWER7|PPCA2, PPCNONE, {FRT, FRB}}, - -+{"fmrgew", X(63,966), X_MASK, PPCVSX2, PPCNONE, {FRT, FRA, FRB}}, -+ - {"fcfidu", XRC(63,974,0), XRA_MASK, POWER7|PPCA2, PPCNONE, {FRT, FRB}}, - {"fcfidu.", XRC(63,974,1), XRA_MASK, POWER7|PPCA2, PPCNONE, {FRT, FRB}}, - }; diff --git a/gdb-power8-2of2.patch b/gdb-power8-2of2.patch deleted file mode 100644 index af16f9f..0000000 --- a/gdb-power8-2of2.patch +++ /dev/null @@ -1,60 +0,0 @@ -[PATCH] Enable hw watchpoint with longer ranges using DAWR on Power -http://sourceware.org/ml/gdb-patches/2013-07/msg00085.html -http://sourceware.org/ml/gdb-cvs/2013-07/msg00097.html - -### src/gdb/ChangeLog 2013/07/22 11:42:30 1.15812 -### src/gdb/ChangeLog 2013/07/22 13:17:51 1.15813 -## -1,3 +1,9 @@ -+2013-07-22 Edjunior Barbosa Machado -+ -+ * ppc-linux-nat.c (PPC_DEBUG_FEATURE_DATA_BP_DAWR): New define. -+ (ppc_linux_region_ok_for_hw_watchpoint): Add checking to use the new -+ DAWR interface for longer ranges hardware watchpoint (up to 512 bytes). -+ - 2013-07-22 Phil Muldoon - - * top.c (print_gdb_version): Add help, apropos description and ---- gdb-7.6/gdb/ppc-linux-nat.c.orig 2013-07-24 17:39:30.434549279 +0200 -+++ gdb-7.6/gdb/ppc-linux-nat.c 2013-07-24 17:41:31.337706502 +0200 -@@ -178,7 +178,11 @@ struct ppc_hw_breakpoint - (1<<((n)+PPC_BREAKPOINT_CONDITION_BE_SHIFT)) - #endif /* PPC_PTRACE_GETHWDBGINFO */ - -- -+/* Feature defined on Linux kernel v3.9: DAWR interface, that enables wider -+ watchpoint (up to 512 bytes). */ -+#ifndef PPC_DEBUG_FEATURE_DATA_BP_DAWR -+#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x10 -+#endif /* PPC_DEBUG_FEATURE_DATA_BP_DAWR */ - - /* Similarly for the general-purpose (gp0 -- gp31) - and floating-point registers (fp0 -- fp31). */ -@@ -1503,6 +1507,7 @@ ppc_linux_region_ok_for_hw_watchpoint (C - to determine the hardcoded watchable region for watchpoints. */ - if (have_ptrace_booke_interface ()) - { -+ int region_size; - /* Embedded DAC-based processors, like the PowerPC 440 have ranged - watchpoints and can watch any access within an arbitrary memory - region. This is useful to watch arrays and structs, for instance. It -@@ -1511,11 +1516,17 @@ ppc_linux_region_ok_for_hw_watchpoint (C - && booke_debug_info.features & PPC_DEBUG_FEATURE_DATA_BP_RANGE - && ppc_linux_get_hwcap () & PPC_FEATURE_BOOKE) - return 2; -+ /* Check if the processor provides DAWR interface. */ -+ if (booke_debug_info.features & PPC_DEBUG_FEATURE_DATA_BP_DAWR) -+ /* DAWR interface allows to watch up to 512 byte wide ranges which -+ can't cross a 512 byte boundary. */ -+ region_size = 512; -+ else -+ region_size = booke_debug_info.data_bp_alignment; - /* Server processors provide one hardware watchpoint and addr+len should - fall in the watchable region provided by the ptrace interface. */ -- if (booke_debug_info.data_bp_alignment -- && (addr + len > (addr & ~(booke_debug_info.data_bp_alignment - 1)) -- + booke_debug_info.data_bp_alignment)) -+ if (region_size -+ && (addr + len > (addr & ~(region_size - 1)) + region_size)) - return 0; - } - /* addr+len must fall in the 8 byte watchable region for DABR-based diff --git a/gdb-psymtab-expand.patch b/gdb-psymtab-expand.patch deleted file mode 100644 index 9792e48..0000000 --- a/gdb-psymtab-expand.patch +++ /dev/null @@ -1,62 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2013-05/msg00300.html -Subject: [RFA] Fix file name matching in expand_symtabs_matching_via_partial - -[blech, apologies for the resend, typo in address] - -Hi. -I noticed this while playing with my new "mt expand-symtabs" command -and watching "mt set per on" output. - -The test here is wrong. -ref: http://sourceware.org/ml/gdb-patches/2013-02/msg00063.html - -The test - (basenames_may_differ - || (*file_matcher) (lbasename (ps->filename), data, 1)) -fails and the code falls through assuming the file name matched. - -Regression tested on amd64-linux. - -Ok to check in? -Ok for 7.6 branch too? - -2013-05-08 Doug Evans - - * psymtab.c (expand_symtabs_matching_via_partial): Fix file name - matching test. - -Index: psymtab.c -=================================================================== -RCS file: /cvs/src/src/gdb/psymtab.c,v -retrieving revision 1.74 -diff -u -p -r1.74 psymtab.c ---- ./gdb/psymtab.c 6 May 2013 19:15:17 -0000 1.74 -+++ ./gdb/psymtab.c 8 May 2013 19:18:51 -0000 -@@ -1400,15 +1405,21 @@ expand_symtabs_matching_via_partial - - if (file_matcher) - { -+ int match; -+ - if (ps->anonymous) - continue; - -- /* Before we invoke realpath, which can get expensive when many -- files are involved, do a quick comparison of the basenames. */ -- if (!(*file_matcher) (ps->filename, data, 0) -- && (basenames_may_differ -+ match = (*file_matcher) (ps->filename, data, 0); -+ if (! match) -+ { -+ /* Before we invoke realpath, which can get expensive when many -+ files are involved, do a quick comparison of the basenames. */ -+ if (basenames_may_differ - || (*file_matcher) (lbasename (ps->filename), data, 1)) -- && !(*file_matcher) (psymtab_to_fullname (ps), data, 0)) -+ match = (*file_matcher) (psymtab_to_fullname (ps), data, 0); -+ } -+ if (! match) - continue; - } - - diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index dd153b4..5fc6369 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -463,10 +463,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-main.patch -Index: gdb-7.5.50.20130215/gdb/ada-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ada-lang.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ada-lang.c 2013-02-15 22:40:18.513622035 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ada-lang.c 2013-08-02 16:38:26.408292160 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ada-lang.c 2013-08-02 16:39:48.052408256 +0200 @@ -80,7 +80,7 @@ static struct type *desc_bounds_type (st static struct value *desc_bounds (struct value *); @@ -653,7 +653,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c set_value_component_location (v, obj); set_value_bitpos (v, bit_offset + value_bitpos (obj)); -@@ -2427,7 +2430,7 @@ ada_value_primitive_packed_val (struct v +@@ -2426,7 +2429,7 @@ ada_value_primitive_packed_val (struct v not overlap. */ static void move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source, @@ -662,16 +662,16 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c { unsigned int accum, mask; int accum_bits, chunk_size; -@@ -2517,7 +2520,7 @@ ada_value_assign (struct value *toval, s +@@ -2516,7 +2519,7 @@ ada_value_assign (struct value *toval, s { int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; - int from_size; + LONGEST from_size; - char *buffer = (char *) alloca (len); + gdb_byte *buffer = alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); -@@ -2562,7 +2565,7 @@ value_assign_to_component (struct value +@@ -2561,7 +2564,7 @@ value_assign_to_component (struct value (LONGEST) (value_address (component) - value_address (container)); int bit_offset_in_container = value_bitpos (component) - value_bitpos (container); @@ -680,7 +680,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c val = value_cast (value_type (component), val); -@@ -4084,7 +4087,7 @@ ensure_lval (struct value *val) +@@ -4082,7 +4085,7 @@ ensure_lval (struct value *val) if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -689,7 +689,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4158,7 +4161,7 @@ static CORE_ADDR +@@ -4156,7 +4159,7 @@ static CORE_ADDR value_pointer (struct value *value, struct type *type) { struct gdbarch *gdbarch = get_type_arch (type); @@ -698,7 +698,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c gdb_byte *buf = alloca (len); CORE_ADDR addr; -@@ -6053,7 +6056,7 @@ value_tag_from_contents_and_address (str +@@ -6087,7 +6090,7 @@ value_tag_from_contents_and_address (str const gdb_byte *valaddr, CORE_ADDR address) { @@ -707,7 +707,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -6518,7 +6521,7 @@ ada_in_variant (LONGEST val, struct type +@@ -6552,7 +6555,7 @@ ada_in_variant (LONGEST val, struct type only in that it can handle packed values of arbitrary type. */ static struct value * @@ -716,7 +716,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *arg_type) { struct type *type; -@@ -6530,7 +6533,7 @@ ada_value_primitive_field (struct value +@@ -6564,7 +6567,7 @@ ada_value_primitive_field (struct value if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -725,7 +725,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -6557,9 +6560,9 @@ ada_value_primitive_field (struct value +@@ -6591,9 +6594,9 @@ ada_value_primitive_field (struct value Returns 1 if found, 0 otherwise. */ static int @@ -737,7 +737,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c int *index_p) { int i; -@@ -6577,8 +6580,8 @@ find_struct_field (const char *name, str +@@ -6611,8 +6614,8 @@ find_struct_field (const char *name, str for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -748,7 +748,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -6648,7 +6651,7 @@ num_visible_fields (struct type *type) +@@ -6682,7 +6685,7 @@ num_visible_fields (struct type *type) Searches recursively through wrapper fields (e.g., '_parent'). */ static struct value * @@ -757,7 +757,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *type) { int i; -@@ -6681,7 +6684,7 @@ ada_search_struct_field (char *name, str +@@ -6715,7 +6718,7 @@ ada_search_struct_field (char *name, str int j; struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -766,7 +766,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -6699,8 +6702,8 @@ ada_search_struct_field (char *name, str +@@ -6733,8 +6736,8 @@ ada_search_struct_field (char *name, str return NULL; } @@ -777,7 +777,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c /* Return field #INDEX in ARG, where the index is that returned by -@@ -6709,7 +6712,7 @@ static struct value *ada_index_struct_fi +@@ -6743,7 +6746,7 @@ static struct value *ada_index_struct_fi * If found, return value, else return NULL. */ static struct value * @@ -786,7 +786,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -6721,7 +6724,7 @@ ada_index_struct_field (int index, struc +@@ -6755,7 +6758,7 @@ ada_index_struct_field (int index, struc * *INDEX_P. */ static struct value * @@ -795,7 +795,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *type) { int i; -@@ -6811,7 +6814,8 @@ ada_value_struct_elt (struct value *arg, +@@ -6845,7 +6848,8 @@ ada_value_struct_elt (struct value *arg, v = ada_search_struct_field (name, arg, 0, t); else { @@ -805,7 +805,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c struct type *field_type; CORE_ADDR address; -@@ -7124,8 +7128,8 @@ ada_coerce_ref (struct value *val0) +@@ -7158,8 +7162,8 @@ ada_coerce_ref (struct value *val0) /* Return OFF rounded upward if necessary to a multiple of ALIGNMENT (a power of 2). */ @@ -816,7 +816,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c { return (off + alignment - 1) & ~(alignment - 1); } -@@ -7504,10 +7508,9 @@ ada_template_to_fixed_record_type_1 (str +@@ -7538,10 +7542,9 @@ ada_template_to_fixed_record_type_1 (str struct value *mark = value_mark (); struct value *dval; struct type *rtype; @@ -829,7 +829,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c int f; /* Compute the number of fields in this record type that are going -@@ -7578,7 +7581,7 @@ ada_template_to_fixed_record_type_1 (str +@@ -7612,7 +7615,7 @@ ada_template_to_fixed_record_type_1 (str that follow this one. */ if (ada_is_aligner_type (field_type)) { @@ -838,7 +838,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -7707,11 +7710,11 @@ ada_template_to_fixed_record_type_1 (str +@@ -7741,11 +7744,11 @@ ada_template_to_fixed_record_type_1 (str if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) @@ -854,7 +854,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c } else { -@@ -8048,7 +8051,8 @@ to_fixed_array_type (struct type *type0, +@@ -8082,7 +8085,8 @@ to_fixed_array_type (struct type *type0, type was a regular (non-packed) array type. As a result, the bitsize of the array elements needs to be set again, and the array length needs to be recomputed based on that bitsize. */ @@ -864,10 +864,10 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.c int elt_bitsize = TYPE_FIELD_BITSIZE (type0, 0); TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0); -Index: gdb-7.5.50.20130215/gdb/ada-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/ada-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ada-lang.h 2013-01-24 19:04:34.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ada-lang.h 2013-02-15 22:40:18.513622035 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ada-lang.h 2013-08-02 16:38:26.409292162 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ada-lang.h 2013-08-02 16:38:32.343300713 +0200 @@ -169,7 +169,7 @@ extern void ada_print_type (struct type extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream); @@ -886,7 +886,7 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.h const struct value_print_options *); struct value *ada_convert_actual (struct value *actual, -@@ -258,7 +258,7 @@ extern int ada_is_constrained_packed_arr +@@ -257,7 +257,7 @@ extern int ada_is_constrained_packed_arr extern struct value *ada_value_primitive_packed_val (struct value *, const gdb_byte *, @@ -895,10 +895,10 @@ Index: gdb-7.5.50.20130215/gdb/ada-lang.h struct type *); extern struct type *ada_coerce_to_simple_array_type (struct type *); -Index: gdb-7.5.50.20130215/gdb/ada-typeprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/ada-typeprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ada-typeprint.c 2013-01-01 07:32:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ada-typeprint.c 2013-02-15 22:40:18.514622038 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ada-typeprint.c 2013-08-02 16:38:26.424292184 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ada-typeprint.c 2013-08-02 16:38:32.343300713 +0200 @@ -829,8 +829,8 @@ ada_print_type (struct type *type0, cons const char *name = ada_type_name (type); @@ -920,10 +920,10 @@ Index: gdb-7.5.50.20130215/gdb/ada-typeprint.c break; case TYPE_CODE_ENUM: if (show < 0) -Index: gdb-7.5.50.20130215/gdb/ada-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ada-valprint.c 2013-02-01 21:08:45.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ada-valprint.c 2013-02-15 22:40:18.514622038 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ada-valprint.c 2013-08-02 16:38:26.425292185 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ada-valprint.c 2013-08-02 16:38:32.344300715 +0200 @@ -41,16 +41,16 @@ static void print_record (struct type *, const struct value_print_options *); @@ -1084,10 +1084,10 @@ Index: gdb-7.5.50.20130215/gdb/ada-valprint.c int bit_size = TYPE_FIELD_BITSIZE (type, i); struct value_print_options opts; -Index: gdb-7.5.50.20130215/gdb/annotate.c +Index: gdb-7.6.50.20130731-cvs/gdb/annotate.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/annotate.c 2013-01-22 21:22:38.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/annotate.c 2013-02-15 22:40:18.514622038 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/annotate.c 2013-08-02 16:38:26.425292185 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/annotate.c 2013-08-02 16:38:32.344300715 +0200 @@ -523,21 +523,21 @@ annotate_frame_end (void) } @@ -1114,10 +1114,10 @@ Index: gdb-7.5.50.20130215/gdb/annotate.c } void -Index: gdb-7.5.50.20130215/gdb/annotate.h +Index: gdb-7.6.50.20130731-cvs/gdb/annotate.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/annotate.h 2013-01-22 21:19:38.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/annotate.h 2013-02-15 22:40:18.515622041 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/annotate.h 2013-08-02 16:38:26.426292186 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/annotate.h 2013-08-02 16:38:32.344300715 +0200 @@ -92,8 +92,8 @@ extern void annotate_frame_source_end (v extern void annotate_frame_where (void); extern void annotate_frame_end (void); @@ -1129,10 +1129,10 @@ Index: gdb-7.5.50.20130215/gdb/annotate.h extern void annotate_elt_rep_end (void); extern void annotate_elt (void); extern void annotate_array_section_end (void); -Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/arm-linux-nat.c 2013-01-01 07:32:38.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/arm-linux-nat.c 2013-02-15 22:40:18.515622041 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/arm-linux-nat.c 2013-08-02 16:38:26.426292186 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c 2013-08-02 16:38:32.345300716 +0200 @@ -1073,7 +1073,7 @@ arm_linux_remove_hw_breakpoint (struct g /* Are we able to use a hardware watchpoint for the LEN bytes starting at ADDR? */ @@ -1142,10 +1142,10 @@ Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c { const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap (); CORE_ADDR max_wp_length, aligned_addr; -Index: gdb-7.5.50.20130215/gdb/ax-gdb.c +Index: gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ax-gdb.c 2013-01-31 17:27:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ax-gdb.c 2013-02-15 22:40:18.516622043 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ax-gdb.c 2013-08-02 16:38:26.427292188 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ax-gdb.c 2013-08-02 16:38:32.346300717 +0200 @@ -83,12 +83,12 @@ static void gen_traced_pop (struct gdbar static void gen_sign_extend (struct agent_expr *, struct type *); static void gen_extend (struct agent_expr *, struct type *); @@ -1181,7 +1181,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c struct type *type); static void gen_struct_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, -@@ -569,7 +570,7 @@ gen_fetch (struct agent_expr *ax, struct +@@ -539,7 +540,7 @@ gen_fetch (struct agent_expr *ax, struct right shift it by -DISTANCE bits if DISTANCE < 0. This generates unsigned (logical) right shifts. */ static void @@ -1190,7 +1190,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { if (distance > 0) { -@@ -623,7 +624,7 @@ gen_frame_locals_address (struct gdbarch +@@ -593,7 +594,7 @@ gen_frame_locals_address (struct gdbarch programming in ML, it would be clearer why these are the same thing. */ static void @@ -1199,7 +1199,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { /* It would suffice to simply push the offset and add it, but this makes it easier to read positive and negative offsets in the -@@ -1279,7 +1280,7 @@ gen_address_of (struct agent_expr *ax, s +@@ -1249,7 +1250,7 @@ gen_address_of (struct agent_expr *ax, s static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *type, @@ -1208,7 +1208,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { /* Note that ops[i] fetches 8 << i bits. */ static enum agent_op ops[] -@@ -1314,13 +1315,13 @@ gen_bitfield_ref (struct expression *exp +@@ -1284,13 +1285,13 @@ gen_bitfield_ref (struct expression *exp /* The first and one-after-last bits in the field, but rounded down and up to byte boundaries. */ @@ -1227,7 +1227,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c /* The index in ops of the opcode we're considering. */ int op; -@@ -1439,7 +1440,7 @@ gen_bitfield_ref (struct expression *exp +@@ -1409,7 +1410,7 @@ gen_bitfield_ref (struct expression *exp static void gen_primitive_field (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1236,7 +1236,7 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { /* Is this a bitfield? */ if (TYPE_FIELD_PACKED (type, fieldno)) -@@ -1464,7 +1465,7 @@ gen_primitive_field (struct expression * +@@ -1434,7 +1435,7 @@ gen_primitive_field (struct expression * static int gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1245,11 +1245,11 @@ Index: gdb-7.5.50.20130215/gdb/ax-gdb.c { int i, rslt; int nbases = TYPE_N_BASECLASSES (type); -Index: gdb-7.5.50.20130215/gdb/ax-general.c +Index: gdb-7.6.50.20130731-cvs/gdb/ax-general.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ax-general.c 2013-01-31 17:27:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ax-general.c 2013-02-15 22:40:18.516622043 +0100 -@@ -192,7 +192,7 @@ ax_zero_ext (struct agent_expr *x, int n +--- gdb-7.6.50.20130731-cvs.orig/gdb/ax-general.c 2013-08-02 16:38:26.428292189 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ax-general.c 2013-08-02 16:38:32.346300717 +0200 +@@ -195,7 +195,7 @@ ax_zero_ext (struct agent_expr *x, int n /* Append a trace_quick instruction to EXPR, to record N bytes. */ void @@ -1258,11 +1258,11 @@ Index: gdb-7.5.50.20130215/gdb/ax-general.c { /* N must fit in a byte. */ if (n < 0 || n > 255) -Index: gdb-7.5.50.20130215/gdb/ax.h +Index: gdb-7.6.50.20130731-cvs/gdb/ax.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ax.h 2013-01-01 07:32:39.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ax.h 2013-02-15 22:40:18.517622045 +0100 -@@ -190,7 +190,7 @@ extern void ax_ext (struct agent_expr *E +--- gdb-7.6.50.20130731-cvs.orig/gdb/ax.h 2013-08-02 16:38:26.428292189 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ax.h 2013-08-02 16:38:32.346300717 +0200 +@@ -207,7 +207,7 @@ extern void ax_ext (struct agent_expr *E extern void ax_zero_ext (struct agent_expr *EXPR, int N); /* Append a trace_quick instruction to EXPR, to record N bytes. */ @@ -1271,11 +1271,11 @@ Index: gdb-7.5.50.20130215/gdb/ax.h /* Append a goto op to EXPR. OP is the actual op (must be aop_goto or aop_if_goto). We assume we don't know the target offset yet, -Index: gdb-7.5.50.20130215/gdb/breakpoint.c +Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.c 2013-02-15 22:37:35.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.c 2013-02-15 22:40:18.521622053 +0100 -@@ -6660,7 +6660,7 @@ breakpoint_address_match (struct address +--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.c 2013-08-02 16:38:26.432292195 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.c 2013-08-02 16:38:32.350300723 +0200 +@@ -6710,7 +6710,7 @@ breakpoint_address_match (struct address static int breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1, @@ -1284,7 +1284,7 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.c CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -11182,7 +11182,7 @@ can_use_hardware_watchpoint (struct valu +@@ -11247,7 +11247,7 @@ can_use_hardware_watchpoint (struct valu && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1293,11 +1293,11 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.c int num_regs; len = (target_exact_watchpoints -Index: gdb-7.5.50.20130215/gdb/breakpoint.h +Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/breakpoint.h 2013-02-15 22:37:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/breakpoint.h 2013-02-15 22:40:18.521622053 +0100 -@@ -250,7 +250,7 @@ struct bp_target_info +--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.h 2013-08-02 16:38:26.434292198 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.h 2013-08-02 16:38:32.351300725 +0200 +@@ -242,7 +242,7 @@ struct bp_target_info /* If this is a ranged breakpoint, then this field contains the length of the range that will be watched for execution. */ @@ -1306,7 +1306,7 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.h /* If the breakpoint lives in memory and reading that memory would give back the breakpoint, instead of the original contents, then -@@ -419,7 +419,7 @@ struct bp_location +@@ -411,7 +411,7 @@ struct bp_location /* For hardware watchpoints, the size of the memory region being watched. For hardware ranged breakpoints, the size of the breakpoint range. */ @@ -1315,10 +1315,10 @@ Index: gdb-7.5.50.20130215/gdb/breakpoint.h /* Type of hardware watchpoint. */ enum target_hw_bp_type watchpoint_type; -Index: gdb-7.5.50.20130215/gdb/c-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/c-lang.c 2013-02-13 11:41:11.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/c-lang.c 2013-02-15 22:40:18.522622055 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/c-lang.c 2013-08-02 16:38:26.434292198 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/c-lang.c 2013-08-02 16:38:32.351300725 +0200 @@ -188,7 +188,7 @@ c_printchar (int c, struct type *type, s void @@ -1346,10 +1346,10 @@ Index: gdb-7.5.50.20130215/gdb/c-lang.c if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type), &low_bound, &high_bound) < 0) -Index: gdb-7.5.50.20130215/gdb/c-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/c-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/c-lang.h 2013-01-01 07:32:40.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/c-lang.h 2013-02-15 22:40:18.522622055 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/c-lang.h 2013-08-02 16:38:26.434292198 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/c-lang.h 2013-08-02 16:38:32.351300725 +0200 @@ -73,7 +73,7 @@ extern void c_print_typedef (struct type struct ui_file *); @@ -1385,10 +1385,10 @@ Index: gdb-7.5.50.20130215/gdb/c-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *, -Index: gdb-7.5.50.20130215/gdb/c-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/c-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/c-valprint.c 2013-01-01 07:32:40.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/c-valprint.c 2013-02-15 22:40:18.522622055 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/c-valprint.c 2013-08-02 16:38:26.435292199 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/c-valprint.c 2013-08-02 16:38:32.352300726 +0200 @@ -132,7 +132,7 @@ static const struct generic_val_print_de void @@ -1430,10 +1430,10 @@ Index: gdb-7.5.50.20130215/gdb/c-valprint.c struct value_print_options opts = *options; opts.deref_ref = 1; -Index: gdb-7.5.50.20130215/gdb/cp-abi.c +Index: gdb-7.6.50.20130731-cvs/gdb/cp-abi.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/cp-abi.c 2013-01-17 21:26:14.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/cp-abi.c 2013-02-15 22:40:18.523622057 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/cp-abi.c 2013-08-02 16:38:26.435292199 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/cp-abi.c 2013-08-02 16:38:32.352300726 +0200 @@ -68,13 +68,13 @@ is_operator_name (const char *name) return (*current_cp_abi.is_operator_name) (name); } @@ -1469,10 +1469,10 @@ Index: gdb-7.5.50.20130215/gdb/cp-abi.c { struct type *ret = NULL; volatile struct gdb_exception e; -Index: gdb-7.5.50.20130215/gdb/cp-abi.h +Index: gdb-7.6.50.20130731-cvs/gdb/cp-abi.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/cp-abi.h 2013-01-01 07:32:40.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/cp-abi.h 2013-02-15 22:40:18.523622057 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/cp-abi.h 2013-08-02 16:38:26.435292199 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/cp-abi.h 2013-08-02 16:38:32.352300726 +0200 @@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_fi struct fn_field *f, int j, @@ -1508,7 +1508,7 @@ Index: gdb-7.5.50.20130215/gdb/cp-abi.h /* Describe the target of a pointer to method. CONTENTS is the byte pattern representing the pointer to method. TYPE is the pointer to -@@ -204,12 +204,13 @@ struct cp_abi_ops +@@ -227,12 +227,13 @@ struct cp_abi_ops struct value *(*virtual_fn_field) (struct value **arg1p, struct fn_field * f, int j, struct type * type, @@ -1527,10 +1527,10 @@ Index: gdb-7.5.50.20130215/gdb/cp-abi.h void (*print_method_ptr) (const gdb_byte *contents, struct type *type, struct ui_file *stream); -Index: gdb-7.5.50.20130215/gdb/cp-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/cp-valprint.c 2013-01-07 17:40:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/cp-valprint.c 2013-02-15 22:40:18.523622057 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/cp-valprint.c 2013-08-02 16:38:26.436292201 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/cp-valprint.c 2013-08-02 16:38:32.353300727 +0200 @@ -82,7 +82,7 @@ static void cp_print_static_field (struc const struct value_print_options *); @@ -1604,10 +1604,10 @@ Index: gdb-7.5.50.20130215/gdb/cp-valprint.c int skip; struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); const char *basename = TYPE_NAME (baseclass); -Index: gdb-7.5.50.20130215/gdb/d-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/d-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/d-lang.h 2013-01-01 07:32:41.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/d-lang.h 2013-02-15 22:40:18.523622057 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/d-lang.h 2013-08-02 16:38:26.436292201 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/d-lang.h 2013-08-02 16:38:32.353300727 +0200 @@ -25,7 +25,7 @@ extern char *d_demangle (const char *mangled, int options); @@ -1617,10 +1617,10 @@ Index: gdb-7.5.50.20130215/gdb/d-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.5.50.20130215/gdb/d-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/d-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/d-valprint.c 2013-01-01 07:32:41.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/d-valprint.c 2013-02-15 22:40:18.524622059 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/d-valprint.c 2013-08-02 16:38:26.436292201 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/d-valprint.c 2013-08-02 16:38:32.353300727 +0200 @@ -29,7 +29,7 @@ static int @@ -1643,11 +1643,11 @@ Index: gdb-7.5.50.20130215/gdb/d-valprint.c const struct value_print_options *options) { int ret; -Index: gdb-7.5.50.20130215/gdb/doublest.c +Index: gdb-7.6.50.20130731-cvs/gdb/doublest.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/doublest.c 2013-01-01 07:32:41.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/doublest.c 2013-02-15 22:40:18.524622059 +0100 -@@ -791,7 +791,7 @@ floatformat_from_doublest (const struct +--- gdb-7.6.50.20130731-cvs.orig/gdb/doublest.c 2013-08-02 16:38:26.436292201 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/doublest.c 2013-08-02 16:38:32.354300729 +0200 +@@ -744,7 +744,7 @@ floatformat_from_doublest (const struct but not passed on by GDB. This should be fixed. */ static const struct floatformat * @@ -1656,7 +1656,7 @@ Index: gdb-7.5.50.20130215/gdb/doublest.c { const struct floatformat *format; -@@ -819,8 +819,8 @@ floatformat_from_length (struct gdbarch +@@ -772,8 +772,8 @@ floatformat_from_length (struct gdbarch else format = NULL; if (format == NULL) @@ -1667,11 +1667,11 @@ Index: gdb-7.5.50.20130215/gdb/doublest.c return format; } -Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c +Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/dwarf2loc.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/dwarf2loc.c 2013-02-15 22:40:18.525622061 +0100 -@@ -1677,19 +1677,19 @@ insert_bits (unsigned int datum, +--- gdb-7.6.50.20130731-cvs.orig/gdb/dwarf2loc.c 2013-08-02 16:38:26.438292204 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/dwarf2loc.c 2013-08-02 16:42:11.217607703 +0200 +@@ -1713,19 +1713,19 @@ insert_bits (unsigned int datum, BITS_BIG_ENDIAN is taken directly from gdbarch. */ static void @@ -1697,7 +1697,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c dest_avail = 8 - dest_offset_bits % 8; -@@ -1727,13 +1727,13 @@ static void +@@ -1763,13 +1763,13 @@ static void read_pieced_value (struct value *v) { int i; @@ -1711,9 +1711,9 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c - size_t type_len; + ULONGEST type_len; size_t buffer_size = 0; - char *buffer = NULL; + gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1760,8 +1760,8 @@ read_pieced_value (struct value *v) +@@ -1796,8 +1796,8 @@ read_pieced_value (struct value *v) for (i = 0; i < c->n_pieces && offset < type_len; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1724,7 +1724,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c const gdb_byte *intermediate_buffer; /* Compute size, source, and destination offsets for copying, in -@@ -1910,13 +1910,13 @@ static void +@@ -1946,13 +1946,13 @@ static void write_pieced_value (struct value *to, struct value *from) { int i; @@ -1738,9 +1738,9 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c - size_t type_len; + ULONGEST type_len; size_t buffer_size = 0; - char *buffer = NULL; + gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1944,8 +1944,8 @@ write_pieced_value (struct value *to, st +@@ -1980,8 +1980,8 @@ write_pieced_value (struct value *to, st for (i = 0; i < c->n_pieces && offset < type_len; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1751,7 +1751,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c int need_bitwise; const gdb_byte *source_buffer; -@@ -2074,8 +2074,8 @@ write_pieced_value (struct value *to, st +@@ -2110,8 +2110,8 @@ write_pieced_value (struct value *to, st implicit pointer. */ static int @@ -1762,7 +1762,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c enum dwarf_value_location check_for) { struct piece_closure *c -@@ -2091,7 +2091,7 @@ check_pieced_value_bits (const struct va +@@ -2127,7 +2127,7 @@ check_pieced_value_bits (const struct va for (i = 0; i < c->n_pieces && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1771,7 +1771,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2129,8 +2129,8 @@ check_pieced_value_bits (const struct va +@@ -2165,8 +2165,8 @@ check_pieced_value_bits (const struct va } static int @@ -1782,7 +1782,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c { return check_pieced_value_bits (value, bit_offset, bit_length, DWARF_VALUE_MEMORY); -@@ -2148,8 +2148,8 @@ check_pieced_value_invalid (const struct +@@ -2184,8 +2184,8 @@ check_pieced_value_invalid (const struct a synthetic pointer. */ static int @@ -1793,7 +1793,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c { return check_pieced_value_bits (value, bit_offset, bit_length, DWARF_VALUE_IMPLICIT_POINTER); -@@ -2174,9 +2174,10 @@ indirect_pieced_value (struct value *val +@@ -2210,9 +2210,10 @@ indirect_pieced_value (struct value *val struct type *type; struct frame_info *frame; struct dwarf2_locexpr_baton baton; @@ -1806,7 +1806,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c type = check_typedef (value_type (value)); if (TYPE_CODE (type) != TYPE_CODE_PTR) -@@ -2190,7 +2191,7 @@ indirect_pieced_value (struct value *val +@@ -2226,7 +2227,7 @@ indirect_pieced_value (struct value *val for (i = 0; i < c->n_pieces && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1815,7 +1815,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2406,7 +2407,7 @@ dwarf2_evaluate_loc_desc_full (struct ty +@@ -2467,7 +2468,7 @@ dwarf2_evaluate_loc_desc_full (struct ty struct value *value = dwarf_expr_fetch (ctx, 0); gdb_byte *contents; const gdb_byte *val_bytes; @@ -1824,11 +1824,11 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2loc.c if (byte_offset + TYPE_LENGTH (type) > n) invalid_synthetic_pointer (); -Index: gdb-7.5.50.20130215/gdb/dwarf2read.c +Index: gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/dwarf2read.c 2013-02-15 22:40:13.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/dwarf2read.c 2013-02-15 22:40:18.528622067 +0100 -@@ -1227,12 +1227,12 @@ dwarf2_complex_location_expr_complaint ( +--- gdb-7.6.50.20130731-cvs.orig/gdb/dwarf2read.c 2013-08-02 16:38:26.441292208 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/dwarf2read.c 2013-08-02 16:38:32.358300735 +0200 +@@ -1258,12 +1258,12 @@ dwarf2_complex_location_expr_complaint ( } static void @@ -1845,7 +1845,7 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2read.c } static void -@@ -10641,8 +10641,8 @@ dwarf2_add_field (struct field_info *fip +@@ -11215,8 +11215,8 @@ dwarf2_add_field (struct field_info *fip object, and then subtract off the number of bits of the field itself. The result is the bit offset of the LSB of the field. */ @@ -1856,10 +1856,10 @@ Index: gdb-7.5.50.20130215/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) -Index: gdb-7.5.50.20130215/gdb/eval.c +Index: gdb-7.6.50.20130731-cvs/gdb/eval.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/eval.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/eval.c 2013-02-15 22:40:18.529622070 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/eval.c 2013-08-02 16:38:26.443292211 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/eval.c 2013-08-02 16:38:32.359300736 +0200 @@ -294,7 +294,8 @@ evaluate_struct_tuple (struct value *str while (--nargs >= 0) { @@ -1879,7 +1879,7 @@ Index: gdb-7.5.50.20130215/gdb/eval.c if (exp->elts[*pos].opcode == BINOP_COMMA) { -@@ -709,11 +710,11 @@ binop_promote (const struct language_def +@@ -713,11 +714,11 @@ binop_promote (const struct language_def /* FIXME: Also mixed integral/booleans, with result an integer. */ { const struct builtin_type *builtin = builtin_type (gdbarch); @@ -1894,7 +1894,7 @@ Index: gdb-7.5.50.20130215/gdb/eval.c int unsigned_operation; /* Determine type length and signedness after promotion for -@@ -896,7 +897,7 @@ evaluate_subexp_standard (struct type *e +@@ -900,7 +901,7 @@ evaluate_subexp_standard (struct type *e struct value **argvec; int code; int ix; @@ -1903,7 +1903,7 @@ Index: gdb-7.5.50.20130215/gdb/eval.c struct type **arg_types; int save_pos1; struct symbol *function = NULL; -@@ -1076,7 +1077,7 @@ evaluate_subexp_standard (struct type *e +@@ -1080,7 +1081,7 @@ evaluate_subexp_standard (struct type *e struct type *range_type = TYPE_INDEX_TYPE (type); struct type *element_type = TYPE_TARGET_TYPE (type); struct value *array = allocate_value (expect_type); @@ -1912,7 +1912,7 @@ Index: gdb-7.5.50.20130215/gdb/eval.c LONGEST low_bound, high_bound, index; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -2078,7 +2079,8 @@ evaluate_subexp_standard (struct type *e +@@ -2075,7 +2076,8 @@ evaluate_subexp_standard (struct type *e { struct type *type = value_type (arg1); struct type *real_type; @@ -1922,10 +1922,10 @@ Index: gdb-7.5.50.20130215/gdb/eval.c struct value_print_options opts; get_user_print_options (&opts); -Index: gdb-7.5.50.20130215/gdb/f-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/f-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/f-lang.c 2013-01-01 07:32:42.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/f-lang.c 2013-02-15 22:40:18.529622070 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/f-lang.c 2013-08-02 16:38:26.443292211 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/f-lang.c 2013-08-02 16:38:32.359300736 +0200 @@ -103,7 +103,7 @@ f_printchar (int c, struct type *type, s static void @@ -1935,10 +1935,10 @@ Index: gdb-7.5.50.20130215/gdb/f-lang.c const struct value_print_options *options) { const char *type_encoding = f_get_encoding (type); -Index: gdb-7.5.50.20130215/gdb/f-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/f-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/f-lang.h 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/f-lang.h 2013-02-15 22:40:18.529622070 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/f-lang.h 2013-08-02 16:38:26.443292211 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/f-lang.h 2013-08-02 16:38:32.359300736 +0200 @@ -33,7 +33,7 @@ extern const char *f_object_address_data (struct type *type, struct ui_file *stream); extern void f_object_address_data_valid_or_error (struct type *type); @@ -1948,10 +1948,10 @@ Index: gdb-7.5.50.20130215/gdb/f-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.5.50.20130215/gdb/f-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/f-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/f-valprint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/f-valprint.c 2013-02-15 22:40:18.529622070 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/f-valprint.c 2013-08-02 16:38:26.444292212 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/f-valprint.c 2013-08-02 16:38:32.359300736 +0200 @@ -43,7 +43,7 @@ static void f77_create_arrayprint_offset struct ui_file *); static void f77_get_dynamic_length_of_aggregate (struct type *); @@ -2016,11 +2016,11 @@ Index: gdb-7.5.50.20130215/gdb/f-valprint.c val_print (TYPE_FIELD_TYPE (type, index), valaddr, embedded_offset + offset, -Index: gdb-7.5.50.20130215/gdb/findvar.c +Index: gdb-7.6.50.20130731-cvs/gdb/findvar.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/findvar.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/findvar.c 2013-02-15 22:40:18.529622070 +0100 -@@ -644,7 +644,7 @@ default_value_from_register (struct type +--- gdb-7.6.50.20130731-cvs.orig/gdb/findvar.c 2013-08-02 16:38:26.444292212 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/findvar.c 2013-08-02 16:38:32.360300738 +0200 +@@ -652,7 +652,7 @@ default_value_from_register (struct type struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2029,7 +2029,7 @@ Index: gdb-7.5.50.20130215/gdb/findvar.c struct value *value = allocate_value (type); VALUE_LVAL (value) = lval_register; -@@ -677,10 +677,10 @@ void +@@ -685,10 +685,10 @@ void read_frame_register_value (struct value *value, struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2043,7 +2043,7 @@ Index: gdb-7.5.50.20130215/gdb/findvar.c gdb_assert (VALUE_LVAL (value) == lval_register); -@@ -695,7 +695,7 @@ read_frame_register_value (struct value +@@ -703,7 +703,7 @@ read_frame_register_value (struct value while (len > 0) { struct value *regval = get_frame_register_value (frame, regnum); @@ -2052,11 +2052,11 @@ Index: gdb-7.5.50.20130215/gdb/findvar.c if (value_optimized_out (regval)) { -Index: gdb-7.5.50.20130215/gdb/frame.c +Index: gdb-7.6.50.20130731-cvs/gdb/frame.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/frame.c 2013-01-01 07:32:42.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/frame.c 2013-02-15 22:40:18.530622073 +0100 -@@ -1113,7 +1113,7 @@ deprecated_frame_register_read (struct f +--- gdb-7.6.50.20130731-cvs.orig/gdb/frame.c 2013-08-02 16:38:26.445292214 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/frame.c 2013-08-02 16:38:32.360300738 +0200 +@@ -1182,7 +1182,7 @@ deprecated_frame_register_read (struct f int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -2065,7 +2065,7 @@ Index: gdb-7.5.50.20130215/gdb/frame.c int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -1142,7 +1142,7 @@ get_frame_register_bytes (struct frame_i +@@ -1211,7 +1211,7 @@ get_frame_register_bytes (struct frame_i } if (len > maxsize) error (_("Bad debug information detected: " @@ -2074,10 +2074,10 @@ Index: gdb-7.5.50.20130215/gdb/frame.c /* Copy the data. */ while (len > 0) -Index: gdb-7.5.50.20130215/gdb/frame.h +Index: gdb-7.6.50.20130731-cvs/gdb/frame.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/frame.h 2013-02-01 20:58:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/frame.h 2013-02-15 22:40:18.530622073 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/frame.h 2013-08-02 16:38:26.445292214 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/frame.h 2013-08-02 16:38:32.360300738 +0200 @@ -532,7 +532,7 @@ extern void put_frame_register (struct f contents are optimized out or unavailable, set *OPTIMIZEDP, *UNAVAILABLEP accordingly. */ @@ -2087,11 +2087,11 @@ Index: gdb-7.5.50.20130215/gdb/frame.h gdb_byte *myaddr, int *optimizedp, int *unavailablep); -Index: gdb-7.5.50.20130215/gdb/gdbtypes.c +Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gdbtypes.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gdbtypes.c 2013-02-15 22:40:39.496648052 +0100 -@@ -2090,7 +2090,7 @@ allocate_gnat_aux_type (struct type *typ +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbtypes.c 2013-08-02 16:38:26.446292215 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbtypes.c 2013-08-02 16:38:32.361300739 +0200 +@@ -2091,7 +2091,7 @@ allocate_gnat_aux_type (struct type *typ least as long as OBJFILE. */ struct type * @@ -2100,7 +2100,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c const char *name, struct objfile *objfile) { struct type *type; -@@ -2321,8 +2321,8 @@ is_public_ancestor (struct type *base, s +@@ -2322,8 +2322,8 @@ is_public_ancestor (struct type *base, s static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -2111,7 +2111,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -2333,7 +2333,7 @@ is_unique_ancestor_worker (struct type * +@@ -2334,7 +2334,7 @@ is_unique_ancestor_worker (struct type * for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -2120,7 +2120,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -2374,7 +2374,7 @@ is_unique_ancestor_worker (struct type * +@@ -2375,7 +2375,7 @@ is_unique_ancestor_worker (struct type * int is_unique_ancestor (struct type *base, struct value *val) { @@ -2129,7 +2129,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -3283,7 +3283,7 @@ recursive_dump_type (struct type *type, +@@ -3303,7 +3303,7 @@ recursive_dump_type (struct type *type, break; } puts_filtered ("\n"); @@ -2138,7 +2138,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -3407,8 +3407,8 @@ recursive_dump_type (struct type *type, +@@ -3427,8 +3427,8 @@ recursive_dump_type (struct type *type, idx, plongest (TYPE_FIELD_ENUMVAL (type, idx))); else printfi_filtered (spaces + 2, @@ -2149,7 +2149,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c TYPE_FIELD_BITSIZE (type, idx)); gdb_print_host_address (TYPE_FIELD_TYPE (type, idx), gdb_stdout); printf_filtered (" name '%s' (", -@@ -3922,7 +3922,7 @@ copy_type (const struct type *type) +@@ -3942,7 +3942,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -2158,10 +2158,10 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.c { struct type *type; -Index: gdb-7.5.50.20130215/gdb/gdbtypes.h +Index: gdb-7.6.50.20130731-cvs/gdb/gdbtypes.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gdbtypes.h 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gdbtypes.h 2013-02-15 22:42:33.846787959 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbtypes.h 2013-08-02 16:38:26.447292217 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gdbtypes.h 2013-08-02 16:38:32.361300739 +0200 @@ -606,7 +606,7 @@ struct main_type gdbarch_bits_big_endian=0 targets, it is the bit offset to the LSB. */ @@ -2195,10 +2195,10 @@ Index: gdb-7.5.50.20130215/gdb/gdbtypes.h extern struct type *arch_integer_type (struct gdbarch *, int, int, char *); extern struct type *arch_character_type (struct gdbarch *, int, int, char *); extern struct type *arch_boolean_type (struct gdbarch *, int, int, char *); -Index: gdb-7.5.50.20130215/gdb/gnu-v2-abi.c +Index: gdb-7.6.50.20130731-cvs/gdb/gnu-v2-abi.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gnu-v2-abi.c 2013-01-21 18:29:39.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gnu-v2-abi.c 2013-02-15 22:40:18.532622077 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/gnu-v2-abi.c 2013-08-02 16:38:26.447292217 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gnu-v2-abi.c 2013-08-02 16:38:32.362300740 +0200 @@ -85,7 +85,7 @@ gnuv2_is_operator_name (const char *name TYPE is the type in which F is located. */ static struct value * @@ -2250,11 +2250,11 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v2-abi.c gnuv2_baseclass_offset (type, i, valaddr, embedded_offset, address, val); -Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c +Index: gdb-7.6.50.20130731-cvs/gdb/gnu-v3-abi.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/gnu-v3-abi.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/gnu-v3-abi.c 2013-02-15 22:40:18.532622077 +0100 -@@ -106,7 +106,7 @@ build_gdb_vtable_type (struct gdbarch *a +--- gdb-7.6.50.20130731-cvs.orig/gdb/gnu-v3-abi.c 2013-08-02 16:38:26.448292218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/gnu-v3-abi.c 2013-08-02 16:38:32.362300740 +0200 +@@ -112,7 +112,7 @@ build_gdb_vtable_type (struct gdbarch *a { struct type *t; struct field *field_list, *field; @@ -2263,7 +2263,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c struct type *void_ptr_type = builtin_type (arch)->builtin_data_ptr; -@@ -182,7 +182,7 @@ vtable_ptrdiff_type (struct gdbarch *gdb +@@ -188,7 +188,7 @@ vtable_ptrdiff_type (struct gdbarch *gdb /* Return the offset from the start of the imaginary `struct gdb_gnu_v3_abi_vtable' object to the vtable's "address point" (i.e., where objects' virtual table pointers point). */ @@ -2272,7 +2272,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c vtable_address_point_offset (struct gdbarch *gdbarch) { struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data); -@@ -273,7 +273,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc +@@ -279,7 +279,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc static struct type * gnuv3_rtti_type (struct value *value, @@ -2281,7 +2281,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c { struct gdbarch *gdbarch; struct type *values_type = check_typedef (value_type (value)); -@@ -385,7 +385,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd +@@ -404,7 +404,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd static struct value * gnuv3_virtual_fn_field (struct value **value_p, struct fn_field *f, int j, @@ -2290,7 +2290,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c { struct type *values_type = check_typedef (value_type (*value_p)); struct gdbarch *gdbarch; -@@ -415,16 +415,16 @@ gnuv3_virtual_fn_field (struct value **v +@@ -434,16 +434,16 @@ gnuv3_virtual_fn_field (struct value **v -1 is returned on error. */ @@ -2310,7 +2310,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c /* Determine architecture. */ gdbarch = get_type_arch (type); -@@ -448,7 +448,7 @@ gnuv3_baseclass_offset (struct type *typ +@@ -467,7 +467,7 @@ gnuv3_baseclass_offset (struct type *typ cur_base_offset = cur_base_offset + vtable_address_point_offset (gdbarch); if ((- cur_base_offset) % TYPE_LENGTH (ptr_type) != 0) error (_("Misaligned vbase offset.")); @@ -2319,7 +2319,7 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset); gdb_assert (vtable != NULL); -@@ -492,7 +492,7 @@ gnuv3_find_method_in (struct type *domai +@@ -511,7 +511,7 @@ gnuv3_find_method_in (struct type *domai we're out of luck. */ for (i = 0; i < TYPE_N_BASECLASSES (domain); i++) { @@ -2328,10 +2328,10 @@ Index: gdb-7.5.50.20130215/gdb/gnu-v3-abi.c struct type *basetype; if (BASETYPE_VIA_VIRTUAL (domain, i)) -Index: gdb-7.5.50.20130215/gdb/go-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/go-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/go-lang.h 2013-01-01 07:32:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/go-lang.h 2013-02-15 22:40:18.532622077 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/go-lang.h 2013-08-02 16:38:26.448292218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/go-lang.h 2013-08-02 16:38:32.362300740 +0200 @@ -83,7 +83,7 @@ extern void go_print_type (struct type * /* Defined in go-valprint.c. */ @@ -2341,10 +2341,10 @@ Index: gdb-7.5.50.20130215/gdb/go-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.5.50.20130215/gdb/go-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/go-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/go-valprint.c 2013-01-01 07:32:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/go-valprint.c 2013-02-15 22:40:18.532622077 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/go-valprint.c 2013-08-02 16:38:26.448292218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/go-valprint.c 2013-08-02 16:38:32.362300740 +0200 @@ -37,7 +37,7 @@ static void @@ -2367,10 +2367,10 @@ Index: gdb-7.5.50.20130215/gdb/go-valprint.c const struct value_print_options *options) { CHECK_TYPEDEF (type); -Index: gdb-7.5.50.20130215/gdb/i386-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/i386-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/i386-nat.c 2013-02-13 15:59:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/i386-nat.c 2013-02-15 22:41:53.950739414 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-nat.c 2013-08-02 16:38:26.448292218 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/i386-nat.c 2013-08-02 16:38:32.362300740 +0200 @@ -290,7 +290,7 @@ static int i386_remove_aligned_watchpoin valid value, bombs through internal_error. */ static int i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state, @@ -2400,11 +2400,11 @@ Index: gdb-7.5.50.20130215/gdb/i386-nat.c { struct i386_debug_reg_state *state = i386_debug_reg_state (ptid_get_pid (inferior_ptid)); -Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c +Index: gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/inf-ttrace.c 2013-01-01 07:32:45.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/inf-ttrace.c 2013-02-15 22:40:18.533622078 +0100 -@@ -364,7 +364,7 @@ inf_ttrace_can_use_hw_breakpoint (int ty +--- gdb-7.6.50.20130731-cvs.orig/gdb/inf-ttrace.c 2013-08-02 16:38:26.449292220 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c 2013-08-02 16:38:32.363300742 +0200 +@@ -365,7 +365,7 @@ inf_ttrace_can_use_hw_breakpoint (int ty } static int @@ -2413,11 +2413,11 @@ Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c { return 1; } -Index: gdb-7.5.50.20130215/gdb/jv-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/jv-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/jv-lang.c 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/jv-lang.c 2013-02-15 22:40:18.533622078 +0100 -@@ -437,7 +437,7 @@ java_link_class_type (struct gdbarch *gd +--- gdb-7.6.50.20130731-cvs.orig/gdb/jv-lang.c 2013-08-02 16:38:26.449292220 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/jv-lang.c 2013-08-02 16:38:32.363300742 +0200 +@@ -436,7 +436,7 @@ java_link_class_type (struct gdbarch *gd for (i = TYPE_N_BASECLASSES (type); i < nfields; i++) { int accflags; @@ -2426,7 +2426,7 @@ Index: gdb-7.5.50.20130215/gdb/jv-lang.c if (fields == NULL) { -@@ -887,7 +887,7 @@ java_printchar (int c, struct type *type +@@ -886,7 +886,7 @@ java_printchar (int c, struct type *type static void java_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, @@ -2435,10 +2435,10 @@ Index: gdb-7.5.50.20130215/gdb/jv-lang.c const struct value_print_options *options) { const char *type_encoding = java_get_encoding (type); -Index: gdb-7.5.50.20130215/gdb/jv-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/jv-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/jv-lang.h 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/jv-lang.h 2013-02-15 22:40:18.533622078 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/jv-lang.h 2013-08-02 16:38:26.449292220 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/jv-lang.h 2013-08-02 16:38:32.363300742 +0200 @@ -42,8 +42,8 @@ struct builtin_java_type extern const struct builtin_java_type *builtin_java_type (struct gdbarch *); @@ -2450,10 +2450,10 @@ Index: gdb-7.5.50.20130215/gdb/jv-lang.h const struct value *, const struct value_print_options *); -Index: gdb-7.5.50.20130215/gdb/jv-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/jv-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/jv-valprint.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/jv-valprint.c 2013-02-15 22:40:18.533622078 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/jv-valprint.c 2013-08-02 16:38:26.450292221 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/jv-valprint.c 2013-08-02 16:38:32.363300742 +0200 @@ -266,7 +266,7 @@ java_value_print (struct value *val, str static void @@ -2472,11 +2472,11 @@ Index: gdb-7.5.50.20130215/gdb/jv-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.5.50.20130215/gdb/language.c +Index: gdb-7.6.50.20130731-cvs/gdb/language.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/language.c 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/language.c 2013-02-15 22:40:18.534622079 +0100 -@@ -720,7 +720,7 @@ unk_lang_printchar (int c, struct type * +--- gdb-7.6.50.20130731-cvs.orig/gdb/language.c 2013-08-02 16:38:26.450292221 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/language.c 2013-08-02 16:38:32.364300743 +0200 +@@ -721,7 +721,7 @@ unk_lang_printchar (int c, struct type * static void unk_lang_printstr (struct ui_file *stream, struct type *type, @@ -2485,7 +2485,7 @@ Index: gdb-7.5.50.20130215/gdb/language.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -739,7 +739,7 @@ unk_lang_print_type (struct type *type, +@@ -740,7 +740,7 @@ unk_lang_print_type (struct type *type, static void unk_lang_val_print (struct type *type, const gdb_byte *valaddr, @@ -2494,10 +2494,10 @@ Index: gdb-7.5.50.20130215/gdb/language.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.5.50.20130215/gdb/language.h +Index: gdb-7.6.50.20130731-cvs/gdb/language.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/language.h 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/language.h 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/language.h 2013-08-02 16:38:26.450292221 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/language.h 2013-08-02 16:38:32.364300743 +0200 @@ -175,7 +175,7 @@ struct language_defn struct ui_file * stream); @@ -2516,10 +2516,10 @@ Index: gdb-7.5.50.20130215/gdb/language.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.5.50.20130215/gdb/m2-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/m2-lang.c 2013-01-07 17:40:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/m2-lang.c 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m2-lang.c 2013-08-02 16:38:26.450292221 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m2-lang.c 2013-08-02 16:38:32.364300743 +0200 @@ -103,10 +103,10 @@ m2_printchar (int c, struct type *type, static void @@ -2554,10 +2554,10 @@ Index: gdb-7.5.50.20130215/gdb/m2-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.5.50.20130215/gdb/m2-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/m2-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/m2-lang.h 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/m2-lang.h 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m2-lang.h 2013-08-02 16:38:26.451292222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m2-lang.h 2013-08-02 16:38:32.364300743 +0200 @@ -33,7 +33,7 @@ extern void m2_print_typedef (struct typ extern int m2_is_long_set (struct type *type); extern int m2_is_unbounded_array (struct type *type); @@ -2567,10 +2567,10 @@ Index: gdb-7.5.50.20130215/gdb/m2-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.5.50.20130215/gdb/m2-typeprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/m2-typeprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/m2-typeprint.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/m2-typeprint.c 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m2-typeprint.c 2013-08-02 16:38:26.451292222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m2-typeprint.c 2013-08-02 16:38:32.364300743 +0200 @@ -233,9 +233,12 @@ static void m2_array (struct type *type, m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1); } @@ -2587,10 +2587,10 @@ Index: gdb-7.5.50.20130215/gdb/m2-typeprint.c } fprintf_filtered (stream, "] OF "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); -Index: gdb-7.5.50.20130215/gdb/m2-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/m2-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/m2-valprint.c 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/m2-valprint.c 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m2-valprint.c 2013-08-02 16:38:26.451292222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m2-valprint.c 2013-08-02 16:38:32.365300745 +0200 @@ -35,7 +35,7 @@ static int print_unpacked_pointer (struc struct ui_file *stream); static void @@ -2656,10 +2656,10 @@ Index: gdb-7.5.50.20130215/gdb/m2-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -Index: gdb-7.5.50.20130215/gdb/memrange.c +Index: gdb-7.6.50.20130731-cvs/gdb/memrange.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/memrange.c 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/memrange.c 2013-02-15 22:40:18.534622079 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/memrange.c 2013-08-02 16:38:26.451292222 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/memrange.c 2013-08-02 16:38:32.365300745 +0200 @@ -21,8 +21,8 @@ #include "memrange.h" @@ -2671,10 +2671,10 @@ Index: gdb-7.5.50.20130215/gdb/memrange.c { ULONGEST h, l; -Index: gdb-7.5.50.20130215/gdb/memrange.h +Index: gdb-7.6.50.20130731-cvs/gdb/memrange.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/memrange.h 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/memrange.h 2013-02-15 22:40:18.535622081 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/memrange.h 2013-08-02 16:38:26.452292224 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/memrange.h 2013-08-02 16:38:32.365300745 +0200 @@ -30,7 +30,7 @@ struct mem_range CORE_ADDR start; @@ -2695,11 +2695,11 @@ Index: gdb-7.5.50.20130215/gdb/memrange.h /* Sort ranges by start address, then coalesce contiguous or overlapping ranges. */ -Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/mips-linux-nat.c 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/mips-linux-nat.c 2013-02-15 22:40:18.535622081 +0100 -@@ -938,7 +938,7 @@ try_one_watch (struct pt_watch_regs *reg +--- gdb-7.6.50.20130731-cvs.orig/gdb/mips-linux-nat.c 2013-08-02 16:38:26.452292224 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c 2013-08-02 16:38:32.365300745 +0200 +@@ -588,7 +588,7 @@ mips_linux_stopped_data_address (struct the specified region can be covered by the watch registers. */ static int @@ -2708,10 +2708,10 @@ Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c { struct pt_watch_regs dummy_regs; int i; -Index: gdb-7.5.50.20130215/gdb/opencl-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/opencl-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/opencl-lang.c 2013-01-25 18:16:40.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/opencl-lang.c 2013-02-15 22:40:18.535622081 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/opencl-lang.c 2013-08-02 16:38:26.452292224 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/opencl-lang.c 2013-08-02 16:38:32.365300745 +0200 @@ -80,11 +80,11 @@ builtin_opencl_type (struct gdbarch *gdb static struct type * @@ -2838,10 +2838,10 @@ Index: gdb-7.5.50.20130215/gdb/opencl-lang.c if (!value_bits_synthetic_pointer (c->val, c->indices[i] * elsize + comp_offset, -Index: gdb-7.5.50.20130215/gdb/p-lang.c +Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/p-lang.c 2013-01-07 17:40:36.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/p-lang.c 2013-02-15 22:40:18.535622081 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/p-lang.c 2013-08-02 16:38:26.453292225 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/p-lang.c 2013-08-02 16:38:32.366300746 +0200 @@ -95,8 +95,8 @@ pascal_main_name (void) are not multiple of TARGET_CHAR_BIT then the results are wrong but this does not happen for Free Pascal nor for GPC. */ @@ -2889,10 +2889,10 @@ Index: gdb-7.5.50.20130215/gdb/p-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.5.50.20130215/gdb/p-lang.h +Index: gdb-7.6.50.20130731-cvs/gdb/p-lang.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/p-lang.h 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/p-lang.h 2013-02-15 22:40:18.535622081 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/p-lang.h 2013-08-02 16:38:26.453292225 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/p-lang.h 2013-08-02 16:38:32.366300746 +0200 @@ -35,7 +35,7 @@ extern void pascal_print_type (struct ty extern void pascal_print_typedef (struct type *, struct symbol *, struct ui_file *); @@ -2927,10 +2927,10 @@ Index: gdb-7.5.50.20130215/gdb/p-lang.h CORE_ADDR, struct ui_file *, int, const struct value *, -Index: gdb-7.5.50.20130215/gdb/p-valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/p-valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/p-valprint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/p-valprint.c 2013-02-15 22:40:18.536622084 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/p-valprint.c 2013-08-02 16:38:26.453292225 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/p-valprint.c 2013-08-02 16:38:32.366300746 +0200 @@ -58,7 +58,7 @@ static const struct generic_val_print_de void @@ -2951,7 +2951,7 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c struct type *char_type; CORE_ADDR addr; int want_space = 0; -@@ -493,7 +493,7 @@ static void pascal_object_print_static_f +@@ -494,7 +494,7 @@ static void pascal_object_print_static_f const struct value_print_options *); static void pascal_object_print_value (struct type *, const gdb_byte *, @@ -2960,7 +2960,7 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c CORE_ADDR, struct ui_file *, int, const struct value *, const struct value_print_options *, -@@ -552,7 +552,7 @@ pascal_object_is_vtbl_member (struct typ +@@ -553,7 +553,7 @@ pascal_object_is_vtbl_member (struct typ void pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr, @@ -2969,7 +2969,7 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -728,7 +728,7 @@ pascal_object_print_value_fields (struct +@@ -729,7 +729,7 @@ pascal_object_print_value_fields (struct static void pascal_object_print_value (struct type *type, const gdb_byte *valaddr, @@ -2978,7 +2978,7 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -751,11 +751,11 @@ pascal_object_print_value (struct type * +@@ -752,11 +752,11 @@ pascal_object_print_value (struct type * for (i = 0; i < n_baseclasses; i++) { @@ -2992,11 +2992,11 @@ Index: gdb-7.5.50.20130215/gdb/p-valprint.c volatile struct gdb_exception ex; int skip = 0; -Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ppc-linux-nat.c 2013-01-01 07:32:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ppc-linux-nat.c 2013-02-15 22:40:18.536622084 +0100 -@@ -1492,7 +1492,7 @@ ppc_linux_can_use_hw_breakpoint (int typ +--- gdb-7.6.50.20130731-cvs.orig/gdb/ppc-linux-nat.c 2013-08-02 16:38:26.454292227 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c 2013-08-02 16:38:32.366300746 +0200 +@@ -1496,7 +1496,7 @@ ppc_linux_can_use_hw_breakpoint (int typ } static int @@ -3005,10 +3005,10 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c { /* Handle sub-8-byte quantities. */ if (len <= 0) -Index: gdb-7.5.50.20130215/gdb/printcmd.c +Index: gdb-7.6.50.20130731-cvs/gdb/printcmd.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/printcmd.c 2013-02-15 22:34:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/printcmd.c 2013-02-15 22:40:18.537622086 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/printcmd.c 2013-08-02 16:38:26.454292227 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/printcmd.c 2013-08-02 16:38:32.367300748 +0200 @@ -290,7 +290,7 @@ print_formatted (struct value *val, int struct ui_file *stream) { @@ -3027,10 +3027,10 @@ Index: gdb-7.5.50.20130215/gdb/printcmd.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); /* String printing should go through val_print_scalar_formatted. */ -Index: gdb-7.5.50.20130215/gdb/procfs.c +Index: gdb-7.6.50.20130731-cvs/gdb/procfs.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/procfs.c 2013-01-01 07:32:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/procfs.c 2013-02-15 22:40:18.537622086 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/procfs.c 2013-08-02 16:38:26.455292228 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/procfs.c 2013-08-02 16:38:32.368300749 +0200 @@ -4926,7 +4926,7 @@ procfs_remove_watchpoint (CORE_ADDR addr } @@ -3040,11 +3040,11 @@ Index: gdb-7.5.50.20130215/gdb/procfs.c { /* The man page for proc(4) on Solaris 2.6 and up says that the system can support "thousands" of hardware watchpoints, but gives -Index: gdb-7.5.50.20130215/gdb/python/py-prettyprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/python/py-prettyprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/python/py-prettyprint.c 2013-01-01 07:33:01.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/python/py-prettyprint.c 2013-02-15 22:40:18.538622088 +0100 -@@ -689,7 +689,7 @@ print_children (PyObject *printer, const +--- gdb-7.6.50.20130731-cvs.orig/gdb/python/py-prettyprint.c 2013-08-02 16:38:26.456292230 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/python/py-prettyprint.c 2013-08-02 16:38:32.368300749 +0200 +@@ -688,7 +688,7 @@ print_children (PyObject *printer, const int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, @@ -3053,7 +3053,7 @@ Index: gdb-7.5.50.20130215/gdb/python/py-prettyprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -837,7 +837,7 @@ gdbpy_default_visualizer (PyObject *self +@@ -843,7 +843,7 @@ gdbpy_default_visualizer (PyObject *self int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, @@ -3062,11 +3062,11 @@ Index: gdb-7.5.50.20130215/gdb/python/py-prettyprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.5.50.20130215/gdb/python/python.h +Index: gdb-7.6.50.20130731-cvs/gdb/python/python.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/python/python.h 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/python/python.h 2013-02-15 22:40:18.538622088 +0100 -@@ -37,7 +37,7 @@ void source_python_script (FILE *file, c +--- gdb-7.6.50.20130731-cvs.orig/gdb/python/python.h 2013-08-02 16:38:26.456292230 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/python/python.h 2013-08-02 16:38:32.368300749 +0200 +@@ -98,7 +98,7 @@ void source_python_script (FILE *file, c void run_python_script (int argc, char **argv); int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, @@ -3075,10 +3075,10 @@ Index: gdb-7.5.50.20130215/gdb/python/python.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.5.50.20130215/gdb/regcache.c +Index: gdb-7.6.50.20130731-cvs/gdb/regcache.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/regcache.c 2013-01-31 19:37:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/regcache.c 2013-02-15 22:40:18.538622088 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/regcache.c 2013-08-02 16:38:26.457292231 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/regcache.c 2013-08-02 16:38:32.368300749 +0200 @@ -899,7 +899,7 @@ typedef void (regcache_write_ftype) (str static enum register_status @@ -3124,10 +3124,10 @@ Index: gdb-7.5.50.20130215/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -Index: gdb-7.5.50.20130215/gdb/regcache.h +Index: gdb-7.6.50.20130731-cvs/gdb/regcache.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/regcache.h 2013-01-01 07:32:49.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/regcache.h 2013-02-15 22:40:18.538622088 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/regcache.h 2013-08-02 16:38:26.457292231 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/regcache.h 2013-08-02 16:38:32.368300749 +0200 @@ -89,9 +89,9 @@ extern void regcache_raw_write_unsigned extern enum register_status @@ -3155,11 +3155,11 @@ Index: gdb-7.5.50.20130215/gdb/regcache.h /* Special routines to read/write the PC. */ -Index: gdb-7.5.50.20130215/gdb/remote.c +Index: gdb-7.6.50.20130731-cvs/gdb/remote.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/remote.c 2013-02-15 22:34:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/remote.c 2013-02-15 22:40:18.540622092 +0100 -@@ -8236,7 +8236,7 @@ int remote_hw_watchpoint_length_limit = +--- gdb-7.6.50.20130731-cvs.orig/gdb/remote.c 2013-08-02 16:38:26.459292234 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/remote.c 2013-08-02 16:38:32.370300752 +0200 +@@ -8368,7 +8368,7 @@ int remote_hw_watchpoint_length_limit = int remote_hw_breakpoint_limit = -1; static int @@ -3168,10 +3168,10 @@ Index: gdb-7.5.50.20130215/gdb/remote.c { if (remote_hw_watchpoint_length_limit == 0) return 0; -Index: gdb-7.5.50.20130215/gdb/s390-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/s390-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/s390-nat.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/s390-nat.c 2013-02-15 22:40:18.540622092 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/s390-nat.c 2013-08-02 16:38:26.459292234 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/s390-nat.c 2013-08-02 16:38:32.370300752 +0200 @@ -571,7 +571,7 @@ s390_can_use_hw_breakpoint (int type, in } @@ -3181,10 +3181,10 @@ Index: gdb-7.5.50.20130215/gdb/s390-nat.c { return 1; } -Index: gdb-7.5.50.20130215/gdb/spu-multiarch.c +Index: gdb-7.6.50.20130731-cvs/gdb/spu-multiarch.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/spu-multiarch.c 2013-01-01 07:32:51.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/spu-multiarch.c 2013-02-15 22:40:18.540622092 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/spu-multiarch.c 2013-08-02 16:38:26.459292234 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/spu-multiarch.c 2013-08-02 16:38:32.370300752 +0200 @@ -118,7 +118,7 @@ spu_thread_architecture (struct target_o /* Override the to_region_ok_for_hw_watchpoint routine. */ @@ -3194,11 +3194,11 @@ Index: gdb-7.5.50.20130215/gdb/spu-multiarch.c { struct target_ops *ops_beneath = find_target_beneath (&spu_ops); while (ops_beneath && !ops_beneath->to_region_ok_for_hw_watchpoint) -Index: gdb-7.5.50.20130215/gdb/stack.c +Index: gdb-7.6.50.20130731-cvs/gdb/stack.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/stack.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/stack.c 2013-02-15 22:40:18.540622092 +0100 -@@ -173,7 +173,7 @@ print_stack_frame (struct frame_info *fr +--- gdb-7.6.50.20130731-cvs.orig/gdb/stack.c 2013-08-02 16:38:26.460292236 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/stack.c 2013-08-02 16:38:32.371300754 +0200 +@@ -178,7 +178,7 @@ print_stack_frame (struct frame_info *fr argument (not just the first nameless argument). */ static void @@ -3207,7 +3207,7 @@ Index: gdb-7.5.50.20130215/gdb/stack.c int first, struct ui_file *stream) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -497,7 +497,7 @@ print_frame_args (struct symbol *func, s +@@ -500,7 +500,7 @@ print_frame_args (struct symbol *func, s /* Offset of next stack argument beyond the one we have seen that is at the highest offset, or -1 if we haven't come to a stack argument yet. */ @@ -3216,7 +3216,7 @@ Index: gdb-7.5.50.20130215/gdb/stack.c /* Number of ints of arguments that we have printed so far. */ int args_printed = 0; struct cleanup *old_chain; -@@ -535,8 +535,8 @@ print_frame_args (struct symbol *func, s +@@ -538,8 +538,8 @@ print_frame_args (struct symbol *func, s case LOC_ARG: case LOC_REF_ARG: { @@ -3227,7 +3227,7 @@ Index: gdb-7.5.50.20130215/gdb/stack.c /* Compute address of next argument by adding the size of this argument and rounding to an int boundary. */ -@@ -671,7 +671,7 @@ print_frame_args (struct symbol *func, s +@@ -674,7 +674,7 @@ print_frame_args (struct symbol *func, s enough about the stack to find them. */ if (num != -1) { @@ -3236,11 +3236,11 @@ Index: gdb-7.5.50.20130215/gdb/stack.c if (highest_offset == -1) start = gdbarch_frame_args_skip (get_frame_arch (frame)); -Index: gdb-7.5.50.20130215/gdb/symmisc.c +Index: gdb-7.6.50.20130731-cvs/gdb/symmisc.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/symmisc.c 2013-02-15 22:34:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/symmisc.c 2013-02-15 22:40:18.541622094 +0100 -@@ -527,11 +527,11 @@ print_symbol (void *args) +--- gdb-7.6.50.20130731-cvs.orig/gdb/symmisc.c 2013-08-02 16:38:26.460292236 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/symmisc.c 2013-08-02 16:38:32.371300754 +0200 +@@ -534,11 +534,11 @@ print_symbol (void *args) case LOC_CONST_BYTES: { @@ -3255,11 +3255,11 @@ Index: gdb-7.5.50.20130215/gdb/symmisc.c for (i = 0; i < TYPE_LENGTH (type); i++) fprintf_filtered (outfile, " %02x", (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); -Index: gdb-7.5.50.20130215/gdb/target.c +Index: gdb-7.6.50.20130731-cvs/gdb/target.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/target.c 2013-01-31 17:32:44.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/target.c 2013-02-15 22:40:18.541622094 +0100 -@@ -51,7 +51,7 @@ static void default_terminal_info (char +--- gdb-7.6.50.20130731-cvs.orig/gdb/target.c 2013-08-02 16:38:26.461292237 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/target.c 2013-08-02 16:38:32.372300755 +0200 +@@ -51,7 +51,7 @@ static void default_terminal_info (const static int default_watchpoint_addr_within_range (struct target_ops *, CORE_ADDR, CORE_ADDR, int); @@ -3277,7 +3277,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, int, int, struct expression *); -@@ -3550,7 +3550,7 @@ target_fileio_read_stralloc (const char +@@ -3586,7 +3586,7 @@ target_fileio_read_stralloc (const char static int @@ -3286,7 +3286,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c { return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT); } -@@ -4251,7 +4251,7 @@ debug_to_can_use_hw_breakpoint (int type +@@ -4541,7 +4541,7 @@ debug_to_can_use_hw_breakpoint (int type } static int @@ -3295,11 +3295,11 @@ Index: gdb-7.5.50.20130215/gdb/target.c { CORE_ADDR retval; -Index: gdb-7.5.50.20130215/gdb/target.h +Index: gdb-7.6.50.20130731-cvs/gdb/target.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/target.h 2013-02-15 22:37:30.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/target.h 2013-02-15 22:40:18.542622096 +0100 -@@ -482,7 +482,7 @@ struct target_ops +--- gdb-7.6.50.20130731-cvs.orig/gdb/target.h 2013-08-02 16:38:26.462292238 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/target.h 2013-08-02 16:38:32.372300755 +0200 +@@ -389,7 +389,7 @@ struct target_ops /* Documentation of this routine is provided with the corresponding target_* macro. */ @@ -3308,11 +3308,11 @@ Index: gdb-7.5.50.20130215/gdb/target.h int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int, struct expression *); -Index: gdb-7.5.50.20130215/gdb/tracepoint.c +Index: gdb-7.6.50.20130731-cvs/gdb/tracepoint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/tracepoint.c 2013-02-14 11:19:39.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/tracepoint.c 2013-02-15 22:40:18.543622099 +0100 -@@ -955,13 +955,13 @@ add_register (struct collection_list *co +--- gdb-7.6.50.20130731-cvs.orig/gdb/tracepoint.c 2013-08-02 16:38:26.464292241 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/tracepoint.c 2013-08-02 16:40:53.018499769 +0200 +@@ -940,13 +940,13 @@ add_register (struct collection_list *co static void add_memrange (struct collection_list *memranges, int type, bfd_signed_vma base, @@ -3328,16 +3328,16 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c } /* type: memrange_absolute == memory, other n == basereg */ -@@ -990,7 +990,7 @@ collect_symbol (struct collection_list * - long frame_regno, long frame_offset, - CORE_ADDR scope) +@@ -976,7 +976,7 @@ collect_symbol (struct collection_list * + CORE_ADDR scope, + int trace_string) { - unsigned long len; + ULONGEST len; unsigned int reg; bfd_signed_vma offset; int treat_as_expr = 0; -@@ -1014,8 +1014,8 @@ collect_symbol (struct collection_list * +@@ -1000,8 +1000,8 @@ collect_symbol (struct collection_list * char tmp[40]; sprintf_vma (tmp, offset); @@ -3348,7 +3348,7 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c tmp /* address */); } /* A struct may be a C++ class with static fields, go to general -@@ -1047,8 +1047,8 @@ collect_symbol (struct collection_list * +@@ -1033,8 +1033,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3359,7 +3359,7 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -1059,8 +1059,8 @@ collect_symbol (struct collection_list * +@@ -1045,8 +1045,8 @@ collect_symbol (struct collection_list * offset = 0; if (info_verbose) { @@ -3370,7 +3370,7 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from reg %d\n", reg); } -@@ -1071,8 +1071,8 @@ collect_symbol (struct collection_list * +@@ -1057,8 +1057,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3381,7 +3381,7 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -2642,7 +2642,8 @@ scope_info (char *args, int from_tty) +@@ -2716,7 +2716,8 @@ scope_info (char *args, int from_tty) const char *symname; char *save_args = args; struct block_iterator iter; @@ -3391,8 +3391,8 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c struct gdbarch *gdbarch; int regno; -@@ -2772,8 +2773,11 @@ scope_info (char *args, int from_tty) - break; +@@ -2852,8 +2853,11 @@ scope_info (char *args, int from_tty) + } } if (SYMBOL_TYPE (sym)) - printf_filtered (", length %d.\n", @@ -3405,10 +3405,10 @@ Index: gdb-7.5.50.20130215/gdb/tracepoint.c } if (BLOCK_FUNCTION (block)) break; -Index: gdb-7.5.50.20130215/gdb/typeprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/typeprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/typeprint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/typeprint.c 2013-02-15 22:40:18.543622099 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/typeprint.c 2013-08-02 16:38:26.464292241 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/typeprint.c 2013-08-02 16:38:32.374300758 +0200 @@ -409,7 +409,7 @@ whatis_exp (char *exp, int show) struct type *real_type = NULL; struct type *type; @@ -3418,10 +3418,10 @@ Index: gdb-7.5.50.20130215/gdb/typeprint.c int using_enc = 0; struct value_print_options opts; struct type_print_options flags = default_ptype_flags; -Index: gdb-7.5.50.20130215/gdb/valarith.c +Index: gdb-7.6.50.20130731-cvs/gdb/valarith.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/valarith.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/valarith.c 2013-02-15 22:40:18.543622099 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/valarith.c 2013-08-02 16:38:26.465292243 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/valarith.c 2013-08-02 16:38:32.374300758 +0200 @@ -190,15 +190,15 @@ value_subscript (struct value *array, LO to doubles, but no longer does. */ @@ -3475,11 +3475,11 @@ Index: gdb-7.5.50.20130215/gdb/valarith.c for (i = 0; i < len; i++) { -Index: gdb-7.5.50.20130215/gdb/valops.c +Index: gdb-7.6.50.20130731-cvs/gdb/valops.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/valops.c 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/valops.c 2013-02-15 22:41:34.751715867 +0100 -@@ -54,11 +54,11 @@ static int typecmp (int staticp, int var +--- gdb-7.6.50.20130731-cvs.orig/gdb/valops.c 2013-08-02 16:38:26.467292246 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/valops.c 2013-08-02 16:38:32.375300759 +0200 +@@ -53,11 +53,11 @@ static int typecmp (int staticp, int var struct field t1[], struct value *t2[]); static struct value *search_struct_field (const char *, struct value *, @@ -3493,7 +3493,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c static int find_oload_champ_namespace (struct value **, int, const char *, const char *, -@@ -86,7 +86,7 @@ oload_classification classify_oload_matc +@@ -85,7 +85,7 @@ oload_classification classify_oload_matc int, int); static struct value *value_struct_elt_for_reference (struct type *, @@ -3502,7 +3502,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c char *, struct type *, int, enum noside); -@@ -103,8 +103,8 @@ static CORE_ADDR allocate_space_in_infer +@@ -102,8 +102,8 @@ static CORE_ADDR allocate_space_in_infer static struct value *cast_into_complex (struct type *, struct value *); static struct fn_field *find_method_list (struct value **, const char *, @@ -3513,7 +3513,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c void _initialize_valops (void); -@@ -189,7 +189,7 @@ find_function_in_inferior (const char *n +@@ -188,7 +188,7 @@ find_function_in_inferior (const char *n space. */ struct value * @@ -3522,7 +3522,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c { struct objfile *objf; struct value *val = find_function_in_inferior ("malloc", &objf); -@@ -262,7 +262,8 @@ value_cast_structs (struct type *type, s +@@ -261,7 +261,8 @@ value_cast_structs (struct type *type, s if (TYPE_NAME (t2) != NULL) { /* Try downcasting using the run-time type of the value. */ @@ -3532,7 +3532,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct type *real_type; real_type = value_rtti_type (v2, &full, &top, &using_enc); -@@ -401,12 +402,12 @@ value_cast (struct type *type, struct va +@@ -400,12 +401,12 @@ value_cast (struct type *type, struct va if (code1 == TYPE_CODE_ARRAY) { struct type *element_type = TYPE_TARGET_TYPE (type); @@ -3547,7 +3547,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c LONGEST low_bound, high_bound, new_length; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -640,7 +641,7 @@ value_reinterpret_cast (struct type *typ +@@ -639,7 +640,7 @@ value_reinterpret_cast (struct type *typ static int dynamic_cast_check_1 (struct type *desired_type, const gdb_byte *valaddr, @@ -3556,7 +3556,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c CORE_ADDR address, struct value *val, struct type *search_type, -@@ -652,8 +653,8 @@ dynamic_cast_check_1 (struct type *desir +@@ -651,8 +652,8 @@ dynamic_cast_check_1 (struct type *desir for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i) { @@ -3567,7 +3567,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (class_types_same_p (desired_type, TYPE_BASECLASS (search_type, i))) { -@@ -687,7 +688,7 @@ dynamic_cast_check_1 (struct type *desir +@@ -686,7 +687,7 @@ dynamic_cast_check_1 (struct type *desir static int dynamic_cast_check_2 (struct type *desired_type, const gdb_byte *valaddr, @@ -3576,7 +3576,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c CORE_ADDR address, struct value *val, struct type *search_type, -@@ -697,7 +698,7 @@ dynamic_cast_check_2 (struct type *desir +@@ -696,7 +697,7 @@ dynamic_cast_check_2 (struct type *desir for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i) { @@ -3585,7 +3585,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (! BASETYPE_VIA_PUBLIC (search_type, i)) continue; -@@ -728,7 +729,8 @@ dynamic_cast_check_2 (struct type *desir +@@ -727,7 +728,8 @@ dynamic_cast_check_2 (struct type *desir struct value * value_dynamic_cast (struct type *type, struct value *arg) { @@ -3595,7 +3595,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct type *resolved_type = check_typedef (type); struct type *arg_type = check_typedef (value_type (arg)); struct type *class_type, *rtti_type; -@@ -1181,7 +1183,7 @@ value_fetch_lazy (struct value *val) +@@ -1007,7 +1009,7 @@ value_at_lazy (struct type *type, CORE_A } void @@ -3604,7 +3604,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length) { -@@ -1332,7 +1334,7 @@ value_assign (struct value *toval, struc +@@ -1157,7 +1159,7 @@ value_assign (struct value *toval, struc { const gdb_byte *dest_buffer; CORE_ADDR changed_addr; @@ -3613,7 +3613,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) -@@ -1411,7 +1413,7 @@ value_assign (struct value *toval, struc +@@ -1236,7 +1238,7 @@ value_assign (struct value *toval, struc if (value_bitsize (toval)) { struct value *parent = value_parent (toval); @@ -3622,7 +3622,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c int changed_len; gdb_byte buffer[sizeof (LONGEST)]; int optim, unavail; -@@ -1891,7 +1893,7 @@ value_array (int lowbound, int highbound +@@ -1716,7 +1718,7 @@ value_array (int lowbound, int highbound { int nelem; int idx; @@ -3631,7 +3631,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct value *val; struct type *arraytype; -@@ -2066,7 +2068,7 @@ typecmp (int staticp, int varargs, int n +@@ -1891,7 +1893,7 @@ typecmp (int staticp, int varargs, int n static void update_search_result (struct value **result_ptr, struct value *v, @@ -3640,7 +3640,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c const char *name, struct type *type) { if (v != NULL) -@@ -2090,10 +2092,10 @@ update_search_result (struct value **res +@@ -1915,10 +1917,10 @@ update_search_result (struct value **res lookup is ambiguous. */ static void @@ -3653,7 +3653,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct type *outermost_type) { int i; -@@ -2148,7 +2150,7 @@ do_search_struct_field (const char *name +@@ -1973,7 +1975,7 @@ do_search_struct_field (const char *name . */ struct value *v = NULL; @@ -3662,7 +3662,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c /* This is pretty gross. In G++, the offset in an anonymous union is relative to the beginning of the -@@ -2187,7 +2189,7 @@ do_search_struct_field (const char *name +@@ -2012,7 +2014,7 @@ do_search_struct_field (const char *name && (strcmp_iw (name, TYPE_BASECLASS_NAME (type, i)) == 0)); @@ -3671,7 +3671,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2262,11 +2264,11 @@ do_search_struct_field (const char *name +@@ -2087,11 +2089,11 @@ do_search_struct_field (const char *name fields, look for a baseclass named NAME. */ static struct value * @@ -3685,7 +3685,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c do_search_struct_field (name, arg1, offset, type, looking_for_baseclass, &result, &boffset, type); -@@ -2283,7 +2285,7 @@ search_struct_field (const char *name, s +@@ -2108,7 +2110,7 @@ search_struct_field (const char *name, s static struct value * search_struct_method (const char *name, struct value **arg1p, @@ -3694,7 +3694,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c int *static_memfuncp, struct type *type) { int i; -@@ -2347,8 +2349,8 @@ search_struct_method (const char *name, +@@ -2172,8 +2174,8 @@ search_struct_method (const char *name, for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3705,7 +3705,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2530,8 +2532,8 @@ value_struct_elt (struct value **argp, s +@@ -2355,8 +2357,8 @@ value_struct_elt (struct value **argp, s static struct fn_field * find_method_list (struct value **argp, const char *method, @@ -3716,7 +3716,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c { int i; struct fn_field *f; -@@ -2564,7 +2566,7 @@ find_method_list (struct value **argp, c +@@ -2389,7 +2391,7 @@ find_method_list (struct value **argp, c /* Not found in object, check in base subobjects. */ for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3725,7 +3725,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2600,7 +2602,7 @@ find_method_list (struct value **argp, c +@@ -2425,7 +2427,7 @@ find_method_list (struct value **argp, c static struct fn_field * value_find_oload_method_list (struct value **argp, const char *method, int offset, int *num_fns, @@ -3734,7 +3734,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c { struct type *t; -@@ -2690,7 +2692,7 @@ find_overload_match (struct value **args +@@ -2515,7 +2517,7 @@ find_overload_match (struct value **args /* Number of overloaded instances being considered. */ int num_fns = 0; struct type *basetype = NULL; @@ -3743,7 +3743,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL); -@@ -3360,7 +3362,7 @@ compare_parameters (struct type *t1, str +@@ -3185,7 +3187,7 @@ compare_parameters (struct type *t1, str the form "DOMAIN::NAME". */ static struct value * @@ -3752,7 +3752,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c struct type *curtype, char *name, struct type *intype, int want_address, -@@ -3397,7 +3399,7 @@ value_struct_elt_for_reference (struct t +@@ -3222,7 +3224,7 @@ value_struct_elt_for_reference (struct t if (want_address) return value_from_longest (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), @@ -3761,7 +3761,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c else if (noside == EVAL_AVOID_SIDE_EFFECTS) return allocate_value (TYPE_FIELD_TYPE (t, i)); else -@@ -3540,7 +3542,7 @@ value_struct_elt_for_reference (struct t +@@ -3365,7 +3367,7 @@ value_struct_elt_for_reference (struct t for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) { struct value *v; @@ -3770,7 +3770,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (t, i)) base_offset = 0; -@@ -3630,7 +3632,7 @@ value_maybe_namespace_elt (const struct +@@ -3455,7 +3457,7 @@ value_maybe_namespace_elt (const struct struct type * value_rtti_indirect_type (struct value *v, int *full, @@ -3779,7 +3779,7 @@ Index: gdb-7.5.50.20130215/gdb/valops.c { struct value *target; struct type *type, *real_type, *target_type; -@@ -3680,12 +3682,12 @@ value_rtti_indirect_type (struct value * +@@ -3505,12 +3507,12 @@ value_rtti_indirect_type (struct value * struct value * value_full_object (struct value *argp, struct type *rtype, @@ -3794,11 +3794,11 @@ Index: gdb-7.5.50.20130215/gdb/valops.c int using_enc = 0; struct value *new_val; -Index: gdb-7.5.50.20130215/gdb/valprint.c +Index: gdb-7.6.50.20130731-cvs/gdb/valprint.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/valprint.c 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/valprint.c 2013-02-15 22:40:18.545622104 +0100 -@@ -299,7 +299,7 @@ scalar_type_p (struct type *type) +--- gdb-7.6.50.20130731-cvs.orig/gdb/valprint.c 2013-08-02 16:38:26.468292247 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/valprint.c 2013-08-02 16:38:32.376300761 +0200 +@@ -302,7 +302,7 @@ scalar_type_p (struct type *type) int valprint_check_validity (struct ui_file *stream, struct type *type, @@ -3807,7 +3807,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c const struct value *val) { CHECK_TYPEDEF (type); -@@ -363,7 +363,7 @@ val_print_invalid_address (struct ui_fil +@@ -366,7 +366,7 @@ val_print_invalid_address (struct ui_fil void generic_val_print (struct type *type, const gdb_byte *valaddr, @@ -3816,7 +3816,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -725,7 +725,7 @@ generic_val_print (struct type *type, co +@@ -728,7 +728,7 @@ generic_val_print (struct type *type, co RECURSE. */ void @@ -3825,7 +3825,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -937,7 +937,7 @@ val_print_type_code_flags (struct type * +@@ -940,7 +940,7 @@ val_print_type_code_flags (struct type * void val_print_scalar_formatted (struct type *type, @@ -3834,7 +3834,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c const struct value *val, const struct value_print_options *options, int size, -@@ -1478,7 +1478,7 @@ print_decimal_chars (struct ui_file *str +@@ -1481,7 +1481,7 @@ print_decimal_chars (struct ui_file *str void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3843,7 +3843,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c { const gdb_byte *p; -@@ -1595,23 +1595,23 @@ maybe_print_array_index (struct type *in +@@ -1598,23 +1598,23 @@ maybe_print_array_index (struct type *in void val_print_array_elements (struct type *type, @@ -3873,7 +3873,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c LONGEST low_bound, high_bound; struct cleanup *back_to; CORE_ADDR saved_address = address; -@@ -1706,7 +1706,7 @@ val_print_array_elements (struct type *t +@@ -1709,7 +1709,7 @@ val_print_array_elements (struct type *t address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3882,7 +3882,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c annotate_elt_rep_end (); i = rep1 - 1; -@@ -2357,7 +2357,7 @@ print_converted_chars_to_obstack (struct +@@ -2360,7 +2360,7 @@ print_converted_chars_to_obstack (struct void generic_printstr (struct ui_file *stream, struct type *type, @@ -3891,11 +3891,11 @@ Index: gdb-7.5.50.20130215/gdb/valprint.c const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options) -Index: gdb-7.5.50.20130215/gdb/valprint.h +Index: gdb-7.6.50.20130731-cvs/gdb/valprint.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/valprint.h 2013-01-08 03:00:34.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/valprint.h 2013-02-15 22:40:18.545622104 +0100 -@@ -113,11 +113,11 @@ extern void maybe_print_array_index (str +--- gdb-7.6.50.20130731-cvs.orig/gdb/valprint.h 2013-08-02 16:38:26.469292248 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/valprint.h 2013-08-02 16:38:32.376300761 +0200 +@@ -115,11 +115,11 @@ extern void maybe_print_array_index (str struct ui_file *stream, const struct value_print_options *); @@ -3909,7 +3909,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h extern void val_print_type_code_int (struct type *, const gdb_byte *, struct ui_file *); -@@ -127,7 +127,7 @@ extern void val_print_type_code_flags (s +@@ -129,7 +129,7 @@ extern void val_print_type_code_flags (s struct ui_file *stream); extern void val_print_scalar_formatted (struct type *, @@ -3918,7 +3918,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h const struct value *, const struct value_print_options *, int, -@@ -143,7 +143,7 @@ extern void print_decimal_chars (struct +@@ -145,7 +145,7 @@ extern void print_decimal_chars (struct unsigned int, enum bfd_endian); extern void print_hex_chars (struct ui_file *, const gdb_byte *, @@ -3927,7 +3927,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h extern void print_char_chars (struct ui_file *, struct type *, const gdb_byte *, unsigned int, enum bfd_endian); -@@ -188,7 +188,7 @@ struct generic_val_print_decorations +@@ -190,7 +190,7 @@ struct generic_val_print_decorations extern void generic_val_print (struct type *type, const gdb_byte *valaddr, @@ -3936,7 +3936,7 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -198,7 +198,7 @@ extern void generic_emit_char (int c, st +@@ -200,7 +200,7 @@ extern void generic_emit_char (int c, st int quoter, const char *encoding); extern void generic_printstr (struct ui_file *stream, struct type *type, @@ -3945,11 +3945,11 @@ Index: gdb-7.5.50.20130215/gdb/valprint.h const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options); -Index: gdb-7.5.50.20130215/gdb/value.c +Index: gdb-7.6.50.20130731-cvs/gdb/value.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/value.c 2013-02-15 22:37:04.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/value.c 2013-02-15 22:40:18.545622104 +0100 -@@ -68,10 +68,10 @@ struct internal_function +--- gdb-7.6.50.20130731-cvs.orig/gdb/value.c 2013-08-02 16:38:26.471292251 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/value.c 2013-08-02 16:41:13.105527483 +0200 +@@ -69,10 +69,10 @@ struct internal_function struct range { /* Lowest offset in the range. */ @@ -3962,7 +3962,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c }; typedef struct range range_s; -@@ -82,8 +82,8 @@ DEF_VEC_O(range_s); +@@ -83,8 +83,8 @@ DEF_VEC_O(range_s); [offset2, offset2+len2) overlap. */ static int @@ -3973,7 +3973,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { ULONGEST h, l; -@@ -107,7 +107,7 @@ range_lessthan (const range_s *r1, const +@@ -108,7 +108,7 @@ range_lessthan (const range_s *r1, const OFFSET+LENGTH). */ static int @@ -3982,7 +3982,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { range_s what; int i; -@@ -240,7 +240,7 @@ struct value +@@ -241,7 +241,7 @@ struct value lval == lval_register, this is a further offset from location.address within the registers structure. Note also the member embedded_offset below. */ @@ -3991,7 +3991,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Only used for bitfields; number of bits contained in them. */ int bitsize; -@@ -310,8 +310,8 @@ struct value +@@ -311,8 +311,8 @@ struct value `type', and `embedded_offset' is zero, so everything works normally. */ struct type *enclosing_type; @@ -4002,7 +4002,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Values are stored in a chain, so that they can be deleted easily over calls to the inferior. Values assigned to internal -@@ -333,7 +333,8 @@ struct value +@@ -334,7 +334,8 @@ struct value }; int @@ -4012,7 +4012,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { gdb_assert (!value->lazy); -@@ -354,7 +355,8 @@ value_entirely_available (struct value * +@@ -355,7 +356,8 @@ value_entirely_available (struct value * } void @@ -4022,7 +4022,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { range_s newr; int i; -@@ -525,7 +527,7 @@ mark_value_bytes_unavailable (struct val +@@ -526,7 +528,7 @@ mark_value_bytes_unavailable (struct val static int find_first_range_overlap (VEC(range_s) *ranges, int pos, @@ -4031,7 +4031,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { range_s *r; int i; -@@ -538,9 +540,9 @@ find_first_range_overlap (VEC(range_s) * +@@ -539,9 +541,9 @@ find_first_range_overlap (VEC(range_s) * } int @@ -4044,7 +4044,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { int idx1 = 0, idx2 = 0; -@@ -768,13 +770,13 @@ deprecated_set_value_type (struct value +@@ -767,13 +769,13 @@ deprecated_set_value_type (struct value value->type = type; } @@ -4060,7 +4060,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { value->offset = offset; } -@@ -928,8 +930,9 @@ value_contents_all (struct value *value) +@@ -932,8 +934,9 @@ value_contents_all (struct value *value) DST_OFFSET+LENGTH) range are wholly available. */ void @@ -4072,7 +4072,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { range_s *r; int i; -@@ -977,8 +980,8 @@ value_contents_copy_raw (struct value *d +@@ -981,8 +984,8 @@ value_contents_copy_raw (struct value *d DST_OFFSET+LENGTH) range are wholly available. */ void @@ -4083,7 +4083,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { require_not_optimized_out (src); -@@ -1072,7 +1075,7 @@ value_entirely_optimized_out (const stru +@@ -1087,7 +1090,7 @@ value_entirely_optimized_out (const stru } int @@ -4092,7 +4092,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { if (!value->optimized_out) return 1; -@@ -1085,7 +1088,7 @@ value_bits_valid (const struct value *va +@@ -1100,7 +1103,7 @@ value_bits_valid (const struct value *va int value_bits_synthetic_pointer (const struct value *value, @@ -4101,7 +4101,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { if (value->lval != lval_computed || !value->location.computed.funcs->check_synthetic_pointer) -@@ -1095,26 +1098,26 @@ value_bits_synthetic_pointer (const stru +@@ -1110,26 +1113,26 @@ value_bits_synthetic_pointer (const stru length); } @@ -4132,7 +4132,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { value->pointed_to_offset = val; } -@@ -1969,7 +1972,7 @@ get_internalvar_function (struct interna +@@ -1982,7 +1985,7 @@ get_internalvar_function (struct interna } void @@ -4141,7 +4141,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c int bitsize, struct value *newval) { gdb_byte *addr; -@@ -2676,7 +2679,7 @@ set_value_enclosing_type (struct value * +@@ -2689,7 +2692,7 @@ set_value_enclosing_type (struct value * FIELDNO says which field. */ struct value * @@ -4150,7 +4150,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c int fieldno, struct type *arg_type) { struct value *v; -@@ -2706,7 +2709,7 @@ value_primitive_field (struct value *arg +@@ -2717,7 +2720,7 @@ value_primitive_field (struct value *arg bit. Assume that the address, offset, and embedded offset are sufficiently aligned. */ @@ -4158,8 +4158,8 @@ Index: gdb-7.5.50.20130215/gdb/value.c + LONGEST bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno); int container_bitsize = TYPE_LENGTH (type) * 8; - v = allocate_value_lazy (type); -@@ -2729,7 +2732,7 @@ value_primitive_field (struct value *arg + if (arg1->optimized_out) +@@ -2744,7 +2747,7 @@ value_primitive_field (struct value *arg /* This field is actually a base subobject, so preserve the entire object's contents for later references to virtual bases, etc. */ @@ -4168,7 +4168,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Lazy register values with offsets are not supported. */ if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1)) -@@ -2806,7 +2809,7 @@ value_field (struct value *arg1, int fie +@@ -2834,7 +2837,7 @@ value_field (struct value *arg1, int fie struct value * value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *type, @@ -4177,7 +4177,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { struct value *v; struct type *ftype = TYPE_FN_FIELD_TYPE (f, j); -@@ -2866,8 +2869,8 @@ value_fn_field (struct value **arg1p, st +@@ -2894,8 +2897,8 @@ value_fn_field (struct value **arg1p, st static int unpack_value_bits_as_long_1 (struct type *field_type, const gdb_byte *valaddr, @@ -4188,7 +4188,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c LONGEST *result) { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (field_type)); -@@ -2875,7 +2878,7 @@ unpack_value_bits_as_long_1 (struct type +@@ -2903,7 +2906,7 @@ unpack_value_bits_as_long_1 (struct type ULONGEST valmask; int lsbcount; int bytes_read; @@ -4197,7 +4197,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Read the minimum number of bytes required; there may not be enough bytes to read an entire ULONGEST. */ -@@ -2945,7 +2948,7 @@ unpack_value_bits_as_long_1 (struct type +@@ -2973,7 +2976,7 @@ unpack_value_bits_as_long_1 (struct type int unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr, @@ -4206,7 +4206,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c const struct value *original_value, LONGEST *result) { -@@ -2963,10 +2966,10 @@ unpack_value_bits_as_long (struct type * +@@ -2991,10 +2994,10 @@ unpack_value_bits_as_long (struct type * static int unpack_value_field_as_long_1 (struct type *type, const gdb_byte *valaddr, @@ -4219,7 +4219,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); struct type *field_type = TYPE_FIELD_TYPE (type, fieldno); -@@ -2982,7 +2985,7 @@ unpack_value_field_as_long_1 (struct typ +@@ -3010,7 +3013,7 @@ unpack_value_field_as_long_1 (struct typ int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, @@ -4228,7 +4228,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c const struct value *val, LONGEST *result) { gdb_assert (val != NULL); -@@ -3014,7 +3017,7 @@ unpack_field_as_long (struct type *type, +@@ -3042,7 +3045,7 @@ unpack_field_as_long (struct type *type, struct value * value_field_bitfield (struct type *type, int fieldno, const gdb_byte *valaddr, @@ -4237,7 +4237,7 @@ Index: gdb-7.5.50.20130215/gdb/value.c { LONGEST l; -@@ -3041,12 +3044,12 @@ value_field_bitfield (struct type *type, +@@ -3069,12 +3072,12 @@ value_field_bitfield (struct type *type, void modify_field (struct type *type, gdb_byte *addr, @@ -4252,10 +4252,10 @@ Index: gdb-7.5.50.20130215/gdb/value.c /* Normalize BITPOS. */ addr += bitpos / 8; -Index: gdb-7.5.50.20130215/gdb/value.h +Index: gdb-7.6.50.20130731-cvs/gdb/value.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/value.h 2013-02-15 22:31:37.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/value.h 2013-02-15 22:40:18.546622106 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/value.h 2013-08-02 16:38:26.472292253 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/value.h 2013-08-02 16:39:15.721362577 +0200 @@ -82,8 +82,8 @@ extern void set_value_parent (struct val within the registers structure. Note also the member embedded_offset below. */ @@ -4310,7 +4310,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h const struct value *val); extern struct value *allocate_optimized_out_value (struct type *type); -@@ -409,13 +410,13 @@ extern struct value *coerce_array (struc +@@ -415,13 +416,13 @@ extern struct value *coerce_array (struc bits in the given range are valid, zero if any bit is invalid. */ extern int value_bits_valid (const struct value *value, @@ -4326,7 +4326,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h /* Given a value, determine whether the contents bytes starting at OFFSET and extending for LENGTH bytes are available. This returns -@@ -423,7 +424,7 @@ extern int value_bits_synthetic_pointer +@@ -429,7 +430,7 @@ extern int value_bits_synthetic_pointer byte is unavailable. */ extern int value_bytes_available (const struct value *value, @@ -4335,7 +4335,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h /* Like value_bytes_available, but return false if any byte in the whole object is unavailable. */ -@@ -433,7 +434,7 @@ extern int value_entirely_available (str +@@ -439,7 +440,7 @@ extern int value_entirely_available (str LENGTH bytes as unavailable. */ extern void mark_value_bytes_unavailable (struct value *value, @@ -4344,7 +4344,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h /* Compare LENGTH bytes of VAL1's contents starting at OFFSET1 with LENGTH bytes of VAL2's contents starting at OFFSET2. -@@ -443,7 +444,7 @@ extern void mark_value_bytes_unavailable +@@ -449,7 +450,7 @@ extern void mark_value_bytes_unavailable example, to compare a complete object value with itself, including its enclosing type chunk, you'd do: @@ -4353,21 +4353,20 @@ Index: gdb-7.5.50.20130215/gdb/value.h value_available_contents (val, 0, val, 0, len); Returns true iff the set of available contents match. Unavailable -@@ -465,9 +466,10 @@ extern void mark_value_bytes_unavailable - value_available_contents_eq(val, 3, val, 4, 4) => 0 - */ +@@ -476,9 +477,9 @@ extern void mark_value_bytes_unavailable + gone, it works with const values. Therefore, this routine must not + be called with lazy values. */ -extern int value_available_contents_eq (const struct value *val1, int offset1, - const struct value *val2, int offset2, - int length); -+extern int value_available_contents_eq (const struct value *val1, -+ LONGEST offset1, -+ const struct value *val2, -+ LONGEST offset2, LONGEST length); ++extern int value_available_contents_eq (const struct value *val1, LONGEST offset1, ++ const struct value *val2, LONGEST offset2, ++ LONGEST length); /* Read LENGTH bytes of memory starting at MEMADDR into BUFFER, which is (or will be copied to) VAL's contents buffer offset by -@@ -476,7 +478,7 @@ extern int value_available_contents_eq ( +@@ -487,7 +488,7 @@ extern int value_available_contents_eq ( memory is likewise unavailable. STACK indicates whether the memory is known to be stack memory. */ @@ -4376,7 +4375,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length); -@@ -510,7 +512,7 @@ extern CORE_ADDR unpack_pointer (struct +@@ -521,7 +522,7 @@ extern CORE_ADDR unpack_pointer (struct extern int unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr, @@ -4385,7 +4384,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h int bitsize, const struct value *original_value, LONGEST *result); -@@ -519,12 +521,12 @@ extern LONGEST unpack_field_as_long (str +@@ -530,12 +531,12 @@ extern LONGEST unpack_field_as_long (str const gdb_byte *valaddr, int fieldno); extern int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, @@ -4400,7 +4399,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h const struct value *val); extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num); -@@ -583,12 +585,12 @@ extern struct value *default_read_var_va +@@ -594,12 +595,12 @@ extern struct value *default_read_var_va extern struct value *allocate_value (struct type *type); extern struct value *allocate_value_lazy (struct type *type); extern void allocate_value_contents (struct value *value); @@ -4419,7 +4418,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h extern struct value *allocate_repeat_value (struct type *type, int count); -@@ -660,16 +662,16 @@ extern int find_overload_match (struct v +@@ -671,16 +672,16 @@ extern int find_overload_match (struct v extern struct value *value_field (struct value *arg1, int fieldno); @@ -4439,7 +4438,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h extern struct value *value_cast_pointers (struct type *, struct value *, int); -@@ -763,7 +765,7 @@ extern void set_internalvar_string (stru +@@ -774,7 +775,7 @@ extern void set_internalvar_string (stru extern void clear_internalvar (struct internalvar *var); extern void set_internalvar_component (struct internalvar *var, @@ -4448,7 +4447,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h int bitpos, int bitsize, struct value *newvalue); -@@ -845,7 +847,7 @@ extern struct value *value_x_unop (struc +@@ -856,7 +857,7 @@ extern struct value *value_x_unop (struc enum noside noside); extern struct value *value_fn_field (struct value **arg1p, struct fn_field *f, @@ -4457,7 +4456,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h extern int binop_types_user_defined_p (enum exp_opcode op, struct type *type1, -@@ -873,7 +875,8 @@ extern void release_value_or_incref (str +@@ -884,7 +885,8 @@ extern void release_value_or_incref (str extern int record_latest_value (struct value *val); extern void modify_field (struct type *type, gdb_byte *addr, @@ -4467,7 +4466,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h extern void type_print (struct type *type, const char *varstring, struct ui_file *stream, int show); -@@ -903,7 +906,7 @@ extern void value_print_array_elements ( +@@ -914,7 +916,7 @@ extern void value_print_array_elements ( extern struct value *value_release_to_mark (struct value *mark); extern void val_print (struct type *type, const gdb_byte *valaddr, @@ -4476,7 +4475,7 @@ Index: gdb-7.5.50.20130215/gdb/value.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -952,10 +955,11 @@ extern struct value *value_literal_compl +@@ -963,10 +965,11 @@ extern struct value *value_literal_compl extern struct value *find_function_in_inferior (const char *, struct objfile **); diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index 07d0583..c396554 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -96,10 +96,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-wp.patch -Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/arm-linux-nat.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/arm-linux-nat.c 2013-02-15 22:42:45.988804306 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/arm-linux-nat.c 2013-08-02 16:42:29.565632895 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c 2013-08-02 16:42:34.094639104 +0200 @@ -1105,7 +1105,7 @@ arm_linux_region_ok_for_hw_watchpoint (C /* Insert a Hardware breakpoint. */ @@ -127,10 +127,10 @@ Index: gdb-7.5.50.20130215/gdb/arm-linux-nat.c { return start <= addr && start + length - 1 >= addr; } -Index: gdb-7.5.50.20130215/gdb/i386-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/i386-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/i386-nat.c 2013-02-15 22:41:53.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/i386-nat.c 2013-02-15 22:43:14.005838741 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-nat.c 2013-08-02 16:42:29.566632896 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/i386-nat.c 2013-08-02 16:42:34.095639105 +0200 @@ -589,7 +589,7 @@ i386_update_inferior_debug_regs (struct of the type TYPE. Return 0 on success, -1 on failure. */ @@ -149,10 +149,10 @@ Index: gdb-7.5.50.20130215/gdb/i386-nat.c struct expression *cond) { struct i386_debug_reg_state *state -Index: gdb-7.5.50.20130215/gdb/ia64-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/ia64-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ia64-linux-nat.c 2013-02-15 22:34:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ia64-linux-nat.c 2013-02-15 22:42:45.989804309 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ia64-linux-nat.c 2013-08-02 16:42:29.566632896 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ia64-linux-nat.c 2013-08-02 16:42:34.095639105 +0200 @@ -542,7 +542,7 @@ is_power_of_2 (int val) } @@ -171,11 +171,11 @@ Index: gdb-7.5.50.20130215/gdb/ia64-linux-nat.c struct expression *cond) { int idx; -Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c +Index: gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/inf-ttrace.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/inf-ttrace.c 2013-02-15 22:42:45.989804309 +0100 -@@ -313,14 +313,14 @@ inf_ttrace_disable_page_protections (pid +--- gdb-7.6.50.20130731-cvs.orig/gdb/inf-ttrace.c 2013-08-02 16:42:29.567632898 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c 2013-08-02 16:42:34.095639105 +0200 +@@ -314,14 +314,14 @@ inf_ttrace_disable_page_protections (pid type TYPE. */ static int @@ -193,7 +193,7 @@ Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c gdb_assert (type == hw_write); -@@ -337,14 +337,14 @@ inf_ttrace_insert_watchpoint (CORE_ADDR +@@ -338,14 +338,14 @@ inf_ttrace_insert_watchpoint (CORE_ADDR type TYPE. */ static int @@ -211,11 +211,11 @@ Index: gdb-7.5.50.20130215/gdb/inf-ttrace.c gdb_assert (type == hw_write); -Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/mips-linux-nat.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/mips-linux-nat.c 2013-02-15 22:42:45.990804311 +0100 -@@ -1017,7 +1017,7 @@ populate_regs_from_watches (struct pt_wa +--- gdb-7.6.50.20130731-cvs.orig/gdb/mips-linux-nat.c 2013-08-02 16:42:29.568632899 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c 2013-08-02 16:42:34.096639106 +0200 +@@ -644,7 +644,7 @@ mips_linux_new_thread (struct lwp_info * watch. Return zero on success. */ static int @@ -224,7 +224,7 @@ Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c struct expression *cond) { struct pt_watch_regs regs; -@@ -1067,7 +1067,7 @@ mips_linux_insert_watchpoint (CORE_ADDR +@@ -697,7 +697,7 @@ mips_linux_insert_watchpoint (CORE_ADDR Return zero on success. */ static int @@ -233,10 +233,10 @@ Index: gdb-7.5.50.20130215/gdb/mips-linux-nat.c struct expression *cond) { int retval; -Index: gdb-7.5.50.20130215/gdb/nto-procfs.c +Index: gdb-7.6.50.20130731-cvs/gdb/nto-procfs.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/nto-procfs.c 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/nto-procfs.c 2013-02-15 22:42:45.990804311 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/nto-procfs.c 2013-08-02 16:42:29.568632899 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/nto-procfs.c 2013-08-02 16:42:34.096639106 +0200 @@ -69,10 +69,10 @@ static ptid_t do_attach (ptid_t ptid); static int procfs_can_use_hw_breakpoint (int, int, int); @@ -267,11 +267,11 @@ Index: gdb-7.5.50.20130215/gdb/nto-procfs.c struct expression *cond) { return procfs_hw_watchpoint (addr, len, type); -Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/ppc-linux-nat.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/ppc-linux-nat.c 2013-02-15 22:42:45.991804313 +0100 -@@ -1838,11 +1838,11 @@ can_use_watchpoint_cond_accel (void) +--- gdb-7.6.50.20130731-cvs.orig/gdb/ppc-linux-nat.c 2013-08-02 16:42:29.570632902 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c 2013-08-02 16:42:34.097639108 +0200 +@@ -1853,11 +1853,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: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c CORE_ADDR addr_end_data, addr_end_dvc; /* The DVC register compares bytes within fixed-length windows which -@@ -1929,7 +1929,7 @@ num_memory_accesses (struct value *v) +@@ -1944,7 +1944,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: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c { int pc = 1, num_accesses_left, num_accesses_right; struct value *left_val, *right_val, *left_chain, *right_chain; -@@ -1996,7 +1996,7 @@ check_condition (CORE_ADDR watch_addr, s +@@ -2011,7 +2011,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: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c struct expression *cond) { CORE_ADDR data_value; -@@ -2013,7 +2013,7 @@ ppc_linux_can_accel_watchpoint_condition +@@ -2028,7 +2028,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: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c int insert) { if (len == 1 -@@ -2058,7 +2058,7 @@ create_watchpoint_request (struct ppc_hw +@@ -2073,7 +2073,7 @@ create_watchpoint_request (struct ppc_hw } static int @@ -322,7 +322,7 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c struct expression *cond) { struct lwp_info *lp; -@@ -2126,7 +2126,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR a +@@ -2141,7 +2141,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR a } static int @@ -331,7 +331,7 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c struct expression *cond) { struct lwp_info *lp; -@@ -2266,7 +2266,7 @@ ppc_linux_stopped_by_watchpoint (void) +@@ -2292,7 +2292,7 @@ ppc_linux_stopped_by_watchpoint (void) static int ppc_linux_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -340,10 +340,10 @@ Index: gdb-7.5.50.20130215/gdb/ppc-linux-nat.c { int mask; -Index: gdb-7.5.50.20130215/gdb/procfs.c +Index: gdb-7.6.50.20130731-cvs/gdb/procfs.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/procfs.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/procfs.c 2013-02-15 22:42:45.992804315 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/procfs.c 2013-08-02 16:42:29.572632904 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/procfs.c 2013-08-02 16:42:34.098639109 +0200 @@ -2433,7 +2433,7 @@ procfs_address_to_host_pointer (CORE_ADD #endif @@ -380,11 +380,11 @@ Index: gdb-7.5.50.20130215/gdb/procfs.c struct expression *cond) { return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0); -Index: gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c +Index: gdb-7.6.50.20130731-cvs/gdb/remote-m32r-sdi.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/remote-m32r-sdi.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c 2013-02-15 22:42:45.993804317 +0100 -@@ -1417,14 +1417,15 @@ m32r_can_use_hw_watchpoint (int type, in +--- gdb-7.6.50.20130731-cvs.orig/gdb/remote-m32r-sdi.c 2013-08-02 16:42:29.573632906 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/remote-m32r-sdi.c 2013-08-02 16:42:34.099639111 +0200 +@@ -1416,14 +1416,15 @@ m32r_can_use_hw_watchpoint (int type, in watchpoint. */ static int @@ -403,7 +403,7 @@ Index: gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c for (i = 0; i < MAX_ACCESS_BREAKS; i++) { -@@ -1442,14 +1443,15 @@ m32r_insert_watchpoint (CORE_ADDR addr, +@@ -1441,14 +1442,15 @@ m32r_insert_watchpoint (CORE_ADDR addr, } static int @@ -422,11 +422,11 @@ Index: gdb-7.5.50.20130215/gdb/remote-m32r-sdi.c for (i = 0; i < MAX_ACCESS_BREAKS; i++) { -Index: gdb-7.5.50.20130215/gdb/remote-mips.c +Index: gdb-7.6.50.20130731-cvs/gdb/remote-mips.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/remote-mips.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/remote-mips.c 2013-02-15 22:42:45.994804319 +0100 -@@ -2419,7 +2419,7 @@ calculate_mask (CORE_ADDR addr, int len) +--- gdb-7.6.50.20130731-cvs.orig/gdb/remote-mips.c 2013-08-02 16:42:29.574632907 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/remote-mips.c 2013-08-02 16:42:34.100639112 +0200 +@@ -2426,7 +2426,7 @@ calculate_mask (CORE_ADDR addr, int len) watchpoint. */ static int @@ -435,7 +435,7 @@ Index: gdb-7.5.50.20130215/gdb/remote-mips.c struct expression *cond) { if (mips_set_breakpoint (addr, len, type)) -@@ -2431,7 +2431,7 @@ mips_insert_watchpoint (CORE_ADDR addr, +@@ -2438,7 +2438,7 @@ mips_insert_watchpoint (CORE_ADDR addr, /* Remove a watchpoint. */ static int @@ -444,11 +444,11 @@ Index: gdb-7.5.50.20130215/gdb/remote-mips.c struct expression *cond) { if (mips_clear_breakpoint (addr, len, type)) -Index: gdb-7.5.50.20130215/gdb/remote.c +Index: gdb-7.6.50.20130731-cvs/gdb/remote.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/remote.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/remote.c 2013-02-15 22:42:45.996804323 +0100 -@@ -8155,7 +8155,7 @@ watchpoint_to_Z_packet (int type) +--- gdb-7.6.50.20130731-cvs.orig/gdb/remote.c 2013-08-02 16:42:29.577632911 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/remote.c 2013-08-02 16:42:34.103639116 +0200 +@@ -8277,7 +8277,7 @@ watchpoint_to_Z_packet (int type) } static int @@ -457,7 +457,7 @@ Index: gdb-7.5.50.20130215/gdb/remote.c struct expression *cond) { struct remote_state *rs = get_remote_state (); -@@ -8170,7 +8170,7 @@ remote_insert_watchpoint (CORE_ADDR addr +@@ -8297,7 +8297,7 @@ remote_insert_watchpoint (CORE_ADDR addr p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -466,7 +466,7 @@ Index: gdb-7.5.50.20130215/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -@@ -8190,7 +8190,7 @@ remote_insert_watchpoint (CORE_ADDR addr +@@ -8317,7 +8317,7 @@ remote_insert_watchpoint (CORE_ADDR addr static int remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -475,7 +475,7 @@ Index: gdb-7.5.50.20130215/gdb/remote.c { CORE_ADDR diff = remote_address_masked (addr - start); -@@ -8199,7 +8199,7 @@ remote_watchpoint_addr_within_range (str +@@ -8326,7 +8326,7 @@ remote_watchpoint_addr_within_range (str static int @@ -484,7 +484,7 @@ Index: gdb-7.5.50.20130215/gdb/remote.c struct expression *cond) { struct remote_state *rs = get_remote_state (); -@@ -8214,7 +8214,7 @@ remote_remove_watchpoint (CORE_ADDR addr +@@ -8346,7 +8346,7 @@ remote_remove_watchpoint (CORE_ADDR addr p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -493,10 +493,10 @@ Index: gdb-7.5.50.20130215/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -Index: gdb-7.5.50.20130215/gdb/s390-nat.c +Index: gdb-7.6.50.20130731-cvs/gdb/s390-nat.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/s390-nat.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/s390-nat.c 2013-02-15 22:42:45.997804325 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/s390-nat.c 2013-08-02 16:42:29.578632913 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/s390-nat.c 2013-08-02 16:42:34.103639116 +0200 @@ -516,7 +516,7 @@ s390_fix_watch_points (struct lwp_info * } @@ -515,21 +515,20 @@ Index: gdb-7.5.50.20130215/gdb/s390-nat.c struct expression *cond) { struct lwp_info *lp; -Index: gdb-7.5.50.20130215/gdb/target.c +Index: gdb-7.6.50.20130731-cvs/gdb/target.c =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/target.c 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/target.c 2013-02-15 22:42:45.997804325 +0100 -@@ -49,7 +49,8 @@ static void target_info (char *, int); - static void default_terminal_info (char *, int); +--- gdb-7.6.50.20130731-cvs.orig/gdb/target.c 2013-08-02 16:42:29.580632915 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/target.c 2013-08-02 16:42:52.160663787 +0200 +@@ -49,7 +49,7 @@ static void target_info (char *, int); + static void default_terminal_info (const char *, int); static int default_watchpoint_addr_within_range (struct target_ops *, - CORE_ADDR, CORE_ADDR, int); -+ CORE_ADDR, CORE_ADDR, -+ LONGEST); ++ CORE_ADDR, CORE_ADDR, LONGEST); static int default_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST); -@@ -114,10 +115,10 @@ static int debug_to_insert_hw_breakpoint +@@ -114,10 +114,10 @@ static int debug_to_insert_hw_breakpoint static int debug_to_remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *); @@ -542,7 +541,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *); static int debug_to_stopped_by_watchpoint (void); -@@ -125,11 +126,12 @@ static int debug_to_stopped_by_watchpoin +@@ -125,11 +125,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 *, @@ -557,7 +556,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *); static void debug_to_terminal_init (void); -@@ -751,10 +753,10 @@ update_current_target (void) +@@ -790,10 +791,10 @@ update_current_target (void) (int (*) (struct gdbarch *, struct bp_target_info *)) return_minus_one); de_fault (to_insert_watchpoint, @@ -570,7 +569,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c return_minus_one); de_fault (to_stopped_by_watchpoint, (int (*) (void)) -@@ -767,7 +769,7 @@ update_current_target (void) +@@ -806,7 +807,7 @@ update_current_target (void) de_fault (to_region_ok_for_hw_watchpoint, default_region_ok_for_hw_watchpoint); de_fault (to_can_accel_watchpoint_condition, @@ -579,7 +578,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c return_zero); de_fault (to_terminal_init, (void (*) (void)) -@@ -3558,7 +3560,7 @@ default_region_ok_for_hw_watchpoint (COR +@@ -3594,7 +3595,7 @@ default_region_ok_for_hw_watchpoint (COR static int default_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -588,7 +587,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c { return addr >= start && addr < start + length; } -@@ -4265,7 +4267,7 @@ debug_to_region_ok_for_hw_watchpoint (CO +@@ -4555,7 +4556,7 @@ debug_to_region_ok_for_hw_watchpoint (CO } static int @@ -597,7 +596,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *cond) { int retval; -@@ -4275,8 +4277,8 @@ debug_to_can_accel_watchpoint_condition +@@ -4565,8 +4566,8 @@ debug_to_can_accel_watchpoint_condition fprintf_unfiltered (gdb_stdlog, "target_can_accel_watchpoint_condition " @@ -608,7 +607,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c host_address_to_string (cond), (unsigned long) retval); return retval; } -@@ -4311,7 +4313,7 @@ debug_to_stopped_data_address (struct ta +@@ -4601,7 +4602,7 @@ debug_to_stopped_data_address (struct ta static int debug_to_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -617,7 +616,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c { int retval; -@@ -4319,9 +4321,9 @@ debug_to_watchpoint_addr_within_range (s +@@ -4609,9 +4610,9 @@ debug_to_watchpoint_addr_within_range (s start, length); fprintf_filtered (gdb_stdlog, @@ -629,7 +628,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c return retval; } -@@ -4356,7 +4358,7 @@ debug_to_remove_hw_breakpoint (struct gd +@@ -4646,7 +4647,7 @@ debug_to_remove_hw_breakpoint (struct gd } static int @@ -638,7 +637,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *cond) { int retval; -@@ -4364,14 +4366,14 @@ debug_to_insert_watchpoint (CORE_ADDR ad +@@ -4654,14 +4655,14 @@ debug_to_insert_watchpoint (CORE_ADDR ad retval = debug_target.to_insert_watchpoint (addr, len, type, cond); fprintf_unfiltered (gdb_stdlog, @@ -656,7 +655,7 @@ Index: gdb-7.5.50.20130215/gdb/target.c struct expression *cond) { int retval; -@@ -4379,8 +4381,8 @@ debug_to_remove_watchpoint (CORE_ADDR ad +@@ -4669,8 +4670,8 @@ debug_to_remove_watchpoint (CORE_ADDR ad retval = debug_target.to_remove_watchpoint (addr, len, type, cond); fprintf_unfiltered (gdb_stdlog, @@ -667,11 +666,11 @@ Index: gdb-7.5.50.20130215/gdb/target.c host_address_to_string (cond), (unsigned long) retval); return retval; } -Index: gdb-7.5.50.20130215/gdb/target.h +Index: gdb-7.6.50.20130731-cvs/gdb/target.h =================================================================== ---- gdb-7.5.50.20130215.orig/gdb/target.h 2013-02-15 22:40:18.000000000 +0100 -+++ gdb-7.5.50.20130215/gdb/target.h 2013-02-15 22:42:45.998804328 +0100 -@@ -466,8 +466,8 @@ struct target_ops +--- gdb-7.6.50.20130731-cvs.orig/gdb/target.h 2013-08-02 16:42:29.580632915 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/target.h 2013-08-02 16:42:34.105639119 +0200 +@@ -373,8 +373,8 @@ struct target_ops /* Documentation of what the two routines below are expected to do is provided with the corresponding target_* macros. */ @@ -682,7 +681,7 @@ Index: gdb-7.5.50.20130215/gdb/target.h int (*to_insert_mask_watchpoint) (struct target_ops *, CORE_ADDR, CORE_ADDR, int); -@@ -478,13 +478,13 @@ struct target_ops +@@ -385,13 +385,13 @@ struct target_ops int to_have_continuable_watchpoint; int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *); int (*to_watchpoint_addr_within_range) (struct target_ops *, diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index 08e2cd4..827d64d 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -137,10 +137,10 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-tdep.patch -Index: gdb-7.5.50.20130310/gdb/alpha-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/alpha-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/alpha-tdep.c 2013-03-10 16:44:34.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/alpha-tdep.c 2013-03-10 16:44:42.111599838 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/alpha-tdep.c 2013-08-02 16:43:01.128676094 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/alpha-tdep.c 2013-08-02 16:43:04.723681004 +0200 @@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *g { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -184,10 +184,10 @@ Index: gdb-7.5.50.20130310/gdb/alpha-tdep.c memcpy (arg_reg_buffer + offset, contents, tlen); offset += tlen; contents += tlen; -Index: gdb-7.5.50.20130310/gdb/amd64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/amd64-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/amd64-tdep.c 2013-03-10 16:16:23.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/amd64-tdep.c 2013-03-10 16:44:42.112599838 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/amd64-tdep.c 2013-08-02 16:43:01.130676097 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/amd64-tdep.c 2013-08-02 16:43:04.724681006 +0200 @@ -616,7 +616,7 @@ amd64_return_value (struct gdbarch *gdba { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -217,10 +217,10 @@ Index: gdb-7.5.50.20130310/gdb/amd64-tdep.c enum amd64_reg_class class[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -Index: gdb-7.5.50.20130310/gdb/amd64-windows-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/amd64-windows-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/amd64-windows-tdep.c 2013-01-01 07:32:37.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/amd64-windows-tdep.c 2013-03-10 16:44:42.112599838 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/amd64-windows-tdep.c 2013-08-02 16:43:01.135676104 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/amd64-windows-tdep.c 2013-08-02 16:43:04.724681006 +0200 @@ -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.50.20130310/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.50.20130310/gdb/arm-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/arm-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/arm-tdep.c 2013-03-01 16:38:23.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/arm-tdep.c 2013-03-10 16:44:42.115599840 +0100 -@@ -3496,7 +3496,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc +--- gdb-7.6.50.20130731-cvs.orig/gdb/arm-tdep.c 2013-08-02 16:43:01.140676110 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/arm-tdep.c 2013-08-02 16:43:04.727681010 +0200 +@@ -3498,7 +3498,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.50.20130310/gdb/arm-tdep.c arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3527,7 +3527,7 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3529,7 +3529,7 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_ARRAY: { @@ -252,7 +252,7 @@ Index: gdb-7.5.50.20130310/gdb/arm-tdep.c unsigned unitlen; count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type); if (count == -1) -@@ -3547,13 +3547,15 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3549,13 +3549,15 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_STRUCT: { @@ -271,7 +271,7 @@ Index: gdb-7.5.50.20130310/gdb/arm-tdep.c if (sub_count == -1) return -1; count += sub_count; -@@ -3573,13 +3575,15 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3575,13 +3577,15 @@ arm_vfp_cprc_sub_candidate (struct type case TYPE_CODE_UNION: { @@ -290,7 +290,7 @@ Index: gdb-7.5.50.20130310/gdb/arm-tdep.c if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3615,7 +3619,7 @@ arm_vfp_call_candidate (struct type *t, +@@ -3617,7 +3621,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.50.20130310/gdb/arm-tdep.c if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3696,7 +3700,7 @@ arm_push_dummy_call (struct gdbarch *gdb +@@ -3698,7 +3702,7 @@ arm_push_dummy_call (struct gdbarch *gdb for (argnum = 0; argnum < nargs; argnum++) { @@ -308,10 +308,10 @@ Index: gdb-7.5.50.20130310/gdb/arm-tdep.c struct type *arg_type; struct type *target_type; enum type_code typecode; -Index: gdb-7.5.50.20130310/gdb/avr-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/avr-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/avr-tdep.c 2013-03-01 16:38:24.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/avr-tdep.c 2013-03-10 16:44:42.116599840 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/avr-tdep.c 2013-08-02 16:43:01.142676113 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/avr-tdep.c 2013-08-02 16:43:04.728681011 +0200 @@ -1170,13 +1170,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s struct stack_item @@ -345,10 +345,10 @@ Index: gdb-7.5.50.20130310/gdb/avr-tdep.c /* Calculate the potential last register needed. */ last_regnum = regnum - (len + (len & 1)); -Index: gdb-7.5.50.20130310/gdb/bfin-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/bfin-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/bfin-tdep.c 2013-03-01 16:38:24.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/bfin-tdep.c 2013-03-10 16:46:27.992669964 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/bfin-tdep.c 2013-08-02 16:43:01.142676113 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/bfin-tdep.c 2013-08-02 16:43:04.728681011 +0200 @@ -506,7 +506,7 @@ bfin_push_dummy_call (struct gdbarch *gd gdb_byte buf[4]; int i; @@ -367,10 +367,10 @@ Index: gdb-7.5.50.20130310/gdb/bfin-tdep.c sp -= container_len; write_memory (sp, value_contents_writeable (args[i]), container_len); -Index: gdb-7.5.50.20130310/gdb/cris-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/cris-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/cris-tdep.c 2013-03-01 16:38:24.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/cris-tdep.c 2013-03-10 16:44:42.117599841 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/cris-tdep.c 2013-08-02 16:43:04.729681012 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/cris-tdep.c 2013-08-02 16:52:28.316491561 +0200 @@ -670,13 +670,13 @@ static CORE_ADDR cris_unwind_sp (struct struct stack_item @@ -382,8 +382,8 @@ Index: gdb-7.5.50.20130310/gdb/cris-tdep.c }; static struct stack_item * --push_stack_item (struct stack_item *prev, void *contents, int len) -+push_stack_item (struct stack_item *prev, void *contents, ssize_t len) +-push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len) ++push_stack_item (struct stack_item *prev, const gdb_byte *contents, ssize_t len) { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); @@ -393,22 +393,22 @@ Index: gdb-7.5.50.20130310/gdb/cris-tdep.c { - int len; + ssize_t len; - char *val; + const gdb_byte *val; - int reg_demand; - int i; + ssize_t reg_demand; + ssize_t i; - len = TYPE_LENGTH (value_type (args[argnum])); - val = (char *) value_contents (args[argnum]); + val = value_contents (args[argnum]); + len = TYPE_LENGTH (value_type (args[argnum])); /* 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.50.20130310/gdb/h8300-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/h8300-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/h8300-tdep.c 2013-01-01 07:32:44.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/h8300-tdep.c 2013-03-10 16:44:42.118599841 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/h8300-tdep.c 2013-08-02 16:43:01.144676116 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/h8300-tdep.c 2013-08-02 16:43:04.730681014 +0200 @@ -640,7 +640,7 @@ h8300_push_dummy_call (struct gdbarch *g int struct_return, CORE_ADDR struct_addr) { @@ -441,10 +441,10 @@ Index: gdb-7.5.50.20130310/gdb/h8300-tdep.c for (offset = 0; offset < padded_len; offset += wordsize) { -Index: gdb-7.5.50.20130310/gdb/hppa-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/hppa-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/hppa-tdep.c 2013-03-01 16:38:24.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/hppa-tdep.c 2013-03-10 16:44:42.119599842 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/hppa-tdep.c 2013-08-02 16:43:01.145676117 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/hppa-tdep.c 2013-08-02 16:43:04.731681015 +0200 @@ -961,7 +961,7 @@ hppa64_push_dummy_call (struct gdbarch * { struct value *arg = args[i]; @@ -463,10 +463,10 @@ Index: gdb-7.5.50.20130310/gdb/hppa-tdep.c int regnum, offset; if (len > 16) -Index: gdb-7.5.50.20130310/gdb/i386-darwin-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/i386-darwin-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/i386-darwin-tdep.c 2013-02-12 20:03:54.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/i386-darwin-tdep.c 2013-03-10 16:44:42.119599842 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-darwin-tdep.c 2013-08-02 16:43:01.145676117 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/i386-darwin-tdep.c 2013-08-02 16:43:04.731681015 +0200 @@ -166,7 +166,7 @@ i386_darwin_push_dummy_call (struct gdba for (write_pass = 0; write_pass < 2; write_pass++) @@ -476,10 +476,10 @@ Index: gdb-7.5.50.20130310/gdb/i386-darwin-tdep.c int num_m128 = 0; if (struct_return) -Index: gdb-7.5.50.20130310/gdb/i386-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/i386-tdep.c 2013-03-10 16:16:23.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/i386-tdep.c 2013-03-10 16:44:42.120599842 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-tdep.c 2013-08-02 16:43:01.147676120 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/i386-tdep.c 2013-08-02 16:43:04.733681018 +0200 @@ -2407,7 +2407,7 @@ i386_push_dummy_call (struct gdbarch *gd gdb_byte buf[4]; int i; @@ -543,10 +543,10 @@ Index: gdb-7.5.50.20130310/gdb/i386-tdep.c if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) { -Index: gdb-7.5.50.20130310/gdb/ia64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/ia64-tdep.c 2013-03-10 16:16:23.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/ia64-tdep.c 2013-03-10 16:44:42.121599843 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ia64-tdep.c 2013-08-02 16:43:01.148676121 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c 2013-08-02 16:43:04.734681019 +0200 @@ -3974,8 +3974,10 @@ ia64_push_dummy_call (struct gdbarch *gd int argno; struct value *arg; @@ -560,10 +560,10 @@ Index: gdb-7.5.50.20130310/gdb/ia64-tdep.c int floatreg; ULONGEST bsp; CORE_ADDR funcdescaddr, pc, global_pointer; -Index: gdb-7.5.50.20130310/gdb/iq2000-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/iq2000-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/iq2000-tdep.c 2013-03-01 16:38:25.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/iq2000-tdep.c 2013-03-10 16:44:42.121599843 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/iq2000-tdep.c 2013-08-02 16:43:01.149676123 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/iq2000-tdep.c 2013-08-02 16:43:04.734681019 +0200 @@ -654,8 +654,9 @@ iq2000_push_dummy_call (struct gdbarch * const bfd_byte *val; bfd_byte buf[4]; @@ -576,11 +576,11 @@ Index: gdb-7.5.50.20130310/gdb/iq2000-tdep.c /* Used to copy struct arguments into the stack. */ CORE_ADDR struct_ptr; -Index: gdb-7.5.50.20130310/gdb/m32r-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/m32r-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/m32r-tdep.c 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/m32r-tdep.c 2013-03-10 16:44:42.121599843 +0100 -@@ -695,7 +695,7 @@ m32r_push_dummy_call (struct gdbarch *gd +--- gdb-7.6.50.20130731-cvs.orig/gdb/m32r-tdep.c 2013-08-02 16:43:01.149676123 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m32r-tdep.c 2013-08-02 16:43:04.734681019 +0200 +@@ -689,7 +689,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.50.20130310/gdb/m32r-tdep.c /* First force sp to a 4-byte alignment. */ sp = sp & ~3; -Index: gdb-7.5.50.20130310/gdb/m68k-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/m68k-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/m68k-tdep.c 2013-01-01 07:32:46.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/m68k-tdep.c 2013-03-10 16:44:42.121599843 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m68k-tdep.c 2013-08-02 16:43:01.149676123 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m68k-tdep.c 2013-08-02 16:43:04.735681021 +0200 @@ -384,7 +384,7 @@ m68k_reg_struct_return_p (struct gdbarch { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -615,10 +615,10 @@ Index: gdb-7.5.50.20130310/gdb/m68k-tdep.c /* Non-scalars bigger than 4 bytes are left aligned, others are right aligned. */ -Index: gdb-7.5.50.20130310/gdb/m88k-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/m88k-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/m88k-tdep.c 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/m88k-tdep.c 2013-03-10 16:44:42.121599843 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/m88k-tdep.c 2013-08-02 16:43:01.150676124 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/m88k-tdep.c 2013-08-02 16:43:04.735681021 +0200 @@ -260,13 +260,13 @@ m88k_store_arguments (struct regcache *r { struct gdbarch *gdbarch = get_regcache_arch (regcache); @@ -646,11 +646,11 @@ Index: gdb-7.5.50.20130310/gdb/m88k-tdep.c if (m88k_in_register_p (type)) { -Index: gdb-7.5.50.20130310/gdb/mep-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/mep-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/mep-tdep.c 2013-03-01 16:38:25.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/mep-tdep.c 2013-03-10 16:44:42.122599843 +0100 -@@ -2279,7 +2279,7 @@ push_large_arguments (CORE_ADDR sp, int +--- gdb-7.6.50.20130731-cvs.orig/gdb/mep-tdep.c 2013-08-02 16:43:01.150676124 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mep-tdep.c 2013-08-02 16:43:04.735681021 +0200 +@@ -2272,7 +2272,7 @@ push_large_arguments (CORE_ADDR sp, int for (i = 0; i < argc; i++) { @@ -659,11 +659,11 @@ Index: gdb-7.5.50.20130310/gdb/mep-tdep.c if (arg_len > MEP_GPR_SIZE) { -Index: gdb-7.5.50.20130310/gdb/mips-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/mips-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/mips-tdep.c 2013-02-24 13:54:04.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/mips-tdep.c 2013-03-10 16:44:42.123599844 +0100 -@@ -396,7 +396,7 @@ static void +--- gdb-7.6.50.20130731-cvs.orig/gdb/mips-tdep.c 2013-08-02 16:43:01.153676128 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mips-tdep.c 2013-08-02 16:43:04.737681023 +0200 +@@ -402,7 +402,7 @@ static void mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, int reg_num, int length, enum bfd_endian endian, gdb_byte *in, @@ -672,7 +672,7 @@ Index: gdb-7.5.50.20130310/gdb/mips-tdep.c { int reg_offset = 0; -@@ -419,8 +419,8 @@ mips_xfer_register (struct gdbarch *gdba +@@ -425,8 +425,8 @@ mips_xfer_register (struct gdbarch *gdba } if (mips_debug) fprintf_unfiltered (gdb_stderr, @@ -683,7 +683,7 @@ Index: gdb-7.5.50.20130310/gdb/mips-tdep.c if (mips_debug && out != NULL) { int i; -@@ -4346,13 +4346,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.50.20130310/gdb/mips-tdep.c /* Function pointer arguments to mips16 code need to be made into mips16 pointers. */ -@@ -4637,7 +4637,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.50.20130310/gdb/mips-tdep.c { int i; -@@ -4652,7 +4652,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.50.20130310/gdb/mips-tdep.c struct type *field_type; /* We're only looking at normal fields. */ -@@ -4694,7 +4694,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.50.20130310/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); -@@ -5045,11 +5045,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.50.20130310/gdb/mips-tdep.c if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16) { /* A 16-byte long double field goes in two consecutive -@@ -5091,8 +5091,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.50.20130310/gdb/mips-tdep.c mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, -@@ -5150,7 +5150,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.50.20130310/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); -@@ -5214,13 +5214,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.50.20130310/gdb/mips-tdep.c val = value_contents (arg); -@@ -5678,8 +5678,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.50.20130310/gdb/mips-tdep.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5740,13 +5740,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,23 +808,23 @@ Index: gdb-7.5.50.20130310/gdb/mips-tdep.c val = value_contents (arg); -Index: gdb-7.5.50.20130310/gdb/mn10300-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/mn10300-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/mn10300-tdep.c 2013-03-01 16:38:25.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/mn10300-tdep.c 2013-03-10 16:44:42.123599844 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/mn10300-tdep.c 2013-08-02 16:43:04.737681023 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mn10300-tdep.c 2013-08-02 16:50:34.212320698 +0200 @@ -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); int regs_used; - int len, arg_len; -+ LONGEST len, arg_len; ++ LONGEST len, arg_len; int stack_offset = 0; int argnum; - char *val, valbuf[MAX_REGISTER_SIZE]; -Index: gdb-7.5.50.20130310/gdb/mt-tdep.c + const gdb_byte *val; +Index: gdb-7.6.50.20130731-cvs/gdb/mt-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/mt-tdep.c 2013-01-01 07:32:47.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/mt-tdep.c 2013-03-10 16:44:42.124599844 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/mt-tdep.c 2013-08-02 16:43:01.154676130 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/mt-tdep.c 2013-08-02 16:43:04.737681023 +0200 @@ -783,9 +783,9 @@ mt_push_dummy_call (struct gdbarch *gdba gdb_byte buf[MT_MAX_STRUCT_SIZE]; int argreg = MT_1ST_ARGREG; @@ -837,10 +837,10 @@ Index: gdb-7.5.50.20130310/gdb/mt-tdep.c int i, j; /* First handle however many args we can fit into MT_1ST_ARGREG thru -Index: gdb-7.5.50.20130310/gdb/ppc-sysv-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/ppc-sysv-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/ppc-sysv-tdep.c 2013-01-23 21:03:18.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/ppc-sysv-tdep.c 2013-03-10 16:44:42.124599844 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/ppc-sysv-tdep.c 2013-08-02 16:43:01.155676131 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/ppc-sysv-tdep.c 2013-08-02 16:43:04.738681025 +0200 @@ -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)); @@ -871,7 +871,7 @@ Index: gdb-7.5.50.20130310/gdb/ppc-sysv-tdep.c const bfd_byte *val = value_contents (arg); if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8 -@@ -1556,14 +1556,14 @@ ppc64_sysv_abi_push_dummy_call (struct g +@@ -1613,14 +1613,14 @@ ppc64_sysv_abi_push_dummy_call (struct g } else { @@ -888,7 +888,7 @@ Index: gdb-7.5.50.20130310/gdb/ppc-sysv-tdep.c if (len > tdep->wordsize) len = tdep->wordsize; memset (regval, 0, sizeof regval); -@@ -1591,7 +1591,7 @@ ppc64_sysv_abi_push_dummy_call (struct g +@@ -1648,7 +1648,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,11 +897,11 @@ Index: gdb-7.5.50.20130310/gdb/ppc-sysv-tdep.c if (len < tdep->wordsize) write_memory (gparam + tdep->wordsize - len, val, len); else -Index: gdb-7.5.50.20130310/gdb/rl78-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/rl78-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/rl78-tdep.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/rl78-tdep.c 2013-03-10 16:44:42.124599844 +0100 -@@ -1019,8 +1019,8 @@ rl78_push_dummy_call (struct gdbarch *gd +--- gdb-7.6.50.20130731-cvs.orig/gdb/rl78-tdep.c 2013-08-02 16:43:01.155676131 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/rl78-tdep.c 2013-08-02 16:43:04.738681025 +0200 +@@ -1030,8 +1030,8 @@ rl78_push_dummy_call (struct gdbarch *gd for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -912,11 +912,11 @@ Index: gdb-7.5.50.20130310/gdb/rl78-tdep.c sp -= container_len; write_memory (rl78_make_data_address (sp), -Index: gdb-7.5.50.20130310/gdb/rs6000-aix-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/rs6000-aix-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/rs6000-aix-tdep.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/rs6000-aix-tdep.c 2013-03-10 16:44:42.125599845 +0100 -@@ -198,9 +198,9 @@ rs6000_push_dummy_call (struct gdbarch * +--- gdb-7.6.50.20130731-cvs.orig/gdb/rs6000-aix-tdep.c 2013-08-02 16:43:01.155676131 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/rs6000-aix-tdep.c 2013-08-02 16:43:04.738681025 +0200 +@@ -196,9 +196,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.50.20130310/gdb/rs6000-aix-tdep.c gdb_byte tmp_buffer[50]; int f_argno = 0; /* current floating point argno */ int wordsize = gdbarch_tdep (gdbarch)->wordsize; -@@ -328,7 +328,7 @@ ran_out_of_registers_for_arguments: +@@ -331,7 +331,7 @@ ran_out_of_registers_for_arguments: if ((argno < nargs) || argbytes) { @@ -937,11 +937,11 @@ Index: gdb-7.5.50.20130310/gdb/rs6000-aix-tdep.c if (argbytes) { -Index: gdb-7.5.50.20130310/gdb/s390-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/s390-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/s390-tdep.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/s390-tdep.c 2013-03-10 16:44:42.125599845 +0100 -@@ -2482,7 +2482,7 @@ is_float_like (struct type *type) +--- gdb-7.6.50.20130731-cvs.orig/gdb/s390-tdep.c 2013-08-02 16:43:01.156676132 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/s390-tdep.c 2013-08-02 16:43:04.739681026 +0200 +@@ -2483,7 +2483,7 @@ is_float_like (struct type *type) static int @@ -950,7 +950,7 @@ Index: gdb-7.5.50.20130310/gdb/s390-tdep.c { return ((n & (n - 1)) == 0); } -@@ -2668,7 +2668,7 @@ s390_push_dummy_call (struct gdbarch *gd +@@ -2669,7 +2669,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.50.20130310/gdb/s390-tdep.c if (s390_function_arg_pass_by_reference (type)) { -Index: gdb-7.5.50.20130310/gdb/score-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/score-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/score-tdep.c 2013-03-01 16:38:26.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/score-tdep.c 2013-03-10 16:44:42.125599845 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/score-tdep.c 2013-08-02 16:43:01.157676134 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/score-tdep.c 2013-08-02 16:43:04.739681026 +0200 @@ -515,7 +515,7 @@ score_push_dummy_call (struct gdbarch *g enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argnum; @@ -972,10 +972,10 @@ Index: gdb-7.5.50.20130310/gdb/score-tdep.c CORE_ADDR stack_offset = 0; CORE_ADDR addr = 0; -Index: gdb-7.5.50.20130310/gdb/sh-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/sh-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/sh-tdep.c 2013-01-01 07:32:50.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/sh-tdep.c 2013-03-10 16:44:42.126599845 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/sh-tdep.c 2013-08-02 16:43:01.157676134 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/sh-tdep.c 2013-08-02 16:51:29.604404553 +0200 @@ -807,7 +807,7 @@ sh_skip_prologue (struct gdbarch *gdbarc static int sh_use_struct_convention (int renesas_abi, struct type *type) @@ -988,36 +988,36 @@ Index: gdb-7.5.50.20130310/gdb/sh-tdep.c @@ -909,7 +909,7 @@ sh_frame_align (struct gdbarch *ignore, /* Helper function to justify value in register according to endianess. */ - static char * + static const gdb_byte * -sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, int len) +sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, LONGEST len) { - static char valbuf[4]; + static gdb_byte valbuf[4]; @@ -1069,7 +1069,8 @@ sh_push_dummy_call_fpu (struct gdbarch * struct type *type; CORE_ADDR regval; - char *val; + const gdb_byte *val; - int len, reg_size = 0; + LONGEST len; -+ ssize_t reg_size = 0; ++ int reg_size = 0; int pass_on_stack = 0; int treat_as_flt; int last_reg_arg = INT_MAX; @@ -1210,7 +1211,8 @@ sh_push_dummy_call_nofpu (struct gdbarch struct type *type; CORE_ADDR regval; - char *val; + const gdb_byte *val; - int len, reg_size = 0; + LONGEST len; -+ ssize_t reg_size = 0; ++ int reg_size = 0; int pass_on_stack = 0; int last_reg_arg = INT_MAX; -Index: gdb-7.5.50.20130310/gdb/sh64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/sh64-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/sh64-tdep.c 2013-03-01 16:38:26.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/sh64-tdep.c 2013-03-10 16:44:42.126599845 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/sh64-tdep.c 2013-08-02 16:43:01.158676135 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/sh64-tdep.c 2013-08-02 16:50:49.740344125 +0200 @@ -1058,7 +1058,7 @@ sh64_push_dummy_call (struct gdbarch *gd CORE_ADDR struct_addr) { @@ -1029,17 +1029,17 @@ Index: gdb-7.5.50.20130310/gdb/sh64-tdep.c int double_argreg; @@ -1069,7 +1069,7 @@ sh64_push_dummy_call (struct gdbarch *gd CORE_ADDR regval; - char *val; - char valbuf[8]; + const gdb_byte *val; + gdb_byte valbuf[8]; - int len; + LONGEST len; int argreg_size; int fp_args[12]; -Index: gdb-7.5.50.20130310/gdb/sparc-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/sparc-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/sparc-tdep.c 2013-03-10 16:44:33.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/sparc-tdep.c 2013-03-10 16:44:42.127599846 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/sparc-tdep.c 2013-08-02 16:43:01.159676136 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/sparc-tdep.c 2013-08-02 16:43:04.740681027 +0200 @@ -471,7 +471,7 @@ sparc32_store_arguments (struct regcache for (i = 0; i < nargs; i++) { @@ -1049,10 +1049,10 @@ Index: gdb-7.5.50.20130310/gdb/sparc-tdep.c if (sparc_structure_or_union_p (type) || (sparc_floating_p (type) && len == 16) -Index: gdb-7.5.50.20130310/gdb/sparc64-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/sparc64-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/sparc64-tdep.c 2013-01-01 07:32:51.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/sparc64-tdep.c 2013-03-10 16:44:42.127599846 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/sparc64-tdep.c 2013-08-02 16:43:01.159676136 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/sparc64-tdep.c 2013-08-02 16:43:04.741681029 +0200 @@ -639,7 +639,8 @@ sparc64_16_byte_align_p (struct type *ty static void @@ -1108,11 +1108,11 @@ Index: gdb-7.5.50.20130310/gdb/sparc64-tdep.c int regnum = -1; gdb_byte buf[16]; -Index: gdb-7.5.50.20130310/gdb/spu-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/spu-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/spu-tdep.c 2013-01-01 07:32:51.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/spu-tdep.c 2013-03-10 16:44:42.127599846 +0100 -@@ -1373,7 +1373,7 @@ spu_push_dummy_call (struct gdbarch *gdb +--- gdb-7.6.50.20130731-cvs.orig/gdb/spu-tdep.c 2013-08-02 16:43:01.160676138 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/spu-tdep.c 2013-08-02 16:43:04.741681029 +0200 +@@ -1376,7 +1376,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.50.20130310/gdb/spu-tdep.c /* If the argument doesn't wholly fit into registers, it and all subsequent arguments go to the stack. */ -@@ -1405,7 +1405,7 @@ spu_push_dummy_call (struct gdbarch *gdb +@@ -1408,7 +1408,7 @@ spu_push_dummy_call (struct gdbarch *gdb { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -1130,10 +1130,10 @@ Index: gdb-7.5.50.20130310/gdb/spu-tdep.c int preferred_slot; if (spu_scalar_value_p (type)) -Index: gdb-7.5.50.20130310/gdb/tic6x-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/tic6x-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/tic6x-tdep.c 2013-03-01 16:38:27.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/tic6x-tdep.c 2013-03-10 16:44:42.128599846 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/tic6x-tdep.c 2013-08-02 16:43:01.160676138 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/tic6x-tdep.c 2013-08-02 16:43:04.742681030 +0200 @@ -896,7 +896,7 @@ tic6x_push_dummy_call (struct gdbarch *g int argreg = 0; int argnum; @@ -1171,10 +1171,10 @@ Index: gdb-7.5.50.20130310/gdb/tic6x-tdep.c addr = sp + stack_offset; write_memory (addr, val, len); -Index: gdb-7.5.50.20130310/gdb/tilegx-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/tilegx-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/tilegx-tdep.c 2013-03-02 02:34:40.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/tilegx-tdep.c 2013-03-10 16:45:31.857629100 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/tilegx-tdep.c 2013-08-02 16:43:01.161676139 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/tilegx-tdep.c 2013-08-02 16:43:04.742681030 +0200 @@ -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.50.20130310/gdb/tilegx-tdep.c static const gdb_byte four_zero_words[16] = { 0 }; /* If struct_return is 1, then the struct return address will -Index: gdb-7.5.50.20130310/gdb/v850-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/v850-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/v850-tdep.c 2013-03-02 19:26:30.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/v850-tdep.c 2013-03-10 16:44:42.128599846 +0100 -@@ -817,7 +817,7 @@ v850_push_dummy_call (struct gdbarch *gd +--- gdb-7.6.50.20130731-cvs.orig/gdb/v850-tdep.c 2013-08-02 16:43:01.161676139 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/v850-tdep.c 2013-08-02 16:52:55.219531101 +0200 +@@ -1021,7 +1021,7 @@ v850_push_dummy_call (struct gdbarch *gd enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argreg; int argnum; @@ -1196,8 +1196,8 @@ Index: gdb-7.5.50.20130310/gdb/v850-tdep.c + LONGEST len = 0; int stack_offset; - /* The offset onto the stack at which we will start copying parameters -@@ -842,7 +842,7 @@ v850_push_dummy_call (struct gdbarch *gd + if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850) +@@ -1049,7 +1049,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,10 +1206,10 @@ Index: gdb-7.5.50.20130310/gdb/v850-tdep.c gdb_byte *val; gdb_byte valbuf[v850_reg_size]; -Index: gdb-7.5.50.20130310/gdb/vax-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/vax-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/vax-tdep.c 2013-03-10 16:44:34.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/vax-tdep.c 2013-03-10 16:44:42.128599846 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/vax-tdep.c 2013-08-02 16:43:01.161676139 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/vax-tdep.c 2013-08-02 16:43:04.742681030 +0200 @@ -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); @@ -1228,10 +1228,10 @@ Index: gdb-7.5.50.20130310/gdb/vax-tdep.c sp -= (len + 3) & ~3; count += (len + 3) / 4; -Index: gdb-7.5.50.20130310/gdb/xstormy16-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/xstormy16-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/xstormy16-tdep.c 2013-03-01 16:38:27.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/xstormy16-tdep.c 2013-03-10 16:46:05.888653201 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/xstormy16-tdep.c 2013-08-02 16:43:01.162676141 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/xstormy16-tdep.c 2013-08-02 16:43:04.743681032 +0200 @@ -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.50.20130310/gdb/xstormy16-tdep.c const gdb_byte *val; gdb_byte buf[xstormy16_pc_size]; -Index: gdb-7.5.50.20130310/gdb/xtensa-tdep.c +Index: gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c =================================================================== ---- gdb-7.5.50.20130310.orig/gdb/xtensa-tdep.c 2013-01-01 07:41:29.000000000 +0100 -+++ gdb-7.5.50.20130310/gdb/xtensa-tdep.c 2013-03-10 16:44:42.129599847 +0100 +--- gdb-7.6.50.20130731-cvs.orig/gdb/xtensa-tdep.c 2013-08-02 16:43:01.163676142 +0200 ++++ gdb-7.6.50.20130731-cvs/gdb/xtensa-tdep.c 2013-08-02 16:43:04.743681032 +0200 @@ -1653,8 +1653,7 @@ xtensa_store_return_value (struct type * if (len > (callsize > 8 ? 8 : 16)) diff --git a/gdb-test-pid0-core.patch b/gdb-test-pid0-core.patch index 1bc221b..c8675a3 100644 --- a/gdb-test-pid0-core.patch +++ b/gdb-test-pid0-core.patch @@ -6,8 +6,10 @@ http://sourceware.org/ml/gdb-patches/2010-08/msg00085.html http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html 2e5bcfdef1ec3883d48c3f87a4be5c0dff25e17e ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu 2013-08-02 22:14:50.748990883 +0200 @@ -0,0 +1,20 @@ +begin 600 x86_64-pid0-core.core.bz2 +M0EIH.3%!629362,CA>P!$/'_____^*#EZ-A!SP36P&_:G0#=14``04A&8,'U @@ -29,8 +31,10 @@ http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html +4B.Z!/,0-IZ^W_Q=R13A0D",CA>P` +` +end ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp +Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp 2013-08-02 22:17:30.575209385 +0200 @@ -0,0 +1,46 @@ +# This testcase is part of GDB, the GNU debugger. +# @@ -77,4 +81,4 @@ http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html + +# Former crash was: +# thread.c:884: internal-error: switch_to_thread: Assertion `inf != NULL' failed. -+gdb_test "core-file ${corefile}" "Program terminated with signal 11, Segmentation fault\\.\r\n.*" ++gdb_test "core-file ${corefile}" "Program terminated with signal (11|SIGSEGV), Segmentation fault\\.\r\n.*" diff --git a/gdb-upstream-framefilters-1of2.patch b/gdb-upstream-framefilters-1of2.patch deleted file mode 100644 index 80a0d43..0000000 --- a/gdb-upstream-framefilters-1of2.patch +++ /dev/null @@ -1,5551 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-05/msg00084.html - -### src/gdb/ChangeLog 2013/05/09 18:03:27 1.15539 -### src/gdb/ChangeLog 2013/05/10 10:26:01 1.15540 -## -1,3 +1,52 @@ -+2013-05-10 Phil Muldoon -+ -+ * stack.c (backtrace_command_1): Add "no-filters", and Python frame -+ filter logic. -+ (backtrace_command): Add "no-filters" option parsing. -+ (_initialize_stack): Alter help to reflect "no-filters" option. -+ * Makefile.in (SUBDIR_PYTHON_OBS): Add py-framefilter.o -+ (SUBDIR_PYTHON_SRCS): Add py-framefilter.c -+ (py-frame.o): Add target -+ * data-directory/Makefile.in (PYTHON_DIR): Add Python frame -+ filter files. -+ * python/python.h: Add new frame filter constants, and flag enum. -+ (apply_frame_filter): Add definition. -+ * python/python.c (apply_frame_filter): New non-Python -+ enabled function. -+ * python/py-utils.c (py_xdecref): New function. -+ (make_cleanup_py_xdecref): Ditto. -+ * python/py-objfile.c: Declare frame_filters dictionary. -+ (objfpy_dealloc): Add frame_filters dealloc. -+ (objfpy_new): Initialize frame_filters attribute. -+ (objfile_to_objfile_object): Ditto. -+ (objfpy_get_frame_filters): New function. -+ (objfpy_set_frame_filters): New function. -+ * python/py-progspace.c: Declare frame_filters dictionary. -+ (pspy_dealloc): Add frame_filters dealloc. -+ (pspy_new): Initialize frame_filters attribute. -+ (pspacee_to_pspace_object): Ditto. -+ (pspy_get_frame_filters): New function. -+ (pspy_set_frame_filters): New function. -+ * python/py-framefilter.c: New file. -+ * python/lib/gdb/command/frame_filters.py: New file. -+ * python/lib/gdb/frames.py: New file. -+ * python/lib/gdb/__init__.py: Initialize global frame_filters -+ dictionary -+ * python/lib/gdb/FrameDecorator.py: New file. -+ * python/lib/gdb/FrameIterator.py: New file. -+ * mi/mi-cmds.c (mi_cmds): Add frame filters command. -+ * mi/mi-cmds.h: Declare. -+ * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Add -+ --no-frame-filter logic, and Python frame filter logic. -+ (stack_enable_frame_filters): New function. -+ (parse_no_frame_option): Ditto. -+ (mi_cmd_stack_list_frames): Add --no-frame-filter and Python frame -+ filter logic. -+ (mi_cmd_stack_list_locals): Ditto. -+ (mi_cmd_stack_list_args): Ditto. -+ (mi_cmd_stack_list_variables): Ditto. -+ * NEWS: Add frame filter note. -+ - 2013-05-09 Doug Evans - - * symfile.c (syms_from_objfile_1): Delete args offsets, num_offsets. -Index: gdb-7.6/gdb/Makefile.in -=================================================================== ---- gdb-7.6.orig/gdb/Makefile.in 2013-06-10 14:31:02.704084663 +0200 -+++ gdb-7.6/gdb/Makefile.in 2013-06-10 14:31:08.351082443 +0200 -@@ -284,6 +284,7 @@ SUBDIR_PYTHON_OBS = \ - py-exitedevent.o \ - py-finishbreakpoint.o \ - py-frame.o \ -+ py-framefilter.o \ - py-function.o \ - py-gdb-readline.o \ - py-inferior.o \ -@@ -318,6 +319,7 @@ SUBDIR_PYTHON_SRCS = \ - python/py-exitedevent.c \ - python/py-finishbreakpoint.c \ - python/py-frame.c \ -+ python/py-framefilter.c \ - python/py-function.c \ - python/py-gdb-readline.c \ - python/py-inferior.c \ -@@ -2174,6 +2176,10 @@ py-frame.o: $(srcdir)/python/py-frame.c - $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-frame.c - $(POSTCOMPILE) - -+py-framefilter.o: $(srcdir)/python/py-framefilter.c -+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-framefilter.c -+ $(POSTCOMPILE) -+ - py-function.o: $(srcdir)/python/py-function.c - $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-function.c - $(POSTCOMPILE) -Index: gdb-7.6/gdb/NEWS -=================================================================== ---- gdb-7.6.orig/gdb/NEWS 2013-06-10 14:31:08.353082442 +0200 -+++ gdb-7.6/gdb/NEWS 2013-06-10 14:31:21.230077319 +0200 -@@ -4,6 +4,10 @@ - * Newly installed $prefix/bin/gcore acts as a shell interface for the - GDB command gcore. - -+* Python scripting -+ -+ ** Frame filters and frame decorators have been added. -+ - * New remote packets - - qXfer:libraries-svr4:read's annex -Index: gdb-7.6/gdb/stack.c -=================================================================== ---- gdb-7.6.orig/gdb/stack.c 2013-06-10 14:31:02.709084661 +0200 -+++ gdb-7.6/gdb/stack.c 2013-06-10 14:31:08.354082441 +0200 -@@ -54,6 +54,7 @@ - - #include "psymtab.h" - #include "symfile.h" -+#include "python/python.h" - - void (*deprecated_selected_frame_level_changed_hook) (int); - -@@ -1655,13 +1656,15 @@ frame_info (char *addr_exp, int from_tty - frames. */ - - static void --backtrace_command_1 (char *count_exp, int show_locals, int from_tty) -+backtrace_command_1 (char *count_exp, int show_locals, int no_filters, -+ int from_tty) - { - struct frame_info *fi; - int count; - int i; - struct frame_info *trailing; -- int trailing_level; -+ int trailing_level, py_start = 0, py_end = 0; -+ enum py_bt_status result = PY_BT_ERROR; - - if (!target_has_stack) - error (_("No stack.")); -@@ -1680,6 +1683,7 @@ backtrace_command_1 (char *count_exp, in - { - struct frame_info *current; - -+ py_start = count; - count = -count; - - current = trailing; -@@ -1701,9 +1705,17 @@ backtrace_command_1 (char *count_exp, in - - count = -1; - } -+ else -+ { -+ py_start = 0; -+ py_end = count; -+ } - } - else -- count = -1; -+ { -+ py_end = -1; -+ count = -1; -+ } - - if (info_verbose) - { -@@ -1723,16 +1735,40 @@ backtrace_command_1 (char *count_exp, in - } - } - -- for (i = 0, fi = trailing; fi && count--; i++, fi = get_prev_frame (fi)) -+ if (! no_filters) - { -- QUIT; -+ int flags = PRINT_LEVEL | PRINT_FRAME_INFO | PRINT_ARGS; -+ enum py_frame_args arg_type; - -- /* Don't use print_stack_frame; if an error() occurs it probably -- means further attempts to backtrace would fail (on the other -- hand, perhaps the code does or could be fixed to make sure -- the frame->prev field gets set to NULL in that case). */ -- print_frame_info (fi, 1, LOCATION, 1); - if (show_locals) -+ flags |= PRINT_LOCALS; -+ -+ if (!strcmp (print_frame_arguments, "scalars")) -+ arg_type = CLI_SCALAR_VALUES; -+ else if (!strcmp (print_frame_arguments, "all")) -+ arg_type = CLI_ALL_VALUES; -+ else -+ arg_type = NO_VALUES; -+ -+ result = apply_frame_filter (get_current_frame (), flags, arg_type, -+ current_uiout, py_start, py_end); -+ -+ } -+ /* Run the inbuilt backtrace if there are no filters registered, or -+ "no-filters" has been specified from the command. */ -+ if (no_filters || result == PY_BT_NO_FILTERS) -+ { -+ for (i = 0, fi = trailing; fi && count--; i++, fi = get_prev_frame (fi)) -+ { -+ QUIT; -+ -+ /* Don't use print_stack_frame; if an error() occurs it probably -+ means further attempts to backtrace would fail (on the other -+ hand, perhaps the code does or could be fixed to make sure -+ the frame->prev field gets set to NULL in that case). */ -+ -+ print_frame_info (fi, 1, LOCATION, 1); -+ if (show_locals) - { - struct frame_id frame_id = get_frame_id (fi); - -@@ -1748,24 +1784,25 @@ backtrace_command_1 (char *count_exp, in - } - } - -- /* Save the last frame to check for error conditions. */ -- trailing = fi; -- } -+ /* Save the last frame to check for error conditions. */ -+ trailing = fi; -+ } - -- /* If we've stopped before the end, mention that. */ -- if (fi && from_tty) -- printf_filtered (_("(More stack frames follow...)\n")); -+ /* If we've stopped before the end, mention that. */ -+ if (fi && from_tty) -+ printf_filtered (_("(More stack frames follow...)\n")); - -- /* If we've run out of frames, and the reason appears to be an error -- condition, print it. */ -- if (fi == NULL && trailing != NULL) -- { -- enum unwind_stop_reason reason; -+ /* If we've run out of frames, and the reason appears to be an error -+ condition, print it. */ -+ if (fi == NULL && trailing != NULL) -+ { -+ enum unwind_stop_reason reason; - -- reason = get_frame_unwind_stop_reason (trailing); -- if (reason >= UNWIND_FIRST_ERROR) -- printf_filtered (_("Backtrace stopped: %s\n"), -- frame_stop_reason_string (reason)); -+ reason = get_frame_unwind_stop_reason (trailing); -+ if (reason >= UNWIND_FIRST_ERROR) -+ printf_filtered (_("Backtrace stopped: %s\n"), -+ frame_stop_reason_string (reason)); -+ } - } - } - -@@ -1773,7 +1810,8 @@ static void - backtrace_command (char *arg, int from_tty) - { - struct cleanup *old_chain = make_cleanup (null_cleanup, NULL); -- int fulltrace_arg = -1, arglen = 0, argc = 0; -+ int fulltrace_arg = -1, arglen = 0, argc = 0, no_filters = -1; -+ int user_arg = 0; - - if (arg) - { -@@ -1790,25 +1828,31 @@ backtrace_command (char *arg, int from_t - for (j = 0; j < strlen (argv[i]); j++) - argv[i][j] = tolower (argv[i][j]); - -- if (fulltrace_arg < 0 && subset_compare (argv[i], "full")) -- fulltrace_arg = argc; -+ if (no_filters < 0 && subset_compare (argv[i], "no-filters")) -+ no_filters = argc; - else - { -- arglen += strlen (argv[i]); -- argc++; -+ if (fulltrace_arg < 0 && subset_compare (argv[i], "full")) -+ fulltrace_arg = argc; -+ else -+ { -+ user_arg++; -+ arglen += strlen (argv[i]); -+ } - } -+ argc++; - } -- arglen += argc; -- if (fulltrace_arg >= 0) -+ arglen += user_arg; -+ if (fulltrace_arg >= 0 || no_filters >= 0) - { - if (arglen > 0) - { - arg = xmalloc (arglen + 1); - make_cleanup (xfree, arg); - arg[0] = 0; -- for (i = 0; i < (argc + 1); i++) -+ for (i = 0; i < argc; i++) - { -- if (i != fulltrace_arg) -+ if (i != fulltrace_arg && i != no_filters) - { - strcat (arg, argv[i]); - strcat (arg, " "); -@@ -1820,7 +1864,8 @@ backtrace_command (char *arg, int from_t - } - } - -- backtrace_command_1 (arg, fulltrace_arg >= 0 /* show_locals */, from_tty); -+ backtrace_command_1 (arg, fulltrace_arg >= 0 /* show_locals */, -+ no_filters >= 0 /* no frame-filters */, from_tty); - - do_cleanups (old_chain); - } -@@ -1828,7 +1873,7 @@ backtrace_command (char *arg, int from_t - static void - backtrace_full_command (char *arg, int from_tty) - { -- backtrace_command_1 (arg, 1 /* show_locals */, from_tty); -+ backtrace_command_1 (arg, 1 /* show_locals */, 0, from_tty); - } - - -@@ -2562,7 +2607,9 @@ It can be a stack frame number or the ad - add_com ("backtrace", class_stack, backtrace_command, _("\ - Print backtrace of all stack frames, or innermost COUNT frames.\n\ - With a negative argument, print outermost -COUNT frames.\nUse of the \ --'full' qualifier also prints the values of the local variables.\n")); -+'full' qualifier also prints the values of the local variables.\n\ -+Use of the 'no-filters' qualifier prohibits frame filters from executing\n\ -+on this backtrace.\n")); - add_com_alias ("bt", "backtrace", class_stack, 0); - if (xdb_commands) - { -Index: gdb-7.6/gdb/data-directory/Makefile.in -=================================================================== ---- gdb-7.6.orig/gdb/data-directory/Makefile.in 2013-06-10 14:31:02.710084660 +0200 -+++ gdb-7.6/gdb/data-directory/Makefile.in 2013-06-10 14:31:08.355082441 +0200 -@@ -53,7 +53,11 @@ PYTHON_DIR = python - PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR) - PYTHON_FILES = \ - gdb/__init__.py \ -+ gdb/frames.py \ -+ gdb/FrameIterator.py \ -+ gdb/FrameDecorator.py \ - gdb/command/__init__.py \ -+ gdb/command/frame_filters.py \ - gdb/command/ignore_errors.py \ - gdb/command/pahole.py \ - gdb/command/type_printers.py \ -Index: gdb-7.6/gdb/doc/gdb.texinfo -=================================================================== ---- gdb-7.6.orig/gdb/doc/gdb.texinfo 2013-06-10 14:31:02.727084654 +0200 -+++ gdb-7.6/gdb/doc/gdb.texinfo 2013-06-10 14:31:08.364082438 +0200 -@@ -6459,6 +6459,7 @@ currently executing frame and describes - @menu - * Frames:: Stack frames - * Backtrace:: Backtraces -+* Frame Filter Management:: Managing frame filters - * Selection:: Selecting a frame - * Frame Info:: Information on a frame - -@@ -6546,6 +6547,7 @@ line per frame, for many frames, startin - frame (frame zero), followed by its caller (frame one), and on up the - stack. - -+@anchor{backtrace-command} - @table @code - @kindex backtrace - @kindex bt @r{(@code{backtrace})} -@@ -6571,6 +6573,19 @@ Similar, but print only the outermost @v - @itemx bt full -@var{n} - Print the values of the local variables also. @var{n} specifies the - number of frames to print, as described above. -+ -+@item backtrace no-filters -+@itemx bt no-filters -+@itemx bt no-filters @var{n} -+@itemx bt no-filters -@var{n} -+@itemx bt no-filters full -+@itemx bt no-filters full @var{n} -+@itemx bt no-filters full -@var{n} -+Do not run Python frame filters on this backtrace. @xref{Frame -+Filter API}, for more information. Additionally use @ref{disable -+frame-filter all} to turn off all frame filters. This is only -+relevant when @value{GDBN} has been configured with @code{Python} -+support. - @end table - - @kindex where -@@ -6720,6 +6735,149 @@ Display an absolute filename. - Show the current way to display filenames. - @end table - -+@node Frame Filter Management -+@section Management of Frame Filters. -+@cindex managing frame filters -+ -+Frame filters are Python based utilities to manage and decorate the -+output of frames. @xref{Frame Filter API}, for further information. -+ -+Managing frame filters is performed by several commands available -+within @value{GDBN}, detailed here. -+ -+@table @code -+@kindex info frame-filter -+@item info frame-filter -+Print a list of installed frame filters from all dictionaries, showing -+their name, priority and enabled status. -+ -+@kindex disable frame-filter -+@anchor{disable frame-filter all} -+@item disable frame-filter @var{filter-dictionary} @var{filter-name} -+Disable a frame filter in the dictionary matching -+@var{filter-dictionary}, or @code{all}, and @var{filter-name}. -+@var{filter-dictionary} may be @code{all}, @code{global}, -+@code{progspace} or the name of the object file where the frame filter -+dictionary resides. When @code{all} is specified, all frame filters -+across all dictionaries are disabled. @var{filter-name} is the name -+of the frame filter and is used when @code{all} is not the option for -+@var{filter-dictionary}. A disabled frame-filter is not deleted, it -+may be enabled again later. -+ -+@kindex enable frame-filter -+@item enable frame-filter @var{filter-dictionary} @var{filter-name} -+Enable a frame filter in the dictionary matching -+@var{filter-dictionary}, or @code{all}, and @var{filter-name}. -+@var{filter-dictionary} may be @code{all}, @code{global}, -+@code{progspace} or the name of the object file where the frame filter -+dictionary resides. When @code{all} is specified, all frame filters across -+all dictionaries are enabled. @var{filter-name} is the name of the frame -+filter and is used when @code{all} is not the option for -+@var{filter-dictionary}. -+ -+Example: -+ -+@smallexample -+(gdb) info frame-filter -+ -+global frame-filters: -+ Priority Enabled Name -+ 1000 No PrimaryFunctionFilter -+ 100 Yes Reverse -+ -+progspace /build/test frame-filters: -+ Priority Enabled Name -+ 100 Yes ProgspaceFilter -+ -+objfile /build/test frame-filters: -+ Priority Enabled Name -+ 999 Yes BuildProgra Filter -+ -+(gdb) disable frame-filter /build/test BuildProgramFilter -+(gdb) info frame-filter -+ -+global frame-filters: -+ Priority Enabled Name -+ 1000 No PrimaryFunctionFilter -+ 100 Yes Reverse -+ -+progspace /build/test frame-filters: -+ Priority Enabled Name -+ 100 Yes ProgspaceFilter -+ -+objfile /build/test frame-filters: -+ Priority Enabled Name -+ 999 No BuildProgramFilter -+ -+(gdb) enable frame-filter global PrimaryFunctionFilter -+(gdb) info frame-filter -+ -+global frame-filters: -+ Priority Enabled Name -+ 1000 Yes PrimaryFunctionFilter -+ 100 Yes Reverse -+ -+progspace /build/test frame-filters: -+ Priority Enabled Name -+ 100 Yes ProgspaceFilter -+ -+objfile /build/test frame-filters: -+ Priority Enabled Name -+ 999 No BuildProgramFilter -+@end smallexample -+ -+@kindex set frame-filter priority -+@item set frame-filter priority @var{filter-dictionary} @var{filter-name} @var{priority} -+Set the @var{priority} of a frame filter in the dictionary matching -+@var{filter-dictionary}, and the frame filter name matching -+@var{filter-name}. @var{filter-dictionary} may be @code{global}, -+@code{progspace} or the name of the object file where the frame filter -+dictionary resides. @var{priority} is an integer. -+ -+@kindex show frame-filter priority -+@item show frame-filter priority @var{filter-dictionary} @var{filter-name} -+Show the @var{priority} of a frame filter in the dictionary matching -+@var{filter-dictionary}, and the frame filter name matching -+@var{filter-name}. @var{filter-dictionary} may be @code{global}, -+@code{progspace} or the name of the object file where the frame filter -+dictionary resides. -+ -+Example: -+ -+@smallexample -+(gdb) info frame-filter -+ -+global frame-filters: -+ Priority Enabled Name -+ 1000 Yes PrimaryFunctionFilter -+ 100 Yes Reverse -+ -+progspace /build/test frame-filters: -+ Priority Enabled Name -+ 100 Yes ProgspaceFilter -+ -+objfile /build/test frame-filters: -+ Priority Enabled Name -+ 999 No BuildProgramFilter -+ -+(gdb) set frame-filter priority global Reverse 50 -+(gdb) info frame-filter -+ -+global frame-filters: -+ Priority Enabled Name -+ 1000 Yes PrimaryFunctionFilter -+ 50 Yes Reverse -+ -+progspace /build/test frame-filters: -+ Priority Enabled Name -+ 100 Yes ProgspaceFilter -+ -+objfile /build/test frame-filters: -+ Priority Enabled Name -+ 999 No BuildProgramFilter -+@end smallexample -+@end table -+ - @node Selection - @section Selecting a Frame - -@@ -23100,6 +23258,9 @@ situation, a Python @code{KeyboardInterr - * Selecting Pretty-Printers:: How GDB chooses a pretty-printer. - * Writing a Pretty-Printer:: Writing a Pretty-Printer. - * Type Printing API:: Pretty-printing types. -+* Frame Filter API:: Filtering Frames. -+* Frame Decorator API:: Decorating Frames. -+* Writing a Frame Filter:: Writing a Frame Filter. - * Inferiors In Python:: Python representation of inferiors (processes) - * Events In Python:: Listening for events from @value{GDBN}. - * Threads In Python:: Accessing inferior threads from Python. -@@ -24450,6 +24611,636 @@ done then type printers would have to ma - order to avoid holding information that could become stale as the - inferior changed. - -+@node Frame Filter API -+@subsubsection Filtering Frames. -+@cindex frame filters api -+ -+Frame filters are Python objects that manipulate the visibility of a -+frame or frames when a backtrace (@pxref{Backtrace}) is printed by -+@value{GDBN}. -+ -+Only commands that print a backtrace, or, in the case of @sc{gdb/mi} -+commands (@pxref{GDB/MI}), those that return a collection of frames -+are affected. The commands that work with frame filters are: -+ -+@code{backtrace} (@pxref{backtrace-command,, The backtrace command}), -+@code{-stack-list-frames} -+(@pxref{-stack-list-frames,, The -stack-list-frames command}), -+@code{-stack-list-variables} (@pxref{-stack-list-variables,, The -+-stack-list-variables command}), @code{-stack-list-arguments} -+@pxref{-stack-list-arguments,, The -stack-list-arguments command}) and -+@code{-stack-list-locals} (@pxref{-stack-list-locals,, The -+-stack-list-locals command}). -+ -+A frame filter works by taking an iterator as an argument, applying -+actions to the contents of that iterator, and returning another -+iterator (or, possibly, the same iterator it was provided in the case -+where the filter does not perform any operations). Typically, frame -+filters utilize tools such as the Python's @code{itertools} module to -+work with and create new iterators from the source iterator. -+Regardless of how a filter chooses to apply actions, it must not alter -+the underlying @value{GDBN} frame or frames, or attempt to alter the -+call-stack within @value{GDBN}. This preserves data integrity within -+@value{GDBN}. Frame filters are executed on a priority basis and care -+should be taken that some frame filters may have been executed before, -+and that some frame filters will be executed after. -+ -+An important consideration when designing frame filters, and well -+worth reflecting upon, is that frame filters should avoid unwinding -+the call stack if possible. Some stacks can run very deep, into the -+tens of thousands in some cases. To search every frame when a frame -+filter executes may be too expensive at that step. The frame filter -+cannot know how many frames it has to iterate over, and it may have to -+iterate through them all. This ends up duplicating effort as -+@value{GDBN} performs this iteration when it prints the frames. If -+the filter can defer unwinding frames until frame decorators are -+executed, after the last filter has executed, it should. @xref{Frame -+Decorator API}, for more information on decorators. Also, there are -+examples for both frame decorators and filters in later chapters. -+@xref{Writing a Frame Filter}, for more information. -+ -+The Python dictionary @code{gdb.frame_filters} contains key/object -+pairings that comprise a frame filter. Frame filters in this -+dictionary are called @code{global} frame filters, and they are -+available when debugging all inferiors. These frame filters must -+register with the dictionary directly. In addition to the -+@code{global} dictionary, there are other dictionaries that are loaded -+with different inferiors via auto-loading (@pxref{Python -+Auto-loading}). The two other areas where frame filter dictionaries -+can be found are: @code{gdb.Progspace} which contains a -+@code{frame_filters} dictionary attribute, and each @code{gdb.Objfile} -+object which also contains a @code{frame_filters} dictionary -+attribute. -+ -+When a command is executed from @value{GDBN} that is compatible with -+frame filters, @value{GDBN} combines the @code{global}, -+@code{gdb.Progspace} and all @code{gdb.Objfile} dictionaries currently -+loaded. All of the @code{gdb.Objfile} dictionaries are combined, as -+several frames, and thus several object files, might be in use. -+@value{GDBN} then prunes any frame filter whose @code{enabled} -+attribute is @code{False}. This pruned list is then sorted according -+to the @code{priority} attribute in each filter. -+ -+Once the dictionaries are combined, pruned and sorted, @value{GDBN} -+creates an iterator which wraps each frame in the call stack in a -+@code{FrameDecorator} object, and calls each filter in order. The -+output from the previous filter will always be the input to the next -+filter, and so on. -+ -+Frame filters have a mandatory interface which each frame filter must -+implement, defined here: -+ -+@defun FrameFilter.filter (iterator) -+@value{GDBN} will call this method on a frame filter when it has -+reached the order in the priority list for that filter. -+ -+For example, if there are four frame filters: -+ -+@smallexample -+Name Priority -+ -+Filter1 5 -+Filter2 10 -+Filter3 100 -+Filter4 1 -+@end smallexample -+ -+The order that the frame filters will be called is: -+ -+@smallexample -+Filter3 -> Filter2 -> Filter1 -> Filter4 -+@end smallexample -+ -+Note that the output from @code{Filter3} is passed to the input of -+@code{Filter2}, and so on. -+ -+This @code{filter} method is passed a Python iterator. This iterator -+contains a sequence of frame decorators that wrap each -+@code{gdb.Frame}, or a frame decorator that wraps another frame -+decorator. The first filter that is executed in the sequence of frame -+filters will receive an iterator entirely comprised of default -+@code{FrameDecorator} objects. However, after each frame filter is -+executed, the previous frame filter may have wrapped some or all of -+the frame decorators with their own frame decorator. As frame -+decorators must also conform to a mandatory interface, these -+decorators can be assumed to act in a uniform manner (@pxref{Frame -+Decorator API}). -+ -+This method must return an object conforming to the Python iterator -+protocol. Each item in the iterator must be an object conforming to -+the frame decorator interface. If a frame filter does not wish to -+perform any operations on this iterator, it should return that -+iterator untouched. -+ -+This method is not optional. If it does not exist, @value{GDBN} will -+raise and print an error. -+@end defun -+ -+@defvar FrameFilter.name -+The @code{name} attribute must be Python string which contains the -+name of the filter displayed by @value{GDBN} (@pxref{Frame Filter -+Management}). This attribute may contain any combination of letters -+or numbers. Care should be taken to ensure that it is unique. This -+attribute is mandatory. -+@end defvar -+ -+@defvar FrameFilter.enabled -+The @code{enabled} attribute must be Python boolean. This attribute -+indicates to @value{GDBN} whether the frame filter is enabled, and -+should be considered when frame filters are executed. If -+@code{enabled} is @code{True}, then the frame filter will be executed -+when any of the backtrace commands detailed earlier in this chapter -+are executed. If @code{enabled} is @code{False}, then the frame -+filter will not be executed. This attribute is mandatory. -+@end defvar -+ -+@defvar FrameFilter.priority -+The @code{priority} attribute must be Python integer. This attribute -+controls the order of execution in relation to other frame filters. -+There are no imposed limits on the range of @code{priority} other than -+it must be a valid integer. The higher the @code{priority} attribute, -+the sooner the frame filter will be executed in relation to other -+frame filters. Although @code{priority} can be negative, it is -+recommended practice to assume zero is the lowest priority that a -+frame filter can be assigned. Frame filters that have the same -+priority are executed in unsorted order in that priority slot. This -+attribute is mandatory. -+@end defvar -+ -+@node Frame Decorator API -+@subsubsection Decorating Frames. -+@cindex frame decorator api -+ -+Frame decorators are sister objects to frame filters (@pxref{Frame -+Filter API}). Frame decorators are applied by a frame filter and can -+only be used in conjunction with frame filters. -+ -+The purpose of a frame decorator is to customize the printed content -+of each @code{gdb.Frame} in commands where frame filters are executed. -+This concept is called decorating a frame. Frame decorators decorate -+a @code{gdb.Frame} with Python code contained within each API call. -+This separates the actual data contained in a @code{gdb.Frame} from -+the decorated data produced by a frame decorator. This abstraction is -+necessary to maintain integrity of the data contained in each -+@code{gdb.Frame}. -+ -+Frame decorators have a mandatory interface, defined below. -+ -+@value{GDBN} already contains a frame decorator called -+@code{FrameDecorator}. This contains substantial amounts of -+boilerplate code to decorate the content of a @code{gdb.Frame}. It is -+recommended that other frame decorators inherit and extend this -+object, and only to override the methods needed. -+ -+@defun FrameDecorator.elided (self) -+ -+The @code{elided} method groups frames together in a hierarchical -+system. An example would be an interpreter, where multiple low-level -+frames make up a single call in the interpreted language. In this -+example, the frame filter would elide the low-level frames and present -+a single high-level frame, representing the call in the interpreted -+language, to the user. -+ -+The @code{elided} function must return an iterable and this iterable -+must contain the frames that are being elided wrapped in a suitable -+frame decorator. If no frames are being elided this function may -+return an empty iterable, or @code{None}. Elided frames are indented -+from normal frames in a @code{CLI} backtrace, or in the case of -+@code{GDB/MI}, are placed in the @code{children} field of the eliding -+frame. -+ -+It is the frame filter's task to also filter out the elided frames from -+the source iterator. This will avoid printing the frame twice. -+@end defun -+ -+@defun FrameDecorator.function (self) -+ -+This method returns the name of the function in the frame that is to -+be printed. -+ -+This method must return a Python string describing the function, or -+@code{None}. -+ -+If this function returns @code{None}, @value{GDBN} will not print any -+data for this field. -+@end defun -+ -+@defun FrameDecorator.address (self) -+ -+This method returns the address of the frame that is to be printed. -+ -+This method must return a Python numeric integer type of sufficient -+size to describe the address of the frame, or @code{None}. -+ -+If this function returns a @code{None}, @value{GDBN} will not print -+any data for this field. -+@end defun -+ -+@defun FrameDecorator.filename (self) -+ -+This method returns the filename and path associated with this frame. -+ -+This method must return a Python string containing the filename and -+the path to the object file backing the frame, or @code{None}. -+ -+If this function returns a @code{None}, @value{GDBN} will not print -+any data for this field. -+@end defun -+ -+@defun FrameDecorator.line (self): -+ -+This method returns the line number associated with the current -+position within the function addressed by this frame. -+ -+This method must return a Python integer type, or @code{None}. -+ -+If this function returns a @code{None}, @value{GDBN} will not print -+any data for this field. -+@end defun -+ -+@defun FrameDecorator.frame_args (self) -+@anchor{frame_args} -+ -+This method must return an iterable, or @code{None}. Returning an -+empty iterable, or @code{None} means frame arguments will not be -+printed for this frame. This iterable must contain objects that -+implement two methods, described here. -+ -+This object must implement a @code{argument} method which takes a -+single @code{self} parameter and must return a @code{gdb.Symbol} -+(@pxref{Symbols In Python}), or a Python string. The object must also -+implement a @code{value} method which takes a single @code{self} -+parameter and must return a @code{gdb.Value} (@pxref{Values From -+Inferior}), a Python value, or @code{None}. If the @code{value} -+method returns @code{None}, and the @code{argument} method returns a -+@code{gdb.Symbol}, @value{GDBN} will look-up and print the value of -+the @code{gdb.Symbol} automatically. -+ -+A brief example: -+ -+@smallexample -+class SymValueWrapper(): -+ -+ def __init__(self, symbol, value): -+ self.sym = symbol -+ self.val = value -+ -+ def value(self): -+ return self.val -+ -+ def symbol(self): -+ return self.sym -+ -+class SomeFrameDecorator() -+... -+... -+ def frame_args(self): -+ args = [] -+ try: -+ block = self.inferior_frame.block() -+ except: -+ return None -+ -+ # Iterate over all symbols in a block. Only add -+ # symbols that are arguments. -+ for sym in block: -+ if not sym.is_argument: -+ continue -+ args.append(SymValueWrapper(sym,None)) -+ -+ # Add example synthetic argument. -+ args.append(SymValueWrapper(``foo'', 42)) -+ -+ return args -+@end smallexample -+@end defun -+ -+@defun FrameDecorator.frame_locals (self) -+ -+This method must return an iterable or @code{None}. Returning an -+empty iterable, or @code{None} means frame local arguments will not be -+printed for this frame. -+ -+The object interface, the description of the various strategies for -+reading frame locals, and the example are largely similar to those -+described in the @code{frame_args} function, (@pxref{frame_args,,The -+frame filter frame_args function}). Below is a modified example: -+ -+@smallexample -+class SomeFrameDecorator() -+... -+... -+ def frame_locals(self): -+ vars = [] -+ try: -+ block = self.inferior_frame.block() -+ except: -+ return None -+ -+ # Iterate over all symbols in a block. Add all -+ # symbols, except arguments. -+ for sym in block: -+ if sym.is_argument: -+ continue -+ vars.append(SymValueWrapper(sym,None)) -+ -+ # Add an example of a synthetic local variable. -+ vars.append(SymValueWrapper(``bar'', 99)) -+ -+ return vars -+@end smallexample -+@end defun -+ -+@defun FrameDecorator.inferior_frame (self): -+ -+This method must return the underlying @code{gdb.Frame} that this -+frame decorator is decorating. @value{GDBN} requires the underlying -+frame for internal frame information to determine how to print certain -+values when printing a frame. -+@end defun -+ -+@node Writing a Frame Filter -+@subsubsection Writing a Frame Filter -+@cindex writing a frame filter -+ -+There are three basic elements that a frame filter must implement: it -+must correctly implement the documented interface (@pxref{Frame Filter -+API}), it must register itself with @value{GDBN}, and finally, it must -+decide if it is to work on the data provided by @value{GDBN}. In all -+cases, whether it works on the iterator or not, each frame filter must -+return an iterator. A bare-bones frame filter follows the pattern in -+the following example. -+ -+@smallexample -+import gdb -+ -+class FrameFilter(): -+ -+ def __init__(self): -+ # Frame filter attribute creation. -+ # -+ # 'name' is the name of the filter that GDB will display. -+ # -+ # 'priority' is the priority of the filter relative to other -+ # filters. -+ # -+ # 'enabled' is a boolean that indicates whether this filter is -+ # enabled and should be executed. -+ -+ self.name = "Foo" -+ self.priority = 100 -+ self.enabled = True -+ -+ # Register this frame filter with the global frame_filters -+ # dictionary. -+ gdb.frame_filters[self.name] = self -+ -+ def filter(self, frame_iter): -+ # Just return the iterator. -+ return frame_iter -+@end smallexample -+ -+The frame filter in the example above implements the three -+requirements for all frame filters. It implements the API, self -+registers, and makes a decision on the iterator (in this case, it just -+returns the iterator untouched). -+ -+The first step is attribute creation and assignment, and as shown in -+the comments the filter assigns the following attributes: @code{name}, -+@code{priority} and whether the filter should be enabled with the -+@code{enabled} attribute. -+ -+The second step is registering the frame filter with the dictionary or -+dictionaries that the frame filter has interest in. As shown in the -+comments, this filter just registers itself with the global dictionary -+@code{gdb.frame_filters}. As noted earlier, @code{gdb.frame_filters} -+is a dictionary that is initialized in the @code{gdb} module when -+@value{GDBN} starts. What dictionary a filter registers with is an -+important consideration. Generally, if a filter is specific to a set -+of code, it should be registered either in the @code{objfile} or -+@code{progspace} dictionaries as they are specific to the program -+currently loaded in @value{GDBN}. The global dictionary is always -+present in @value{GDBN} and is never unloaded. Any filters registered -+with the global dictionary will exist until @value{GDBN} exits. To -+avoid filters that may conflict, it is generally better to register -+frame filters against the dictionaries that more closely align with -+the usage of the filter currently in question. @xref{Python -+Auto-loading}, for further information on auto-loading Python scripts. -+ -+@value{GDBN} takes a hands-off approach to frame filter registration, -+therefore it is the frame filter's responsibility to ensure -+registration has occurred, and that any exceptions are handled -+appropriately. In particular, you may wish to handle exceptions -+relating to Python dictionary key uniqueness. It is mandatory that -+the dictionary key is the same as frame filter's @code{name} -+attribute. When a user manages frame filters (@pxref{Frame Filter -+Management}), the names @value{GDBN} will display are those contained -+in the @code{name} attribute. -+ -+The final step of this example is the implementation of the -+@code{filter} method. As shown in the example comments, we define the -+@code{filter} method and note that the method must take an iterator, -+and also must return an iterator. In this bare-bones example, the -+frame filter is not very useful as it just returns the iterator -+untouched. However this is a valid operation for frame filters that -+have the @code{enabled} attribute set, but decide not to operate on -+any frames. -+ -+In the next example, the frame filter operates on all frames and -+utilizes a frame decorator to perform some work on the frames. -+@xref{Frame Decorator API}, for further information on the frame -+decorator interface. -+ -+This example works on inlined frames. It highlights frames which are -+inlined by tagging them with an ``[inlined]'' tag. By applying a -+frame decorator to all frames with the Python @code{itertools imap} -+method, the example defers actions to the frame decorator. Frame -+decorators are only processed when @value{GDBN} prints the backtrace. -+ -+This introduces a new decision making topic: whether to perform -+decision making operations at the filtering step, or at the printing -+step. In this example's approach, it does not perform any filtering -+decisions at the filtering step beyond mapping a frame decorator to -+each frame. This allows the actual decision making to be performed -+when each frame is printed. This is an important consideration, and -+well worth reflecting upon when designing a frame filter. An issue -+that frame filters should avoid is unwinding the stack if possible. -+Some stacks can run very deep, into the tens of thousands in some -+cases. To search every frame to determine if it is inlined ahead of -+time may be too expensive at the filtering step. The frame filter -+cannot know how many frames it has to iterate over, and it would have -+to iterate through them all. This ends up duplicating effort as -+@value{GDBN} performs this iteration when it prints the frames. -+ -+In this example decision making can be deferred to the printing step. -+As each frame is printed, the frame decorator can examine each frame -+in turn when @value{GDBN} iterates. From a performance viewpoint, -+this is the most appropriate decision to make as it avoids duplicating -+the effort that the printing step would undertake anyway. Also, if -+there are many frame filters unwinding the stack during filtering, it -+can substantially delay the printing of the backtrace which will -+result in large memory usage, and a poor user experience. -+ -+@smallexample -+class InlineFilter(): -+ -+ def __init__(self): -+ self.name = "InlinedFrameFilter" -+ self.priority = 100 -+ self.enabled = True -+ gdb.frame_filters[self.name] = self -+ -+ def filter(self, frame_iter): -+ frame_iter = itertools.imap(InlinedFrameDecorator, -+ frame_iter) -+ return frame_iter -+@end smallexample -+ -+This frame filter is somewhat similar to the earlier example, except -+that the @code{filter} method applies a frame decorator object called -+@code{InlinedFrameDecorator} to each element in the iterator. The -+@code{imap} Python method is light-weight. It does not proactively -+iterate over the iterator, but rather creates a new iterator which -+wraps the existing one. -+ -+Below is the frame decorator for this example. -+ -+@smallexample -+class InlinedFrameDecorator(FrameDecorator): -+ -+ def __init__(self, fobj): -+ super(InlinedFrameDecorator, self).__init__(fobj) -+ -+ def function(self): -+ frame = fobj.inferior_frame() -+ name = str(frame.name()) -+ -+ if frame.type() == gdb.INLINE_FRAME: -+ name = name + " [inlined]" -+ -+ return name -+@end smallexample -+ -+This frame decorator only defines and overrides the @code{function} -+method. It lets the supplied @code{FrameDecorator}, which is shipped -+with @value{GDBN}, perform the other work associated with printing -+this frame. -+ -+The combination of these two objects create this output from a -+backtrace: -+ -+@smallexample -+#0 0x004004e0 in bar () at inline.c:11 -+#1 0x00400566 in max [inlined] (b=6, a=12) at inline.c:21 -+#2 0x00400566 in main () at inline.c:31 -+@end smallexample -+ -+So in the case of this example, a frame decorator is applied to all -+frames, regardless of whether they may be inlined or not. As -+@value{GDBN} iterates over the iterator produced by the frame filters, -+@value{GDBN} executes each frame decorator which then makes a decision -+on what to print in the @code{function} callback. Using a strategy -+like this is a way to defer decisions on the frame content to printing -+time. -+ -+@subheading Eliding Frames -+ -+It might be that the above example is not desirable for representing -+inlined frames, and a hierarchical approach may be preferred. If we -+want to hierarchically represent frames, the @code{elided} frame -+decorator interface might be preferable. -+ -+This example approaches the issue with the @code{elided} method. This -+example is quite long, but very simplistic. It is out-of-scope for -+this section to write a complete example that comprehensively covers -+all approaches of finding and printing inlined frames. However, this -+example illustrates the approach an author might use. -+ -+This example comprises of three sections. -+ -+@smallexample -+class InlineFrameFilter(): -+ -+ def __init__(self): -+ self.name = "InlinedFrameFilter" -+ self.priority = 100 -+ self.enabled = True -+ gdb.frame_filters[self.name] = self -+ -+ def filter(self, frame_iter): -+ return ElidingInlineIterator(frame_iter) -+@end smallexample -+ -+This frame filter is very similar to the other examples. The only -+difference is this frame filter is wrapping the iterator provided to -+it (@code{frame_iter}) with a custom iterator called -+@code{ElidingInlineIterator}. This again defers actions to when -+@value{GDBN} prints the backtrace, as the iterator is not traversed -+until printing. -+ -+The iterator for this example is as follows. It is in this section of -+the example where decisions are made on the content of the backtrace. -+ -+@smallexample -+class ElidingInlineIterator: -+ def __init__(self, ii): -+ self.input_iterator = ii -+ -+ def __iter__(self): -+ return self -+ -+ def next(self): -+ frame = next(self.input_iterator) -+ -+ if frame.inferior_frame().type() != gdb.INLINE_FRAME: -+ return frame -+ -+ try: -+ eliding_frame = next(self.input_iterator) -+ except StopIteration: -+ return frame -+ return ElidingFrameDecorator(eliding_frame, [frame]) -+@end smallexample -+ -+This iterator implements the Python iterator protocol. When the -+@code{next} function is called (when @value{GDBN} prints each frame), -+the iterator checks if this frame decorator, @code{frame}, is wrapping -+an inlined frame. If it is not, it returns the existing frame decorator -+untouched. If it is wrapping an inlined frame, it assumes that the -+inlined frame was contained within the next oldest frame, -+@code{eliding_frame}, which it fetches. It then creates and returns a -+frame decorator, @code{ElidingFrameDecorator}, which contains both the -+elided frame, and the eliding frame. -+ -+@smallexample -+class ElidingInlineDecorator(FrameDecorator): -+ -+ def __init__(self, frame, elided_frames): -+ super(ElidingInlineDecorator, self).__init__(frame) -+ self.frame = frame -+ self.elided_frames = elided_frames -+ -+ def elided(self): -+ return iter(self.elided_frames) -+@end smallexample -+ -+This frame decorator overrides one function and returns the inlined -+frame in the @code{elided} method. As before it lets -+@code{FrameDecorator} do the rest of the work involved in printing -+this frame. This produces the following output. -+ -+@smallexample -+#0 0x004004e0 in bar () at inline.c:11 -+#2 0x00400529 in main () at inline.c:25 -+ #1 0x00400529 in max (b=6, a=12) at inline.c:15 -+@end smallexample -+ -+In that output, @code{max} which has been inlined into @code{main} is -+printed hierarchically. Another approach would be to combine the -+@code{function} method, and the @code{elided} method to both print a -+marker in the inlined frame, and also show the hierarchical -+relationship. -+ - @node Inferiors In Python - @subsubsection Inferiors In Python - @cindex inferiors in Python -@@ -25280,6 +26071,11 @@ The @code{type_printers} attribute is a - @xref{Type Printing API}, for more information. - @end defvar - -+@defvar Progspace.frame_filters -+The @code{frame_filters} attribute is a dictionary of frame filter -+objects. @xref{Frame Filter API}, for more information. -+@end defvar -+ - @node Objfiles In Python - @subsubsection Objfiles In Python - -@@ -25330,6 +26126,11 @@ The @code{type_printers} attribute is a - @xref{Type Printing API}, for more information. - @end defvar - -+@defvar Objfile.frame_filters -+The @code{frame_filters} attribute is a dictionary of frame filter -+objects. @xref{Frame Filter API}, for more information. -+@end defvar -+ - A @code{gdb.Objfile} object has the following methods: - - @defun Objfile.is_valid () -@@ -26348,7 +27149,7 @@ No my-foo-pretty-printers.py - When reading an auto-loaded file, @value{GDBN} sets the - @dfn{current objfile}. This is available via the @code{gdb.current_objfile} - function (@pxref{Objfiles In Python}). This can be useful for --registering objfile-specific pretty-printers. -+registering objfile-specific pretty-printers and frame-filters. - - @menu - * objfile-gdb.py file:: The @file{@var{objfile}-gdb.py} file -@@ -30219,6 +31020,22 @@ Is this going away???? - @node GDB/MI Stack Manipulation - @section @sc{gdb/mi} Stack Manipulation Commands - -+@subheading The @code{-enable-frame-filters} Command -+@findex -enable-frame-filters -+ -+@smallexample -+-enable-frame-filters -+@end smallexample -+ -+@value{GDBN} allows Python-based frame filters to affect the output of -+the MI commands relating to stack traces. As there is no way to -+implement this in a fully backward-compatible way, a front end must -+request that this functionality be enabled. -+ -+Once enabled, this feature cannot be disabled. -+ -+Note that if Python support has not been compiled into @value{GDBN}, -+this command will still succeed (and do nothing). - - @subheading The @code{-stack-info-frame} Command - @findex -stack-info-frame -@@ -30286,13 +31103,14 @@ For a stack with frame levels 0 through - (gdb) - @end smallexample - -+@anchor{-stack-list-arguments} - @subheading The @code{-stack-list-arguments} Command - @findex -stack-list-arguments - - @subsubheading Synopsis - - @smallexample -- -stack-list-arguments @var{print-values} -+ -stack-list-arguments [ --no-frame-filters ] @var{print-values} - [ @var{low-frame} @var{high-frame} ] - @end smallexample - -@@ -30309,7 +31127,9 @@ If @var{print-values} is 0 or @code{--no - the variables; if it is 1 or @code{--all-values}, print also their - values; and if it is 2 or @code{--simple-values}, print the name, - type and value for simple data types, and the name and type for arrays, --structures and unions. -+structures and unions. If the option @code{--no-frame-filters} is -+supplied, then Python frame filters will not be executed. -+ - - Use of this command to obtain arguments in a single frame is - deprecated in favor of the @samp{-stack-list-variables} command. -@@ -30380,13 +31200,14 @@ args=[@{name="intarg",value="2"@}, - @c @subheading -stack-list-exception-handlers - - -+@anchor{-stack-list-frames} - @subheading The @code{-stack-list-frames} Command - @findex -stack-list-frames - - @subsubheading Synopsis - - @smallexample -- -stack-list-frames [ @var{low-frame} @var{high-frame} ] -+ -stack-list-frames [ --no-frame-filters @var{low-frame} @var{high-frame} ] - @end smallexample - - List the frames currently on the stack. For each frame it displays the -@@ -30416,7 +31237,9 @@ levels are between the two arguments (in - are equal, it shows the single frame at the corresponding level. It is - an error if @var{low-frame} is larger than the actual number of - frames. On the other hand, @var{high-frame} may be larger than the --actual number of frames, in which case only existing frames will be returned. -+actual number of frames, in which case only existing frames will be -+returned. If the option @code{--no-frame-filters} is supplied, then -+Python frame filters will not be executed. - - @subsubheading @value{GDBN} Command - -@@ -30486,11 +31309,12 @@ Show a single frame: - - @subheading The @code{-stack-list-locals} Command - @findex -stack-list-locals -+@anchor{-stack-list-locals} - - @subsubheading Synopsis - - @smallexample -- -stack-list-locals @var{print-values} -+ -stack-list-locals [ --no-frame-filters ] @var{print-values} - @end smallexample - - Display the local variable names for the selected frame. If -@@ -30501,7 +31325,8 @@ type and value for simple data types, an - structures and unions. In this last case, a frontend can immediately - display the value of simple data types and create variable objects for - other data types when the user wishes to explore their values in --more detail. -+more detail. If the option @code{--no-frame-filters} is supplied, then -+Python frame filters will not be executed. - - This command is deprecated in favor of the - @samp{-stack-list-variables} command. -@@ -30526,13 +31351,14 @@ This command is deprecated in favor of t - (gdb) - @end smallexample - -+@anchor{-stack-list-variables} - @subheading The @code{-stack-list-variables} Command - @findex -stack-list-variables - - @subsubheading Synopsis - - @smallexample -- -stack-list-variables @var{print-values} -+ -stack-list-variables [ --no-frame-filters ] @var{print-values} - @end smallexample - - Display the names of local variables and function arguments for the selected frame. If -@@ -30540,7 +31366,8 @@ Display the names of local variables and - the variables; if it is 1 or @code{--all-values}, print also their - values; and if it is 2 or @code{--simple-values}, print the name, - type and value for simple data types, and the name and type for arrays, --structures and unions. -+structures and unions. If the option @code{--no-frame-filters} is -+supplied, then Python frame filters will not be executed. - - @subsubheading Example - -Index: gdb-7.6/gdb/mi/mi-cmd-stack.c -=================================================================== ---- gdb-7.6.orig/gdb/mi/mi-cmd-stack.c 2013-06-10 14:31:02.730084652 +0200 -+++ gdb-7.6/gdb/mi/mi-cmd-stack.c 2013-06-10 14:31:08.365082437 +0200 -@@ -31,6 +31,10 @@ - #include "language.h" - #include "valprint.h" - #include "exceptions.h" -+#include "utils.h" -+#include "mi-getopt.h" -+#include "python/python.h" -+#include - - enum what_to_list { locals, arguments, all }; - -@@ -38,6 +42,28 @@ static void list_args_or_locals (enum wh - enum print_values values, - struct frame_info *fi); - -+/* True if we want to allow Python-based frame filters. */ -+static int frame_filters = 0; -+ -+void -+mi_cmd_enable_frame_filters (char *command, char **argv, int argc) -+{ -+ if (argc != 0) -+ error (_("-enable-frame-filters: no arguments allowed")); -+ frame_filters = 1; -+} -+ -+/* Parse the --no-frame-filters option in commands where we cannot use -+ mi_getopt. */ -+static int -+parse_no_frames_option (const char *arg) -+{ -+ if (arg && (strcmp (arg, "--no-frame-filters") == 0)) -+ return 1; -+ -+ return 0; -+} -+ - /* Print a list of the stack frames. Args can be none, in which case - we want to print the whole backtrace, or a pair of numbers - specifying the frame numbers at which to start and stop the -@@ -52,14 +78,46 @@ mi_cmd_stack_list_frames (char *command, - int i; - struct cleanup *cleanup_stack; - struct frame_info *fi; -+ enum py_bt_status result = PY_BT_ERROR; -+ int raw_arg = 0; -+ int oind = 0; -+ enum opt -+ { -+ NO_FRAME_FILTERS -+ }; -+ static const struct mi_opt opts[] = -+ { -+ {"-no-frame-filters", NO_FRAME_FILTERS, 0}, -+ { 0, 0, 0 } -+ }; -+ -+ /* Parse arguments. In this instance we are just looking for -+ --no-frame-filters. */ -+ while (1) -+ { -+ char *oarg; -+ int opt = mi_getopt ("-stack-list-frames", argc, argv, -+ opts, &oind, &oarg); -+ if (opt < 0) -+ break; -+ switch ((enum opt) opt) -+ { -+ case NO_FRAME_FILTERS: -+ raw_arg = oind; -+ break; -+ } -+ } - -- if (argc > 2 || argc == 1) -- error (_("-stack-list-frames: Usage: [FRAME_LOW FRAME_HIGH]")); -+ /* After the last option is parsed, there should either be low - -+ high range, or no further arguments. */ -+ if ((argc - oind != 0) && (argc - oind != 2)) -+ error (_("-stack-list-frames: Usage: [--no-frame-filters] [FRAME_LOW FRAME_HIGH]")); - -- if (argc == 2) -+ /* If there is a range, set it. */ -+ if (argc - oind == 2) - { -- frame_low = atoi (argv[0]); -- frame_high = atoi (argv[1]); -+ frame_low = atoi (argv[0 + oind]); -+ frame_high = atoi (argv[1 + oind]); - } - else - { -@@ -81,16 +139,37 @@ mi_cmd_stack_list_frames (char *command, - - cleanup_stack = make_cleanup_ui_out_list_begin_end (current_uiout, "stack"); - -- /* Now let's print the frames up to frame_high, or until there are -- frames in the stack. */ -- for (; -- fi && (i <= frame_high || frame_high == -1); -- i++, fi = get_prev_frame (fi)) -+ if (! raw_arg && frame_filters) - { -- QUIT; -- /* Print the location and the address always, even for level 0. -- If args is 0, don't print the arguments. */ -- print_frame_info (fi, 1, LOC_AND_ADDRESS, 0 /* args */ ); -+ int flags = PRINT_LEVEL | PRINT_FRAME_INFO; -+ int py_frame_low = frame_low; -+ -+ /* We cannot pass -1 to frame_low, as that would signify a -+ relative backtrace from the tail of the stack. So, in the case -+ of frame_low == -1, assign and increment it. */ -+ if (py_frame_low == -1) -+ py_frame_low++; -+ -+ result = apply_frame_filter (get_current_frame (), flags, -+ NO_VALUES, current_uiout, -+ py_frame_low, frame_high); -+ } -+ -+ /* Run the inbuilt backtrace if there are no filters registered, or -+ if "--no-frame-filters" has been specified from the command. */ -+ if (! frame_filters || raw_arg || result == PY_BT_NO_FILTERS) -+ { -+ /* Now let's print the frames up to frame_high, or until there are -+ frames in the stack. */ -+ for (; -+ fi && (i <= frame_high || frame_high == -1); -+ i++, fi = get_prev_frame (fi)) -+ { -+ QUIT; -+ /* Print the location and the address always, even for level 0. -+ If args is 0, don't print the arguments. */ -+ print_frame_info (fi, 1, LOC_AND_ADDRESS, 0 /* args */ ); -+ } - } - - do_cleanups (cleanup_stack); -@@ -147,13 +226,34 @@ void - mi_cmd_stack_list_locals (char *command, char **argv, int argc) - { - struct frame_info *frame; -+ int raw_arg = 0; -+ enum py_bt_status result = PY_BT_ERROR; -+ int print_value; -+ -+ if (argc > 0) -+ raw_arg = parse_no_frames_option (argv[0]); -+ -+ if (argc < 1 || argc > 2 || (argc == 2 && ! raw_arg) -+ || (argc == 1 && raw_arg)) -+ error (_("-stack-list-locals: Usage: [--no-frame-filters] PRINT_VALUES")); - -- if (argc != 1) -- error (_("-stack-list-locals: Usage: PRINT_VALUES")); -- -- frame = get_selected_frame (NULL); -+ frame = get_selected_frame (NULL); -+ print_value = parse_print_values (argv[raw_arg]); - -- list_args_or_locals (locals, parse_print_values (argv[0]), frame); -+ if (! raw_arg && frame_filters) -+ { -+ int flags = PRINT_LEVEL | PRINT_LOCALS; -+ -+ result = apply_frame_filter (frame, flags, print_value, -+ current_uiout, 0, 0); -+ } -+ -+ /* Run the inbuilt backtrace if there are no filters registered, or -+ if "--no-frame-filters" has been specified from the command. */ -+ if (! frame_filters || raw_arg || result == PY_BT_NO_FILTERS) -+ { -+ list_args_or_locals (locals, print_value, frame); -+ } - } - - /* Print a list of the arguments for the current frame. With argument -@@ -170,15 +270,20 @@ mi_cmd_stack_list_args (char *command, c - struct cleanup *cleanup_stack_args; - enum print_values print_values; - struct ui_out *uiout = current_uiout; -+ int raw_arg = 0; -+ enum py_bt_status result = PY_BT_ERROR; - -- if (argc < 1 || argc > 3 || argc == 2) -- error (_("-stack-list-arguments: Usage: " -- "PRINT_VALUES [FRAME_LOW FRAME_HIGH]")); -+ if (argc > 0) -+ raw_arg = parse_no_frames_option (argv[0]); - -- if (argc == 3) -+ if (argc < 1 || (argc > 3 && ! raw_arg) || (argc == 2 && ! raw_arg)) -+ error (_("-stack-list-arguments: Usage: " \ -+ "[--no-frame-filters] PRINT_VALUES [FRAME_LOW FRAME_HIGH]")); -+ -+ if (argc >= 3) - { -- frame_low = atoi (argv[1]); -- frame_high = atoi (argv[2]); -+ frame_low = atoi (argv[1 + raw_arg]); -+ frame_high = atoi (argv[2 + raw_arg]); - } - else - { -@@ -188,7 +293,7 @@ mi_cmd_stack_list_args (char *command, c - frame_high = -1; - } - -- print_values = parse_print_values (argv[0]); -+ print_values = parse_print_values (argv[raw_arg]); - - /* Let's position fi on the frame at which to start the - display. Could be the innermost frame if the whole stack needs -@@ -203,21 +308,41 @@ mi_cmd_stack_list_args (char *command, c - cleanup_stack_args - = make_cleanup_ui_out_list_begin_end (uiout, "stack-args"); - -- /* Now let's print the frames up to frame_high, or until there are -- frames in the stack. */ -- for (; -- fi && (i <= frame_high || frame_high == -1); -- i++, fi = get_prev_frame (fi)) -+ if (! raw_arg && frame_filters) - { -- struct cleanup *cleanup_frame; -+ int flags = PRINT_LEVEL | PRINT_ARGS; -+ int py_frame_low = frame_low; - -- QUIT; -- cleanup_frame = make_cleanup_ui_out_tuple_begin_end (uiout, "frame"); -- ui_out_field_int (uiout, "level", i); -- list_args_or_locals (arguments, print_values, fi); -- do_cleanups (cleanup_frame); -+ /* We cannot pass -1 to frame_low, as that would signify a -+ relative backtrace from the tail of the stack. So, in the case -+ of frame_low == -1, assign and increment it. */ -+ if (py_frame_low == -1) -+ py_frame_low++; -+ -+ result = apply_frame_filter (get_current_frame (), flags, -+ print_values, current_uiout, -+ py_frame_low, frame_high); - } - -+ /* Run the inbuilt backtrace if there are no filters registered, or -+ if "--no-frame-filters" has been specified from the command. */ -+ if (! frame_filters || raw_arg || result == PY_BT_NO_FILTERS) -+ { -+ /* Now let's print the frames up to frame_high, or until there are -+ frames in the stack. */ -+ for (; -+ fi && (i <= frame_high || frame_high == -1); -+ i++, fi = get_prev_frame (fi)) -+ { -+ struct cleanup *cleanup_frame; -+ -+ QUIT; -+ cleanup_frame = make_cleanup_ui_out_tuple_begin_end (uiout, "frame"); -+ ui_out_field_int (uiout, "level", i); -+ list_args_or_locals (arguments, print_values, fi); -+ do_cleanups (cleanup_frame); -+ } -+ } - do_cleanups (cleanup_stack_args); - } - -@@ -230,13 +355,35 @@ void - mi_cmd_stack_list_variables (char *command, char **argv, int argc) - { - struct frame_info *frame; -+ int raw_arg = 0; -+ enum py_bt_status result = PY_BT_ERROR; -+ int print_value; -+ -+ if (argc > 0) -+ raw_arg = parse_no_frames_option (argv[0]); -+ -+ if (argc < 1 || argc > 2 || (argc == 2 && ! raw_arg) -+ || (argc == 1 && raw_arg)) -+ error (_("-stack-list-variables: Usage: " \ -+ "[--no-frame-filters] PRINT_VALUES")); - -- if (argc != 1) -- error (_("Usage: PRINT_VALUES")); -- -- frame = get_selected_frame (NULL); -+ frame = get_selected_frame (NULL); -+ print_value = parse_print_values (argv[raw_arg]); - -- list_args_or_locals (all, parse_print_values (argv[0]), frame); -+ if (! raw_arg && frame_filters) -+ { -+ int flags = PRINT_LEVEL | PRINT_ARGS | PRINT_LOCALS; -+ -+ result = apply_frame_filter (frame, flags, print_value, -+ current_uiout, 0, 0); -+ } -+ -+ /* Run the inbuilt backtrace if there are no filters registered, or -+ if "--no-frame-filters" has been specified from the command. */ -+ if (! frame_filters || raw_arg || result == PY_BT_NO_FILTERS) -+ { -+ list_args_or_locals (all, print_value, frame); -+ } - } - - /* Print single local or argument. ARG must be already read in. For -Index: gdb-7.6/gdb/mi/mi-cmds.c -=================================================================== ---- gdb-7.6.orig/gdb/mi/mi-cmds.c 2013-06-10 14:31:02.730084652 +0200 -+++ gdb-7.6/gdb/mi/mi-cmds.c 2013-06-10 14:31:08.365082437 +0200 -@@ -86,6 +86,7 @@ static struct mi_cmd mi_cmds[] = - mi_cmd_data_write_register_values), - DEF_MI_CMD_MI ("enable-timings", mi_cmd_enable_timings), - DEF_MI_CMD_MI ("enable-pretty-printing", mi_cmd_enable_pretty_printing), -+ DEF_MI_CMD_MI ("enable-frame-filters", mi_cmd_enable_frame_filters), - DEF_MI_CMD_MI ("environment-cd", mi_cmd_env_cd), - DEF_MI_CMD_MI ("environment-directory", mi_cmd_env_dir), - DEF_MI_CMD_MI ("environment-path", mi_cmd_env_path), -Index: gdb-7.6/gdb/mi/mi-cmds.h -=================================================================== ---- gdb-7.6.orig/gdb/mi/mi-cmds.h 2013-06-10 14:31:02.730084652 +0200 -+++ gdb-7.6/gdb/mi/mi-cmds.h 2013-06-10 14:31:08.365082437 +0200 -@@ -118,6 +118,7 @@ extern mi_cmd_argv_ftype mi_cmd_var_show - extern mi_cmd_argv_ftype mi_cmd_var_show_format; - extern mi_cmd_argv_ftype mi_cmd_var_update; - extern mi_cmd_argv_ftype mi_cmd_enable_pretty_printing; -+extern mi_cmd_argv_ftype mi_cmd_enable_frame_filters; - extern mi_cmd_argv_ftype mi_cmd_var_set_update_range; - - /* Description of a single command. */ -Index: gdb-7.6/gdb/python/py-framefilter.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/python/py-framefilter.c 2013-06-10 14:31:08.366082437 +0200 -@@ -0,0 +1,1528 @@ -+/* Python frame filters -+ -+ Copyright (C) 2013 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 . */ -+ -+#include "defs.h" -+#include "objfiles.h" -+#include "symtab.h" -+#include "language.h" -+#include "exceptions.h" -+#include "arch-utils.h" -+#include "python.h" -+#include "ui-out.h" -+#include "valprint.h" -+#include "annotate.h" -+#include "hashtab.h" -+#include "demangle.h" -+#include "mi/mi-cmds.h" -+#include "python-internal.h" -+ -+enum mi_print_types -+{ -+ MI_PRINT_ARGS, -+ MI_PRINT_LOCALS -+}; -+ -+/* Helper function to extract a symbol, a name and a language -+ definition from a Python object that conforms to the "Symbol Value" -+ interface. OBJ is the Python object to extract the values from. -+ NAME is a pass-through argument where the name of the symbol will -+ be written. NAME is allocated in this function, but the caller is -+ responsible for clean up. SYM is a pass-through argument where the -+ symbol will be written. In the case of the API returning a string, -+ this will be set to NULL. LANGUAGE is also a pass-through argument -+ denoting the language attributed to the Symbol. In the case of SYM -+ being NULL, this will be set to the current language. Returns -+ PY_BT_ERROR on error with the appropriate Python exception set, and -+ PY_BT_OK on success. */ -+ -+static enum py_bt_status -+extract_sym (PyObject *obj, char **name, struct symbol **sym, -+ const struct language_defn **language) -+{ -+ PyObject *result = PyObject_CallMethod (obj, "symbol", NULL); -+ -+ if (result == NULL) -+ return PY_BT_ERROR; -+ -+ /* For 'symbol' callback, the function can return a symbol or a -+ string. */ -+ if (gdbpy_is_string (result)) -+ { -+ *name = python_string_to_host_string (result); -+ Py_DECREF (result); -+ -+ if (*name == NULL) -+ return PY_BT_ERROR; -+ /* If the API returns a string (and not a symbol), then there is -+ no symbol derived language available and the frame filter has -+ either overridden the symbol with a string, or supplied a -+ entirely synthetic symbol/value pairing. In that case, use -+ python_language. */ -+ *language = python_language; -+ *sym = NULL; -+ } -+ else -+ { -+ /* This type checks 'result' during the conversion so we -+ just call it unconditionally and check the return. */ -+ *sym = symbol_object_to_symbol (result); -+ -+ Py_DECREF (result); -+ -+ if (*sym == NULL) -+ { -+ PyErr_SetString (PyExc_RuntimeError, -+ _("Unexpected value. Expecting a " -+ "gdb.Symbol or a Python string.")); -+ return PY_BT_ERROR; -+ } -+ -+ /* Duplicate the symbol name, so the caller has consistency -+ in garbage collection. */ -+ *name = xstrdup (SYMBOL_PRINT_NAME (*sym)); -+ -+ /* If a symbol is specified attempt to determine the language -+ from the symbol. If mode is not "auto", then the language -+ has been explicitly set, use that. */ -+ if (language_mode == language_mode_auto) -+ *language = language_def (SYMBOL_LANGUAGE (*sym)); -+ else -+ *language = current_language; -+ } -+ -+ return PY_BT_OK; -+} -+ -+/* Helper function to extract a value from an object that conforms to -+ the "Symbol Value" interface. OBJ is the Python object to extract -+ the value from. VALUE is a pass-through argument where the value -+ will be written. If the object does not have the value attribute, -+ or provides the Python None for a value, VALUE will be set to NULL -+ and this function will return as successful. Returns PY_BT_ERROR -+ on error with the appropriate Python exception set, and PY_BT_OK on -+ success. */ -+ -+static enum py_bt_status -+extract_value (PyObject *obj, struct value **value) -+{ -+ if (PyObject_HasAttrString (obj, "value")) -+ { -+ PyObject *vresult = PyObject_CallMethod (obj, "value", NULL); -+ -+ if (vresult == NULL) -+ return PY_BT_ERROR; -+ -+ /* The Python code has returned 'None' for a value, so we set -+ value to NULL. This flags that GDB should read the -+ value. */ -+ if (vresult == Py_None) -+ { -+ Py_DECREF (vresult); -+ *value = NULL; -+ return PY_BT_OK; -+ } -+ else -+ { -+ *value = convert_value_from_python (vresult); -+ Py_DECREF (vresult); -+ -+ if (*value == NULL) -+ return PY_BT_ERROR; -+ -+ return PY_BT_OK; -+ } -+ } -+ else -+ *value = NULL; -+ -+ return PY_BT_OK; -+} -+ -+/* MI prints only certain values according to the type of symbol and -+ also what the user has specified. SYM is the symbol to check, and -+ MI_PRINT_TYPES is an enum specifying what the user wants emitted -+ for the MI command in question. */ -+static int -+mi_should_print (struct symbol *sym, enum mi_print_types type) -+{ -+ int print_me = 0; -+ -+ switch (SYMBOL_CLASS (sym)) -+ { -+ default: -+ case LOC_UNDEF: /* catches errors */ -+ case LOC_CONST: /* constant */ -+ case LOC_TYPEDEF: /* local typedef */ -+ case LOC_LABEL: /* local label */ -+ case LOC_BLOCK: /* local function */ -+ case LOC_CONST_BYTES: /* loc. byte seq. */ -+ case LOC_UNRESOLVED: /* unresolved static */ -+ case LOC_OPTIMIZED_OUT: /* optimized out */ -+ print_me = 0; -+ break; -+ -+ case LOC_ARG: /* argument */ -+ case LOC_REF_ARG: /* reference arg */ -+ case LOC_REGPARM_ADDR: /* indirect register arg */ -+ case LOC_LOCAL: /* stack local */ -+ case LOC_STATIC: /* static */ -+ case LOC_REGISTER: /* register */ -+ case LOC_COMPUTED: /* computed location */ -+ if (type == MI_PRINT_LOCALS) -+ print_me = ! SYMBOL_IS_ARGUMENT (sym); -+ else -+ print_me = SYMBOL_IS_ARGUMENT (sym); -+ } -+ return print_me; -+} -+ -+/* Helper function which outputs a type name extracted from VAL to a -+ "type" field in the output stream OUT. OUT is the ui-out structure -+ the type name will be output too, and VAL is the value that the -+ type will be extracted from. Returns PY_BT_ERROR on error, with -+ any GDB exceptions converted to a Python exception, or PY_BT_OK on -+ success. */ -+ -+static enum py_bt_status -+py_print_type (struct ui_out *out, struct value *val) -+{ -+ volatile struct gdb_exception except; -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ struct type *type; -+ struct ui_file *stb; -+ struct cleanup *cleanup; -+ -+ stb = mem_fileopen (); -+ cleanup = make_cleanup_ui_file_delete (stb); -+ type = check_typedef (value_type (val)); -+ type_print (value_type (val), "", stb, -1); -+ ui_out_field_stream (out, "type", stb); -+ do_cleanups (cleanup); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ return PY_BT_ERROR; -+ } -+ -+ return PY_BT_OK; -+} -+ -+/* Helper function which outputs a value to an output field in a -+ stream. OUT is the ui-out structure the value will be output to, -+ VAL is the value that will be printed, OPTS contains the value -+ printing options, ARGS_TYPE is an enumerator describing the -+ argument format, and LANGUAGE is the language_defn that the value -+ will be printed with. Returns PY_BT_ERROR on error, with any GDB -+ exceptions converted to a Python exception, or PY_BT_OK on -+ success. */ -+ -+static enum py_bt_status -+py_print_value (struct ui_out *out, struct value *val, -+ const struct value_print_options *opts, -+ int indent, -+ enum py_frame_args args_type, -+ const struct language_defn *language) -+{ -+ int should_print = 0; -+ volatile struct gdb_exception except; -+ int local_indent = (4 * indent); -+ -+ /* Never set an indent level for common_val_print if MI. */ -+ if (ui_out_is_mi_like_p (out)) -+ local_indent = 0; -+ -+ /* MI does not print certain values, differentiated by type, -+ depending on what ARGS_TYPE indicates. Test type against option. -+ For CLI print all values. */ -+ if (args_type == MI_PRINT_SIMPLE_VALUES -+ || args_type == MI_PRINT_ALL_VALUES) -+ { -+ struct type *type = NULL; -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ type = check_typedef (value_type (val)); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ return PY_BT_ERROR; -+ } -+ -+ if (args_type == MI_PRINT_ALL_VALUES) -+ should_print = 1; -+ else if (args_type == MI_PRINT_SIMPLE_VALUES -+ && TYPE_CODE (type) != TYPE_CODE_ARRAY -+ && TYPE_CODE (type) != TYPE_CODE_STRUCT -+ && TYPE_CODE (type) != TYPE_CODE_UNION) -+ should_print = 1; -+ } -+ else if (args_type != NO_VALUES) -+ should_print = 1; -+ -+ if (should_print) -+ { -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ struct ui_file *stb; -+ struct cleanup *cleanup; -+ -+ stb = mem_fileopen (); -+ cleanup = make_cleanup_ui_file_delete (stb); -+ common_val_print (val, stb, indent, opts, language); -+ ui_out_field_stream (out, "value", stb); -+ do_cleanups (cleanup); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ return PY_BT_ERROR; -+ } -+ } -+ -+ return PY_BT_OK; -+} -+ -+/* Helper function to call a Python method and extract an iterator -+ from the result. If the function returns anything but an iterator -+ the exception is preserved and NULL is returned. FILTER is the -+ Python object to call, and FUNC is the name of the method. Returns -+ a PyObject, or NULL on error with the appropriate exception set. -+ This function can return an iterator, or NULL. */ -+ -+static PyObject * -+get_py_iter_from_func (PyObject *filter, char *func) -+{ -+ if (PyObject_HasAttrString (filter, func)) -+ { -+ PyObject *result = PyObject_CallMethod (filter, func, NULL); -+ -+ if (result != NULL) -+ { -+ if (result == Py_None) -+ { -+ return result; -+ } -+ else -+ { -+ PyObject *iterator = PyObject_GetIter (result); -+ -+ Py_DECREF (result); -+ return iterator; -+ } -+ } -+ } -+ else -+ Py_RETURN_NONE; -+ -+ return NULL; -+} -+ -+/* Helper function to output a single frame argument and value to an -+ output stream. This function will account for entry values if the -+ FV parameter is populated, the frame argument has entry values -+ associated with them, and the appropriate "set entry-value" -+ options are set. Will output in CLI or MI like format depending -+ on the type of output stream detected. OUT is the output stream, -+ SYM_NAME is the name of the symbol. If SYM_NAME is populated then -+ it must have an accompanying value in the parameter FV. FA is a -+ frame argument structure. If FA is populated, both SYM_NAME and -+ FV are ignored. OPTS contains the value printing options, -+ ARGS_TYPE is an enumerator describing the argument format, -+ PRINT_ARGS_FIELD is a flag which indicates if we output "ARGS=1" -+ in MI output in commands where both arguments and locals are -+ printed. Returns PY_BT_ERROR on error, with any GDB exceptions -+ converted to a Python exception, or PY_BT_OK on success. */ -+ -+static enum py_bt_status -+py_print_single_arg (struct ui_out *out, -+ const char *sym_name, -+ struct frame_arg *fa, -+ struct value *fv, -+ const struct value_print_options *opts, -+ enum py_frame_args args_type, -+ int print_args_field, -+ const struct language_defn *language) -+{ -+ struct value *val; -+ volatile struct gdb_exception except; -+ -+ if (fa != NULL) -+ { -+ language = language_def (SYMBOL_LANGUAGE (fa->sym)); -+ val = fa->val; -+ } -+ else -+ val = fv; -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ struct cleanup *cleanups = make_cleanup (null_cleanup, NULL); -+ -+ /* MI has varying rules for tuples, but generally if there is only -+ one element in each item in the list, do not start a tuple. The -+ exception is -stack-list-variables which emits an ARGS="1" field -+ if the value is a frame argument. This is denoted in this -+ function with PRINT_ARGS_FIELD which is flag from the caller to -+ emit the ARGS field. */ -+ if (ui_out_is_mi_like_p (out)) -+ { -+ if (print_args_field || args_type != NO_VALUES) -+ make_cleanup_ui_out_tuple_begin_end (out, NULL); -+ } -+ -+ annotate_arg_begin (); -+ -+ /* If frame argument is populated, check for entry-values and the -+ entry value options. */ -+ if (fa != NULL) -+ { -+ struct ui_file *stb; -+ -+ stb = mem_fileopen (); -+ make_cleanup_ui_file_delete (stb); -+ fprintf_symbol_filtered (stb, SYMBOL_PRINT_NAME (fa->sym), -+ SYMBOL_LANGUAGE (fa->sym), -+ DMGL_PARAMS | DMGL_ANSI); -+ if (fa->entry_kind == print_entry_values_compact) -+ { -+ fputs_filtered ("=", stb); -+ -+ fprintf_symbol_filtered (stb, SYMBOL_PRINT_NAME (fa->sym), -+ SYMBOL_LANGUAGE (fa->sym), -+ DMGL_PARAMS | DMGL_ANSI); -+ } -+ if (fa->entry_kind == print_entry_values_only -+ || fa->entry_kind == print_entry_values_compact) -+ { -+ fputs_filtered ("@entry", stb); -+ } -+ ui_out_field_stream (out, "name", stb); -+ } -+ else -+ /* Otherwise, just output the name. */ -+ ui_out_field_string (out, "name", sym_name); -+ -+ annotate_arg_name_end (); -+ -+ if (! ui_out_is_mi_like_p (out)) -+ ui_out_text (out, "="); -+ -+ if (print_args_field) -+ ui_out_field_int (out, "arg", 1); -+ -+ /* For MI print the type, but only for simple values. This seems -+ weird, but this is how MI choose to format the various output -+ types. */ -+ if (args_type == MI_PRINT_SIMPLE_VALUES) -+ { -+ if (py_print_type (out, val) == PY_BT_ERROR) -+ { -+ do_cleanups (cleanups); -+ goto error; -+ } -+ } -+ -+ annotate_arg_value (value_type (val)); -+ -+ /* If the output is to the CLI, and the user option "set print -+ frame-arguments" is set to none, just output "...". */ -+ if (! ui_out_is_mi_like_p (out) && args_type == NO_VALUES) -+ ui_out_field_string (out, "value", "..."); -+ else -+ { -+ /* Otherwise, print the value for both MI and the CLI, except -+ for the case of MI_PRINT_NO_VALUES. */ -+ if (args_type != NO_VALUES) -+ { -+ if (py_print_value (out, val, opts, 0, args_type, language) -+ == PY_BT_ERROR) -+ { -+ do_cleanups (cleanups); -+ goto error; -+ } -+ } -+ } -+ -+ do_cleanups (cleanups); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ -+ return PY_BT_OK; -+ -+ error: -+ return PY_BT_ERROR; -+} -+ -+/* Helper function to loop over frame arguments provided by the -+ "frame_arguments" Python API. Elements in the iterator must -+ conform to the "Symbol Value" interface. ITER is the Python -+ iterable object, OUT is the output stream, ARGS_TYPE is an -+ enumerator describing the argument format, PRINT_ARGS_FIELD is a -+ flag which indicates if we output "ARGS=1" in MI output in commands -+ where both arguments and locals are printed, and FRAME is the -+ backing frame. Returns PY_BT_ERROR on error, with any GDB -+ exceptions converted to a Python exception, or PY_BT_OK on -+ success. */ -+ -+static enum py_bt_status -+enumerate_args (PyObject *iter, -+ struct ui_out *out, -+ enum py_frame_args args_type, -+ int print_args_field, -+ struct frame_info *frame) -+{ -+ PyObject *item; -+ struct value_print_options opts; -+ volatile struct gdb_exception except; -+ -+ get_user_print_options (&opts); -+ -+ if (args_type == CLI_SCALAR_VALUES) -+ { -+ /* True in "summary" mode, false otherwise. */ -+ opts.summary = 1; -+ } -+ -+ opts.deref_ref = 1; -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ annotate_frame_args (); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ -+ /* Collect the first argument outside of the loop, so output of -+ commas in the argument output is correct. At the end of the -+ loop block collect another item from the iterator, and, if it is -+ not null emit a comma. */ -+ item = PyIter_Next (iter); -+ if (item == NULL && PyErr_Occurred ()) -+ goto error; -+ -+ while (item) -+ { -+ const struct language_defn *language; -+ char *sym_name; -+ struct symbol *sym; -+ struct value *val; -+ enum py_bt_status success = PY_BT_ERROR; -+ -+ success = extract_sym (item, &sym_name, &sym, &language); -+ if (success == PY_BT_ERROR) -+ { -+ Py_DECREF (item); -+ goto error; -+ } -+ -+ success = extract_value (item, &val); -+ if (success == PY_BT_ERROR) -+ { -+ xfree (sym_name); -+ Py_DECREF (item); -+ goto error; -+ } -+ -+ Py_DECREF (item); -+ item = NULL; -+ -+ if (sym && ui_out_is_mi_like_p (out) -+ && ! mi_should_print (sym, MI_PRINT_ARGS)) -+ { -+ xfree (sym_name); -+ continue; -+ } -+ -+ /* If the object did not provide a value, read it using -+ read_frame_args and account for entry values, if any. */ -+ if (val == NULL) -+ { -+ struct frame_arg arg, entryarg; -+ -+ /* If there is no value, and also no symbol, set error and -+ exit. */ -+ if (sym == NULL) -+ { -+ PyErr_SetString (PyExc_RuntimeError, -+ _("No symbol or value provided.")); -+ xfree (sym_name); -+ goto error; -+ } -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ read_frame_arg (sym, frame, &arg, &entryarg); -+ } -+ if (except.reason < 0) -+ { -+ xfree (sym_name); -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ -+ /* The object has not provided a value, so this is a frame -+ argument to be read by GDB. In this case we have to -+ account for entry-values. */ -+ -+ if (arg.entry_kind != print_entry_values_only) -+ { -+ if (py_print_single_arg (out, NULL, &arg, -+ NULL, &opts, -+ args_type, -+ print_args_field, -+ NULL) == PY_BT_ERROR) -+ { -+ xfree (arg.error); -+ xfree (entryarg.error); -+ xfree (sym_name); -+ goto error; -+ } -+ } -+ -+ if (entryarg.entry_kind != print_entry_values_no) -+ { -+ if (arg.entry_kind != print_entry_values_only) -+ { -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ ui_out_text (out, ", "); -+ ui_out_wrap_hint (out, " "); -+ } -+ if (except.reason < 0) -+ { -+ xfree (arg.error); -+ xfree (entryarg.error); -+ xfree (sym_name); -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ -+ if (py_print_single_arg (out, NULL, &entryarg, NULL, -+ &opts, args_type, -+ print_args_field, NULL) == PY_BT_ERROR) -+ { -+ xfree (arg.error); -+ xfree (entryarg.error); -+ xfree (sym_name); -+ goto error; -+ } -+ } -+ -+ xfree (arg.error); -+ xfree (entryarg.error); -+ } -+ else -+ { -+ /* If the object has provided a value, we just print that. */ -+ if (val != NULL) -+ { -+ if (py_print_single_arg (out, sym_name, NULL, val, &opts, -+ args_type, print_args_field, -+ language) == PY_BT_ERROR) -+ { -+ xfree (sym_name); -+ goto error; -+ } -+ } -+ } -+ -+ xfree (sym_name); -+ -+ /* Collect the next item from the iterator. If -+ this is the last item, do not print the -+ comma. */ -+ item = PyIter_Next (iter); -+ if (item != NULL) -+ { -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ ui_out_text (out, ", "); -+ } -+ if (except.reason < 0) -+ { -+ Py_DECREF (item); -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ else if (PyErr_Occurred ()) -+ goto error; -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ annotate_arg_end (); -+ } -+ if (except.reason < 0) -+ { -+ Py_DECREF (item); -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ -+ return PY_BT_OK; -+ -+ error: -+ return PY_BT_ERROR; -+} -+ -+ -+/* Helper function to loop over variables provided by the -+ "frame_locals" Python API. Elements in the iterable must conform -+ to the "Symbol Value" interface. ITER is the Python iterable -+ object, OUT is the output stream, INDENT is whether we should -+ indent the output (for CLI), ARGS_TYPE is an enumerator describing -+ the argument format, PRINT_ARGS_FIELD is flag which indicates -+ whether to output the ARGS field in the case of -+ -stack-list-variables and FRAME is the backing frame. Returns -+ PY_BT_ERROR on error, with any GDB exceptions converted to a Python -+ exception, or PY_BT_OK on success. */ -+ -+static enum py_bt_status -+enumerate_locals (PyObject *iter, -+ struct ui_out *out, -+ int indent, -+ enum py_frame_args args_type, -+ int print_args_field, -+ struct frame_info *frame) -+{ -+ PyObject *item; -+ struct value_print_options opts; -+ -+ get_user_print_options (&opts); -+ opts.deref_ref = 1; -+ -+ while ((item = PyIter_Next (iter))) -+ { -+ const struct language_defn *language; -+ char *sym_name; -+ struct value *val; -+ enum py_bt_status success = PY_BT_ERROR; -+ struct symbol *sym; -+ volatile struct gdb_exception except; -+ int local_indent = 8 + (8 * indent); -+ struct cleanup *locals_cleanups; -+ -+ locals_cleanups = make_cleanup_py_decref (item); -+ -+ success = extract_sym (item, &sym_name, &sym, &language); -+ if (success == PY_BT_ERROR) -+ { -+ do_cleanups (locals_cleanups); -+ goto error; -+ } -+ -+ make_cleanup (xfree, sym_name); -+ -+ success = extract_value (item, &val); -+ if (success == PY_BT_ERROR) -+ { -+ do_cleanups (locals_cleanups); -+ goto error; -+ } -+ -+ if (sym != NULL && ui_out_is_mi_like_p (out) -+ && ! mi_should_print (sym, MI_PRINT_LOCALS)) -+ { -+ do_cleanups (locals_cleanups); -+ continue; -+ } -+ -+ /* If the object did not provide a value, read it. */ -+ if (val == NULL) -+ { -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ val = read_var_value (sym, frame); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ do_cleanups (locals_cleanups); -+ goto error; -+ } -+ } -+ -+ /* With PRINT_NO_VALUES, MI does not emit a tuple normally as -+ each output contains only one field. The exception is -+ -stack-list-variables, which always provides a tuple. */ -+ if (ui_out_is_mi_like_p (out)) -+ { -+ if (print_args_field || args_type != NO_VALUES) -+ make_cleanup_ui_out_tuple_begin_end (out, NULL); -+ } -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ if (! ui_out_is_mi_like_p (out)) -+ { -+ /* If the output is not MI we indent locals. */ -+ ui_out_spaces (out, local_indent); -+ } -+ -+ ui_out_field_string (out, "name", sym_name); -+ -+ if (! ui_out_is_mi_like_p (out)) -+ ui_out_text (out, " = "); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ do_cleanups (locals_cleanups); -+ goto error; -+ } -+ -+ if (args_type == MI_PRINT_SIMPLE_VALUES) -+ { -+ if (py_print_type (out, val) == PY_BT_ERROR) -+ { -+ do_cleanups (locals_cleanups); -+ goto error; -+ } -+ } -+ -+ /* CLI always prints values for locals. MI uses the -+ simple/no/all system. */ -+ if (! ui_out_is_mi_like_p (out)) -+ { -+ int val_indent = (indent + 1) * 4; -+ -+ if (py_print_value (out, val, &opts, val_indent, args_type, -+ language) == PY_BT_ERROR) -+ { -+ do_cleanups (locals_cleanups); -+ goto error; -+ } -+ } -+ else -+ { -+ if (args_type != NO_VALUES) -+ { -+ if (py_print_value (out, val, &opts, 0, args_type, -+ language) == PY_BT_ERROR) -+ { -+ do_cleanups (locals_cleanups); -+ goto error; -+ } -+ } -+ } -+ -+ do_cleanups (locals_cleanups); -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ ui_out_text (out, "\n"); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ -+ if (item == NULL && PyErr_Occurred ()) -+ goto error; -+ -+ return PY_BT_OK; -+ -+ error: -+ return PY_BT_ERROR; -+} -+ -+/* Helper function for -stack-list-variables. Returns PY_BT_ERROR on -+ error, or PY_BT_OK on success. */ -+ -+static enum py_bt_status -+py_mi_print_variables (PyObject *filter, struct ui_out *out, -+ struct value_print_options *opts, -+ enum py_frame_args args_type, -+ struct frame_info *frame) -+{ -+ struct cleanup *old_chain; -+ PyObject *args_iter; -+ PyObject *locals_iter; -+ -+ args_iter = get_py_iter_from_func (filter, "frame_args"); -+ old_chain = make_cleanup_py_xdecref (args_iter); -+ if (args_iter == NULL) -+ goto error; -+ -+ locals_iter = get_py_iter_from_func (filter, "frame_locals"); -+ if (locals_iter == NULL) -+ goto error; -+ -+ make_cleanup_py_decref (locals_iter); -+ make_cleanup_ui_out_list_begin_end (out, "variables"); -+ -+ if (args_iter != Py_None) -+ if (enumerate_args (args_iter, out, args_type, 1, frame) == PY_BT_ERROR) -+ goto error; -+ -+ if (locals_iter != Py_None) -+ if (enumerate_locals (locals_iter, out, 1, args_type, 1, frame) -+ == PY_BT_ERROR) -+ goto error; -+ -+ do_cleanups (old_chain); -+ return PY_BT_OK; -+ -+ error: -+ do_cleanups (old_chain); -+ return PY_BT_ERROR; -+} -+ -+/* Helper function for printing locals. This function largely just -+ creates the wrapping tuple, and calls enumerate_locals. Returns -+ PY_BT_ERROR on error, or PY_BT_OK on success.*/ -+ -+static enum py_bt_status -+py_print_locals (PyObject *filter, -+ struct ui_out *out, -+ enum py_frame_args args_type, -+ int indent, -+ struct frame_info *frame) -+{ -+ PyObject *locals_iter = get_py_iter_from_func (filter, -+ "frame_locals"); -+ struct cleanup *old_chain = make_cleanup_py_xdecref (locals_iter); -+ -+ if (locals_iter == NULL) -+ goto locals_error; -+ -+ make_cleanup_ui_out_list_begin_end (out, "locals"); -+ -+ if (locals_iter != Py_None) -+ if (enumerate_locals (locals_iter, out, indent, args_type, -+ 0, frame) == PY_BT_ERROR) -+ goto locals_error; -+ -+ do_cleanups (old_chain); -+ return PY_BT_OK;; -+ -+ locals_error: -+ do_cleanups (old_chain); -+ return PY_BT_ERROR; -+} -+ -+/* Helper function for printing frame arguments. This function -+ largely just creates the wrapping tuple, and calls enumerate_args. -+ Returns PY_BT_ERROR on error, with any GDB exceptions converted to -+ a Python exception, or PY_BT_OK on success. */ -+ -+static enum py_bt_status -+py_print_args (PyObject *filter, -+ struct ui_out *out, -+ enum py_frame_args args_type, -+ struct frame_info *frame) -+{ -+ PyObject *args_iter = get_py_iter_from_func (filter, "frame_args"); -+ struct cleanup *old_chain = make_cleanup_py_xdecref (args_iter); -+ volatile struct gdb_exception except; -+ -+ if (args_iter == NULL) -+ goto args_error; -+ -+ make_cleanup_ui_out_list_begin_end (out, "args"); -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ annotate_frame_args (); -+ if (! ui_out_is_mi_like_p (out)) -+ ui_out_text (out, " ("); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto args_error; -+ } -+ -+ if (args_iter != Py_None) -+ if (enumerate_args (args_iter, out, args_type, 0, frame) == PY_BT_ERROR) -+ goto args_error; -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ if (! ui_out_is_mi_like_p (out)) -+ ui_out_text (out, ")"); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto args_error; -+ } -+ -+ do_cleanups (old_chain); -+ return PY_BT_OK; -+ -+ args_error: -+ do_cleanups (old_chain); -+ return PY_BT_ERROR; -+} -+ -+/* Print a single frame to the designated output stream, detecting -+ whether the output is MI or console, and formatting the output -+ according to the conventions of that protocol. FILTER is the -+ frame-filter associated with this frame. FLAGS is an integer -+ describing the various print options. The FLAGS variables is -+ described in "apply_frame_filter" function. ARGS_TYPE is an -+ enumerator describing the argument format. OUT is the output -+ stream to print, INDENT is the level of indention for this frame -+ (in the case of elided frames), and LEVELS_PRINTED is a hash-table -+ containing all the frames level that have already been printed. -+ If a frame level has been printed, do not print it again (in the -+ case of elided frames). Returns PY_BT_ERROR on error, with any -+ GDB exceptions converted to a Python exception, or PY_BT_COMPLETED -+ on success. */ -+ -+static enum py_bt_status -+py_print_frame (PyObject *filter, int flags, enum py_frame_args args_type, -+ struct ui_out *out, int indent, htab_t levels_printed) -+{ -+ int has_addr = 0; -+ CORE_ADDR address = 0; -+ struct gdbarch *gdbarch = NULL; -+ struct frame_info *frame = NULL; -+ struct cleanup *cleanup_stack = make_cleanup (null_cleanup, NULL); -+ struct value_print_options opts; -+ PyObject *py_inf_frame, *elided; -+ int print_level, print_frame_info, print_args, print_locals; -+ volatile struct gdb_exception except; -+ -+ /* Extract print settings from FLAGS. */ -+ print_level = (flags & PRINT_LEVEL) ? 1 : 0; -+ print_frame_info = (flags & PRINT_FRAME_INFO) ? 1 : 0; -+ print_args = (flags & PRINT_ARGS) ? 1 : 0; -+ print_locals = (flags & PRINT_LOCALS) ? 1 : 0; -+ -+ get_user_print_options (&opts); -+ -+ /* Get the underlying frame. This is needed to determine GDB -+ architecture, and also, in the cases of frame variables/arguments to -+ read them if they returned filter object requires us to do so. */ -+ py_inf_frame = PyObject_CallMethod (filter, "inferior_frame", NULL); -+ if (py_inf_frame == NULL) -+ goto error; -+ -+ frame = frame_object_to_frame_info (py_inf_frame);; -+ -+ Py_DECREF (py_inf_frame); -+ -+ if (frame == NULL) -+ goto error; -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ gdbarch = get_frame_arch (frame); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ -+ -+ /* stack-list-variables. */ -+ if (print_locals && print_args && ! print_frame_info) -+ { -+ if (py_mi_print_variables (filter, out, &opts, -+ args_type, frame) == PY_BT_ERROR) -+ goto error; -+ else -+ { -+ do_cleanups (cleanup_stack); -+ return PY_BT_COMPLETED; -+ } -+ } -+ -+ /* -stack-list-locals does not require a -+ wrapping frame attribute. */ -+ if (print_frame_info || (print_args && ! print_locals)) -+ make_cleanup_ui_out_tuple_begin_end (out, "frame"); -+ -+ if (print_frame_info) -+ { -+ /* Elided frames are also printed with this function (recursively) -+ and are printed with indention. */ -+ if (indent > 0) -+ { -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ ui_out_spaces (out, indent*4); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ -+ /* The address is required for frame annotations, and also for -+ address printing. */ -+ if (PyObject_HasAttrString (filter, "address")) -+ { -+ PyObject *paddr = PyObject_CallMethod (filter, "address", NULL); -+ if (paddr != NULL) -+ { -+ if (paddr != Py_None) -+ { -+ address = PyLong_AsLong (paddr); -+ has_addr = 1; -+ } -+ Py_DECREF (paddr); -+ } -+ else -+ goto error; -+ } -+ } -+ -+ /* Print frame level. MI does not require the level if -+ locals/variables only are being printed. */ -+ if ((print_frame_info || print_args) && print_level) -+ { -+ struct frame_info **slot; -+ int level; -+ volatile struct gdb_exception except; -+ -+ slot = (struct frame_info **) htab_find_slot (levels_printed, -+ frame, INSERT); -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ level = frame_relative_level (frame); -+ -+ /* Check if this frame has already been printed (there are cases -+ where elided synthetic dummy-frames have to 'borrow' the frame -+ architecture from the eliding frame. If that is the case, do -+ not print 'level', but print spaces. */ -+ if (*slot == frame) -+ ui_out_field_skip (out, "level"); -+ else -+ { -+ *slot = frame; -+ annotate_frame_begin (print_level ? level : 0, -+ gdbarch, address); -+ ui_out_text (out, "#"); -+ ui_out_field_fmt_int (out, 2, ui_left, "level", -+ level); -+ } -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ -+ if (print_frame_info) -+ { -+ /* Print address to the address field. If an address is not provided, -+ print nothing. */ -+ if (opts.addressprint && has_addr) -+ { -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ annotate_frame_address (); -+ ui_out_field_core_addr (out, "addr", gdbarch, address); -+ annotate_frame_address_end (); -+ ui_out_text (out, " in "); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ -+ /* Print frame function name. */ -+ if (PyObject_HasAttrString (filter, "function")) -+ { -+ PyObject *py_func = PyObject_CallMethod (filter, "function", NULL); -+ -+ if (py_func != NULL) -+ { -+ const char *function = NULL; -+ -+ if (gdbpy_is_string (py_func)) -+ { -+ function = PyString_AsString (py_func); -+ -+ if (function == NULL) -+ { -+ Py_DECREF (py_func); -+ goto error; -+ } -+ } -+ else if (PyLong_Check (py_func)) -+ { -+ CORE_ADDR addr = PyLong_AsUnsignedLongLong (py_func); -+ struct minimal_symbol *msymbol; -+ -+ if (PyErr_Occurred ()) -+ goto error; -+ -+ msymbol = lookup_minimal_symbol_by_pc (addr); -+ if (msymbol != NULL) -+ function = SYMBOL_PRINT_NAME (msymbol); -+ } -+ else if (py_func != Py_None) -+ { -+ PyErr_SetString (PyExc_RuntimeError, -+ _("FrameDecorator.function: expecting a " \ -+ "String, integer or None.")); -+ Py_DECREF (py_func); -+ goto error; -+ } -+ -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ annotate_frame_function_name (); -+ if (function == NULL) -+ ui_out_field_skip (out, "func"); -+ else -+ ui_out_field_string (out, "func", function); -+ } -+ if (except.reason < 0) -+ { -+ Py_DECREF (py_func); -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ Py_DECREF (py_func); -+ } -+ else -+ goto error; -+ } -+ -+ -+ /* Frame arguments. Check the result, and error if something went -+ wrong. */ -+ if (print_args) -+ { -+ if (py_print_args (filter, out, args_type, frame) == PY_BT_ERROR) -+ goto error; -+ } -+ -+ /* File name/source/line number information. */ -+ if (print_frame_info) -+ { -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ annotate_frame_source_begin (); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ -+ if (PyObject_HasAttrString (filter, "filename")) -+ { -+ PyObject *py_fn = PyObject_CallMethod (filter, "filename", -+ NULL); -+ if (py_fn != NULL) -+ { -+ if (py_fn != Py_None) -+ { -+ char *filename = PyString_AsString (py_fn); -+ -+ if (filename == NULL) -+ { -+ Py_DECREF (py_fn); -+ goto error; -+ } -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ ui_out_wrap_hint (out, " "); -+ ui_out_text (out, " at "); -+ annotate_frame_source_file (); -+ ui_out_field_string (out, "file", filename); -+ annotate_frame_source_file_end (); -+ } -+ if (except.reason < 0) -+ { -+ Py_DECREF (py_fn); -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ Py_DECREF (py_fn); -+ } -+ else -+ goto error; -+ } -+ -+ if (PyObject_HasAttrString (filter, "line")) -+ { -+ PyObject *py_line = PyObject_CallMethod (filter, "line", NULL); -+ int line; -+ -+ if (py_line != NULL) -+ { -+ if (py_line != Py_None) -+ { -+ line = PyLong_AsLong (py_line); -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ ui_out_text (out, ":"); -+ annotate_frame_source_line (); -+ ui_out_field_int (out, "line", line); -+ } -+ if (except.reason < 0) -+ { -+ Py_DECREF (py_line); -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ Py_DECREF (py_line); -+ } -+ else -+ goto error; -+ } -+ } -+ -+ /* For MI we need to deal with the "children" list population of -+ elided frames, so if MI output detected do not send newline. */ -+ if (! ui_out_is_mi_like_p (out)) -+ { -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ annotate_frame_end (); -+ ui_out_text (out, "\n"); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ } -+ -+ if (print_locals) -+ { -+ if (py_print_locals (filter, out, args_type, indent, -+ frame) == PY_BT_ERROR) -+ goto error; -+ } -+ -+ /* Finally recursively print elided frames, if any. */ -+ elided = get_py_iter_from_func (filter, "elided"); -+ if (elided == NULL) -+ goto error; -+ -+ make_cleanup_py_decref (elided); -+ if (elided != Py_None) -+ { -+ PyObject *item; -+ -+ make_cleanup_ui_out_list_begin_end (out, "children"); -+ -+ if (! ui_out_is_mi_like_p (out)) -+ indent++; -+ -+ while ((item = PyIter_Next (elided))) -+ { -+ enum py_bt_status success = py_print_frame (item, flags, -+ args_type, out, -+ indent, -+ levels_printed); -+ -+ if (success == PY_BT_ERROR) -+ { -+ Py_DECREF (item); -+ goto error; -+ } -+ -+ Py_DECREF (item); -+ } -+ if (item == NULL && PyErr_Occurred ()) -+ goto error; -+ } -+ -+ -+ do_cleanups (cleanup_stack); -+ return PY_BT_COMPLETED; -+ -+ error: -+ do_cleanups (cleanup_stack); -+ return PY_BT_ERROR; -+} -+ -+/* Helper function to initiate frame filter invocation at starting -+ frame FRAME. */ -+ -+static PyObject * -+bootstrap_python_frame_filters (struct frame_info *frame, -+ int frame_low, int frame_high) -+{ -+ struct cleanup *cleanups = -+ make_cleanup (null_cleanup, NULL); -+ PyObject *module, *sort_func, *iterable, *frame_obj, *iterator; -+ PyObject *py_frame_low, *py_frame_high; -+ -+ frame_obj = frame_info_to_frame_object (frame); -+ if (frame_obj == NULL) -+ goto error; -+ make_cleanup_py_decref (frame_obj); -+ -+ module = PyImport_ImportModule ("gdb.frames"); -+ if (module == NULL) -+ goto error; -+ make_cleanup_py_decref (module); -+ -+ sort_func = PyObject_GetAttrString (module, "execute_frame_filters"); -+ if (sort_func == NULL) -+ goto error; -+ make_cleanup_py_decref (sort_func); -+ -+ py_frame_low = PyInt_FromLong (frame_low); -+ if (py_frame_low == NULL) -+ goto error; -+ make_cleanup_py_decref (py_frame_low); -+ -+ py_frame_high = PyInt_FromLong (frame_high); -+ if (py_frame_high == NULL) -+ goto error; -+ make_cleanup_py_decref (py_frame_high); -+ -+ iterable = PyObject_CallFunctionObjArgs (sort_func, frame_obj, -+ py_frame_low, -+ py_frame_high, -+ NULL); -+ if (iterable == NULL) -+ goto error; -+ -+ do_cleanups (cleanups); -+ -+ if (iterable != Py_None) -+ { -+ iterator = PyObject_GetIter (iterable); -+ Py_DECREF (iterable); -+ } -+ else -+ { -+ return iterable; -+ } -+ -+ return iterator; -+ -+ error: -+ do_cleanups (cleanups); -+ return NULL; -+} -+ -+/* This is the only publicly exported function in this file. FRAME -+ is the source frame to start frame-filter invocation. FLAGS is an -+ integer holding the flags for printing. The following elements of -+ the FRAME_FILTER_FLAGS enum denotes the make-up of FLAGS: -+ PRINT_LEVEL is a flag indicating whether to print the frame's -+ relative level in the output. PRINT_FRAME_INFO is a flag that -+ indicates whether this function should print the frame -+ information, PRINT_ARGS is a flag that indicates whether to print -+ frame arguments, and PRINT_LOCALS, likewise, with frame local -+ variables. ARGS_TYPE is an enumerator describing the argument -+ format, OUT is the output stream to print. FRAME_LOW is the -+ beginning of the slice of frames to print, and FRAME_HIGH is the -+ upper limit of the frames to count. Returns PY_BT_ERROR on error, -+ or PY_BT_COMPLETED on success.*/ -+ -+enum py_bt_status -+apply_frame_filter (struct frame_info *frame, int flags, -+ enum py_frame_args args_type, -+ struct ui_out *out, int frame_low, -+ int frame_high) -+ -+{ -+ struct gdbarch *gdbarch = NULL; -+ struct cleanup *cleanups; -+ enum py_bt_status success = PY_BT_ERROR; -+ PyObject *iterable; -+ volatile struct gdb_exception except; -+ PyObject *item; -+ htab_t levels_printed; -+ -+ cleanups = ensure_python_env (gdbarch, current_language); -+ -+ TRY_CATCH (except, RETURN_MASK_ALL) -+ { -+ gdbarch = get_frame_arch (frame); -+ } -+ if (except.reason < 0) -+ { -+ gdbpy_convert_exception (except); -+ goto error; -+ } -+ -+ iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high); -+ -+ if (iterable == NULL) -+ goto error; -+ -+ /* If iterable is None, then there are no frame filters registered. -+ If this is the case, defer to default GDB printing routines in MI -+ and CLI. */ -+ make_cleanup_py_decref (iterable); -+ if (iterable == Py_None) -+ { -+ success = PY_BT_NO_FILTERS; -+ goto done; -+ } -+ -+ levels_printed = htab_create (20, -+ htab_hash_pointer, -+ htab_eq_pointer, -+ NULL); -+ make_cleanup_htab_delete (levels_printed); -+ -+ while ((item = PyIter_Next (iterable))) -+ { -+ success = py_print_frame (item, flags, args_type, out, 0, -+ levels_printed); -+ -+ /* Do not exit on error printing a single frame. Print the -+ error and continue with other frames. */ -+ if (success == PY_BT_ERROR) -+ gdbpy_print_stack (); -+ -+ Py_DECREF (item); -+ } -+ -+ if (item == NULL && PyErr_Occurred ()) -+ goto error; -+ -+ done: -+ do_cleanups (cleanups); -+ return success; -+ -+ error: -+ gdbpy_print_stack (); -+ do_cleanups (cleanups); -+ return PY_BT_ERROR; -+} -Index: gdb-7.6/gdb/python/py-objfile.c -=================================================================== ---- gdb-7.6.orig/gdb/python/py-objfile.c 2013-06-10 14:31:02.731084652 +0200 -+++ gdb-7.6/gdb/python/py-objfile.c 2013-06-10 14:31:08.366082437 +0200 -@@ -33,6 +33,8 @@ typedef struct - /* The pretty-printer list of functions. */ - PyObject *printers; - -+ /* The frame filter list of functions. */ -+ PyObject *frame_filters; - /* The type-printer list. */ - PyObject *type_printers; - } objfile_object; -@@ -61,6 +63,7 @@ objfpy_dealloc (PyObject *o) - objfile_object *self = (objfile_object *) o; - - Py_XDECREF (self->printers); -+ Py_XDECREF (self->frame_filters); - Py_XDECREF (self->type_printers); - Py_TYPE (self)->tp_free (self); - } -@@ -81,6 +84,13 @@ objfpy_new (PyTypeObject *type, PyObject - return NULL; - } - -+ self->frame_filters = PyDict_New (); -+ if (!self->frame_filters) -+ { -+ Py_DECREF (self); -+ return NULL; -+ } -+ - self->type_printers = PyList_New (0); - if (!self->type_printers) - { -@@ -129,6 +139,47 @@ objfpy_set_printers (PyObject *o, PyObje - return 0; - } - -+/* Return the Python dictionary attribute containing frame filters for -+ this object file. */ -+PyObject * -+objfpy_get_frame_filters (PyObject *o, void *ignore) -+{ -+ objfile_object *self = (objfile_object *) o; -+ -+ Py_INCREF (self->frame_filters); -+ return self->frame_filters; -+} -+ -+/* Set this object file's frame filters dictionary to FILTERS. */ -+static int -+objfpy_set_frame_filters (PyObject *o, PyObject *filters, void *ignore) -+{ -+ PyObject *tmp; -+ objfile_object *self = (objfile_object *) o; -+ -+ if (! filters) -+ { -+ PyErr_SetString (PyExc_TypeError, -+ _("Cannot delete the frame filters attribute.")); -+ return -1; -+ } -+ -+ if (! PyDict_Check (filters)) -+ { -+ PyErr_SetString (PyExc_TypeError, -+ _("The frame_filters attribute must be a dictionary.")); -+ return -1; -+ } -+ -+ /* Take care in case the LHS and RHS are related somehow. */ -+ tmp = self->frame_filters; -+ Py_INCREF (filters); -+ self->frame_filters = filters; -+ Py_XDECREF (tmp); -+ -+ return 0; -+} -+ - /* Get the 'type_printers' attribute. */ - - static PyObject * -@@ -225,6 +276,13 @@ objfile_to_objfile_object (struct objfil - return NULL; - } - -+ object->frame_filters = PyDict_New (); -+ if (!object->frame_filters) -+ { -+ Py_DECREF (object); -+ return NULL; -+ } -+ - object->type_printers = PyList_New (0); - if (!object->type_printers) - { -@@ -270,6 +328,8 @@ static PyGetSetDef objfile_getset[] = - "The objfile's filename, or None.", NULL }, - { "pretty_printers", objfpy_get_printers, objfpy_set_printers, - "Pretty printers.", NULL }, -+ { "frame_filters", objfpy_get_frame_filters, -+ objfpy_set_frame_filters, "Frame Filters.", NULL }, - { "type_printers", objfpy_get_type_printers, objfpy_set_type_printers, - "Type printers.", NULL }, - { NULL } -Index: gdb-7.6/gdb/python/py-progspace.c -=================================================================== ---- gdb-7.6.orig/gdb/python/py-progspace.c 2013-06-10 14:31:02.731084652 +0200 -+++ gdb-7.6/gdb/python/py-progspace.c 2013-06-10 14:31:08.366082437 +0200 -@@ -35,6 +35,8 @@ typedef struct - /* The pretty-printer list of functions. */ - PyObject *printers; - -+ /* The frame filter list of functions. */ -+ PyObject *frame_filters; - /* The type-printer list. */ - PyObject *type_printers; - } pspace_object; -@@ -69,6 +71,7 @@ pspy_dealloc (PyObject *self) - pspace_object *ps_self = (pspace_object *) self; - - Py_XDECREF (ps_self->printers); -+ Py_XDECREF (ps_self->frame_filters); - Py_XDECREF (ps_self->type_printers); - Py_TYPE (self)->tp_free (self); - } -@@ -89,6 +92,13 @@ pspy_new (PyTypeObject *type, PyObject * - return NULL; - } - -+ self->frame_filters = PyDict_New (); -+ if (!self->frame_filters) -+ { -+ Py_DECREF (self); -+ return NULL; -+ } -+ - self->type_printers = PyList_New (0); - if (!self->type_printers) - { -@@ -137,6 +147,47 @@ pspy_set_printers (PyObject *o, PyObject - return 0; - } - -+/* Return the Python dictionary attribute containing frame filters for -+ this program space. */ -+PyObject * -+pspy_get_frame_filters (PyObject *o, void *ignore) -+{ -+ pspace_object *self = (pspace_object *) o; -+ -+ Py_INCREF (self->frame_filters); -+ return self->frame_filters; -+} -+ -+/* Set this object file's frame filters dictionary to FILTERS. */ -+static int -+pspy_set_frame_filters (PyObject *o, PyObject *frame, void *ignore) -+{ -+ PyObject *tmp; -+ pspace_object *self = (pspace_object *) o; -+ -+ if (! frame) -+ { -+ PyErr_SetString (PyExc_TypeError, -+ "cannot delete the frame filter attribute"); -+ return -1; -+ } -+ -+ if (! PyDict_Check (frame)) -+ { -+ PyErr_SetString (PyExc_TypeError, -+ "the frame filter attribute must be a dictionary"); -+ return -1; -+ } -+ -+ /* Take care in case the LHS and RHS are related somehow. */ -+ tmp = self->frame_filters; -+ Py_INCREF (frame); -+ self->frame_filters = frame; -+ Py_XDECREF (tmp); -+ -+ return 0; -+} -+ - /* Get the 'type_printers' attribute. */ - - static PyObject * -@@ -221,6 +272,13 @@ pspace_to_pspace_object (struct program_ - return NULL; - } - -+ object->frame_filters = PyDict_New (); -+ if (!object->frame_filters) -+ { -+ Py_DECREF (object); -+ return NULL; -+ } -+ - object->type_printers = PyList_New (0); - if (!object->type_printers) - { -@@ -257,6 +315,8 @@ static PyGetSetDef pspace_getset[] = - "The progspace's main filename, or None.", NULL }, - { "pretty_printers", pspy_get_printers, pspy_set_printers, - "Pretty printers.", NULL }, -+ { "frame_filters", pspy_get_frame_filters, pspy_set_frame_filters, -+ "Frame filters.", NULL }, - { "type_printers", pspy_get_type_printers, pspy_set_type_printers, - "Type printers.", NULL }, - { NULL } -Index: gdb-7.6/gdb/python/py-utils.c -=================================================================== ---- gdb-7.6.orig/gdb/python/py-utils.c 2013-06-10 14:31:02.732084652 +0200 -+++ gdb-7.6/gdb/python/py-utils.c 2013-06-10 14:31:08.366082437 +0200 -@@ -48,6 +48,28 @@ make_cleanup_py_decref (PyObject *py) - return make_cleanup (py_decref, (void *) py); - } - -+/* This is a cleanup function which decrements the refcount on a -+ Python object. This function accounts appropriately for NULL -+ references. */ -+ -+static void -+py_xdecref (void *p) -+{ -+ PyObject *py = p; -+ -+ Py_XDECREF (py); -+} -+ -+/* Return a new cleanup which will decrement the Python object's -+ refcount when run. Account for and operate on NULL references -+ correctly. */ -+ -+struct cleanup * -+make_cleanup_py_xdecref (PyObject *py) -+{ -+ return make_cleanup (py_xdecref, py); -+} -+ - /* Converts a Python 8-bit string to a unicode string object. Assumes the - 8-bit string is in the host charset. If an error occurs during conversion, - returns NULL with a python exception set. -Index: gdb-7.6/gdb/python/python-internal.h -=================================================================== ---- gdb-7.6.orig/gdb/python/python-internal.h 2013-06-10 14:31:02.732084652 +0200 -+++ gdb-7.6/gdb/python/python-internal.h 2013-06-10 14:31:08.367082436 +0200 -@@ -251,9 +251,11 @@ PyObject *frame_info_to_frame_object (st - - PyObject *pspace_to_pspace_object (struct program_space *); - PyObject *pspy_get_printers (PyObject *, void *); -+PyObject *pspy_get_frame_filters (PyObject *, void *); - - PyObject *objfile_to_objfile_object (struct objfile *); - PyObject *objfpy_get_printers (PyObject *, void *); -+PyObject *objfpy_get_frame_filters (PyObject *, void *); - - PyObject *gdbarch_to_arch_object (struct gdbarch *gdbarch); - -@@ -304,6 +306,7 @@ void gdbpy_initialize_new_objfile_event - void gdbpy_initialize_arch (void); - - struct cleanup *make_cleanup_py_decref (PyObject *py); -+struct cleanup *make_cleanup_py_xdecref (PyObject *py); - - struct cleanup *ensure_python_env (struct gdbarch *gdbarch, - const struct language_defn *language); -Index: gdb-7.6/gdb/python/python.c -=================================================================== ---- gdb-7.6.orig/gdb/python/python.c 2013-06-10 14:31:02.732084652 +0200 -+++ gdb-7.6/gdb/python/python.c 2013-06-10 14:31:08.367082436 +0200 -@@ -1442,6 +1442,15 @@ free_type_printers (void *arg) - { - } - -+enum py_bt_status -+apply_frame_filter (struct frame_info *frame, int flags, -+ enum py_frame_args args_type, -+ struct ui_out *out, int frame_low, -+ int frame_high) -+{ -+ return PY_BT_NO_FILTERS; -+} -+ - #endif /* HAVE_PYTHON */ - - -Index: gdb-7.6/gdb/python/python.h -=================================================================== ---- gdb-7.6.orig/gdb/python/python.h 2013-06-10 14:31:02.732084652 +0200 -+++ gdb-7.6/gdb/python/python.h 2013-06-10 14:31:08.367082436 +0200 -@@ -21,6 +21,7 @@ - #define GDB_PYTHON_H - - #include "value.h" -+#include "mi/mi-cmds.h" - - struct breakpoint_object; - -@@ -28,6 +29,66 @@ struct breakpoint_object; - E.g. When the program loads libfoo.so, look for libfoo-gdb.py. */ - #define GDBPY_AUTO_FILE_NAME "-gdb.py" - -+/* Python frame-filter status return values. */ -+enum py_bt_status -+ { -+ /* Return when an error has occurred in processing frame filters, -+ or when printing the stack. */ -+ PY_BT_ERROR = -1, -+ -+ /* Return from internal routines to indicate that the function -+ succeeded. */ -+ PY_BT_OK = 1, -+ -+ /* Return when the frame filter process is complete, and all -+ operations have succeeded. */ -+ PY_BT_COMPLETED = 2, -+ -+ /* Return when the frame filter process is complete, but there -+ were no filter registered and enabled to process. */ -+ PY_BT_NO_FILTERS = 3 -+ }; -+ -+/* Flags to pass to apply_frame_filter. */ -+ -+enum frame_filter_flags -+ { -+ /* Set this flag if frame level is to be printed. */ -+ PRINT_LEVEL = 1, -+ -+ /* Set this flag if frame information is to be printed. */ -+ PRINT_FRAME_INFO = 2, -+ -+ /* Set this flag if frame arguments are to be printed. */ -+ PRINT_ARGS = 4, -+ -+ /* Set this flag if frame locals are to be printed. */ -+ PRINT_LOCALS = 8, -+ }; -+ -+/* A choice of the different frame argument printing strategies that -+ can occur in different cases of frame filter instantiation. */ -+typedef enum py_frame_args -+{ -+ /* Print no values for arguments when invoked from the MI. */ -+ NO_VALUES = PRINT_NO_VALUES, -+ -+ MI_PRINT_ALL_VALUES = PRINT_ALL_VALUES, -+ -+ /* Print only simple values (what MI defines as "simple") for -+ arguments when invoked from the MI. */ -+ MI_PRINT_SIMPLE_VALUES = PRINT_SIMPLE_VALUES, -+ -+ -+ /* Print only scalar values for arguments when invoked from the -+ CLI. */ -+ CLI_SCALAR_VALUES, -+ -+ /* Print all values for arguments when invoked from the -+ CLI. */ -+ CLI_ALL_VALUES -+} py_frame_args; -+ - extern void finish_python_initialization (void); - - void eval_python_from_control_command (struct command_line *); -@@ -43,6 +104,11 @@ int apply_val_pretty_printer (struct typ - const struct value_print_options *options, - const struct language_defn *language); - -+enum py_bt_status apply_frame_filter (struct frame_info *frame, int flags, -+ enum py_frame_args args_type, -+ struct ui_out *out, int frame_low, -+ int frame_high); -+ - void preserve_python_values (struct objfile *objfile, htab_t copied_types); - - void gdbpy_load_auto_scripts_for_objfile (struct objfile *objfile); -Index: gdb-7.6/gdb/python/lib/gdb/FrameDecorator.py -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/python/lib/gdb/FrameDecorator.py 2013-06-10 14:31:08.367082436 +0200 -@@ -0,0 +1,285 @@ -+# Copyright (C) 2013 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 . -+ -+import gdb -+ -+class FrameDecorator(object): -+ """Basic implementation of a Frame Decorator""" -+ -+ """ This base frame decorator decorates a frame or another frame -+ decorator, and provides convenience methods. If this object is -+ wrapping a frame decorator, defer to that wrapped object's method -+ if it has one. This allows for frame decorators that have -+ sub-classed FrameDecorator object, but also wrap other frame -+ decorators on the same frame to correctly execute. -+ -+ E.g -+ -+ If the result of frame filters running means we have one gdb.Frame -+ wrapped by multiple frame decorators, all sub-classed from -+ FrameDecorator, the resulting hierarchy will be: -+ -+ Decorator1 -+ -- (wraps) Decorator2 -+ -- (wraps) FrameDecorator -+ -- (wraps) gdb.Frame -+ -+ In this case we have two frame decorators, both of which are -+ sub-classed from FrameDecorator. If Decorator1 just overrides the -+ 'function' method, then all of the other methods are carried out -+ by the super-class FrameDecorator. But Decorator2 may have -+ overriden other methods, so FrameDecorator will look at the -+ 'base' parameter and defer to that class's methods. And so on, -+ down the chain.""" -+ -+ # 'base' can refer to a gdb.Frame or another frame decorator. In -+ # the latter case, the child class will have called the super -+ # method and _base will be an object conforming to the Frame Filter -+ # class. -+ def __init__(self, base): -+ self._base = base -+ -+ @staticmethod -+ def _is_limited_frame(frame): -+ """Internal utility to determine if the frame is special or -+ limited.""" -+ sal = frame.find_sal() -+ -+ if (not sal.symtab or not sal.symtab.filename -+ or frame.type() == gdb.DUMMY_FRAME -+ or frame.type() == gdb.SIGTRAMP_FRAME): -+ -+ return True -+ -+ return False -+ -+ def elided(self): -+ """Return any elided frames that this class might be -+ wrapping, or None.""" -+ if hasattr(self._base, "elided"): -+ return self._base.elided() -+ -+ return None -+ -+ def function(self): -+ """ Return the name of the frame's function or an address of -+ the function of the frame. First determine if this is a -+ special frame. If not, try to determine filename from GDB's -+ frame internal function API. Finally, if a name cannot be -+ determined return the address. If this function returns an -+ address, GDB will attempt to determine the function name from -+ its internal minimal symbols store (for example, for inferiors -+ without debug-info).""" -+ -+ # Both gdb.Frame, and FrameDecorator have a method called -+ # "function", so determine which object this is. -+ if not isinstance(self._base, gdb.Frame): -+ if hasattr(self._base, "function"): -+ # If it is not a gdb.Frame, and there is already a -+ # "function" method, use that. -+ return self._base.function() -+ -+ frame = self.inferior_frame() -+ -+ if frame.type() == gdb.DUMMY_FRAME: -+ return "" -+ elif frame.type() == gdb.SIGTRAMP_FRAME: -+ return "" -+ -+ func = frame.function() -+ -+ # If we cannot determine the function name, return the -+ # address. If GDB detects an integer value from this function -+ # it will attempt to find the function name from minimal -+ # symbols via its own internal functions. -+ if func == None: -+ pc = frame.pc() -+ return pc -+ -+ return str(func) -+ -+ def address(self): -+ """ Return the address of the frame's pc""" -+ -+ if hasattr(self._base, "address"): -+ return self._base.address() -+ -+ frame = self.inferior_frame() -+ return frame.pc() -+ -+ def filename(self): -+ """ Return the filename associated with this frame, detecting -+ and returning the appropriate library name is this is a shared -+ library.""" -+ -+ if hasattr(self._base, "filename"): -+ return self._base.filename() -+ -+ frame = self.inferior_frame() -+ sal = frame.find_sal() -+ if not sal.symtab or not sal.symtab.filename: -+ pc = frame.pc() -+ return gdb.solib_name(pc) -+ else: -+ return sal.symtab.filename -+ -+ def frame_args(self): -+ """ Return an iterable of frame arguments for this frame, if -+ any. The iterable object contains objects conforming with the -+ Symbol/Value interface. If there are no frame arguments, or -+ if this frame is deemed to be a special case, return None.""" -+ -+ if hasattr(self._base, "frame_args"): -+ return self._base.frame_args() -+ -+ frame = self.inferior_frame() -+ if self._is_limited_frame(frame): -+ return None -+ -+ args = FrameVars(frame) -+ return args.fetch_frame_args() -+ -+ def frame_locals(self): -+ """ Return an iterable of local variables for this frame, if -+ any. The iterable object contains objects conforming with the -+ Symbol/Value interface. If there are no frame locals, or if -+ this frame is deemed to be a special case, return None.""" -+ -+ if hasattr(self._base, "frame_locals"): -+ return self._base.frame_locals() -+ -+ frame = self.inferior_frame() -+ if self._is_limited_frame(frame): -+ return None -+ -+ args = FrameVars(frame) -+ return args.fetch_frame_locals() -+ -+ def line(self): -+ """ Return line number information associated with the frame's -+ pc. If symbol table/line information does not exist, or if -+ this frame is deemed to be a special case, return None""" -+ -+ if hasattr(self._base, "line"): -+ return self._base.line() -+ -+ frame = self.inferior_frame() -+ if self._is_limited_frame(frame): -+ return None -+ -+ sal = frame.find_sal() -+ if (sal): -+ return sal.line -+ else: -+ return None -+ -+ def inferior_frame(self): -+ """ Return the gdb.Frame underpinning this frame decorator.""" -+ -+ # If 'base' is a frame decorator, we want to call its inferior -+ # frame method. If '_base' is a gdb.Frame, just return that. -+ if hasattr(self._base, "inferior_frame"): -+ return self._base.inferior_frame() -+ return self._base -+ -+class SymValueWrapper(object): -+ """A container class conforming to the Symbol/Value interface -+ which holds frame locals or frame arguments.""" -+ def __init__(self, symbol, value): -+ self.sym = symbol -+ self.val = value -+ -+ def value(self): -+ """ Return the value associated with this symbol, or None""" -+ return self.val -+ -+ def symbol(self): -+ """ Return the symbol, or Python text, associated with this -+ symbol, or None""" -+ return self.sym -+ -+class FrameVars(object): -+ -+ """Utility class to fetch and store frame local variables, or -+ frame arguments.""" -+ -+ def __init__(self, frame): -+ self.frame = frame -+ self.symbol_class = { -+ gdb.SYMBOL_LOC_STATIC: True, -+ gdb.SYMBOL_LOC_REGISTER: True, -+ gdb.SYMBOL_LOC_ARG: True, -+ gdb.SYMBOL_LOC_REF_ARG: True, -+ gdb.SYMBOL_LOC_LOCAL: True, -+ gdb.SYMBOL_LOC_REGPARM_ADDR: True, -+ gdb.SYMBOL_LOC_COMPUTED: True -+ } -+ -+ def fetch_b(self, sym): -+ """ Local utility method to determine if according to Symbol -+ type whether it should be included in the iterator. Not all -+ symbols are fetched, and only symbols that return -+ True from this method should be fetched.""" -+ -+ # SYM may be a string instead of a symbol in the case of -+ # synthetic local arguments or locals. If that is the case, -+ # always fetch. -+ if isinstance(sym, basestring): -+ return True -+ -+ sym_type = sym.addr_class -+ -+ return self.symbol_class.get(sym_type, False) -+ -+ def fetch_frame_locals(self): -+ """Public utility method to fetch frame local variables for -+ the stored frame. Frame arguments are not fetched. If there -+ are no frame local variables, return an empty list.""" -+ lvars = [] -+ -+ block = self.frame.block() -+ -+ while block != None: -+ if block.is_global or block.is_static: -+ break -+ for sym in block: -+ if sym.is_argument: -+ continue; -+ if self.fetch_b(sym): -+ lvars.append(SymValueWrapper(sym, None)) -+ -+ block = block.superblock -+ -+ return lvars -+ -+ def fetch_frame_args(self): -+ """Public utility method to fetch frame arguments for the -+ stored frame. Frame arguments are the only type fetched. If -+ there are no frame argument variables, return an empty list.""" -+ -+ args = [] -+ block = self.frame.block() -+ while block != None: -+ if block.function != None: -+ break -+ block = block.superblock -+ -+ if block != None: -+ for sym in block: -+ if not sym.is_argument: -+ continue; -+ args.append(SymValueWrapper(sym, None)) -+ -+ return args -Index: gdb-7.6/gdb/python/lib/gdb/FrameIterator.py -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/python/lib/gdb/FrameIterator.py 2013-06-10 14:31:08.367082436 +0200 -@@ -0,0 +1,45 @@ -+# Copyright (C) 2013 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 . -+ -+import gdb -+import itertools -+ -+class FrameIterator(object): -+ """A gdb.Frame iterator. Iterates over gdb.Frames or objects that -+ conform to that interface.""" -+ -+ def __init__(self, frame_obj): -+ """Initialize a FrameIterator. -+ -+ Arguments: -+ frame_obj the starting frame.""" -+ -+ super(FrameIterator, self).__init__() -+ self.frame = frame_obj -+ -+ def __iter__(self): -+ return self -+ -+ def next(self): -+ """next implementation. -+ -+ Returns: -+ The next oldest frame.""" -+ -+ result = self.frame -+ if result is None: -+ raise StopIteration -+ self.frame = result.older() -+ return result -Index: gdb-7.6/gdb/python/lib/gdb/frames.py -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/python/lib/gdb/frames.py 2013-06-10 14:31:08.368082436 +0200 -@@ -0,0 +1,229 @@ -+# Frame-filter commands. -+# Copyright (C) 2013 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 . -+ -+"""Internal functions for working with frame-filters.""" -+ -+import gdb -+from gdb.FrameIterator import FrameIterator -+from gdb.FrameDecorator import FrameDecorator -+import itertools -+import collections -+ -+def get_priority(filter_item): -+ """ Internal worker function to return the frame-filter's priority -+ from a frame filter object. This is a fail free function as it is -+ used in sorting and filtering. If a badly implemented frame -+ filter does not implement the priority attribute, return zero -+ (otherwise sorting/filtering will fail and prevent other frame -+ filters from executing). -+ -+ Arguments: -+ filter_item: An object conforming to the frame filter -+ interface. -+ -+ Returns: -+ The priority of the frame filter from the "priority" -+ attribute, or zero. -+ """ -+ # Do not fail here, as the sort will fail. If a filter has not -+ # (incorrectly) set a priority, set it to zero. -+ return getattr(filter_item, "priority", 0) -+ -+def set_priority(filter_item, priority): -+ """ Internal worker function to set the frame-filter's priority. -+ -+ Arguments: -+ filter_item: An object conforming to the frame filter -+ interface. -+ priority: The priority to assign as an integer. -+ """ -+ -+ filter_item.priority = priority -+ -+def get_enabled(filter_item): -+ """ Internal worker function to return a filter's enabled state -+ from a frame filter object. This is a fail free function as it is -+ used in sorting and filtering. If a badly implemented frame -+ filter does not implement the enabled attribute, return False -+ (otherwise sorting/filtering will fail and prevent other frame -+ filters from executing). -+ -+ Arguments: -+ filter_item: An object conforming to the frame filter -+ interface. -+ -+ Returns: -+ The enabled state of the frame filter from the "enabled" -+ attribute, or False. -+ """ -+ -+ # If the filter class is badly implemented when called from the -+ # Python filter command, do not cease filter operations, just set -+ # enabled to False. -+ return getattr(filter_item, "enabled", False) -+ -+def set_enabled(filter_item, state): -+ """ Internal Worker function to set the frame-filter's enabled -+ state. -+ -+ Arguments: -+ filter_item: An object conforming to the frame filter -+ interface. -+ state: True or False, depending on desired state. -+ """ -+ -+ filter_item.enabled = state -+ -+def return_list(name): -+ """ Internal Worker function to return the frame filter -+ dictionary, depending on the name supplied as an argument. If the -+ name is not "all", "global" or "progspace", it is assumed to name -+ an object-file. -+ -+ Arguments: -+ name: The name of the list, as specified by GDB user commands. -+ -+ Returns: -+ A dictionary object for a single specified dictionary, or a -+ list containing all the items for "all" -+ -+ Raises: -+ gdb.GdbError: A dictionary of that name cannot be found. -+ """ -+ -+ # If all dictionaries are wanted in the case of "all" we -+ # cannot return a combined dictionary as keys() may clash in -+ # between different dictionaries. As we just want all the frame -+ # filters to enable/disable them all, just return the combined -+ # items() as a list. -+ if name == "all": -+ all_dicts = gdb.frame_filters.values() -+ all_dicts = all_dicts + gdb.current_progspace().frame_filters.values() -+ for objfile in gdb.objfiles(): -+ all_dicts = all_dicts + objfile.frame_filters.values() -+ return all_dicts -+ -+ if name == "global": -+ return gdb.frame_filters -+ else: -+ if name == "progspace": -+ cp = gdb.current_progspace() -+ return cp.frame_filters -+ else: -+ for objfile in gdb.objfiles(): -+ if name == objfile.filename: -+ return objfile.frame_filters -+ -+ msg = "Cannot find frame-filter dictionary for '" + name + "'" -+ raise gdb.GdbError(msg) -+ -+def _sort_list(): -+ """ Internal Worker function to merge all known frame-filter -+ lists, prune any filters with the state set to "disabled", and -+ sort the list on the frame-filter's "priority" attribute. -+ -+ Returns: -+ sorted_list: A sorted, pruned list of frame filters to -+ execute. -+ """ -+ -+ all_filters = [] -+ for objfile in gdb.objfiles(): -+ all_filters = all_filters + objfile.frame_filters.values() -+ cp = gdb.current_progspace() -+ -+ all_filters = all_filters + cp.frame_filters.values() -+ all_filters = all_filters + gdb.frame_filters.values() -+ -+ sorted_frame_filters = sorted(all_filters, key = get_priority, -+ reverse = True) -+ -+ sorted_frame_filters = filter(get_enabled, -+ sorted_frame_filters) -+ -+ return sorted_frame_filters -+ -+def execute_frame_filters(frame, frame_low, frame_high): -+ """ Internal function called from GDB that will execute the chain -+ of frame filters. Each filter is executed in priority order. -+ After the execution completes, slice the iterator to frame_low - -+ frame_high range. -+ -+ Arguments: -+ frame: The initial frame. -+ -+ frame_low: The low range of the slice. If this is a negative -+ integer then it indicates a backward slice (ie bt -4) which -+ counts backward from the last frame in the backtrace. -+ -+ frame_high: The high range of the slice. If this is -1 then -+ it indicates all frames until the end of the stack from -+ frame_low. -+ -+ Returns: -+ frame_iterator: The sliced iterator after all frame -+ filters have had a change to execute, or None if no frame -+ filters are registered. -+ """ -+ -+ # Get a sorted list of frame filters. -+ sorted_list = _sort_list() -+ -+ # Check to see if there are any frame-filters. If not, just -+ # return None and let default backtrace printing occur. -+ if len(sorted_list) == 0: -+ return None -+ -+ frame_iterator = FrameIterator(frame) -+ -+ # Apply a basic frame decorator to all gdb.Frames. This unifies the -+ # interface. -+ frame_iterator = itertools.imap(FrameDecorator, frame_iterator) -+ -+ for ff in sorted_list: -+ frame_iterator = ff.filter(frame_iterator) -+ -+ # Slicing -+ -+ # Is this a slice from the end of the backtrace, ie bt -2? -+ if frame_low < 0: -+ count = 0 -+ slice_length = abs(frame_low) -+ # We cannot use MAXLEN argument for deque as it is 2.6 onwards -+ # and some GDB versions might be < 2.6. -+ sliced = collections.deque() -+ -+ for frame_item in frame_iterator: -+ if count >= slice_length: -+ sliced.popleft(); -+ count = count + 1 -+ sliced.append(frame_item) -+ -+ return iter(sliced) -+ -+ # -1 for frame_high means until the end of the backtrace. Set to -+ # None if that is the case, to indicate to itertools.islice to -+ # slice to the end of the iterator. -+ if frame_high == -1: -+ frame_high = None -+ else: -+ # As frames start from 0, add one to frame_high so islice -+ # correctly finds the end -+ frame_high = frame_high + 1; -+ -+ sliced = itertools.islice(frame_iterator, frame_low, frame_high) -+ -+ return sliced -Index: gdb-7.6/gdb/python/lib/gdb/__init__.py -=================================================================== ---- gdb-7.6.orig/gdb/python/lib/gdb/__init__.py 2013-06-10 14:31:02.733084651 +0200 -+++ gdb-7.6/gdb/python/lib/gdb/__init__.py 2013-06-10 14:31:08.368082436 +0200 -@@ -67,6 +67,8 @@ pretty_printers = [] - - # Initial type printers. - type_printers = [] -+# Initial frame filters. -+frame_filters = {} - - # Convenience variable to GDB's python directory - PYTHONDIR = os.path.dirname(os.path.dirname(__file__)) -Index: gdb-7.6/gdb/python/lib/gdb/command/frame_filters.py -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/python/lib/gdb/command/frame_filters.py 2013-06-10 14:31:08.368082436 +0200 -@@ -0,0 +1,461 @@ -+# Frame-filter commands. -+# Copyright (C) 2013 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 . -+ -+"""GDB commands for working with frame-filters.""" -+ -+import gdb -+import copy -+from gdb.FrameIterator import FrameIterator -+from gdb.FrameDecorator import FrameDecorator -+import gdb.frames -+import itertools -+ -+# GDB Commands. -+class SetFilterPrefixCmd(gdb.Command): -+ """Prefix command for 'set' frame-filter related operations.""" -+ -+ def __init__(self): -+ super(SetFilterPrefixCmd, self).__init__("set frame-filter", -+ gdb.COMMAND_OBSCURE, -+ gdb.COMPLETE_NONE, True) -+ -+class ShowFilterPrefixCmd(gdb.Command): -+ """Prefix command for 'show' frame-filter related operations.""" -+ def __init__(self): -+ super(ShowFilterPrefixCmd, self).__init__("show frame-filter", -+ gdb.COMMAND_OBSCURE, -+ gdb.COMPLETE_NONE, True) -+class InfoFrameFilter(gdb.Command): -+ """List all registered Python frame-filters. -+ -+ Usage: info frame-filters -+ """ -+ -+ def __init__(self): -+ super(InfoFrameFilter, self).__init__("info frame-filter", -+ gdb.COMMAND_DATA) -+ @staticmethod -+ def enabled_string(state): -+ """Return "Yes" if filter is enabled, otherwise "No".""" -+ if state: -+ return "Yes" -+ else: -+ return "No" -+ -+ def list_frame_filters(self, frame_filters): -+ """ Internal worker function to list and print frame filters -+ in a dictionary. -+ -+ Arguments: -+ frame_filters: The name of the dictionary, as -+ specified by GDB user commands. -+ """ -+ -+ sorted_frame_filters = sorted(frame_filters.items(), -+ key=lambda i: gdb.frames.get_priority(i[1]), -+ reverse=True) -+ -+ if len(sorted_frame_filters) == 0: -+ print(" No frame filters registered.") -+ else: -+ print(" Priority Enabled Name") -+ for frame_filter in sorted_frame_filters: -+ name = frame_filter[0] -+ try: -+ priority = '{:<8}'.format( -+ str(gdb.frames.get_priority(frame_filter[1]))) -+ enabled = '{:<7}'.format( -+ self.enabled_string(gdb.frames.get_enabled(frame_filter[1]))) -+ except Exception as e: -+ print(" Error printing filter '"+name+"': "+str(e)) -+ else: -+ print(" %s %s %s" % (priority, enabled, name)) -+ -+ def print_list(self, title, filter_list, blank_line): -+ print(title) -+ self.list_frame_filters(filter_list) -+ if blank_line: -+ print("") -+ -+ def invoke(self, arg, from_tty): -+ self.print_list("global frame-filters:", gdb.frame_filters, True) -+ -+ cp = gdb.current_progspace() -+ self.print_list("progspace %s frame-filters:" % cp.filename, -+ cp.frame_filters, True) -+ -+ for objfile in gdb.objfiles(): -+ self.print_list("objfile %s frame-filters:" % objfile.filename, -+ objfile.frame_filters, False) -+ -+# Internal enable/disable functions. -+ -+def _enable_parse_arg(cmd_name, arg): -+ """ Internal worker function to take an argument from -+ enable/disable and return a tuple of arguments. -+ -+ Arguments: -+ cmd_name: Name of the command invoking this function. -+ args: The argument as a string. -+ -+ Returns: -+ A tuple containing the dictionary, and the argument, or just -+ the dictionary in the case of "all". -+ """ -+ -+ argv = gdb.string_to_argv(arg); -+ argc = len(argv) -+ if argv[0] == "all" and argc > 1: -+ raise gdb.GdbError(cmd_name + ": with 'all' " \ -+ "you may not specify a filter.") -+ else: -+ if argv[0] != "all" and argc != 2: -+ raise gdb.GdbError(cmd_name + " takes exactly two arguments.") -+ -+ return argv -+ -+def _do_enable_frame_filter(command_tuple, flag): -+ """Worker for enabling/disabling frame_filters. -+ -+ Arguments: -+ command_type: A tuple with the first element being the -+ frame filter dictionary, and the second being -+ the frame filter name. -+ flag: True for Enable, False for Disable. -+ """ -+ -+ list_op = command_tuple[0] -+ op_list = gdb.frames.return_list(list_op) -+ -+ if list_op == "all": -+ for item in op_list: -+ gdb.frames.set_enabled(item, flag) -+ else: -+ frame_filter = command_tuple[1] -+ try: -+ ff = op_list[frame_filter] -+ except KeyError: -+ msg = "frame-filter '" + str(name) + "' not found." -+ raise gdb.GdbError(msg) -+ -+ gdb.frames.set_enabled(ff, flag) -+ -+def _complete_frame_filter_list(text, word, all_flag): -+ """Worker for frame filter dictionary name completion. -+ -+ Arguments: -+ text: The full text of the command line. -+ word: The most recent word of the command line. -+ all_flag: Whether to include the word "all" in completion. -+ -+ Returns: -+ A list of suggested frame filter dictionary name completions -+ from text/word analysis. This list can be empty when there -+ are no suggestions for completion. -+ """ -+ if all_flag == True: -+ filter_locations = ["all", "global", "progspace"] -+ else: -+ filter_locations = ["global", "progspace"] -+ for objfile in gdb.objfiles(): -+ filter_locations.append(objfile.filename) -+ -+ # If the user just asked for completions with no completion -+ # hints, just return all the frame filter dictionaries we know -+ # about. -+ if (text == ""): -+ return filter_locations -+ -+ # Otherwise filter on what we know. -+ flist = filter(lambda x,y=text:x.startswith(y), filter_locations) -+ -+ # If we only have one completion, complete it and return it. -+ if len(flist) == 1: -+ flist[0] = flist[0][len(text)-len(word):] -+ -+ # Otherwise, return an empty list, or a list of frame filter -+ # dictionaries that the previous filter operation returned. -+ return flist -+ -+def _complete_frame_filter_name(word, printer_dict): -+ """Worker for frame filter name completion. -+ -+ Arguments: -+ -+ word: The most recent word of the command line. -+ -+ printer_dict: The frame filter dictionary to search for frame -+ filter name completions. -+ -+ Returns: A list of suggested frame filter name completions -+ from word analysis of the frame filter dictionary. This list -+ can be empty when there are no suggestions for completion. -+ """ -+ -+ printer_keys = printer_dict.keys() -+ if (word == ""): -+ return printer_keys -+ -+ flist = filter(lambda x,y=word:x.startswith(y), printer_keys) -+ return flist -+ -+class EnableFrameFilter(gdb.Command): -+ """GDB command to disable the specified frame-filter. -+ -+ Usage: enable frame-filter enable DICTIONARY [NAME] -+ -+ DICTIONARY is the name of the frame filter dictionary on which to -+ operate. If dictionary is set to "all", perform operations on all -+ dictionaries. Named dictionaries are: "global" for the global -+ frame filter dictionary, "progspace" for the program space's frame -+ filter dictionary. If either all, or the two named dictionaries -+ are not specified, the dictionary name is assumed to be the name -+ of the object-file name. -+ -+ NAME matches the name of the frame-filter to operate on. If -+ DICTIONARY is "all", NAME is ignored. -+ """ -+ def __init__(self): -+ super(EnableFrameFilter, self).__init__("enable frame-filter", -+ gdb.COMMAND_DATA) -+ def complete(self, text, word): -+ """Completion function for both frame filter dictionary, and -+ frame filter name.""" -+ if text.count(" ") == 0: -+ return _complete_frame_filter_list(text, word, True) -+ else: -+ printer_list = gdb.frames.return_list(text.split()[0].rstrip()) -+ return _complete_frame_filter_name(word, printer_list) -+ -+ def invoke(self, arg, from_tty): -+ command_tuple = _enable_parse_arg("enable frame-filter", arg) -+ _do_enable_frame_filter(command_tuple, True) -+ -+ -+class DisableFrameFilter(gdb.Command): -+ """GDB command to disable the specified frame-filter. -+ -+ Usage: disable frame-filter disable DICTIONARY [NAME] -+ -+ DICTIONARY is the name of the frame filter dictionary on which to -+ operate. If dictionary is set to "all", perform operations on all -+ dictionaries. Named dictionaries are: "global" for the global -+ frame filter dictionary, "progspace" for the program space's frame -+ filter dictionary. If either all, or the two named dictionaries -+ are not specified, the dictionary name is assumed to be the name -+ of the object-file name. -+ -+ NAME matches the name of the frame-filter to operate on. If -+ DICTIONARY is "all", NAME is ignored. -+ """ -+ def __init__(self): -+ super(DisableFrameFilter, self).__init__("disable frame-filter", -+ gdb.COMMAND_DATA) -+ -+ def complete(self, text, word): -+ """Completion function for both frame filter dictionary, and -+ frame filter name.""" -+ if text.count(" ") == 0: -+ return _complete_frame_filter_list(text, word, True) -+ else: -+ printer_list = gdb.frames.return_list(text.split()[0].rstrip()) -+ return _complete_frame_filter_name(word, printer_list) -+ -+ def invoke(self, arg, from_tty): -+ command_tuple = _enable_parse_arg("disable frame-filter", arg) -+ _do_enable_frame_filter(command_tuple, False) -+ -+class SetFrameFilterPriority(gdb.Command): -+ """GDB command to set the priority of the specified frame-filter. -+ -+ Usage: set frame-filter priority DICTIONARY NAME PRIORITY -+ -+ DICTIONARY is the name of the frame filter dictionary on which to -+ operate. Named dictionaries are: "global" for the global frame -+ filter dictionary, "progspace" for the program space's framefilter -+ dictionary. If either of these two are not specified, the -+ dictionary name is assumed to be the name of the object-file name. -+ -+ NAME matches the name of the frame filter to operate on. -+ -+ PRIORITY is the an integer to assign the new priority to the frame -+ filter. -+ """ -+ -+ def __init__(self): -+ super(SetFrameFilterPriority, self).__init__("set frame-filter " \ -+ "priority", -+ gdb.COMMAND_DATA) -+ -+ def _parse_pri_arg(self, arg): -+ """Internal worker to parse a priority from a tuple. -+ -+ Arguments: -+ arg: Tuple which contains the arguments from the command. -+ -+ Returns: -+ A tuple containing the dictionary, name and priority from -+ the arguments. -+ -+ Raises: -+ gdb.GdbError: An error parsing the arguments. -+ """ -+ -+ argv = gdb.string_to_argv(arg); -+ argc = len(argv) -+ if argc != 3: -+ print("set frame-filter priority " \ -+ "takes exactly three arguments.") -+ return None -+ -+ return argv -+ -+ def _set_filter_priority(self, command_tuple): -+ """Internal worker for setting priority of frame-filters, by -+ parsing a tuple and calling _set_priority with the parsed -+ tuple. -+ -+ Arguments: -+ command_tuple: Tuple which contains the arguments from the -+ command. -+ """ -+ -+ list_op = command_tuple[0] -+ frame_filter = command_tuple[1] -+ priority = command_tuple[2] -+ -+ op_list = gdb.frames.return_list(list_op) -+ -+ try: -+ ff = op_list[frame_filter] -+ except KeyError: -+ msg = "frame-filter '" + str(name) + "' not found." -+ raise gdb.GdbError(msg) -+ -+ gdb.frames.set_priority(ff, priority) -+ -+ def complete(self, text, word): -+ """Completion function for both frame filter dictionary, and -+ frame filter name.""" -+ if text.count(" ") == 0: -+ return _complete_frame_filter_list(text, word, False) -+ else: -+ printer_list = gdb.frames.return_list(text.split()[0].rstrip()) -+ return _complete_frame_filter_name(word, printer_list) -+ -+ def invoke(self, arg, from_tty): -+ command_tuple = self._parse_pri_arg(arg) -+ if command_tuple != None: -+ self._set_filter_priority(command_tuple) -+ -+class ShowFrameFilterPriority(gdb.Command): -+ """GDB command to show the priority of the specified frame-filter. -+ -+ Usage: show frame-filter priority DICTIONARY NAME -+ -+ DICTIONARY is the name of the frame filter dictionary on which to -+ operate. Named dictionaries are: "global" for the global frame -+ filter dictionary, "progspace" for the program space's framefilter -+ dictionary. If either of these two are not specified, the -+ dictionary name is assumed to be the name of the object-file name. -+ -+ NAME matches the name of the frame-filter to operate on. -+ """ -+ -+ def __init__(self): -+ super(ShowFrameFilterPriority, self).__init__("show frame-filter " \ -+ "priority", -+ gdb.COMMAND_DATA) -+ -+ def _parse_pri_arg(self, arg): -+ """Internal worker to parse a dictionary and name from a -+ tuple. -+ -+ Arguments: -+ arg: Tuple which contains the arguments from the command. -+ -+ Returns: -+ A tuple containing the dictionary, and frame filter name. -+ -+ Raises: -+ gdb.GdbError: An error parsing the arguments. -+ """ -+ -+ argv = gdb.string_to_argv(arg); -+ argc = len(argv) -+ if argc != 2: -+ print("show frame-filter priority " \ -+ "takes exactly two arguments.") -+ return None -+ -+ return argv -+ -+ def get_filter_priority(self, frame_filters, name): -+ """Worker for retrieving the priority of frame_filters. -+ -+ Arguments: -+ frame_filters: Name of frame filter dictionary. -+ name: object to select printers. -+ -+ Returns: -+ The priority of the frame filter. -+ -+ Raises: -+ gdb.GdbError: A frame filter cannot be found. -+ """ -+ -+ op_list = gdb.frames.return_list(frame_filters) -+ -+ try: -+ ff = op_list[name] -+ except KeyError: -+ msg = "frame-filter '" + str(name) + "' not found." -+ raise gdb.GdbError(msg) -+ -+ return gdb.frames.get_priority(ff) -+ -+ def complete(self, text, word): -+ """Completion function for both frame filter dictionary, and -+ frame filter name.""" -+ -+ if text.count(" ") == 0: -+ return _complete_frame_filter_list(text, word, False) -+ else: -+ printer_list = frame._return_list(text.split()[0].rstrip()) -+ return _complete_frame_filter_name(word, printer_list) -+ -+ def invoke(self, arg, from_tty): -+ command_tuple = self._parse_pri_arg(arg) -+ if command_tuple == None: -+ return -+ filter_name = command_tuple[1] -+ list_name = command_tuple[0] -+ try: -+ priority = self.get_filter_priority(list_name, filter_name); -+ except Exception as e: -+ print("Error printing filter priority for '"+name+"':"+str(e)) -+ else: -+ print("Priority of filter '" + filter_name + "' in list '" \ -+ + list_name + "' is: " + str(priority)) -+ -+# Register commands -+SetFilterPrefixCmd() -+ShowFilterPrefixCmd() -+InfoFrameFilter() -+EnableFrameFilter() -+DisableFrameFilter() -+SetFrameFilterPriority() -+ShowFrameFilterPriority() -Index: gdb-7.6/gdb/testsuite/gdb.python/py-framefilter-gdb.py.in -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.python/py-framefilter-gdb.py.in 2013-06-10 14:31:08.368082436 +0200 -@@ -0,0 +1,48 @@ -+# Copyright (C) 2013 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 . -+ -+# This file is part of the GDB testsuite. It tests Python-based -+# frame-filters. -+import gdb -+import itertools -+from gdb.FrameDecorator import FrameDecorator -+ -+ -+class FrameObjFile (): -+ -+ def __init__ (self): -+ self.name = "Filter1" -+ self.priority = 1 -+ self.enabled = False -+ gdb.current_progspace().frame_filters ["Progspace" + self.name] = self -+ gdb.current_objfile().frame_filters ["ObjectFile" + self.name] = self -+ -+ def filter (self, frame_iter): -+ return frame_iter -+ -+class FrameObjFile2 (): -+ -+ def __init__ (self): -+ self.name = "Filter2" -+ self.priority = 100 -+ self.enabled = True -+ gdb.current_progspace().frame_filters ["Progspace" + self.name] = self -+ gdb.current_objfile().frame_filters ["ObjectFile" + self.name] = self -+ -+ def filter (self, frame_iter): -+ return frame_iter -+ -+FrameObjFile() -+FrameObjFile2() -Index: gdb-7.6/gdb/testsuite/gdb.python/py-framefilter-mi.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.python/py-framefilter-mi.c 2013-06-10 14:31:08.368082436 +0200 -@@ -0,0 +1,138 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2013 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 . */ -+ -+#include -+ -+void funca(void); -+int count = 0; -+ -+typedef struct -+{ -+ char *nothing; -+ int f; -+ short s; -+} foobar; -+ -+void end_func (int foo, char *bar, foobar *fb, foobar bf) -+{ -+ const char *str = "The End"; -+ const char *st2 = "Is Near"; -+ int b = 12; -+ short c = 5; -+ { -+ int d = 15; -+ int e = 14; -+ const char *foo = "Inside block"; -+ { -+ int f = 42; -+ int g = 19; -+ const char *bar = "Inside block x2"; -+ { -+ short h = 9; -+ h = h +1; /* Inner test breakpoint */ -+ } -+ } -+ } -+ -+ return; /* Backtrace end breakpoint */ -+} -+ -+void funcb(int j) -+{ -+ struct foo -+ { -+ int a; -+ int b; -+ }; -+ -+ struct foo bar; -+ -+ bar.a = 42; -+ bar.b = 84; -+ -+ funca(); -+ return; -+} -+ -+void funca(void) -+{ -+ foobar fb; -+ foobar *bf; -+ -+ if (count < 10) -+ { -+ count++; -+ funcb(count); -+ } -+ -+ fb.nothing = "Foo Bar"; -+ fb.f = 42; -+ fb.s = 19; -+ -+ bf = malloc (sizeof (foobar)); -+ bf->nothing = malloc (128); -+ bf->nothing = "Bar Foo"; -+ bf->f = 24; -+ bf->s = 91; -+ -+ end_func(21, "Param", bf, fb); -+ free (bf->nothing); -+ free (bf); -+ return; -+} -+ -+ -+void func1(void) -+{ -+ funca(); -+ return; -+} -+ -+int func2(void) -+{ -+ func1(); -+ return 1; -+} -+ -+void func3(int i) -+{ -+ func2(); -+ -+ return; -+} -+ -+int func4(int j) -+{ -+ func3(j); -+ -+ return 2; -+} -+ -+int func5(int f, int d) -+{ -+ int i = 0; -+ char *random = "random"; -+ i=i+f; -+ -+ func4(i); -+ return i; -+} -+ -+main() -+{ -+ func5(3,5); -+} -Index: gdb-7.6/gdb/testsuite/gdb.python/py-framefilter-mi.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.python/py-framefilter-mi.exp 2013-06-10 14:31:08.368082436 +0200 -@@ -0,0 +1,179 @@ -+# Copyright (C) 2013 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 . -+ -+# This file is part of the GDB testsuite. It tests Python-based -+# frame-filters. -+load_lib mi-support.exp -+load_lib gdb-python.exp -+ -+set MIFLAGS "-i=mi2" -+ -+gdb_exit -+if [mi_gdb_start] { -+ continue -+} -+ -+standard_testfile py-framefilter-mi.c -+set pyfile py-framefilter.py -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } { -+ untested ${testfile}.exp -+ return -1 -+} -+ -+mi_delete_breakpoints -+mi_gdb_reinitialize_dir $srcdir/$subdir -+mi_gdb_load ${binfile} -+ -+if {[lsearch -exact [mi_get_features] python] < 0} { -+ unsupported "python support is disabled" -+ return -1 -+} -+ -+mi_runto main -+ -+set remote_python_file [remote_download host ${srcdir}/${subdir}/${pyfile}] -+ -+mi_gdb_test "python execfile ('${remote_python_file}')" ".*\\^done." \ -+ "Load python file" -+ -+# Multiple blocks test -+mi_continue_to_line [gdb_get_line_number {Inner test breakpoint} ${srcfile}] \ -+ "step to breakpoint" -+ -+mi_gdb_test "-stack-list-locals --all-values" \ -+ "\\^done,locals=\\\[{name=\"h\",value=\"9\"},{name=\"f\",value=\"42\"},{name=\"g\",value=\"19\"},{name=\"bar\",value=\"$hex \\\\\"Inside block x2\\\\\"\"},{name=\"d\",value=\"15\"},{name=\"e\",value=\"14\"},{name=\"foo\",value=\"$hex \\\\\"Inside block\\\\\"\"},{name=\"str\",value=\"$hex \\\\\"The End\\\\\"\"},{name=\"st2\",value=\"$hex \\\\\"Is Near\\\\\"\"},{name=\"b\",value=\"12\"},{name=\"c\",value=\"5\"}\\\]" \ -+ "stack-list-locals --all-values" -+ -+mi_gdb_test "-enable-frame-filters" ".*\\^done." "enable frame filters" -+mi_gdb_test "-stack-list-locals --all-values" \ -+ "\\^done,locals=\\\[{name=\"h\",value=\"9\"},{name=\"f\",value=\"42\"},{name=\"g\",value=\"19\"},{name=\"bar\",value=\"$hex \\\\\"Inside block x2\\\\\"\"},{name=\"d\",value=\"15\"},{name=\"e\",value=\"14\"},{name=\"foo\",value=\"$hex \\\\\"Inside block\\\\\"\"},{name=\"str\",value=\"$hex \\\\\"The End\\\\\"\"},{name=\"st2\",value=\"$hex \\\\\"Is Near\\\\\"\"},{name=\"b\",value=\"12\"},{name=\"c\",value=\"5\"}\\\]" \ -+ "stack-list-locals --all-values frame filters enabled" -+ -+mi_continue_to_line [gdb_get_line_number {Backtrace end breakpoint} ${srcfile}] \ -+ "step to breakpoint" -+ -+mi_gdb_test "-stack-list-frames" \ -+ "\\^done,stack=\\\[frame={level=\"0\",addr=\"$hex\",func=\"cnuf_dne\".*},frame={level=\"1\",addr=\"$hex\",func=\"acnuf\".*},frame={level=\"2\",addr=\"$hex\",func=\"bcnuf\".*},frame={level=\"3\",addr=\"$hex\",func=\"acnuf\".*},frame={level=\"22\",addr=\"$hex\",func=\"1cnuf\".*,children=\\\[frame={level=\"23\",addr=\"$hex\",func=\"func2\".*}\\\]},frame={level=\"24\",addr=\"$hex\",func=\"3cnuf\".*},frame={level=\"27\",addr=\"$hex\",func=\"niam\".*}\\\].*" \ -+ "filtered stack listing" -+mi_gdb_test "-stack-list-frames 0 3" \ -+ "\\^done,stack=\\\[frame={level=\"0\",addr=\"$hex\",func=\"cnuf_dne\".*},frame={level=\"1\",addr=\"$hex\",func=\"acnuf\".*},frame={level=\"2\",addr=\"$hex\",func=\"bcnuf\".*},frame={level=\"3\",addr=\"$hex\",func=\"acnuf\".*}\\\]" \ -+ "filtered stack list 0 3" -+mi_gdb_test "-stack-list-frames 22 24" \ -+ "\\^done,stack=\\\[frame={level=\"22\",addr=\"$hex\",func=\"1cnuf\".*,children=\\\[frame={level=\"23\",addr=\"$hex\",func=\"func2\".*}\\\]},frame={level=\"24\",addr=\"$hex\",func=\"3cnuf\".*}\\\]" \ -+ "filtered stack list 22 24" -+ -+#stack list arguments -+ -+ -+mi_gdb_test "-stack-list-arguments 0" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[name=\"foo\",name=\"bar\",name=\"fb\",name=\"bf\"\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[name=\"j\"\\\]},.*frame={level=\"22\",args=\\\[\\\],children=\\\[frame={level=\"23\",args=\\\[\\\]}\\\]},.*frame={level=\"26\",args=\\\[name=\"f\",name=\"d\"\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 0" -+ -+mi_gdb_test "-stack-list-arguments --no-frame-filters 0" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[name=\"foo\",name=\"bar\",name=\"fb\",name=\"bf\"\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[name=\"j\"\\\]},.*frame={level=\"22\",args=\\\[\\\]},frame={level=\"23\",args=\\\[\\\]},.*frame={level=\"26\",args=\\\[name=\"f\",name=\"d\"\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments --no-frame-filters 0" -+ -+mi_gdb_test "-stack-list-arguments 0 0 3" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[name=\"foo\",name=\"bar\",name=\"fb\",name=\"bf\"\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[name=\"j\"\\\]},frame={level=\"3\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 0 0 3" -+ -+mi_gdb_test "-stack-list-arguments 0 22 27" \ -+ "\\^done,stack-args=\\\[frame={level=\"22\",args=\\\[\\\],children=\\\[frame={level=\"23\",args=\\\[\\\]}\\\]},.*frame={level=\"26\",args=\\\[name=\"f\",name=\"d\"\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 0 22 27" -+ -+mi_gdb_test "-stack-list-arguments 1" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[{name=\"foo\",value=\"21\"},{name=\"bar\",value=\"$hex \\\\\"Param\\\\\"\"},{name=\"fb\",value=\"$hex\"},{name=\"bf\",value=\"{nothing = $hex \\\\\"Foo Bar\\\\\", f = 42, s = 19}\"}\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[{name=\"j\",value=\"10\"}\\\]},.*frame={level=\"22\",args=\\\[\\\],children=\\\[frame={level=\"23\",args=\\\[\\\]}\\\]},.*frame={level=\"26\",args=\\\[{name=\"f\",value=\"3\"},{name=\"d\",value=\"5\"}\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 1" -+ -+mi_gdb_test "-stack-list-arguments --no-frame-filters 1" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[{name=\"foo\",value=\"21\"},{name=\"bar\",value=\"$hex \\\\\"Param\\\\\"\"},{name=\"fb\",value=\"$hex\"},{name=\"bf\",value=\"{nothing = $hex \\\\\"Foo Bar\\\\\", f = 42, s = 19}\"}\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[{name=\"j\",value=\"10\"}\\\]},.*frame={level=\"22\",args=\\\[\\\]},frame={level=\"23\",args=\\\[\\\]},.*frame={level=\"26\",args=\\\[{name=\"f\",value=\"3\"},{name=\"d\",value=\"5\"}\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments --no-frame-filters 1" -+ -+ -+mi_gdb_test "-stack-list-arguments 1 0 3" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[{name=\"foo\",value=\"21\"},{name=\"bar\",value=\"$hex \\\\\"Param\\\\\"\"},{name=\"fb\",value=\"$hex\"},{name=\"bf\",value=\"{nothing = $hex \\\\\"Foo Bar\\\\\", f = 42, s = 19}\"}\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[{name=\"j\",value=\"10\"}\\\]},frame={level=\"3\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 1 0 3" -+ -+mi_gdb_test "-stack-list-arguments 1 22 27" \ -+ "\\^done,stack-args=\\\[frame={level=\"22\",args=\\\[\\\],children=\\\[frame={level=\"23\",args=\\\[\\\]}\\\]},.*frame={level=\"26\",args=\\\[{name=\"f\",value=\"3\"},{name=\"d\",value=\"5\"}\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 1 22 27" -+ -+mi_gdb_test "-stack-list-arguments 2" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[{name=\"foo\",type=\"int\",value=\"21\"},{name=\"bar\",type=\"char \\\*\",value=\"$hex \\\\\"Param\\\\\"\"},{name=\"fb\",type=\"foobar \\\*\",value=\"$hex\"},{name=\"bf\",type=\"foobar\"\}\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[{name=\"j\",type=\"int\",value=\"10\"}\\\]},.*frame={level=\"22\",args=\\\[\\\],children=\\\[frame={level=\"23\",args=\\\[\\\]}\\\]},.*frame={level=\"26\",args=\\\[{name=\"f\",type=\"int\",value=\"3\"},{name=\"d\",type=\"int\",value=\"5\"}\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 2" -+ -+mi_gdb_test "-stack-list-arguments --no-frame-filters 2" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[{name=\"foo\",type=\"int\",value=\"21\"},{name=\"bar\",type=\"char \\\*\",value=\"$hex \\\\\"Param\\\\\"\"},{name=\"fb\",type=\"foobar \\\*\",value=\"$hex\"},{name=\"bf\",type=\"foobar\"}\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[{name=\"j\",type=\"int\",value=\"10\"}\\\]},.*frame={level=\"22\",args=\\\[\\\]},.*frame={level=\"26\",args=\\\[{name=\"f\",type=\"int\",value=\"3\"},{name=\"d\",type=\"int\",value=\"5\"}\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments --no-frame-filters 2" -+ -+ -+mi_gdb_test "-stack-list-arguments 2 0 3" \ -+ "\\^done,stack-args=\\\[frame={level=\"0\",args=\\\[{name=\"foo\",type=\"int\",value=\"21\"},{name=\"bar\",type=\"char \\\*\",value=\"$hex \\\\\"Param\\\\\"\"},{name=\"fb\",type=\"foobar \\\*\",value=\"$hex\"},{name=\"bf\",type=\"foobar\"}\\\]},frame={level=\"1\",args=\\\[\\\]},frame={level=\"2\",args=\\\[{name=\"j\",type=\"int\",value=\"10\"}\\\]},frame={level=\"3\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 2 0 3" -+ -+mi_gdb_test "-stack-list-arguments 2 22 27" \ -+ "\\^done,stack-args=\\\[frame={level=\"22\",args=\\\[\\\],children=\\\[frame={level=\"23\",args=\\\[\\\]}\\\]},.*frame={level=\"26\",args=\\\[{name=\"f\",type=\"int\",value=\"3\"},{name=\"d\",type=\"int\",value=\"5\"}\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments 2 22 27" -+ -+mi_gdb_test "-stack-list-arguments --no-frame-filters 2 22 27" \ -+ "\\^done,stack-args=\\\[frame={level=\"22\",args=\\\[\\\]},frame={level=\"23\",args=\\\[\\\]},.*frame={level=\"26\",args=\\\[{name=\"f\",type=\"int\",value=\"3\"},{name=\"d\",type=\"int\",value=\"5\"}\\\]},frame={level=\"27\",args=\\\[\\\]}\\\]" \ -+ "stack-list-arguments --no-frame-filters 2 22 27" -+ -+#stack-list-locals -+mi_gdb_test "-stack-list-locals --no-frame-filters 0" \ -+ "\\^done,locals=\\\[name=\"str\",name=\"st2\",name=\"b\",name=\"c\"\\\]" \ -+ "stack-list-locals --no-frame-filters 0" -+ -+mi_gdb_test "-stack-list-locals --no-frame-filters 1" \ -+ "\\^done,locals=\\\[{name=\"str\",value=\"$hex \\\\\"The End\\\\\"\"},{name=\"st2\",value=\"$hex \\\\\"Is Near\\\\\"\"},{name=\"b\",value=\"12\"},{name=\"c\",value=\"5\"}\\\]" \ -+ "stack-list-locals --no-frame-filters 1" -+ -+mi_gdb_test "-stack-list-locals --no-frame-filters 2" \ -+ "\\^done,locals=\\\[{name=\"str\",type=\"const char \\\*\",value=\"$hex \\\\\"The End\\\\\"\"},{name=\"st2\",type=\"const char \\\*\",value=\"$hex \\\\\"Is Near\\\\\"\"},{name=\"b\",type=\"int\",value=\"12\"},{name=\"c\",type=\"short\",value=\"5\"}\\\]" \ -+ "stack-list-locals --no-frame-filters 2" -+ -+mi_gdb_test "-stack-list-locals --no-frame-filters --no-values" \ -+ "\\^done,locals=\\\[name=\"str\",name=\"st2\",name=\"b\",name=\"c\"\\\]" \ -+ "stack-list-locals --no-frame-filters --no-values" -+ -+mi_gdb_test "-stack-list-locals --no-frame-filters --all-values" \ -+ "\\^done,locals=\\\[{name=\"str\",value=\"$hex \\\\\"The End\\\\\"\"},{name=\"st2\",value=\"$hex \\\\\"Is Near\\\\\"\"},{name=\"b\",value=\"12\"},{name=\"c\",value=\"5\"}\\\]" \ -+ "stack-list-locals --no-frame-filters --all-values" -+ -+mi_gdb_test "-stack-list-locals --no-frame-filters --simple-values" \ -+ "\\^done,locals=\\\[{name=\"str\",type=\"const char \\\*\",value=\"$hex \\\\\"The End\\\\\"\"},{name=\"st2\",type=\"const char \\\*\",value=\"$hex \\\\\"Is Near\\\\\"\"},{name=\"b\",type=\"int\",value=\"12\"},{name=\"c\",type=\"short\",value=\"5\"}\\\]" \ -+ "stack-list-locals --no-frame-filters --simple-values" -+ -+mi_gdb_test "-stack-list-locals 0" \ -+ "\\^done,locals=\\\[name=\"str\",name=\"st2\",name=\"b\",name=\"c\"\\\]" \ -+ "stack-list-locals 0" -+ -+mi_gdb_test "-stack-list-locals 1" \ -+ "\\^done,locals=\\\[{name=\"str\",value=\"$hex \\\\\"The End\\\\\"\"},{name=\"st2\",value=\"$hex \\\\\"Is Near\\\\\"\"},{name=\"b\",value=\"12\"},{name=\"c\",value=\"5\"}\\\]" \ -+ "stack-list-locals 1" -+ -+mi_gdb_test "-stack-list-locals 2" \ -+ "\\^done,locals=\\\[{name=\"str\",type=\"const char \\\*\",value=\"$hex \\\\\"The End\\\\\"\"},{name=\"st2\",type=\"const char \\\*\",value=\"$hex \\\\\"Is Near\\\\\"\"},{name=\"b\",type=\"int\",value=\"12\"},{name=\"c\",type=\"short\",value=\"5\"}\\\]" \ -+ "stack-list-locals 2" -+ -+# stack-list-variables -+mi_gdb_test "-stack-list-variables --no-frame-filters 0" \ -+ "\\^done,variables=\\\[{name=\"foo\",arg=\"1\"},{name=\"bar\",arg=\"1\"},{name=\"fb\",arg=\"1\"},{name=\"bf\",arg=\"1\"},{name=\"str\"},{name=\"st2\"},{name=\"b\"},{name=\"c\"}\\\]" \ -+ "stack-list-variables --no-frame-filters 0" -+ -+mi_gdb_test "-stack-list-variables 0" \ -+ "\\^done,variables=\\\[{name=\"foo\",arg=\"1\"},{name=\"bar\",arg=\"1\"},{name=\"fb\",arg=\"1\"},{name=\"bf\",arg=\"1\"},{name=\"str\"},{name=\"st2\"},{name=\"b\"},{name=\"c\"}\\\]" \ -+ "stack-list-variables 0" -Index: gdb-7.6/gdb/testsuite/gdb.python/py-framefilter.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.python/py-framefilter.c 2013-06-10 14:31:08.369082436 +0200 -@@ -0,0 +1,155 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2013 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 . */ -+ -+#include -+ -+void funca(void); -+int count = 0; -+ -+typedef struct -+{ -+ char *nothing; -+ int f; -+ short s; -+} foobar; -+ -+void end_func (int foo, char *bar, foobar *fb, foobar bf) -+{ -+ const char *str = "The End"; -+ const char *st2 = "Is Near"; -+ int b = 12; -+ short c = 5; -+ -+ { -+ int d = 15; -+ int e = 14; -+ const char *foo = "Inside block"; -+ { -+ int f = 42; -+ int g = 19; -+ const char *bar = "Inside block x2"; -+ { -+ short h = 9; -+ h = h +1; /* Inner test breakpoint */ -+ } -+ } -+ } -+ -+ return; /* Backtrace end breakpoint */ -+} -+ -+void funcb(int j) -+{ -+ struct foo -+ { -+ int a; -+ int b; -+ }; -+ -+ struct foo bar; -+ -+ bar.a = 42; -+ bar.b = 84; -+ -+ funca(); -+ return; -+} -+ -+void funca(void) -+{ -+ foobar fb; -+ foobar *bf = NULL; -+ -+ if (count < 10) -+ { -+ count++; -+ funcb(count); -+ } -+ -+ fb.nothing = "Foo Bar"; -+ fb.f = 42; -+ fb.s = 19; -+ -+ bf = alloca (sizeof (foobar)); -+ bf->nothing = alloca (128); -+ bf->nothing = "Bar Foo"; -+ bf->f = 24; -+ bf->s = 91; -+ -+ end_func(21, "Param", bf, fb); -+ return; -+} -+ -+ -+void func1(void) -+{ -+ funca(); -+ return; -+} -+ -+int func2(int f) -+{ -+ int c; -+ const char *elided = "Elided frame"; -+ foobar fb; -+ foobar *bf = NULL; -+ -+ fb.nothing = "Elided Foo Bar"; -+ fb.f = 84; -+ fb.s = 38; -+ -+ bf = alloca (sizeof (foobar)); -+ bf->nothing = alloca (128); -+ bf->nothing = "Elided Bar Foo"; -+ bf->f = 48; -+ bf->s = 182; -+ -+ func1(); -+ return 1; -+} -+ -+void func3(int i) -+{ -+ func2(i); -+ -+ return; -+} -+ -+int func4(int j) -+{ -+ func3(j); -+ -+ return 2; -+} -+ -+int func5(int f, int d) -+{ -+ int i = 0; -+ char *random = "random"; -+ i=i+f; -+ -+ func4(i); -+ return i; -+} -+ -+main() -+{ -+ int z = 32; -+ int y = 44; -+ const char *foo1 = "Test"; -+ func5(3,5); -+} -Index: gdb-7.6/gdb/testsuite/gdb.python/py-framefilter.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.python/py-framefilter.exp 2013-06-10 14:31:08.369082436 +0200 -@@ -0,0 +1,239 @@ -+# Copyright (C) 2013 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 . -+ -+# This file is part of the GDB testsuite. It tests Python-based -+# frame-filters. -+ -+load_lib gdb-python.exp -+ -+standard_testfile -+ -+# We cannot use prepare_for_testing as we have to set the safe-patch -+# to check objfile and progspace printers. -+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { -+ return -1 -+} -+ -+# Start with a fresh gdb. -+gdb_exit -+gdb_start -+ -+# Skip all tests if Python scripting is not enabled. -+if { [skip_python_tests] } { continue } -+ -+# Make the -gdb.py script available to gdb, it is automagically loaded by gdb. -+# Care is taken to put it in the same directory as the binary so that -+# gdb will find it. -+set remote_obj_python_file \ -+ [remote_download \ -+ host ${srcdir}/${subdir}/${testfile}-gdb.py.in \ -+ ${subdir}/${testfile}-gdb.py] -+ -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_test_no_output "set auto-load safe-path ${remote_obj_python_file}" \ -+ "set auto-load safe-path" -+gdb_load ${binfile} -+# Verify gdb loaded the script. -+gdb_test "info auto-load python-scripts" "Yes.*/${testfile}-gdb.py.*" \ -+ "Test auto-load had loaded python scripts" -+ -+if ![runto_main] then { -+ perror "couldn't run to breakpoint" -+ return -+} -+gdb_test_no_output "set python print-stack full" \ -+ "Set python print-stack to full" -+ -+# Load global frame-filters -+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py] -+gdb_test_no_output "python execfile ('${remote_python_file}')" \ -+ "Load python file" -+ -+gdb_breakpoint [gdb_get_line_number "Backtrace end breakpoint"] -+gdb_breakpoint [gdb_get_line_number "Inner test breakpoint"] -+gdb_continue_to_breakpoint "Inner test breakpoint" -+ -+# Test multiple local blocks. -+gdb_test "bt full no-filters" \ -+ ".*#0.*end_func.*h = 9.*f = 42.*g = 19.*bar = $hex \"Inside block x2\".*d = 15.*e = 14.*foo = $hex \"Inside block\".*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*" \ -+ "bt full no-filters" -+gdb_test "bt full" \ -+ ".*#0.*cnuf_dne.*h = 9.*f = 42.*g = 19.*bar = $hex \"Inside block x2\".*d = 15.*e = 14.*foo = $hex \"Inside block\".*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*" \ -+ "bt full with filters" -+ -+gdb_continue_to_breakpoint "Backtrace end breakpoint" -+ -+# Test set/show -+gdb_test "info frame-filter" \ -+ ".*900.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \ -+ "info frame filter before setting priority" -+gdb_test "show frame-filter priority global Elider" \ -+ "Priority of filter 'Elider' in list 'global' is: 900" \ -+ "show frame-filter priority global Elider before setting" -+gdb_test_no_output "set frame-filter priority global Elider 1000" \ -+ "set frame-filter priotiy global Elider 1000" -+gdb_test "show frame-filter priority global Elider" \ -+ "Priority of filter 'Elider' in list 'global' is: 1000" \ -+ "show frame-filter priority global Elider after setting" -+gdb_test "info frame-filter" \ -+ ".*1000.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \ -+ "info frame filter after setting priority" -+ -+# Test enable/disable -+gdb_test "info frame-filter" \ -+ ".*1000.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \ -+ "info frame filter before disable frame filter" -+gdb_test_no_output "disable frame-filter global Elider" \ -+ "disable frame-filter global Elider" -+gdb_test "info frame-filter" \ -+ ".*1000.*No.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \ -+ "info frame filter after disable frame filter" -+gdb_test_no_output "enable frame-filter global Elider" \ -+ "enable frame-filter global Elider" -+gdb_test "info frame-filter" \ -+ ".*1000.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \ -+ "info frame filter after reenabling frame filter" -+ -+# Test no-filters -+gdb_test "bt no-filters" \ -+ ".*#0.*end_func.*#22.*in func1.*#27.*in main \\(\\).*" \ -+ "bt no-filters" -+ -+# Test reverse -+gdb_test "bt" \ -+ ".*#0.*cnuf_dne.*#22.*in 1cnuf.*#27.*in niam \\(\\).*" \ -+ "bt with frame filters" -+ -+# Disable Reverse -+gdb_test_no_output "disable frame-filter global Reverse" \ -+ "disable frame-filter global Reverse" -+gdb_test "bt" \ -+ ".*#0.*end_func.*#22.*in func1.*#27.*in main \\(\\).*" \ -+ "bt with frame-filter Reverse disabled" -+gdb_test "bt -2" \ -+ ".*#26.*func5.*#27.*in main \\(\\).*" \ -+ "bt -2 with frame-filter Reverse disabled" -+gdb_test "bt 3" \ -+ ".*#0.*end_func.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*" \ -+ "bt 3 with frame-filter Reverse disabled" -+gdb_test "bt no-filter full" \ -+ ".*#0.*end_func.*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*bar = \{a = 42, b = 84\}.*" \ -+ "bt no-filters full with Reverse disabled" -+gdb_test "bt full" \ -+ ".*#0.*end_func.*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*bar = \{a = 42, b = 84\}.*#22.*in func1 \\(\\).*#23.*in func2 \\(f=3\\).*elided = $hex \"Elided frame\".*fb = \{nothing = $hex \"Elided Foo Bar\", f = 84, s = 38\}.*bf = $hex.*" \ -+ "bt full with Reverse disabled" -+ -+# Test set print frame-arguments -+# none -+gdb_test_no_output "set print frame-arguments none" \ -+ "turn off frame arguments" -+gdb_test "bt no-filter 1" \ -+ "#0.*end_func \\(foo=\.\.\., bar=\.\.\., fb=\.\.\., bf=\.\.\.\\) at .*py-framefilter.c.*" \ -+ "bt no-filter 1 no args" -+gdb_test "bt 1" \ -+ "#0.*end_func \\(foo=\.\.\., bar=\.\.\., fb=\.\.\., bf=\.\.\.\\) at .*py-framefilter.c.*" \ -+ "bt 1 no args" -+ -+# scalars -+gdb_test_no_output "set print frame-arguments scalars" \ -+ "turn frame arguments to scalars only" -+gdb_test "bt no-filter 1" \ -+ "#0.*end_func \\(foo=21, bar=$hex \"Param\", fb=$hex, bf=\.\.\.\\) at .*py-framefilter.c.*" \ -+ "bt no-filter 1 scalars" -+gdb_test "bt 1" \ -+ "#0.*end_func \\(foo=21, bar=$hex \"Param\", fb=$hex, bf=\.\.\.\\) at .*py-framefilter.c.*" \ -+ "bt 1 scalars" -+ -+# all -+gdb_test_no_output "set print frame-arguments all" \ -+ "turn on frame arguments" -+gdb_test "bt no-filter 1" \ -+ "#0.*end_func \\(foo=21, bar=$hex \"Param\", fb=$hex, bf=\{nothing = $hex \"Foo Bar\", f = 42, s = 19\}\\) at .*py-framefilter.c.*" \ -+ "bt no-filter 1 all args" -+gdb_test "bt 1" \ -+ "#0.*end_func \\(foo=21, bar=$hex \"Param\", fb=$hex, bf=\{nothing = $hex \"Foo Bar\", f = 42, s = 19\}\\) at .*py-framefilter.c.*" \ -+ "bt 1 all args" -+ -+# set print address off -+gdb_test_no_output "set print address off" \ -+ "Turn off address printing" -+gdb_test "bt no-filter 1" \ -+ "#0 end_func \\(foo=21, bar=\"Param\", fb=, bf=\{nothing = \"Foo Bar\", f = 42, s = 19\}\\) at .*py-framefilter.c.*" \ -+ "bt no-filter 1 no address" -+gdb_test "bt 1" \ -+ "#0 end_func \\(foo=21, bar=\"Param\", fb=, bf=\{nothing = \"Foo Bar\", f = 42, s = 19\}\\) at .*py-framefilter.c.*" \ -+ "bt 1 no addresss" -+ -+remote_file host delete ${remote_python_file} -+ -+# Test with no debuginfo -+ -+# We cannot use prepare_for_testing as we have to set the safe-patch -+# to check objfile and progspace printers. -+if {[build_executable $testfile.exp $testfile $srcfile {nodebug}] == -1} { -+ return -1 -+} -+ -+# Start with a fresh gdb. -+gdb_exit -+gdb_start -+ -+# Skip all tests if Python scripting is not enabled. -+if { [skip_python_tests] } { continue } -+ -+# Make the -gdb.py script available to gdb, it is automagically loaded by gdb. -+# Care is taken to put it in the same directory as the binary so that -+# gdb will find it. -+set remote_obj_python_file \ -+ [remote_download \ -+ host ${srcdir}/${subdir}/${testfile}-gdb.py.in \ -+ ${subdir}/${testfile}-gdb.py] -+ -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_test_no_output "set auto-load safe-path ${remote_obj_python_file}" \ -+ "set auto-load safe-path for no debug info" -+gdb_load ${binfile} -+ -+# Verify gdb loaded the script. -+gdb_test "info auto-load python-scripts" "Yes.*/${testfile}-gdb.py.*" \ -+ "Set autoload path for no debug info tests" -+if ![runto_main] then { -+ perror "couldn't run to breakpoint" -+ return -+} -+ -+gdb_test_no_output "set python print-stack full" \ -+ "set python print-stack full for no debuginfo tests" -+ -+# Load global frame-filters -+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py] -+gdb_test_no_output "python execfile ('${remote_python_file}')" \ -+ "Load python file for no debuginfo tests" -+ -+# Disable Reverse -+gdb_test_no_output "disable frame-filter global Reverse" \ -+ "disable frame-filter gloval Reverse for no debuginfo" -+gdb_test "bt" \ -+ ".*#0..*in main \\(\\).*" \ -+ "bt for no debuginfo" -+gdb_test "bt full" \ -+ ".*#0..*in main \\(\\).*" \ -+ "bt full for no debuginfo" -+gdb_test "bt no-filters" \ -+ ".*#0..*in main \\(\\).*" \ -+ "bt no filters for no debuginfo" -+gdb_test "bt no-filters full" \ -+ ".*#0..*in main \\(\\).*" \ -+ "bt no-filters full no debuginfo" -Index: gdb-7.6/gdb/testsuite/gdb.python/py-framefilter.py -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.python/py-framefilter.py 2013-06-10 14:31:08.369082436 +0200 -@@ -0,0 +1,117 @@ -+# Copyright (C) 2013 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 . -+ -+# This file is part of the GDB testsuite. It tests Python-based -+# frame-filters. -+import gdb -+import itertools -+from gdb.FrameDecorator import FrameDecorator -+import copy -+ -+class Reverse_Function (FrameDecorator): -+ -+ def __init__(self, fobj): -+ super(Reverse_Function, self).__init__(fobj) -+ self.fobj = fobj -+ -+ def function (self): -+ fname = str (self.fobj.function()) -+ if (fname == None or fname == ""): -+ return None -+ else: -+ fname = fname[::-1] -+ return fname -+ -+class Dummy (FrameDecorator): -+ -+ def __init__(self, fobj): -+ super(Dummy, self).__init__(fobj) -+ self.fobj = fobj -+ -+ def function (self): -+ return "Dummy function" -+ -+ def address (self): -+ return 0x123 -+ -+ def filename (self): -+ return "Dummy filename" -+ -+ def frame_args (self): -+ return [("Foo",gdb.Value(12)),("Bar","Stuff"), ("FooBar",42)] -+ -+ def frame_locals (self): -+ return [] -+ -+ def line (self): -+ return 0 -+ -+ def elided (self): -+ return None -+ -+class FrameFilter (): -+ -+ def __init__ (self): -+ self.name = "Reverse" -+ self.priority = 100 -+ self.enabled = True -+ gdb.frame_filters [self.name] = self -+ -+ def filter (self, frame_iter): -+ frame_iter = itertools.imap (Reverse_Function, -+ frame_iter) -+ return frame_iter -+ -+class ElidingFrameDecorator(FrameDecorator): -+ -+ def __init__(self, frame, elided_frames): -+ super(ElidingFrameDecorator, self).__init__(frame) -+ self.elided_frames = elided_frames -+ -+ def elided(self): -+ return iter(self.elided_frames) -+ -+class ElidingIterator: -+ def __init__(self, ii): -+ self.input_iterator = ii -+ -+ def __iter__(self): -+ return self -+ -+ def next(self): -+ frame = next(self.input_iterator) -+ if str(frame.function()) != 'func1': -+ return frame -+ -+ # Suppose we want to return the 'func1' frame but elide the -+ # next frame. E.g., if call in our interpreter language takes -+ # two C frames to implement, and the first one we see is the -+ # "sentinel". -+ elided = next(self.input_iterator) -+ return ElidingFrameDecorator(frame, [elided]) -+ -+class FrameElider (): -+ -+ def __init__ (self): -+ self.name = "Elider" -+ self.priority = 900 -+ self.enabled = True -+ gdb.frame_filters [self.name] = self -+ -+ def filter (self, frame_iter): -+ return ElidingIterator (frame_iter) -+ -+FrameFilter() -+FrameElider() diff --git a/gdb-upstream-framefilters-2of2.patch b/gdb-upstream-framefilters-2of2.patch deleted file mode 100644 index 0446ef6..0000000 --- a/gdb-upstream-framefilters-2of2.patch +++ /dev/null @@ -1,175 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-05/msg00141.html - -### src/gdb/ChangeLog 2013/05/17 06:58:33 1.15565 -### src/gdb/ChangeLog 2013/05/17 08:34:18 1.15566 -## -1,3 +1,18 @@ -+2013-05-17 Phil Muldoon -+ -+ * frame.c (frame_stash): Convert to htab. -+ (frame_addr_hash): New function. -+ (frame_addr_hash_eq): New function. -+ (frame_stash_create): Convert function to create -+ a hash table. -+ (frame_stash_add): Convert function to add an entry to a hash -+ table. -+ (frame_stash_find): Convert function to search the hash table. -+ (frame_stash_invalidate): Convert function to empty the hash -+ table. -+ (get_frame_id): Only add to stash if a frame_id is created. -+ (_initialize_frame): Call frame_stash_create. -+ - 2013-05-16 Yue Lu (tiny change) - - * configure.ac: Ensure MIG is available when building for GNU Hurd ---- src/gdb/frame.c 2013/04/10 15:11:11 1.317 -+++ src/gdb/frame.c 2013/05/17 08:34:18 1.318 -@@ -43,6 +43,7 @@ - #include "block.h" - #include "inline-frame.h" - #include "tracepoint.h" -+#include "hashtab.h" - - static struct frame_info *get_prev_frame_1 (struct frame_info *this_frame); - static struct frame_info *get_prev_frame_raw (struct frame_info *this_frame); -@@ -128,38 +129,107 @@ - enum unwind_stop_reason stop_reason; - }; - --/* A frame stash used to speed up frame lookups. */ -+/* A frame stash used to speed up frame lookups. Create a hash table -+ to stash frames previously accessed from the frame cache for -+ quicker subsequent retrieval. The hash table is emptied whenever -+ the frame cache is invalidated. */ -+ -+static htab_t frame_stash; -+ -+/* Internal function to calculate a hash from the frame_id addresses, -+ using as many valid addresses as possible. Frames below level 0 -+ are not stored in the hash table. */ -+ -+static hashval_t -+frame_addr_hash (const void *ap) -+{ -+ const struct frame_info *frame = ap; -+ const struct frame_id f_id = frame->this_id.value; -+ hashval_t hash = 0; -+ -+ gdb_assert (f_id.stack_addr_p || f_id.code_addr_p -+ || f_id.special_addr_p); -+ -+ if (f_id.stack_addr_p) -+ hash = iterative_hash (&f_id.stack_addr, -+ sizeof (f_id.stack_addr), hash); -+ if (f_id.code_addr_p) -+ hash = iterative_hash (&f_id.code_addr, -+ sizeof (f_id.code_addr), hash); -+ if (f_id.special_addr_p) -+ hash = iterative_hash (&f_id.special_addr, -+ sizeof (f_id.special_addr), hash); - --/* We currently only stash one frame at a time, as this seems to be -- sufficient for now. */ --static struct frame_info *frame_stash = NULL; -+ return hash; -+} -+ -+/* Internal equality function for the hash table. This function -+ defers equality operations to frame_id_eq. */ -+ -+static int -+frame_addr_hash_eq (const void *a, const void *b) -+{ -+ const struct frame_info *f_entry = a; -+ const struct frame_info *f_element = b; - --/* Add the following FRAME to the frame stash. */ -+ return frame_id_eq (f_entry->this_id.value, -+ f_element->this_id.value); -+} -+ -+/* Internal function to create the frame_stash hash table. 100 seems -+ to be a good compromise to start the hash table at. */ -+ -+static void -+frame_stash_create (void) -+{ -+ frame_stash = htab_create (100, -+ frame_addr_hash, -+ frame_addr_hash_eq, -+ NULL); -+} -+ -+/* Internal function to add a frame to the frame_stash hash table. Do -+ not store frames below 0 as they may not have any addresses to -+ calculate a hash. */ - - static void - frame_stash_add (struct frame_info *frame) - { -- frame_stash = frame; -+ /* Do not stash frames below level 0. */ -+ if (frame->level >= 0) -+ { -+ struct frame_info **slot; -+ -+ slot = (struct frame_info **) htab_find_slot (frame_stash, -+ frame, -+ INSERT); -+ *slot = frame; -+ } - } - --/* Search the frame stash for an entry with the given frame ID. -- If found, return that frame. Otherwise return NULL. */ -+/* Internal function to search the frame stash for an entry with the -+ given frame ID. If found, return that frame. Otherwise return -+ NULL. */ - - static struct frame_info * - frame_stash_find (struct frame_id id) - { -- if (frame_stash && frame_id_eq (frame_stash->this_id.value, id)) -- return frame_stash; -+ struct frame_info dummy; -+ struct frame_info *frame; - -- return NULL; -+ dummy.this_id.value = id; -+ frame = htab_find (frame_stash, &dummy); -+ return frame; - } - --/* Invalidate the frame stash by removing all entries in it. */ -+/* Internal function to invalidate the frame stash by removing all -+ entries in it. This only occurs when the frame cache is -+ invalidated. */ - - static void - frame_stash_invalidate (void) - { -- frame_stash = NULL; -+ htab_empty (frame_stash); - } - - /* Flag to control debugging. */ -@@ -345,10 +415,9 @@ - fprint_frame_id (gdb_stdlog, fi->this_id.value); - fprintf_unfiltered (gdb_stdlog, " }\n"); - } -+ frame_stash_add (fi); - } - -- frame_stash_add (fi); -- - return fi->this_id.value; - } - -@@ -2451,6 +2520,8 @@ - { - obstack_init (&frame_cache_obstack); - -+ frame_stash_create (); -+ - observer_attach_target_changed (frame_observer_target_changed); - - add_prefix_cmd ("backtrace", class_maintenance, set_backtrace_cmd, _("\ diff --git a/gdb-upstream-man-gcore-1of2.patch b/gdb-upstream-man-gcore-1of2.patch deleted file mode 100644 index c0255f3..0000000 --- a/gdb-upstream-man-gcore-1of2.patch +++ /dev/null @@ -1,690 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-04/msg00109.html - -### src/gdb/ChangeLog 2013/04/11 13:14:04 1.15397 -### src/gdb/ChangeLog 2013/04/11 14:13:42 1.15398 -## -1,4 +1,28 @@ - 2013-04-11 Jan Kratochvil -+ Pedro Alves -+ -+ * Makefile.in (HAVE_NATIVE_GCORE_TARGET): New. -+ (generated_files): Add gcore. -+ (install-only, uninstall): Add gcore if HAVE_NATIVE_GCORE_TARGET or -+ HAVE_NATIVE_GCORE_HOST. -+ (gcore): New. -+ * NEWS (Changes since GDB 7.6): Mention newly installed gcore. -+ * config/alpha/alpha-osf3.mh, config/i386/fbsd.mh, -+ config/i386/fbsd64.mh, config/i386/i386gnu.mh, config/i386/i386sol2.mh, -+ config/i386/sol2-64.mh, config/mips/irix5.mh, config/mips/irix6.mh, -+ config/powerpc/fbsd.mh, config/sparc/fbsd.mh, config/sparc/sol2.mh: -+ Add HAVE_NATIVE_GCORE_HOST. -+ * configure: Regenerate. -+ * configure.ac (HAVE_NATIVE_GCORE_TARGET): New, set it, AC_SUBST it. -+ New AC_SUBST fir GDB_TRANSFORM_NAME and GCORE_TRANSFORM_NAME. New -+ AC_CONFIG_FILES for gcore. -+ * configure.tgt: Add gdb_have_gcore to the initial comment. Set -+ gdb_have_gcore. -+ * gdb_gcore.sh: Rename to ... -+ * gcore.in: ... here. Remove gcore.sh comment. Use GDB_TRANSFORM_NAME -+ and GCORE_TRANSFORM_NAME substitutions. -+ -+2013-04-11 Jan Kratochvil - - * remote.c (unpush_and_perror): Add output message final dot. - -### src/gdb/doc/ChangeLog 2013/04/10 15:11:12 1.1440 -### src/gdb/doc/ChangeLog 2013/04/11 14:13:44 1.1441 -## -1,3 +1,13 @@ -+2013-04-11 Jan Kratochvil -+ -+ * Makefile.in (MAN1S): Add gcore.1. -+ Remove "Host, target, and site specific Makefile fragments" comment. -+ (@host_makefile_frag@, HAVE_NATIVE_GCORE_TARGET): New. -+ (install-man1, uninstall-man1): Conditionalize gcore.1. -+ (gcore.1): New. -+ * gdb.texinfo (Man Pages): Add gcore man. -+ (gcore man): New node. -+ - 2013-04-10 Pedro Alves - - * gdb.texinfo (Process Record and Replay): Document that "set -Index: gdb-7.6/gdb/gcore.in -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/gcore.in 2013-04-26 15:33:01.171049247 +0200 -@@ -0,0 +1,69 @@ -+#!/bin/sh -+ -+# Copyright (C) 2003-2013 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 . -+ -+# -+# Script to generate a core file of a running program. -+# It starts up gdb, attaches to the given PID and invokes the gcore command. -+# -+ -+if [ "$#" -eq "0" ] -+then -+ echo "usage: @GCORE_TRANSFORM_NAME@ [-o filename] pid" -+ exit 2 -+fi -+ -+# Need to check for -o option, but set default basename to "core". -+name=core -+ -+if [ "$1" = "-o" ] -+then -+ if [ "$#" -lt "3" ] -+ then -+ # Not enough arguments. -+ echo "usage: @GCORE_TRANSFORM_NAME@ [-o filename] pid" -+ exit 2 -+ fi -+ name=$2 -+ -+ # Shift over to start of pid list -+ shift; shift -+fi -+ -+# Initialise return code. -+rc=0 -+ -+# Loop through pids -+for pid in $* -+do -+ # `. -- --# --# gcore.sh --# Script to generate a core file of a running program. --# It starts up gdb, attaches to the given PID and invokes the gcore command. --# -- --if [ "$#" -eq "0" ] --then -- echo "usage: gcore [-o filename] pid" -- exit 2 --fi -- --# Need to check for -o option, but set default basename to "core". --name=core -- --if [ "$1" = "-o" ] --then -- if [ "$#" -lt "3" ] -- then -- # Not enough arguments. -- echo "usage: gcore [-o filename] pid" -- exit 2 -- fi -- name=$2 -- -- # Shift over to start of pid list -- shift; shift --fi -- --# Initialise return code. --rc=0 -- --# Loop through pids --for pid in $* --do -- # `>confdefs.h - - -+# Undo the $ec_script escaping suitable for Makefile. -+transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` -+GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"` -+if test "x$GDB_TRANSFORM_NAME" = x; then -+ GDB_TRANSFORM_NAME=gdb -+fi -+ -+GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"` -+if test "x$GCORE_TRANSFORM_NAME" = x; then -+ GCORE_TRANSFORM_NAME=gcore -+fi -+ -+ac_config_files="$ac_config_files gcore" -+ -+ - ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" - - ac_config_commands="$ac_config_commands default" -@@ -14841,6 +14867,7 @@ do - "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; - "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; - "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; -+ "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; -@@ -15462,6 +15489,7 @@ $as_echo "$as_me: executing $ac_file com - - case $ac_file$ac_mode in - "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; -+ "gcore":F) chmod +x gcore ;; - "default":C) - case x$CONFIG_HEADERS in - xconfig.h:config.in) -Index: gdb-7.6/gdb/configure.ac -=================================================================== ---- gdb-7.6.orig/gdb/configure.ac 2013-03-12 23:25:32.000000000 +0100 -+++ gdb-7.6/gdb/configure.ac 2013-04-26 15:33:01.180049239 +0200 -@@ -203,6 +203,7 @@ fi - - TARGET_OBS= - all_targets= -+HAVE_NATIVE_GCORE_TARGET= - - for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` - do -@@ -236,6 +237,12 @@ do - if test x${want64} = xfalse; then - . ${srcdir}/../bfd/config.bfd - fi -+ -+ # Check whether this target is native and supports gcore. -+ if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ -+ && $gdb_have_gcore; then -+ HAVE_NATIVE_GCORE_TARGET=1 -+ fi - fi - done - -@@ -264,6 +271,7 @@ if test x${all_targets} = xtrue; then - fi - - AC_SUBST(TARGET_OBS) -+AC_SUBST(HAVE_NATIVE_GCORE_TARGET) - - # For other settings, only the main target counts. - gdb_sim= -@@ -2349,6 +2357,20 @@ dnl At the moment, we just assume it's - AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8", - [Define to be a string naming the default host character set.]) - -+# Undo the $ec_script escaping suitable for Makefile. -+transform=`echo "$program_transform_name" | sed -e 's/[\\$][\\$]/\\$/g'` -+GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"` -+if test "x$GDB_TRANSFORM_NAME" = x; then -+ GDB_TRANSFORM_NAME=gdb -+fi -+AC_SUBST(GDB_TRANSFORM_NAME) -+GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"` -+if test "x$GCORE_TRANSFORM_NAME" = x; then -+ GCORE_TRANSFORM_NAME=gcore -+fi -+AC_SUBST(GCORE_TRANSFORM_NAME) -+AC_CONFIG_FILES([gcore], [chmod +x gcore]) -+ - AC_OUTPUT(Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile, - [ - case x$CONFIG_HEADERS in -Index: gdb-7.6/gdb/configure.tgt -=================================================================== ---- gdb-7.6.orig/gdb/configure.tgt 2013-03-05 14:37:10.000000000 +0100 -+++ gdb-7.6/gdb/configure.tgt 2013-04-26 15:33:01.180049239 +0200 -@@ -6,6 +6,7 @@ - # gdb_sim simulator library for target - # gdb_osabi default OS ABI to use with target - # build_gdbserver set to "yes" if gdbserver supports target -+# gdb_have_gcore set to "true"/"false" if this target can run gcore - - # NOTE: Every file added to a gdb_target_obs variable for any target here - # must also be added to either ALL_TARGET_OBS or ALL_64_TARGET_OBS -@@ -703,3 +704,14 @@ m68*-*-openbsd* | m88*-*-openbsd* | vax- - *-*-symbianelf*) - gdb_osabi=GDB_OSABI_SYMBIAN ;; - esac -+ -+# Check whether this target supports gcore. -+# Such target has to call set_gdbarch_find_memory_regions. -+case " ${gdb_target_obs} " in -+ *" linux-tdep.o "*) -+ gdb_have_gcore=true -+ ;; -+ *) -+ gdb_have_gcore=false -+ ;; -+esac -Index: gdb-7.6/gdb/config/alpha/alpha-osf3.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/alpha/alpha-osf3.mh 2012-01-10 17:30:44.000000000 +0100 -+++ gdb-7.6/gdb/config/alpha/alpha-osf3.mh 2013-04-26 15:33:01.181049238 +0200 -@@ -3,4 +3,5 @@ NAT_FILE= nm-osf3.h - NATDEPFILES= alpha-nat.o fork-child.o \ - solib-osf.o procfs.o proc-api.o proc-events.o proc-flags.o \ - proc-why.o dec-thread.o -+HAVE_NATIVE_GCORE_HOST = 1 - NAT_CLIBS= -lpthreaddebug -Index: gdb-7.6/gdb/config/i386/fbsd.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/i386/fbsd.mh 2009-10-26 19:28:13.000000000 +0100 -+++ gdb-7.6/gdb/config/i386/fbsd.mh 2013-04-26 15:33:01.181049238 +0200 -@@ -3,5 +3,6 @@ NATDEPFILES= fork-child.o inf-ptrace.o \ - fbsd-nat.o i386-nat.o i386bsd-nat.o i386fbsd-nat.o \ - bsd-kvm.o - NAT_FILE= nm-fbsd.h -+HAVE_NATIVE_GCORE_HOST = 1 - - LOADLIBES= -lkvm -Index: gdb-7.6/gdb/config/i386/fbsd64.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/i386/fbsd64.mh 2012-02-09 17:06:44.000000000 +0100 -+++ gdb-7.6/gdb/config/i386/fbsd64.mh 2013-04-26 15:33:01.181049238 +0200 -@@ -2,5 +2,6 @@ - NATDEPFILES= fork-child.o inf-ptrace.o \ - fbsd-nat.o amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o \ - bsd-kvm.o i386-nat.o -+HAVE_NATIVE_GCORE_HOST = 1 - - LOADLIBES= -lkvm -Index: gdb-7.6/gdb/config/i386/i386gnu.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/i386/i386gnu.mh 2012-01-10 17:30:44.000000000 +0100 -+++ gdb-7.6/gdb/config/i386/i386gnu.mh 2013-04-26 15:33:01.181049238 +0200 -@@ -2,6 +2,7 @@ - NATDEPFILES= i386gnu-nat.o gnu-nat.o core-regset.o fork-child.o \ - notify_S.o process_reply_S.o msg_reply_S.o \ - msg_U.o exc_request_U.o exc_request_S.o -+HAVE_NATIVE_GCORE_HOST = 1 - - NAT_FILE= nm-i386gnu.h - MH_CFLAGS = -D_GNU_SOURCE -Index: gdb-7.6/gdb/config/i386/i386sol2.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/i386/i386sol2.mh 2010-04-26 15:53:56.000000000 +0200 -+++ gdb-7.6/gdb/config/i386/i386sol2.mh 2013-04-26 15:33:01.181049238 +0200 -@@ -1,3 +1,4 @@ - # Host: Solaris x86 - NATDEPFILES= fork-child.o i386v4-nat.o i386-sol2-nat.o \ - procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o -+HAVE_NATIVE_GCORE_HOST = 1 -Index: gdb-7.6/gdb/config/i386/sol2-64.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/i386/sol2-64.mh 2010-04-26 15:53:57.000000000 +0200 -+++ gdb-7.6/gdb/config/i386/sol2-64.mh 2013-04-26 15:33:01.182049237 +0200 -@@ -1,3 +1,4 @@ - # Host: Solaris x86_64 - NATDEPFILES= fork-child.o amd64-nat.o i386v4-nat.o i386-sol2-nat.o \ - procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o -+HAVE_NATIVE_GCORE_HOST = 1 -Index: gdb-7.6/gdb/config/mips/irix5.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/mips/irix5.mh 2012-01-10 17:30:45.000000000 +0100 -+++ gdb-7.6/gdb/config/mips/irix5.mh 2013-04-26 15:33:01.182049237 +0200 -@@ -1,3 +1,4 @@ - # Host: SGI Iris running irix 5.x - NATDEPFILES= fork-child.o irix5-nat.o procfs.o \ - proc-api.o proc-events.o proc-flags.o proc-why.o -+HAVE_NATIVE_GCORE_HOST = 1 -Index: gdb-7.6/gdb/config/mips/irix6.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/mips/irix6.mh 2012-01-10 17:30:45.000000000 +0100 -+++ gdb-7.6/gdb/config/mips/irix6.mh 2013-04-26 15:33:01.182049237 +0200 -@@ -1,3 +1,4 @@ - # Host: SGI Iris running irix 6.x - NATDEPFILES= fork-child.o irix5-nat.o procfs.o \ - proc-api.o proc-events.o proc-flags.o proc-why.o -+HAVE_NATIVE_GCORE_HOST = 1 -Index: gdb-7.6/gdb/config/powerpc/fbsd.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/powerpc/fbsd.mh 2013-02-04 21:48:53.000000000 +0100 -+++ gdb-7.6/gdb/config/powerpc/fbsd.mh 2013-04-26 15:33:01.182049237 +0200 -@@ -18,6 +18,7 @@ - # along with this program. If not, see . */ - - NATDEPFILES= fbsd-nat.o fork-child.o inf-ptrace.o ppcfbsd-nat.o bsd-kvm.o -+HAVE_NATIVE_GCORE_HOST = 1 - - LOADLIBES= -lkvm - -Index: gdb-7.6/gdb/config/sparc/fbsd.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/sparc/fbsd.mh 2009-10-26 19:28:15.000000000 +0100 -+++ gdb-7.6/gdb/config/sparc/fbsd.mh 2013-04-26 15:33:01.182049237 +0200 -@@ -2,5 +2,6 @@ - NATDEPFILES= fork-child.o inf-ptrace.o \ - fbsd-nat.o sparc-nat.o sparc64-nat.o sparc64fbsd-nat.o \ - bsd-kvm.o -+HAVE_NATIVE_GCORE_HOST = 1 - - LOADLIBES= -lkvm -Index: gdb-7.6/gdb/config/sparc/sol2.mh -=================================================================== ---- gdb-7.6.orig/gdb/config/sparc/sol2.mh 2012-01-10 17:30:49.000000000 +0100 -+++ gdb-7.6/gdb/config/sparc/sol2.mh 2013-04-26 15:33:01.182049237 +0200 -@@ -3,3 +3,4 @@ NAT_FILE= nm-sol2.h - NATDEPFILES= sparc-sol2-nat.o \ - core-regset.o fork-child.o \ - procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o -+HAVE_NATIVE_GCORE_HOST = 1 -Index: gdb-7.6/gdb/doc/Makefile.in -=================================================================== ---- gdb-7.6.orig/gdb/doc/Makefile.in 2013-04-26 15:32:58.000000000 +0200 -+++ gdb-7.6/gdb/doc/Makefile.in 2013-04-26 15:33:01.183049235 +0200 -@@ -177,11 +177,15 @@ POD2MAN5 = pod2man --center="GNU Develop - --release="gdb-`sed q $(srcdir)/../version.in`" --section=5 - - # List of man pages generated from gdb.texi --MAN1S = gdb.1 gdbserver.1 -+MAN1S = gdb.1 gdbserver.1 gcore.1 - MAN5S = gdbinit.5 - MANS = $(MAN1S) $(MAN5S) - --#### Host, target, and site specific Makefile fragments come in here. -+# Host-dependent makefile fragment comes in here. -+@host_makefile_frag@ -+# End of host-dependent makefile fragment -+HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@ -+ - ### - - all: -@@ -269,6 +273,10 @@ install-man: install-man1 install-man5 - install-man1: $(MAN1S) - test -z "$(man1dir)" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)" - @list='$(MAN1S)'; for p in $$list; do \ -+ if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \ -+ -a "$$p" = gcore.1; then \ -+ continue; \ -+ fi; \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=`echo $$p | sed -e 's|^.*/||'`; \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \ -@@ -288,7 +296,13 @@ uninstall-man: uninstall-man1 uninstall- - - uninstall-man1: - @test -n "$(man1dir)" || exit 0; \ -- files=`{ l2='$(MAN1S)'; for i in $$l2; do echo "$$i"; done | \ -+ files=`{ l2='$(MAN1S)'; for i in $$l2; do \ -+ if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \ -+ -a "$$i" = gcore.1; then \ -+ continue; \ -+ fi; \ -+ echo "$$i"; \ -+ done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ -@@ -605,6 +619,13 @@ gdbserver.1: $(GDB_DOC_FILES) - mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) - rm -f gdbserver.pod - -+gcore.1: $(GDB_DOC_FILES) -+ touch $@ -+ -$(TEXI2POD) $(MANCONF) -Dgcore < $(srcdir)/gdb.texinfo > gcore.pod -+ -($(POD2MAN1) gcore.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) -+ rm -f gcore.pod -+ - gdbinit.5: $(GDB_DOC_FILES) - touch $@ - -$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod -Index: gdb-7.6/gdb/doc/gdb.texinfo -=================================================================== ---- gdb-7.6.orig/gdb/doc/gdb.texinfo 2013-04-26 15:32:58.000000000 +0200 -+++ gdb-7.6/gdb/doc/gdb.texinfo 2013-04-26 15:33:01.191049229 +0200 -@@ -41709,6 +41709,7 @@ switch (die->tag) - @menu - * gdb man:: The GNU Debugger man page - * gdbserver man:: Remote Server for the GNU Debugger man page -+* gcore man:: Generate a core file of a running program - * gdbinit man:: gdbinit scripts - @end menu - -@@ -42230,6 +42231,53 @@ info gdb - should give you access to the complete manual. - - @cite{Using GDB: A Guide to the GNU Source-Level Debugger}, -+Richard M. Stallman and Roland H. Pesch, July 1991. -+@end ifset -+@c man end -+ -+@node gcore man -+@heading gcore -+ -+@c man title gcore Generate a core file of a running program -+ -+@format -+@c man begin SYNOPSIS gcore -+gcore [-o @var{filename}] @var{pid} -+@c man end -+@end format -+ -+@c man begin DESCRIPTION gcore -+Generate a core dump of a running program with process ID @var{pid}. -+Produced file is equivalent to a kernel produced core file as if the process -+crashed (and if @kbd{ulimit -c} were used to set up an appropriate core dump -+limit). Unlike after a crash, after @command{gcore} the program remains -+running without any change. -+@c man end -+ -+@c man begin OPTIONS gcore -+@table @env -+@item -o @var{filename} -+The optional argument -+@var{filename} specifies the file name where to put the core dump. -+If not specified, the file name defaults to @file{core.@var{pid}}, -+where @var{pid} is the running program process ID. -+@end table -+@c man end -+ -+@c man begin SEEALSO gcore -+@ifset man -+The full documentation for @value{GDBN} is maintained as a Texinfo manual. -+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo -+documentation are properly installed at your site, the command -+ -+@smallexample -+info gdb -+@end smallexample -+ -+@noindent -+should give you access to the complete manual. -+ -+@cite{Using GDB: A Guide to the GNU Source-Level Debugger}, - Richard M. Stallman and Roland H. Pesch, July 1991. - @end ifset - @c man end diff --git a/gdb-upstream-man-gcore-2of2.patch b/gdb-upstream-man-gcore-2of2.patch deleted file mode 100644 index e8b6ce1..0000000 --- a/gdb-upstream-man-gcore-2of2.patch +++ /dev/null @@ -1,33 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-04/msg00110.html - -### src/gdb/ChangeLog 2013/04/11 14:13:42 1.15398 -### src/gdb/ChangeLog 2013/04/11 16:53:01 1.15399 -## -22,6 +22,9 @@ - * gcore.in: ... here. Remove gcore.sh comment. Use GDB_TRANSFORM_NAME - and GCORE_TRANSFORM_NAME substitutions. - -+ Fix parsing tabs in ${gdb_target_obs}. -+ * configure.tgt (gdb_have_gcore): Replace case with for and if. -+ - 2013-04-11 Jan Kratochvil - - * remote.c (unpush_and_perror): Add output message final dot. ---- src/gdb/configure.tgt 2013/04/11 14:13:43 1.273 -+++ src/gdb/configure.tgt 2013/04/11 16:53:01 1.274 -@@ -707,11 +707,9 @@ - - # Check whether this target supports gcore. - # Such target has to call set_gdbarch_find_memory_regions. --case " ${gdb_target_obs} " in -- *" linux-tdep.o "*) -+gdb_have_gcore=false -+for t in x ${gdb_target_obs}; do -+ if test "$t" = linux-tdep.o; then - gdb_have_gcore=true -- ;; -- *) -- gdb_have_gcore=false -- ;; --esac -+ fi -+done diff --git a/gdb-upstream.patch b/gdb-upstream.patch deleted file mode 100644 index 5d7665c..0000000 --- a/gdb-upstream.patch +++ /dev/null @@ -1,1343 +0,0 @@ -http://sourceware.org/ml/gdb-cvs/2013-04/msg00056.html - -### src/gdb/ChangeLog 2013/04/05 19:17:15 1.15370 -### src/gdb/ChangeLog 2013/04/05 20:01:32 1.15371 -## -1,5 +1,12 @@ - 2013-04-05 Jan Kratochvil - -+ Convert man pages to texinfo, new gdbinit.5 texinfo page. -+ * Makefile.in (gdb.z): Remove. -+ (install-only): Remove $(man1dir) and gdb.1 installation. -+ * gdb.1: Remove. -+ -+2013-04-05 Jan Kratochvil -+ - Fix compatibility with Linux kernel 3.8.3. - * linux-tdep.c (linux_find_memory_regions_full): Move variable number - to more inner block. Remove parsing of NUMBER from outer block. ---- src/gdb/Makefile.in 2013/04/05 13:24:24 1.1246 -+++ src/gdb/Makefile.in 2013/04/05 20:01:33 1.1247 -@@ -1019,11 +1019,6 @@ - info install-info clean-info dvi pdf install-pdf html install-html: force - @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do - --gdb.z:gdb.1 -- nroff -man $(srcdir)/gdb.1 | col -b > gdb.t -- pack gdb.t ; rm -f gdb.t -- mv gdb.t.z gdb.z -- - # Traditionally "install" depends on "all". But it may be useful - # not to; for example, if the user has made some trivial change to a - # source file and doesn't care about rebuilding or just wants to save the -@@ -1043,10 +1038,6 @@ - $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ - $(INSTALL_PROGRAM) gdb$(EXEEXT) \ - $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ -- $(SHELL) $(srcdir)/../mkinstalldirs \ -- $(DESTDIR)$(man1dir) ; \ -- $(INSTALL_DATA) $(srcdir)/gdb.1 \ -- $(DESTDIR)$(man1dir)/$$transformed_name.1 ; \ - $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \ - $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h - @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do -### src/gdb/doc/ChangeLog 2013/04/02 17:52:08 1.1432 -### src/gdb/doc/ChangeLog 2013/04/05 20:01:33 1.1433 -## -1,3 +1,22 @@ -+2013-04-05 Jan Kratochvil -+ -+ Convert man pages to texinfo, new gdbinit.5 texinfo page. -+ * Makefile.in (mandir, man1dir, man5dir, SYSTEM_GDBINIT, MANCONF, -+ (TEXI2POD, POD2MAN1, POD2MAN5, MAN1S, MAN5S, MANS, man): New. -+ (diststuff): Add man. -+ (install-man, install-man1, install-man5, uninstall-man, uninstall-man1) -+ (uninstall-man5): New. -+ (STAGESTUFF): Add *.1 and *.5. -+ (GDBvn.texi): Add SYSTEM_GDBINIT. -+ (gdb.1, gdbserver.1, gdbinit.5): New. -+ (maintainer-clean realclean): Add $(MANS). -+ (install): Add install-man. -+ (uninstall): Add uninstall-man. -+ * gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE. -+ (@copying): Wrap it by @c man begin COPYRIGHT. -+ (Top): Add Man Pages. -+ (Man Pages, gdb man, gdbserver man, gdbinit man): New. -+ - 2013-04-02 Pedro Alves - - * gdb.texinfo (Debugging Output): Document "set/show debug ---- src/gdb/doc/Makefile.in 2013/01/01 06:32:56 1.57 -+++ src/gdb/doc/Makefile.in 2013/04/05 20:01:33 1.58 -@@ -26,6 +26,9 @@ - docdir = @docdir@ - pdfdir = @pdfdir@ - htmldir = @htmldir@ -+mandir = @mandir@ -+man1dir = $(mandir)/man1 -+man5dir = $(mandir)/man5 - - SHELL = @SHELL@ - -@@ -35,6 +38,8 @@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_DATA = @INSTALL_DATA@ - -+SYSTEM_GDBINIT = @SYSTEM_GDBINIT@ -+ - mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs - - # main GDB source directory -@@ -160,6 +165,22 @@ - $(ANNOTATE_DOC_SOURCE_INCLUDES) \ - $(ANNOTATE_DOC_BUILD_INCLUDES) - -+# Options to extract the man page from gdb.texinfo -+MANCONF = -Dman -+ -+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \ -+ $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS) -+ -+POD2MAN1 = pod2man --center="GNU Development Tools" \ -+ --release="gdb-$(VERSION)" --section=1 -+POD2MAN5 = pod2man --center="GNU Development Tools" \ -+ --release="gdb-$(VERSION)" --section=5 -+ -+# List of man pages generated from gdb.texi -+MAN1S = gdb.1 gdbserver.1 -+MAN5S = gdbinit.5 -+MANS = $(MAN1S) $(MAN5S) -+ - #### Host, target, and site specific Makefile fragments come in here. - ### - -@@ -170,8 +191,9 @@ - ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps - html: $(HTMLFILES) - pdf: $(PDFFILES) -+man: $(MANS) - all-doc: info dvi ps # pdf --diststuff: info -+diststuff: info man - rm -f gdb-cfg.texi GDBvn.texi - - install-info: $(INFO_DEPS) -@@ -242,7 +264,49 @@ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ - done - --STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf -+install-man: install-man1 install-man5 -+ -+install-man1: $(MAN1S) -+ test -z "$(man1dir)" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)" -+ @list='$(MANS)'; for p in $$list; do \ -+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -+ f=`echo $$p | sed -e 's|^.*/||'`; \ -+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \ -+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man1dir)/$$f"; \ -+ done -+ -+install-man5: $(MAN5S) -+ test -z "$(man5dir)" || $(mkinstalldirs) "$(DESTDIR)$(man5dir)" -+ @list='$(MANS)'; for p in $$list; do \ -+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -+ f=`echo $$p | sed -e 's|^.*/||'`; \ -+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \ -+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \ -+ done -+ -+uninstall-man: uninstall-man1 uninstall-man5 -+ -+uninstall-man1: -+ @test -n "$(man1dir)" || exit 0; \ -+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \ -+ sed -n '/\.1[a-z]*$$/p'; \ -+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ -+ test -z "$$files" || { \ -+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -+ -+uninstall-man5: -+ @test -n "$(man5dir)" || exit 0; \ -+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \ -+ sed -n '/\.5[a-z]*$$/p'; \ -+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ -+ test -z "$$files" || { \ -+ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } -+ -+STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.1 *.5 - - # Copy the object files from a particular stage into a subdirectory. - stage1: force -@@ -313,6 +377,9 @@ - if test -z "$(READLINE_TEXI_INCFLAG)"; then \ - echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \ - fi -+ if [ -n "$(SYSTEM_GDBINIT)" ]; then \ -+ echo "@set SYSTEM_GDBINIT $(SYSTEM_GDBINIT)" >> ./GDBvn.new; \ -+ fi - mv GDBvn.new GDBvn.texi - - # Updated atomically -@@ -523,6 +590,28 @@ - annotate/index.html: $(ANNOTATE_DOC_FILES) - $(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo - -+# Man pages -+gdb.1: $(GDB_DOC_FILES) -+ touch $@ -+ -$(TEXI2POD) $(MANCONF) -Dgdb < gdb.texinfo > gdb.pod -+ -($(POD2MAN1) gdb.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) -+ rm -f gdb.pod -+ -+gdbserver.1: $(GDB_DOC_FILES) -+ touch $@ -+ -$(TEXI2POD) $(MANCONF) -Dgdbserver < gdb.texinfo > gdbserver.pod -+ -($(POD2MAN1) gdbserver.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) -+ rm -f gdbserver.pod -+ -+gdbinit.5: $(GDB_DOC_FILES) -+ touch $@ -+ -$(TEXI2POD) $(MANCONF) -Dgdbinit < gdb.texinfo > gdbinit.pod -+ -($(POD2MAN5) gdbinit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) -+ rm -f gdbinit.pod -+ - force: - - Makefile: Makefile.in $(host_makefile_frag) ../config.status -@@ -551,8 +640,8 @@ - # "clean" or "distclean". Use maintainer-clean to remove them. - - maintainer-clean realclean: distclean -- rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf -+ rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf $(MANS) - --install: install-info -+install: install-info install-man - --uninstall: uninstall-info -+uninstall: uninstall-info uninstall-man ---- src/gdb/doc/gdb.texinfo 2013/04/02 17:52:08 1.1069 -+++ src/gdb/doc/gdb.texinfo 2013/04/05 20:01:33 1.1070 -@@ -6,7 +6,9 @@ - @c of @set vars. However, you can override filename with makeinfo -o. - @setfilename gdb.info - @c -+@c man begin INCLUDE - @include gdb-cfg.texi -+@c man end - @c - @settitle Debugging with @value{GDBN} - @setchapternewpage odd -@@ -46,6 +48,7 @@ - @end direntry - - @copying -+@c man begin COPYRIGHT - Copyright @copyright{} 1988-2013 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this document -@@ -58,6 +61,7 @@ - (a) The FSF's Back-Cover Text is: ``You are free to copy and modify - this GNU Manual. Buying copies from GNU Press supports the FSF in - developing GNU and promoting software freedom.'' -+@c man end - @end copying - - @ifnottex -@@ -179,6 +183,7 @@ - the operating system - * Trace File Format:: GDB trace file format - * Index Section Format:: .gdb_index section format -+* Man Pages:: Manual pages - * Copying:: GNU General Public License says - how you can copy and share GDB - * GNU Free Documentation License:: The license for this documentation -@@ -41597,6 +41602,497 @@ - @} - @end smallexample - -+@node Man Pages -+@appendix Manual pages -+@cindex Man pages -+ -+@menu -+* gdb man:: The GNU Debugger man page -+* gdbserver man:: Remote Server for the GNU Debugger man page -+* gdbinit man:: gdbinit scripts -+@end menu -+ -+@node gdb man -+@heading gdb man -+ -+@c man title gdb The GNU Debugger -+ -+@c man begin SYNOPSIS gdb -+gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}] -+[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}] -+[@option{-b}@w{ }@var{bps}] -+ [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}] -+[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}] -+[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}] -+ [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}] -+@c man end -+ -+@c man begin DESCRIPTION gdb -+The purpose of a debugger such as @value{GDBN} is to allow you to see what is -+going on ``inside'' another program while it executes -- or what another -+program was doing at the moment it crashed. -+ -+@value{GDBN} can do four main kinds of things (plus other things in support of -+these) to help you catch bugs in the act: -+ -+@itemize @bullet -+@item -+Start your program, specifying anything that might affect its behavior. -+ -+@item -+Make your program stop on specified conditions. -+ -+@item -+Examine what has happened, when your program has stopped. -+ -+@item -+Change things in your program, so you can experiment with correcting the -+effects of one bug and go on to learn about another. -+@end itemize -+ -+You can use @value{GDBN} to debug programs written in C, C@t{++}, and Modula-2. -+Fortran support will be added when a GNU Fortran compiler is ready. -+ -+@value{GDBN} is invoked with the shell command @code{gdb}. Once started, it reads -+commands from the terminal until you tell it to exit with the @value{GDBN} -+command @code{quit}. You can get online help from @value{GDBN} itself -+by using the command @code{help}. -+ -+You can run @code{gdb} with no arguments or options; but the most -+usual way to start @value{GDBN} is with one argument or two, specifying an -+executable program as the argument: -+ -+@smallexample -+gdb program -+@end smallexample -+ -+You can also start with both an executable program and a core file specified: -+ -+@smallexample -+gdb program core -+@end smallexample -+ -+You can, instead, specify a process ID as a second argument, if you want -+to debug a running process: -+ -+@smallexample -+gdb program 1234 -+@end smallexample -+ -+@noindent -+would attach @value{GDBN} to process @code{1234} (unless you also have a file -+named @file{1234}; @value{GDBN} does check for a core file first). -+ -+Here are some of the most frequently needed @value{GDBN} commands: -+ -+@c pod2man highlights the right hand side of the @item lines. -+@table @env -+@item break [@var{file}:]@var{functiop} -+Set a breakpoint at @var{function} (in @var{file}). -+ -+@item run [@var{arglist}] -+Start your program (with @var{arglist}, if specified). -+ -+@item bt -+Backtrace: display the program stack. -+ -+@item print @var{expr} -+Display the value of an expression. -+ -+@item c -+Continue running your program (after stopping, e.g. at a breakpoint). -+ -+@item next -+Execute next program line (after stopping); step @emph{over} any -+function calls in the line. -+ -+@item edit [@var{file}:]@var{function} -+look at the program line where it is presently stopped. -+ -+@item list [@var{file}:]@var{function} -+type the text of the program in the vicinity of where it is presently stopped. -+ -+@item step -+Execute next program line (after stopping); step @emph{into} any -+function calls in the line. -+ -+@item help [@var{name}] -+Show information about @value{GDBN} command @var{name}, or general information -+about using @value{GDBN}. -+ -+@item quit -+Exit from @value{GDBN}. -+@end table -+ -+@ifset man -+For full details on @value{GDBN}, -+see @cite{Using GDB: A Guide to the GNU Source-Level Debugger}, -+by Richard M. Stallman and Roland H. Pesch. The same text is available online -+as the @code{gdb} entry in the @code{info} program. -+@end ifset -+@c man end -+ -+@c man begin OPTIONS gdb -+Any arguments other than options specify an executable -+file and core file (or process ID); that is, the first argument -+encountered with no -+associated option flag is equivalent to a @option{-se} option, and the second, -+if any, is equivalent to a @option{-c} option if it's the name of a file. -+Many options have -+both long and short forms; both are shown here. The long forms are also -+recognized if you truncate them, so long as enough of the option is -+present to be unambiguous. (If you prefer, you can flag option -+arguments with @option{+} rather than @option{-}, though we illustrate the -+more usual convention.) -+ -+All the options and command line arguments you give are processed -+in sequential order. The order makes a difference when the @option{-x} -+option is used. -+ -+@table @env -+@item -help -+@itemx -h -+List all options, with brief explanations. -+ -+@item -symbols=@var{file} -+@itemx -s @var{file} -+Read symbol table from file @var{file}. -+ -+@item -write -+Enable writing into executable and core files. -+ -+@item -exec=@var{file} -+@itemx -e @var{file} -+Use file @var{file} as the executable file to execute when -+appropriate, and for examining pure data in conjunction with a core -+dump. -+ -+@item -se=@var{file} -+Read symbol table from file @var{file} and use it as the executable -+file. -+ -+@item -core=@var{file} -+@itemx -c @var{file} -+Use file @var{file} as a core dump to examine. -+ -+@item -command=@var{file} -+@itemx -x @var{file} -+Execute @value{GDBN} commands from file @var{file}. -+ -+@item -ex @var{command} -+Execute given @value{GDBN} @var{command}. -+ -+@item -directory=@var{directory} -+@itemx -d @var{directory} -+Add @var{directory} to the path to search for source files. -+ -+@item -nh -+Do not execute commands from @file{~/.gdbinit}. -+ -+@item -nx -+@itemx -n -+Do not execute commands from any @file{.gdbinit} initialization files. -+ -+@item -quiet -+@itemx -q -+``Quiet''. Do not print the introductory and copyright messages. These -+messages are also suppressed in batch mode. -+ -+@item -batch -+Run in batch mode. Exit with status @code{0} after processing all the command -+files specified with @option{-x} (and @file{.gdbinit}, if not inhibited). -+Exit with nonzero status if an error occurs in executing the @value{GDBN} -+commands in the command files. -+ -+Batch mode may be useful for running @value{GDBN} as a filter, for example to -+download and run a program on another computer; in order to make this -+more useful, the message -+ -+@smallexample -+Program exited normally. -+@end smallexample -+ -+@noindent -+(which is ordinarily issued whenever a program running under @value{GDBN} control -+terminates) is not issued when running in batch mode. -+ -+@item -cd=@var{directory} -+Run @value{GDBN} using @var{directory} as its working directory, -+instead of the current directory. -+ -+@item -fullname -+@itemx -f -+Emacs sets this option when it runs @value{GDBN} as a subprocess. It tells -+@value{GDBN} to output the full file name and line number in a standard, -+recognizable fashion each time a stack frame is displayed (which -+includes each time the program stops). This recognizable format looks -+like two @samp{\032} characters, followed by the file name, line number -+and character position separated by colons, and a newline. The -+Emacs-to-@value{GDBN} interface program uses the two @samp{\032} -+characters as a signal to display the source code for the frame. -+ -+@item -b @var{bps} -+Set the line speed (baud rate or bits per second) of any serial -+interface used by @value{GDBN} for remote debugging. -+ -+@item -tty=@var{device} -+Run using @var{device} for your program's standard input and output. -+@end table -+@c man end -+ -+@c man begin SEEALSO gdb -+@ifset man -+The full documentation for @value{GDBN} is maintained as a Texinfo manual. -+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo -+documentation are properly installed at your site, the command -+ -+@smallexample -+info gdb -+@end smallexample -+ -+@noindent -+should give you access to the complete manual. -+ -+@cite{Using GDB: A Guide to the GNU Source-Level Debugger}, -+Richard M. Stallman and Roland H. Pesch, July 1991. -+@end ifset -+@c man end -+ -+@node gdbserver man -+@heading gdbserver man -+ -+@c man title gdbserver Remote Server for the GNU Debugger -+@format -+@c man begin SYNOPSIS gdbserver -+gdbserver @var{tty} @var{prog} [@var{args}@dots{}] -+ -+gdbserver @var{tty} --attach @var{PID} -+@c man end -+@end format -+ -+@c man begin DESCRIPTION gdbserver -+@command{gdbserver} is a program that allows you to run @value{GDBN} on a different machine -+than the one which is running the program being debugged. -+ -+@ifclear man -+@subheading Usage (server (target) side) -+@end ifclear -+@ifset man -+Usage (server (target) side): -+@end ifset -+ -+First, you need to have a copy of the program you want to debug put onto -+the target system. The program can be stripped to save space if needed, as -+@command{gdbserver} doesn't care about symbols. All symbol handling is taken care of by -+the @value{GDBN} running on the host system. -+ -+To use the server, you log on to the target system, and run the @command{gdbserver} -+program. You must tell it (a) how to communicate with @value{GDBN}, (b) the name of -+your program, and (c) its arguments. The general syntax is: -+ -+@smallexample -+target> gdbserver @var{comm} @var{program} [@var{args} ...] -+@end smallexample -+ -+For example, using a serial port, you might say: -+ -+@smallexample -+@ifset man -+@c @file would wrap it as F. -+target> gdbserver /dev/com1 emacs foo.txt -+@end ifset -+@ifclear man -+target> gdbserver @file{/dev/com1} emacs foo.txt -+@end ifclear -+@end smallexample -+ -+This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and -+to communicate with @value{GDBN} via @file{/dev/com1}. @command{gdbserver} now -+waits patiently for the host @value{GDBN} to communicate with it. -+ -+To use a TCP connection, you could say: -+ -+@smallexample -+target> gdbserver host:2345 emacs foo.txt -+@end smallexample -+ -+This says pretty much the same thing as the last example, except that we are -+going to communicate with the @code{host} @value{GDBN} via TCP. The @code{host:2345} argument means -+that we are expecting to see a TCP connection from @code{host} to local TCP port -+2345. (Currently, the @code{host} part is ignored.) You can choose any number you -+want for the port number as long as it does not conflict with any existing TCP -+ports on the target system. This same port number must be used in the host -+@value{GDBN}s @code{target remote} command, which will be described shortly. Note that if -+you chose a port number that conflicts with another service, @command{gdbserver} will -+print an error message and exit. -+ -+On some targets, @command{gdbserver} can also attach to running programs. -+This is accomplished via the @option{--attach} argument. The syntax is: -+ -+@smallexample -+target> gdbserver @var{comm} --attach @var{pid} -+@end smallexample -+ -+@var{pid} is the process ID of a currently running process. It isn't -+necessary to point @command{gdbserver} at a binary for the running process. -+ -+@ifclear man -+@subheading Usage (host side) -+@end ifclear -+@ifset man -+Usage (host side): -+@end ifset -+ -+You need an unstripped copy of the target program on your host system, since -+@value{GDBN} needs to examine it's symbol tables and such. Start up @value{GDBN} as you normally -+would, with the target program as the first argument. (You may need to use the -+@option{--baud} option if the serial line is running at anything except 9600 baud.) -+That is @code{gdb TARGET-PROG}, or @code{gdb --baud BAUD TARGET-PROG}. After that, the only -+new command you need to know about is @code{target remote}. It's argument is either -+a device name (usually a serial device, like @file{/dev/ttyb}), or a @code{HOST:PORT} -+descriptor. For example: -+ -+@smallexample -+@ifset man -+@c @file would wrap it as F. -+(gdb) target remote /dev/ttyb -+@end ifset -+@ifclear man -+(gdb) target remote @file{/dev/ttyb} -+@end ifclear -+@end smallexample -+ -+@noindent -+communicates with the server via serial line @file{/dev/ttyb}, and: -+ -+@smallexample -+(gdb) target remote the-target:2345 -+@end smallexample -+ -+@noindent -+communicates via a TCP connection to port 2345 on host `the-target', where -+you previously started up @command{gdbserver} with the same port number. Note that for -+TCP connections, you must start up @command{gdbserver} prior to using the `target remote' -+command, otherwise you may get an error that looks something like -+`Connection refused'. -+@c man end -+ -+@c man begin OPTIONS gdbserver -+You have to supply the name of the program to debug -+and the tty to communicate on; the remote @value{GDBN} will do everything else. -+Any remaining arguments will be passed to the program verbatim. -+@c man end -+ -+@c man begin SEEALSO gdbserver -+@ifset man -+The full documentation for @value{GDBN} is maintained as a Texinfo manual. -+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo -+documentation are properly installed at your site, the command -+ -+@smallexample -+info gdb -+@end smallexample -+ -+should give you access to the complete manual. -+ -+@cite{Using GDB: A Guide to the GNU Source-Level Debugger}, -+Richard M. Stallman and Roland H. Pesch, July 1991. -+@end ifset -+@c man end -+ -+@node gdbinit man -+@heading gdbinit -+ -+@c man title gdbinit GDB initialization scripts -+ -+@format -+@c man begin SYNOPSIS gdbinit -+@ifset SYSTEM_GDBINIT -+@value{SYSTEM_GDBINIT} -+@end ifset -+ -+~/.gdbinit -+ -+./.gdbinit -+@c man end -+@end format -+ -+@c man begin DESCRIPTION gdbinit -+These files contain @value{GDBN} commands to automatically execute during -+@value{GDBN} startup. The lines of contents are canned sequences of commands, -+described in -+@ifset man -+the @value{GDBN} manual in node @code{Sequences} -+-- shell command @code{info -f gdb -n Sequences}. -+@end ifset -+@ifclear man -+@ref{Sequences}. -+@end ifclear -+ -+Please read more in -+@ifset man -+the @value{GDBN} manual in node @code{Startup} -+-- shell command @code{info -f gdb -n Startup}. -+@end ifset -+@ifclear man -+@ref{Startup}. -+@end ifclear -+ -+@table @env -+@ifset SYSTEM_GDBINIT -+@item @value{SYSTEM_GDBINIT} -+@end ifset -+@ifclear SYSTEM_GDBINIT -+@item (not enabled with @code{--with-system-gdbinit} during compilation) -+@end ifclear -+System-wide initialization file. It is executed unless user specified -+@value{GDBN} option @code{-nx} or @code{-n}. -+See more in -+@ifset man -+the @value{GDBN} manual in node @code{System-wide configuration} -+-- shell command @code{info -f gdb -n 'System-wide configuration'}. -+@end ifset -+@ifclear man -+@ref{System-wide configuration}. -+@end ifclear -+ -+@item ~/.gdbinit -+User initialization file. It is executed unless user specified -+@value{GDBN} options @code{-nx}, @code{-n} or @code{-nh}. -+ -+@item ./.gdbinit -+Initialization file for current directory. It may need to be enabled with -+@value{GDBN} security command @code{set auto-load local-gdbinit}. -+See more in -+@ifset man -+the @value{GDBN} manual in node @code{Init File in the Current Directory} -+-- shell command @code{info -f gdb -n 'Init File in the Current Directory'}. -+@end ifset -+@ifclear man -+@ref{Init File in the Current Directory}. -+@end ifclear -+@end table -+@c man end -+ -+@c man begin SEEALSO gdbinit -+@ifset man -+gdb(1), @code{info -f gdb -n Startup} -+ -+The full documentation for @value{GDBN} is maintained as a Texinfo manual. -+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo -+documentation are properly installed at your site, the command -+ -+@smallexample -+info gdb -+@end smallexample -+ -+should give you access to the complete manual. -+ -+@cite{Using GDB: A Guide to the GNU Source-Level Debugger}, -+Richard M. Stallman and Roland H. Pesch, July 1991. -+@end ifset -+@c man end -+ - @include gpl.texi - - @node GNU Free Documentation License -### src/gdb/gdbserver/ChangeLog 2013/03/22 14:52:26 1.702 -### src/gdb/gdbserver/ChangeLog 2013/04/05 20:01:33 1.703 -## -1,3 +1,10 @@ -+2013-04-05 Jan Kratochvil -+ -+ Convert man pages to texinfo, new gdbinit.5 texinfo page. -+ * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1 -+ installation. -+ * gdbserver.1: Remove. -+ - 2013-03-22 Pedro Alves - - * linux-low.c (handle_extended_wait): Don't call ---- src/gdb/gdbserver/Makefile.in 2013/03/15 17:30:27 1.145 -+++ src/gdb/gdbserver/Makefile.in 2013/04/05 20:01:33 1.146 -@@ -252,8 +252,6 @@ - fi; \ - $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \ - $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT); \ -- $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir); \ -- $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1 - @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do - - uninstall: force - - - -http://sourceware.org/ml/gdb-cvs/2013-04/msg00057.html - -### src/gdb/doc/ChangeLog 2013/04/05 20:01:33 1.1433 -### src/gdb/doc/ChangeLog 2013/04/05 20:02:58 1.1434 -## -1,5 +1,10 @@ - 2013-04-05 Jan Kratochvil - -+ * gdb.texinfo (gdb man): Mention option -p. Include Fortran to -+ the list of supported languages. -+ -+2013-04-05 Jan Kratochvil -+ - Convert man pages to texinfo, new gdbinit.5 texinfo page. - * Makefile.in (mandir, man1dir, man5dir, SYSTEM_GDBINIT, MANCONF, - (TEXI2POD, POD2MAN1, POD2MAN5, MAN1S, MAN5S, MANS, man): New. ---- src/gdb/doc/gdb.texinfo 2013/04/05 20:01:33 1.1070 -+++ src/gdb/doc/gdb.texinfo 2013/04/05 20:02:58 1.1071 -@@ -41623,8 +41623,9 @@ - [@option{-b}@w{ }@var{bps}] - [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}] - [@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}] --[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}] -- [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}] -+[@option{-c}@w{ }@var{core}] [@option{-p}@w{ }@var{procID}] -+ [@option{-x}@w{ }@var{cmds}] [@option{-d}@w{ }@var{dir}] -+[@var{prog}|@var{prog} @var{procID}|@var{prog} @var{core}] - @c man end - - @c man begin DESCRIPTION gdb -@@ -41650,8 +41651,8 @@ - effects of one bug and go on to learn about another. - @end itemize - --You can use @value{GDBN} to debug programs written in C, C@t{++}, and Modula-2. --Fortran support will be added when a GNU Fortran compiler is ready. -+You can use @value{GDBN} to debug programs written in C, C@t{++}, Fortran and -+Modula-2. - - @value{GDBN} is invoked with the shell command @code{gdb}. Once started, it reads - commands from the terminal until you tell it to exit with the @value{GDBN} -@@ -41677,11 +41678,13 @@ - - @smallexample - gdb program 1234 -+gdb -p 1234 - @end smallexample - - @noindent - would attach @value{GDBN} to process @code{1234} (unless you also have a file - named @file{1234}; @value{GDBN} does check for a core file first). -+With option @option{-p} you can omit the @var{program} filename. - - Here are some of the most frequently needed @value{GDBN} commands: - - - - -http://sourceware.org/ml/gdb-cvs/2013-04/msg00064.html - -### src/gdb/doc/ChangeLog 2013/04/05 20:02:58 1.1434 -### src/gdb/doc/ChangeLog 2013/04/06 08:58:53 1.1435 -## -1,3 +1,11 @@ -+2013-04-06 Jan Kratochvil -+ Eli Zaretskii -+ -+ * gdb.texinfo (gdbserver man): Rename tty to comm. Swap --attach -+ parameters order. Remove "On some targets" for --attach. Document the -+ --multi parameter and extended-remote command. Document all the -+ options. -+ - 2013-04-05 Jan Kratochvil - - * gdb.texinfo (gdb man): Mention option -p. Include Fortran to ---- src/gdb/doc/gdb.texinfo 2013/04/05 20:02:58 1.1071 -+++ src/gdb/doc/gdb.texinfo 2013/04/06 08:58:53 1.1072 -@@ -41867,9 +41867,11 @@ - @c man title gdbserver Remote Server for the GNU Debugger - @format - @c man begin SYNOPSIS gdbserver --gdbserver @var{tty} @var{prog} [@var{args}@dots{}] -+gdbserver @var{comm} @var{prog} [@var{args}@dots{}] - --gdbserver @var{tty} --attach @var{PID} -+gdbserver --attach @var{comm} @var{pid} -+ -+gdbserver --multi @var{comm} - @c man end - @end format - -@@ -41929,16 +41931,25 @@ - you chose a port number that conflicts with another service, @command{gdbserver} will - print an error message and exit. - --On some targets, @command{gdbserver} can also attach to running programs. -+@command{gdbserver} can also attach to running programs. - This is accomplished via the @option{--attach} argument. The syntax is: - - @smallexample --target> gdbserver @var{comm} --attach @var{pid} -+target> gdbserver --attach @var{comm} @var{pid} - @end smallexample - - @var{pid} is the process ID of a currently running process. It isn't - necessary to point @command{gdbserver} at a binary for the running process. - -+To start @code{gdbserver} without supplying an initial command to run -+or process ID to attach, use the @option{--multi} command line option. -+In such case you should connect using @kbd{target extended-remote} to start -+the program you want to debug. -+ -+@smallexample -+target> gdbserver --multi @var{comm} -+@end smallexample -+ - @ifclear man - @subheading Usage (host side) - @end ifclear -@@ -41951,7 +41962,8 @@ - would, with the target program as the first argument. (You may need to use the - @option{--baud} option if the serial line is running at anything except 9600 baud.) - That is @code{gdb TARGET-PROG}, or @code{gdb --baud BAUD TARGET-PROG}. After that, the only --new command you need to know about is @code{target remote}. It's argument is either -+new command you need to know about is @code{target remote} -+(or @code{target extended-remote}). Its argument is either - a device name (usually a serial device, like @file{/dev/ttyb}), or a @code{HOST:PORT} - descriptor. For example: - -@@ -41978,12 +41990,131 @@ - TCP connections, you must start up @command{gdbserver} prior to using the `target remote' - command, otherwise you may get an error that looks something like - `Connection refused'. -+ -+@command{gdbserver} can also debug multiple inferiors at once, -+described in -+@ifset man -+the @value{GDBN} manual in node @code{Inferiors and Programs} -+-- shell command @code{info -f gdb -n 'Inferiors and Programs'}. -+@end ifset -+@ifclear man -+@ref{Inferiors and Programs}. -+@end ifclear -+In such case use the @code{extended-remote} @value{GDBN} command variant: -+ -+@smallexample -+(gdb) target extended-remote the-target:2345 -+@end smallexample -+ -+The @command{gdbserver} option @option{--multi} may or may not be used in such -+case. - @c man end - - @c man begin OPTIONS gdbserver --You have to supply the name of the program to debug --and the tty to communicate on; the remote @value{GDBN} will do everything else. --Any remaining arguments will be passed to the program verbatim. -+There are three different modes for invoking @command{gdbserver}: -+ -+@itemize @bullet -+ -+@item -+Debug a specific program specified by its program name: -+ -+@smallexample -+gdbserver @var{comm} @var{prog} [@var{args}@dots{}] -+@end smallexample -+ -+The @var{comm} parameter specifies how should the server communicate -+with @value{GDBN}; it is either a device name (to use a serial line), -+a TCP port number (@code{:1234}), or @code{-} or @code{stdio} to use -+stdin/stdout of @code{gdbserver}. Specify the name of the program to -+debug in @var{prog}. Any remaining arguments will be passed to the -+program verbatim. When the program exits, @value{GDBN} will close the -+connection, and @code{gdbserver} will exit. -+ -+@item -+Debug a specific program by specifying the process ID of a running -+program: -+ -+@smallexample -+gdbserver --attach @var{comm} @var{pid} -+@end smallexample -+ -+The @var{comm} parameter is as described above. Supply the process ID -+of a running program in @var{pid}; @value{GDBN} will do everything -+else. Like with the previous mode, when the process @var{pid} exits, -+@value{GDBN} will close the connection, and @code{gdbserver} will exit. -+ -+@item -+Multi-process mode -- debug more than one program/process: -+ -+@smallexample -+gdbserver --multi @var{comm} -+@end smallexample -+ -+In this mode, @value{GDBN} can instruct @command{gdbserver} which -+command(s) to run. Unlike the other 2 modes, @value{GDBN} will not -+close the connection when a process being debugged exits, so you can -+debug several processes in the same session. -+@end itemize -+ -+In each of the modes you may specify these options: -+ -+@table @env -+ -+@item --help -+List all options, with brief explanations. -+ -+@item --version -+This option causes @command{gdbserver} to print its version number and exit. -+ -+@item --attach -+@command{gdbserver} will attach to a running program. The syntax is: -+ -+@smallexample -+target> gdbserver --attach @var{comm} @var{pid} -+@end smallexample -+ -+@var{pid} is the process ID of a currently running process. It isn't -+necessary to point @command{gdbserver} at a binary for the running process. -+ -+@item --multi -+To start @code{gdbserver} without supplying an initial command to run -+or process ID to attach, use this command line option. -+Then you can connect using @kbd{target extended-remote} and start -+the program you want to debug. The syntax is: -+ -+@smallexample -+target> gdbserver --multi @var{comm} -+@end smallexample -+ -+@item --debug -+Instruct @code{gdbserver} to display extra status information about the debugging -+process. -+This option is intended for @code{gdbserver} development and for bug reports to -+the developers. -+ -+@item --remote-debug -+Instruct @code{gdbserver} to display remote protocol debug output. -+This option is intended for @code{gdbserver} development and for bug reports to -+the developers. -+ -+@item --wrapper -+Specify a wrapper to launch programs -+for debugging. The option should be followed by the name of the -+wrapper, then any command-line arguments to pass to the wrapper, then -+@kbd{--} indicating the end of the wrapper arguments. -+ -+@item --once -+By default, @command{gdbserver} keeps the listening TCP port open, so that -+additional connections are possible. However, if you start @code{gdbserver} -+with the @option{--once} option, it will stop listening for any further -+connection attempts after connecting to the first @value{GDBN} session. -+ -+@c --disable-packet is not documented for users. -+ -+@c --disable-randomization and --no-disable-randomization are superseded by -+@c QDisableRandomization. -+ -+@end table - @c man end - - @c man begin SEEALSO gdbserver - - - -http://sourceware.org/ml/gdb-cvs/2013-04/msg00065.html - -### src/gdb/doc/ChangeLog 2013/04/06 08:58:53 1.1435 -### src/gdb/doc/ChangeLog 2013/04/06 15:52:06 1.1436 -## -1,4 +1,8 @@ - 2013-04-06 Jan Kratochvil -+ -+ * Makefile.in (POD2MAN1, POD2MAN5): Replace $(VERSION) by ../version.in. -+ -+2013-04-06 Jan Kratochvil - Eli Zaretskii - - * gdb.texinfo (gdbserver man): Rename tty to comm. Swap --attach ---- src/gdb/doc/Makefile.in 2013/04/05 20:01:33 1.58 -+++ src/gdb/doc/Makefile.in 2013/04/06 15:52:06 1.59 -@@ -172,9 +172,9 @@ - $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS) - - POD2MAN1 = pod2man --center="GNU Development Tools" \ -- --release="gdb-$(VERSION)" --section=1 -+ --release="gdb-`sed q $(srcdir)/../version.in`" --section=1 - POD2MAN5 = pod2man --center="GNU Development Tools" \ -- --release="gdb-$(VERSION)" --section=5 -+ --release="gdb-`sed q $(srcdir)/../version.in`" --section=5 - - # List of man pages generated from gdb.texi - MAN1S = gdb.1 gdbserver.1 - - - -http://sourceware.org/ml/gdb-cvs/2013-04/msg00068.html - -### src/gdb/gdbserver/ChangeLog 2013/04/05 20:01:33 1.703 -### src/gdb/gdbserver/ChangeLog 2013/04/07 05:53:21 1.704 -## -1,3 +1,7 @@ -+2013-04-07 Jan Kratochvil -+ -+ * Makefile.in (install-only): Fix make install regression. -+ - 2013-04-05 Jan Kratochvil - - Convert man pages to texinfo, new gdbinit.5 texinfo page. ---- src/gdb/gdbserver/Makefile.in 2013/04/05 20:01:33 1.146 -+++ src/gdb/gdbserver/Makefile.in 2013/04/07 05:53:22 1.147 -@@ -251,7 +251,7 @@ - $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \ - fi; \ - $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \ -- $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT); \ -+ $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) - @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do - - uninstall: force - - - -http://sourceware.org/ml/gdb-cvs/2013-04/msg00069.html - -### src/gdb/doc/ChangeLog 2013/04/06 15:52:06 1.1436 -### src/gdb/doc/ChangeLog 2013/04/07 06:04:58 1.1437 -## -2,6 +2,9 @@ - - * Makefile.in (POD2MAN1, POD2MAN5): Replace $(VERSION) by ../version.in. - -+ * Makefile.in (install-man1, install-man5, uninstall-man1) -+ (uninstall-man5): Replace $(MANS) by $(MAN1S) and $(MAN5S) respectively. -+ - 2013-04-06 Jan Kratochvil - Eli Zaretskii - ---- src/gdb/doc/Makefile.in 2013/04/06 15:52:06 1.59 -+++ src/gdb/doc/Makefile.in 2013/04/07 06:04:58 1.60 -@@ -268,7 +268,7 @@ - - install-man1: $(MAN1S) - test -z "$(man1dir)" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)" -- @list='$(MANS)'; for p in $$list; do \ -+ @list='$(MAN1S)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=`echo $$p | sed -e 's|^.*/||'`; \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \ -@@ -277,7 +277,7 @@ - - install-man5: $(MAN5S) - test -z "$(man5dir)" || $(mkinstalldirs) "$(DESTDIR)$(man5dir)" -- @list='$(MANS)'; for p in $$list; do \ -+ @list='$(MAN5S)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=`echo $$p | sed -e 's|^.*/||'`; \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \ -@@ -288,7 +288,7 @@ - - uninstall-man1: - @test -n "$(man1dir)" || exit 0; \ -- files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \ -+ files=`{ l2='$(MAN1S)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ -@@ -298,7 +298,7 @@ - - uninstall-man5: - @test -n "$(man5dir)" || exit 0; \ -- files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \ -+ files=`{ l2='$(MAN5S)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - - - -http://sourceware.org/ml/gdb-cvs/2013-04/msg00070.html - -### src/gdb/doc/ChangeLog 2013/04/07 06:04:58 1.1437 -### src/gdb/doc/ChangeLog 2013/04/07 06:20:19 1.1438 -## -5,6 +5,8 @@ - * Makefile.in (install-man1, install-man5, uninstall-man1) - (uninstall-man5): Replace $(MANS) by $(MAN1S) and $(MAN5S) respectively. - -+ * Makefile.in (gdb.1, gdbserver.1, gdbinit.5): Use $(srcdir). -+ - 2013-04-06 Jan Kratochvil - Eli Zaretskii - ---- src/gdb/doc/Makefile.in 2013/04/07 06:04:58 1.60 -+++ src/gdb/doc/Makefile.in 2013/04/07 06:20:19 1.61 -@@ -593,21 +593,21 @@ - # Man pages - gdb.1: $(GDB_DOC_FILES) - touch $@ -- -$(TEXI2POD) $(MANCONF) -Dgdb < gdb.texinfo > gdb.pod -+ -$(TEXI2POD) $(MANCONF) -Dgdb < $(srcdir)/gdb.texinfo > gdb.pod - -($(POD2MAN1) gdb.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ - mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) - rm -f gdb.pod - - gdbserver.1: $(GDB_DOC_FILES) - touch $@ -- -$(TEXI2POD) $(MANCONF) -Dgdbserver < gdb.texinfo > gdbserver.pod -+ -$(TEXI2POD) $(MANCONF) -Dgdbserver < $(srcdir)/gdb.texinfo > gdbserver.pod - -($(POD2MAN1) gdbserver.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ - mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) - rm -f gdbserver.pod - - gdbinit.5: $(GDB_DOC_FILES) - touch $@ -- -$(TEXI2POD) $(MANCONF) -Dgdbinit < gdb.texinfo > gdbinit.pod -+ -$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod - -($(POD2MAN5) gdbinit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ - mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) - rm -f gdbinit.pod - - - -http://sourceware.org/bugzilla/show_bug.cgi?id=15413 -http://sourceware.org/ml/gdb-cvs/2013-05/msg00063.html - -### src/gdb/ChangeLog 2013/04/26 14:13:13 1.15260.2.50 -### src/gdb/ChangeLog 2013/05/07 17:04:56 1.15260.2.51 -## -1,3 +1,10 @@ -+2013-05-07 Sergio Durigan Junior -+ -+ PR breakpoints/15413: -+ * breakpoint.c (condition_completer): Simplify the code to -+ disconsider multiple locations of breakpoints when completing the -+ "condition" command. -+ - 2013-04-26 Joel Brobecker - - * version.in: Set version to 7.6.0.20130426-cvs. ---- src/gdb/breakpoint.c 2013/04/25 08:15:34 1.745.2.5 -+++ src/gdb/breakpoint.c 2013/05/07 17:04:57 1.745.2.6 -@@ -1015,27 +1015,14 @@ - len = strlen (text); - - ALL_BREAKPOINTS (b) -- { -- int single = b->loc->next == NULL; -- struct bp_location *loc; -- int count = 1; -- -- for (loc = b->loc; loc; loc = loc->next) -- { -- char location[50]; -- -- if (single) -- xsnprintf (location, sizeof (location), "%d", b->number); -- else -- xsnprintf (location, sizeof (location), "%d.%d", b->number, -- count); -+ { -+ char number[50]; - -- if (strncmp (location, text, len) == 0) -- VEC_safe_push (char_ptr, result, xstrdup (location)); -+ xsnprintf (number, sizeof (number), "%d", b->number); - -- ++count; -- } -- } -+ if (strncmp (number, text, len) == 0) -+ VEC_safe_push (char_ptr, result, xstrdup (number)); -+ } - - return result; - } -### src/gdb/testsuite/ChangeLog 2013/05/03 16:26:32 1.3580.2.20 -### src/gdb/testsuite/ChangeLog 2013/05/07 17:04:57 1.3580.2.21 -## -1,3 +1,11 @@ -+2013-05-07 Sergio Durigan Junior -+ -+ PR breakpoints/15413: -+ * gdb.base/pending.exp: Add test for completion of the "condition" -+ command for pending breakpoints. -+ * gdb.linespec/linespec.ex: Add test for completion of the -+ "condition" command when dealing with multiple locations. -+ - 2013-05-03 Hafiz Abid Qadeer - - * status-stop.exp (test_tstart_tstart): Check for error ---- src/gdb/testsuite/gdb.base/pending.exp 2013/01/01 06:33:26 1.27 -+++ src/gdb/testsuite/gdb.base/pending.exp 2013/05/07 17:04:57 1.27.2.1 -@@ -55,6 +55,9 @@ - } - } - -+# Complete the condition (PR 15413). -+gdb_test "complete condition " "condition 1" -+ - gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* - \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*" \ ---- src/gdb/testsuite/gdb.linespec/linespec.exp 2013/01/01 06:41:24 1.6 -+++ src/gdb/testsuite/gdb.linespec/linespec.exp 2013/05/07 17:04:57 1.6.2.1 -@@ -63,6 +63,10 @@ - "Breakpoint $decimal at $hex: dupname:label. \[(\]2 locations\[)\]" \ - "multi-location break using duplicate function name and label" - -+# Testing if the "condition" command completes only the breakpoints, -+# not the locations. -+gdb_test "complete condition " "condition $decimal\r\ncondition $decimal\r\ncondition $decimal" -+ - gdb_test_no_output "set breakpoint pending off" \ - "disable pending breakpoints for linespec tests" - - - - -https://bugzilla.redhat.com/show_bug.cgi?id=967915 -http://sourceware.org/ml/gdb-cvs/2013-05/msg00146.html - -### src/gdb/ChangeLog 2013/05/17 18:09:05 1.15569 -### src/gdb/ChangeLog 2013/05/17 23:05:00 1.15570 -## -1,3 +1,9 @@ -+2013-05-17 Edjunior Machado -+ -+ * ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Check if the -+ region is ok for a hardware watchpoint using the new ptrace interface -+ on Power servers. -+ - 2013-05-17 Doug Evans - - * NEWS: Mention new maintenance commands check-symtabs, and ---- src/gdb/ppc-linux-nat.c 2013/05/07 07:43:33 1.119 -+++ src/gdb/ppc-linux-nat.c 2013/05/17 23:05:00 1.120 -@@ -1503,16 +1503,19 @@ - to determine the hardcoded watchable region for watchpoints. */ - if (have_ptrace_booke_interface ()) - { -- /* DAC-based processors (i.e., embedded processors), like the PowerPC 440 -- have ranged watchpoints and can watch any access within an arbitrary -- memory region. This is useful to watch arrays and structs, for -- instance. It takes two hardware watchpoints though. */ -+ /* Embedded DAC-based processors, like the PowerPC 440 have ranged -+ watchpoints and can watch any access within an arbitrary memory -+ region. This is useful to watch arrays and structs, for instance. It -+ takes two hardware watchpoints though. */ - if (len > 1 -- && booke_debug_info.features & PPC_DEBUG_FEATURE_DATA_BP_RANGE) -+ && booke_debug_info.features & PPC_DEBUG_FEATURE_DATA_BP_RANGE -+ && ppc_linux_get_hwcap () & PPC_FEATURE_BOOKE) - return 2; -- else if (booke_debug_info.data_bp_alignment -- && (addr + len > (addr & ~(booke_debug_info.data_bp_alignment - 1)) -- + booke_debug_info.data_bp_alignment)) -+ /* Server processors provide one hardware watchpoint and addr+len should -+ fall in the watchable region provided by the ptrace interface. */ -+ if (booke_debug_info.data_bp_alignment -+ && (addr + len > (addr & ~(booke_debug_info.data_bp_alignment - 1)) -+ + booke_debug_info.data_bp_alignment)) - return 0; - } - /* addr+len must fall in the 8 byte watchable region for DABR-based diff --git a/gdb-vdso-gcore.patch b/gdb-vdso-gcore.patch deleted file mode 100644 index 4fdbc81..0000000 --- a/gdb-vdso-gcore.patch +++ /dev/null @@ -1,56 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2013-05/msg00042.html -Subject: [patch] Fix gcore for vDSO (on ppc64) - -Hi, - -on ppc64 GNU/Linux one gets in live process or kernel-generated core file: - -#0 0x00003fff9e946b3c in __pause_nocancel () from /lib64/libc.so.6 -#1 0x000000001000080c in handle_alrm (signo=14) at small.c:16 -#2 -#3 0x00003fff9e946b3c in __pause_nocancel () from /lib64/libc.so.6 -#4 0x0000000010000914 in main (argc=2, argv=0x3fffcd00dec8) at small.c:32 - -while with gcore generated core file one gets: - -#0 0x00003fff9e946b3c in __pause_nocancel () from /lib64/libc.so.6 -#1 0x000000001000080c in handle_alrm (signo=14) at small.c:16 -#2 0x00003fff9ea70448 in ?? () -#3 0x0000000010000914 in main (argc=2, argv=0x3fffcd00dec8) at small.c:32 - -This is because on ppc64 GNU/Linux the signal handler frame is in vDSO (and -not in libc as on x86_64 GNU/Linux). And if one has kernel-debuginfo -installed GDB gcore thinks it can omit the vDSO page from core file. - -As vDSO cannot be reliably found from link_map it should be rather fully -present in the core file. Which also gcore_create_callback tries to do but it -gets mistaken by the separate debug info. - -It seems pretty obvious patch to me. - - -Thanks, -Jan - - -gdb/ -2013-05-03 Jan Kratochvil - - * gcore.c (gcore_create_callback): Ignore sections with - separate_debug_objfile_backlink != NULL. - ---- gdb-7.6-orig/gdb/gcore.c 2013-01-01 07:32:42.000000000 +0100 -+++ gdb-7.6/gdb/gcore.c 2013-05-03 03:31:34.795312996 +0200 -@@ -428,8 +428,9 @@ gcore_create_callback (CORE_ADDR vaddr, - - This BFD was synthesized from reading target memory, - we don't want to omit that. */ -- if (((vaddr >= start && vaddr + size <= end) -- || (start >= vaddr && end <= vaddr + size)) -+ if (objfile->separate_debug_objfile_backlink == NULL -+ && ((vaddr >= start && vaddr + size <= end) -+ || (start >= vaddr && end <= vaddr + size)) - && !(bfd_get_file_flags (abfd) & BFD_IN_MEMORY)) - { - flags &= ~(SEC_LOAD | SEC_HAS_CONTENTS); - diff --git a/gdb.spec b/gdb.spec index bbe6edf..471e00e 100644 --- a/gdb.spec +++ b/gdb.spec @@ -27,22 +27,23 @@ Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages Name: %{?scl_prefix}gdb -#global snap 20130423 +# 6e5c95e6cf1e3c37bd3a822ca9e6721caab97a85 +%global snap 20130731 # Freeze it when GDB gets branched -%global snapsrc 20130312 +%global snapsrc 20130731 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20121213 -Version: 7.6 +Version: 7.6.50.%{snap} # 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: 36%{?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 # Do not provide URL for snapshots as the file lasts there only for 2 days. # ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2 -Source: ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2 +Source: gdb-%{version}-cvs.tar.bz2 Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) URL: http://gnu.org/software/gdb/ @@ -51,7 +52,7 @@ Obsoletes: devtoolset-1.0-%{pkg_name} %endif # For our convenience -%global gdb_src %{pkg_name}-%{version} +%global gdb_src %{pkg_name}-%{version}-cvs %global gdb_build build-%{_target_platform} # Make sure we get rid of the old package gdb64, now that we have unified @@ -262,12 +263,7 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch # Backported fixups post the source tarball. #Xdrop: Just backports. -Patch232: gdb-upstream.patch -Patch828: gdb-upstream-man-gcore-1of2.patch -Patch829: gdb-upstream-man-gcore-2of2.patch -# Backported Python frame filters (Phil Muldoon). -Patch836: gdb-upstream-framefilters-1of2.patch -Patch837: gdb-upstream-framefilters-2of2.patch +#Patch232: gdb-upstream.patch # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). #=fedoratest+ppc @@ -504,20 +500,6 @@ Patch548: gdb-test-expr-cumulative-archer.patch #=push+work 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). -# Fix crash regression from the dlopen of libpthread.so fix (BZ 911712). -# Fix performance regression when inferior opens many libraries (Gary Benson). -#=drop -Patch718: gdb-dlopen-stap-probe-1of9.patch -Patch719: gdb-dlopen-stap-probe-2of9.patch -Patch720: gdb-dlopen-stap-probe-3of9.patch -Patch721: gdb-dlopen-stap-probe-4of9.patch -Patch722: gdb-dlopen-stap-probe-5of9.patch -Patch723: gdb-dlopen-stap-probe-6of9.patch -Patch822: gdb-dlopen-stap-probe-7of9.patch -Patch827: gdb-dlopen-stap-probe-8of9.patch -Patch619: gdb-dlopen-stap-probe-9of9.patch - # Work around PR libc/13097 "linux-vdso.so.1" warning message. #=push Patch627: gdb-glibc-vdso-workaround.patch @@ -533,8 +515,6 @@ Patch642: gdb-readline62-ask-more-rh.patch # Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878). #=push Patch653: gdb-attach-fail-reasons-5of5.patch -#=fedora -Patch657: gdb-attach-fail-reasons-5of5configure.patch # Workaround crashes from stale frame_info pointer (BZ 804256). #=fedora @@ -569,24 +549,6 @@ Patch818: gdb-rhbz795424-bitpos-lazyvalue.patch #=fedoratest Patch832: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch -# Fix gcore for vDSO (on ppc64). -#=drop -Patch834: gdb-vdso-gcore.patch - -# Fix needless expansion of non-gdbindex symtabs (Doug Evans). -#=drop -Patch835: gdb-psymtab-expand.patch - -# Fix C++ lookups performance regression (Doug Evans, BZ 972677). -#=drop -Patch838: gdb-cxx-performance-1of2.patch -Patch839: gdb-cxx-performance-2of2.patch - -# [ppc] Support Power8 CPU (IBM, BZ 731875). -#=drop -Patch840: gdb-power8-1of2.patch -Patch841: gdb-power8-2of2.patch - %if 0%{!?rhel:1} || 0%{?rhel} > 6 # RL_STATE_FEDORA_GDB would not be found for: # Patch642: gdb-readline62-ask-more-rh.patch @@ -792,9 +754,7 @@ find -name "*.info*"|xargs rm -f %patch2 -p1 %patch349 -p1 -%patch232 -p1 -%patch828 -p1 -%patch829 -p1 +#patch232 -p1 %patch1 -p1 %patch3 -p1 @@ -883,19 +843,9 @@ find -name "*.info*"|xargs rm -f %patch547 -p1 %patch548 -p1 %patch579 -p1 -%patch718 -p1 -%patch719 -p1 -%patch720 -p1 -%patch721 -p1 -%patch722 -p1 -%patch723 -p1 -%patch822 -p1 -%patch827 -p1 -%patch619 -p1 %patch627 -p1 %patch634 -p1 %patch653 -p1 -%patch657 -p1 %patch661 -p1 %patch690 -p1 %patch698 -p1 @@ -908,19 +858,7 @@ find -name "*.info*"|xargs rm -f %patch817 -p1 %patch818 -p1 %patch832 -p1 -%patch834 -p1 -%patch835 -p1 -%patch838 -p1 -%patch839 -p1 -%patch840 -p1 -%patch841 -p1 -%patch836 -p1 -%patch837 -p1 -%if 0%{?scl:1} -%patch836 -p1 -R -%patch837 -p1 -R -%endif %patch393 -p1 %if 0%{!?el5:1} || 0%{?scl:1} %patch393 -p1 -R @@ -1422,6 +1360,9 @@ fi %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch" %changelog +* Fri Aug 2 2013 Jan Kratochvil - 7.6.50.20130731-1.fc20 +- Rebase to FSF GDB 7.6.50.20130731 (pre-7.6 snapshot). + * Mon Jul 29 2013 Jan Kratochvil - 7.6-36.fc20 - Remove %%{gdb_docdir}, rebuild for unversioned docdirs (for BZ 986871). diff --git a/sources b/sources index 1f9fa5b..2055164 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ 4981307aa9619bbec5b73261e4e41c8d gdb-libstdc++-v3-python-r155978.tar.bz2 -fda57170e4d11cdde74259ca575412a8 gdb-7.6.tar.bz2 +8ce4e757790139e3f07652a2b49d79ff gdb-7.6.50.20130624.tar.bz2 +f16c33bdd9d0030d0c2a42d5f319f841 gdb-7.6.50.20130731-cvs.tar.bz2