changed debian/source/format to native
This commit is contained in:
parent
b5d49162d4
commit
fc1f49f743
|
@ -1,2 +0,0 @@
|
|||
git diff b755db3c98137baaff8a154d936d326d9a9c72a7 001bcd07e0cea1fd8b996e10f91325831db029c3
|
||||
|
|
@ -1,300 +0,0 @@
|
|||
--- a/gdb/testsuite/gdb.multi.orig/multi-term-settings.c
|
||||
+++ b/gdb/testsuite/gdb.multi/multi-term-settings.c
|
||||
@@ -1,52 +0,0 @@
|
||||
-/* This testcase is part of GDB, the GNU debugger.
|
||||
-
|
||||
- Copyright 2017-2020 Free Software Foundation, Inc.
|
||||
-
|
||||
- This program is free software; you can redistribute it and/or modify
|
||||
- it under the terms of the GNU General Public License as published by
|
||||
- the Free Software Foundation; either version 3 of the License, or
|
||||
- (at your option) any later version.
|
||||
-
|
||||
- This program is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- GNU General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU General Public License
|
||||
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
-
|
||||
-/* This program is intended to be started outside of gdb, and then
|
||||
- attached to by gdb. It loops for a while, but not forever. */
|
||||
-
|
||||
-#include <unistd.h>
|
||||
-#include <stdio.h>
|
||||
-#include <sys/types.h>
|
||||
-#include <termios.h>
|
||||
-#include <unistd.h>
|
||||
-#include <signal.h>
|
||||
-
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
- /* In case we inherit SIG_IGN. */
|
||||
- signal (SIGTTOU, SIG_DFL);
|
||||
-
|
||||
- alarm (240);
|
||||
-
|
||||
- int count = 0;
|
||||
- while (1)
|
||||
- {
|
||||
- struct termios termios;
|
||||
-
|
||||
- printf ("pid=%ld, count=%d\n", (long) getpid (), count++);
|
||||
-
|
||||
- /* This generates a SIGTTOU if our progress group is not in the
|
||||
- foreground. */
|
||||
- tcgetattr (0, &termios);
|
||||
- tcsetattr (0, TCSANOW, &termios);
|
||||
-
|
||||
- usleep (100000);
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
--- a/gdb/testsuite/gdb.multi.orig/multi-term-settings.exp
|
||||
+++ b/gdb/testsuite/gdb.multi/multi-term-settings.exp
|
||||
@@ -1,242 +0,0 @@
|
||||
-# This testcase is part of GDB, the GNU debugger.
|
||||
-
|
||||
-# Copyright 2017-2020 Free Software Foundation, Inc.
|
||||
-
|
||||
-# This program is free software; you can redistribute it and/or modify
|
||||
-# it under the terms of the GNU General Public License as published by
|
||||
-# the Free Software Foundation; either version 3 of the License, or
|
||||
-# (at your option) any later version.
|
||||
-#
|
||||
-# This program is distributed in the hope that it will be useful,
|
||||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-# GNU General Public License for more details.
|
||||
-#
|
||||
-# You should have received a copy of the GNU General Public License
|
||||
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-
|
||||
-# This testcase exercises GDB's terminal ownership management
|
||||
-# (terminal_ours/terminal_inferior, etc.) when debugging multiple
|
||||
-# inferiors. It tests debugging multiple inferiors started with
|
||||
-# different combinations of 'run'/'run+tty'/'attach', and ensures that
|
||||
-# the process that is sharing GDB's terminal/session is properly made
|
||||
-# the GDB terminal's foregound process group (i.e., "given the
|
||||
-# terminal").
|
||||
-
|
||||
-standard_testfile
|
||||
-
|
||||
-if ![can_spawn_for_attach] {
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-if [build_executable "failed to prepare" $testfile $srcfile {debug}] {
|
||||
- return -1
|
||||
-}
|
||||
-
|
||||
-# Start the programs running and then wait for a bit, to be sure that
|
||||
-# they can be attached to. We start these processes upfront in order
|
||||
-# to reuse them for the different iterations. This makes the testcase
|
||||
-# faster, compared to calling spawn_wait_for_attach for each iteration
|
||||
-# in the testing matrix.
|
||||
-
|
||||
-set spawn_id_list [spawn_wait_for_attach [list $binfile $binfile]]
|
||||
-set attach_spawn_id1 [lindex $spawn_id_list 0]
|
||||
-set attach_spawn_id2 [lindex $spawn_id_list 1]
|
||||
-set attach_pid1 [spawn_id_get_pid $attach_spawn_id1]
|
||||
-set attach_pid2 [spawn_id_get_pid $attach_spawn_id2]
|
||||
-
|
||||
-# Create inferior WHICH_INF. INF_HOW is how to create it. This can
|
||||
-# be one of:
|
||||
-#
|
||||
-# - "run" - for "run" command.
|
||||
-# - "tty" - for "run" + "tty TTY".
|
||||
-# - "attach" - for attaching to an existing process.
|
||||
-proc create_inferior {which_inf inf_how} {
|
||||
- global binfile
|
||||
-
|
||||
- # Run to main and delete breakpoints.
|
||||
- proc my_runto_main {} {
|
||||
- if ![runto_main] {
|
||||
- fail "run to main"
|
||||
- return 0
|
||||
- } else {
|
||||
- # Delete breakpoints otherwise GDB would try to step over
|
||||
- # the breakpoint at 'main' without resuming the other
|
||||
- # inferior, possibly masking the issue we're trying to
|
||||
- # test.
|
||||
- delete_breakpoints
|
||||
- return 1
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if {$inf_how == "run"} {
|
||||
- if [my_runto_main] {
|
||||
- global inferior_spawn_id
|
||||
- return $inferior_spawn_id
|
||||
- }
|
||||
- } elseif {$inf_how == "tty"} {
|
||||
- # Create the new PTY for the inferior.
|
||||
- spawn -pty
|
||||
- set inf_spawn_id $spawn_id
|
||||
- set inf_tty_name $spawn_out(slave,name)
|
||||
- gdb_test_no_output "tty $inf_tty_name" "tty TTY"
|
||||
-
|
||||
- if [my_runto_main] {
|
||||
- return $inf_spawn_id
|
||||
- }
|
||||
- } elseif {$inf_how == "attach"} {
|
||||
-
|
||||
- # Reuse the inferiors spawned at the start of the testcase (to
|
||||
- # avoid having to wait the delay imposed by
|
||||
- # spawn_wait_for_attach).
|
||||
- global attach_spawn_id$which_inf
|
||||
- set test_spawn_id [set attach_spawn_id$which_inf]
|
||||
- set testpid [spawn_id_get_pid $test_spawn_id]
|
||||
- if {[gdb_test "attach $testpid" \
|
||||
- "Attaching to program: .*, process $testpid.*(in|at).*" \
|
||||
- "attach"] == 0} {
|
||||
- return $test_spawn_id
|
||||
- }
|
||||
- } else {
|
||||
- error "unhandled inf_how: $inf_how"
|
||||
- }
|
||||
-
|
||||
- return ""
|
||||
-}
|
||||
-
|
||||
-# Print debug output.
|
||||
-
|
||||
-proc send_debug {str} {
|
||||
- # Uncomment for debugging.
|
||||
- #send_user $str
|
||||
-}
|
||||
-
|
||||
-# The core of the testcase. See intro. Creates two inferiors that
|
||||
-# both loop changing their terminal's settings and printing output,
|
||||
-# and checks whether they receive SIGTTOU. INF1_HOW and INF2_HOW
|
||||
-# indicate how inferiors 1 and 2 should be created, respectively. See
|
||||
-# 'create_inferior' above for what arguments these parameters accept.
|
||||
-
|
||||
-proc coretest {inf1_how inf2_how} {
|
||||
- global binfile
|
||||
- global inferior_spawn_id
|
||||
- global gdb_spawn_id
|
||||
- global decimal
|
||||
-
|
||||
- clean_restart $binfile
|
||||
-
|
||||
- set inf1_spawn_id [create_inferior 1 $inf1_how]
|
||||
-
|
||||
- set num 2
|
||||
- gdb_test "add-inferior" "Added inferior $num.*" \
|
||||
- "add empty inferior $num"
|
||||
- gdb_test "inferior $num" "Switching to inferior $num.*" \
|
||||
- "switch to inferior $num"
|
||||
- gdb_file_cmd ${binfile}
|
||||
-
|
||||
- set inf2_spawn_id [create_inferior 2 $inf2_how]
|
||||
-
|
||||
- gdb_test_no_output "set schedule-multiple on"
|
||||
-
|
||||
- # "run" makes each inferior be a process group leader. When we
|
||||
- # run both inferiors in GDB's terminal/session, only one can end
|
||||
- # up as the terminal's foreground process group, so it's expected
|
||||
- # that the other receives a SIGTTOU.
|
||||
- set expect_ttou [expr {$inf1_how == "run" && $inf2_how == "run"}]
|
||||
-
|
||||
- global gdb_prompt
|
||||
-
|
||||
- set any "\[^\r\n\]*"
|
||||
-
|
||||
- set pid1 -1
|
||||
- set pid2 -1
|
||||
-
|
||||
- set test "info inferiors"
|
||||
- gdb_test_multiple $test $test {
|
||||
- -re "1${any}process ($decimal)${any}\r\n" {
|
||||
- set pid1 $expect_out(1,string)
|
||||
- send_debug "pid1=$pid1\n"
|
||||
- exp_continue
|
||||
- }
|
||||
- -re "2${any}process ($decimal)${any}\r\n" {
|
||||
- set pid2 $expect_out(1,string)
|
||||
- send_debug "pid2=$pid2\n"
|
||||
- exp_continue
|
||||
- }
|
||||
- -re "$gdb_prompt $" {
|
||||
- pass $test
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- # Helper for the gdb_test_multiple call below. Issues a PASS if
|
||||
- # we've seen each inferior print at least 3 times, otherwise
|
||||
- # continues waiting for inferior output.
|
||||
- proc pass_or_exp_continue {} {
|
||||
- uplevel 1 {
|
||||
- if {$count1 >= 3 && $count2 >= 3} {
|
||||
- if $expect_ttou {
|
||||
- fail "$test (expected SIGTTOU)"
|
||||
- } else {
|
||||
- pass $test
|
||||
- }
|
||||
- } else {
|
||||
- exp_continue
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- set infs_spawn_ids [list $inf1_spawn_id $inf2_spawn_id]
|
||||
- send_debug "infs_spawn_ids=$infs_spawn_ids\n"
|
||||
-
|
||||
- set count1 0
|
||||
- set count2 0
|
||||
-
|
||||
- set test "continue"
|
||||
- gdb_test_multiple $test $test {
|
||||
- -i $infs_spawn_ids -re "pid=$pid1, count=" {
|
||||
- incr count1
|
||||
- pass_or_exp_continue
|
||||
- }
|
||||
- -i $infs_spawn_ids -re "pid=$pid2, count=" {
|
||||
- incr count2
|
||||
- pass_or_exp_continue
|
||||
- }
|
||||
- -i $gdb_spawn_id -re "received signal SIGTTOU.*$gdb_prompt " {
|
||||
- if $expect_ttou {
|
||||
- pass "$test (expected SIGTTOU)"
|
||||
- } else {
|
||||
- fail "$test (SIGTTOU)"
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- send_gdb "\003"
|
||||
- if {$expect_ttou} {
|
||||
- gdb_test "" "Quit" "stop with control-c (Quit)"
|
||||
- } else {
|
||||
- gdb_test "" "received signal SIGINT.*" "stop with control-c (SIGINT)"
|
||||
- }
|
||||
-
|
||||
- # Useful for debugging in case the Ctrl-C above fails.
|
||||
- gdb_test "info inferiors"
|
||||
- gdb_test "info threads"
|
||||
-}
|
||||
-
|
||||
-set how_modes {"run" "attach" "tty"}
|
||||
-
|
||||
-foreach_with_prefix inf1_how $how_modes {
|
||||
- foreach_with_prefix inf2_how $how_modes {
|
||||
- if {($inf1_how == "tty" || $inf2_how == "tty")
|
||||
- && [target_info gdb_protocol] == "extended-remote"} {
|
||||
- # No way to specify the inferior's tty in the remote
|
||||
- # protocol.
|
||||
- unsupported "no support for \"tty\" in the RSP"
|
||||
- continue
|
||||
- }
|
||||
-
|
||||
- coretest $inf1_how $inf2_how
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-kill_wait_spawned_process $attach_spawn_id1
|
||||
-kill_wait_spawned_process $attach_spawn_id2
|
|
@ -1,37 +0,0 @@
|
|||
Index: b/gdb/auxv.c
|
||||
===================================================================
|
||||
--- a/gdb/auxv.c
|
||||
+++ b/gdb/auxv.c
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "auxv.h"
|
||||
#include "elf/common.h"
|
||||
+#include <bits/auxv.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
Index: b/gdb/gdbserver/linux-low.c
|
||||
===================================================================
|
||||
--- a/gdb/gdbserver/linux-low.c
|
||||
+++ b/gdb/gdbserver/linux-low.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <sched.h>
|
||||
#include <ctype.h>
|
||||
#include <pwd.h>
|
||||
+#include <bits/auxv.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
Index: b/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -48,6 +48,8 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "probe.h"
|
||||
|
||||
+#include <bits/auxv.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);
|
|
@ -1,146 +0,0 @@
|
|||
Bug-Debian: http://bugs.debian.org/581707
|
||||
Bug-Redhat: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337
|
||||
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Origin: vendor, http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch?id=e6e9cf3987dc51070b7b58db9967209f23a8c3d3
|
||||
|
||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
currently for trivial nonthreaded helloworld with no debug info up to -ggdb2 you
|
||||
will get:
|
||||
(gdb) p errno
|
||||
[some error]
|
||||
|
||||
* with -ggdb2 and less "errno" in fact does not exist anywhere as it was
|
||||
compiled to "(*__errno_location ())" and the macro definition is not present.
|
||||
Unfortunately gdb will find the TLS symbol and it will try to access it but
|
||||
as the program has been compiled without -lpthread the TLS base register
|
||||
(%gs on i386) is not setup and it will result in:
|
||||
Cannot access memory at address 0x8
|
||||
|
||||
Attached suggestion patch how to deal with the most common "errno" symbol
|
||||
for the most common under-ggdb3 compiled programs.
|
||||
|
||||
Original patch hooked into target_translate_tls_address. But its inferior
|
||||
call invalidates `struct frame *' in the callers - RH BZ 690908.
|
||||
|
||||
|
||||
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* ./gdb/dwarf2read.c (read_partial_die, dwarf2_linkage_name): Prefer
|
||||
DW_AT_MIPS_linkage_name over DW_AT_name now only for non-C.
|
||||
|
||||
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
|
||||
@@ -1202,7 +1202,11 @@ print_command_1 (const char *args, int v
|
||||
|
||||
if (exp != nullptr && *exp)
|
||||
{
|
||||
- expression_up expr = parse_expression (exp);
|
||||
+ expression_up expr;
|
||||
+
|
||||
+ if (strcmp (exp, "errno") == 0)
|
||||
+ exp = "*((int *(*) (void)) __errno_location) ()";
|
||||
+ expr = parse_expression (exp);
|
||||
val = evaluate_expression (expr.get ());
|
||||
}
|
||||
else
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2005, 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ errno = 42;
|
||||
+
|
||||
+ return 0; /* breakpoint */
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
@@ -0,0 +1,60 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile dw2-errno
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+proc prep {} {
|
||||
+ global srcdir subdir binfile
|
||||
+ gdb_exit
|
||||
+ gdb_start
|
||||
+ gdb_reinitialize_dir $srcdir/$subdir
|
||||
+ gdb_load ${binfile}
|
||||
+
|
||||
+ runto_main
|
||||
+
|
||||
+ gdb_breakpoint [gdb_get_line_number "breakpoint"]
|
||||
+ gdb_continue_to_breakpoint "breakpoint"
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+prep
|
||||
+gdb_test "print errno" ".* = 42" "errno with macros=N threads=N"
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+prep
|
||||
+gdb_test "print errno" ".* = 42" "errno with macros=Y threads=N"
|
||||
+
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+prep
|
||||
+gdb_test "print errno" ".* = 42" "errno with macros=N threads=Y"
|
||||
+
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+prep
|
||||
+gdb_test "print errno" ".* = 42" "errno with macros=Y threads=Y"
|
||||
+
|
||||
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
||||
+# Just how to find the current libc filename?
|
|
@ -1,83 +0,0 @@
|
|||
Daniel,
|
||||
|
||||
Although the proper way of adding case insensitivity to symbol lookup is
|
||||
still under discussion, I think it might be desirable to set the main
|
||||
function of Fortran programs to "MAIN__" first. Because it can at least
|
||||
let GDB recognize that the language is Fortran after loading a Fortran
|
||||
executable only. What is your idea on this? Please comments. TIA!
|
||||
|
||||
Here is the patch to set the main function in Fortran programs to
|
||||
"MAIN__". And followed is a patch to verify this. Tested with g77 and
|
||||
gfortran on x86, and g77 on ppc64. With the first patch, it reported
|
||||
PASS; without, report FAIL. No regression is found in gdb.fortran
|
||||
testcases.
|
||||
|
||||
P.S: if there is a symbol named "MAIN__" in sources of other languages, it
|
||||
might disturb the debugging. But I am not sure how much it is.
|
||||
---
|
||||
gdb/symtab.c | 8 ++++++--
|
||||
gdb/testsuite/gdb.fortran/lang.exp | 40 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 46 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/lang.exp
|
||||
|
||||
--- a/gdb/symtab.c
|
||||
+++ b/gdb/symtab.c
|
||||
@@ -6015,8 +6015,13 @@ find_main_name (void)
|
||||
}
|
||||
|
||||
/* The languages above didn't identify the name of the main procedure.
|
||||
- Fallback to "main". */
|
||||
- set_main_name ("main", language_unknown);
|
||||
+ Fallback to "MAIN__" (g77 and gfortran) if we can find it in the
|
||||
+ minimal symtab, to "main" otherwise. */
|
||||
+ struct bound_minimal_symbol msym = lookup_minimal_symbol ("MAIN__", NULL, NULL);
|
||||
+ if (msym.minsym)
|
||||
+ set_main_name ("MAIN__", language_fortran);
|
||||
+ else
|
||||
+ set_main_name ("main", language_unknown);
|
||||
}
|
||||
|
||||
/* See symtab.h. */
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/lang.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# This file was written by Wu Zhou. (woodzltc@cn.ibm.com)
|
||||
+
|
||||
+# This file is part of the gdb testsuite. It is intended to test that gdb
|
||||
+# could recognize the Fortran language after loading the binary
|
||||
+
|
||||
+if $tracelevel then {
|
||||
+ strace $tracelevel
|
||||
+}
|
||||
+
|
||||
+set testfile "array-element"
|
||||
+set srcfile ${srcdir}/${subdir}/${testfile}.f
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+if { [gdb_compile "${srcfile}" "${binfile}" executable {debug f77}] != "" } {
|
||||
+ untested "Couldn't compile ${srcfile}"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+gdb_test "show language" ".*currently fortran.*" "show language(fortran)"
|
|
@ -1,29 +0,0 @@
|
|||
http://sourceware.org/ml/gdb-patches/2011-08/msg00331.html
|
||||
Subject: [RFC] Work around PR libc/13097 "linux-vdso.so.1" #2
|
||||
|
||||
Hi,
|
||||
|
||||
missed the x86_64-m32 case:
|
||||
|
||||
gdb/
|
||||
2011-08-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Work around PR libc/13097.
|
||||
* solib.c (update_solib_list): Ignore "linux-vdso.so.1".
|
||||
|
||||
--- a/gdb/solib.c
|
||||
+++ b/gdb/solib.c
|
||||
@@ -868,8 +868,11 @@ update_solib_list (int from_tty)
|
||||
|
||||
try
|
||||
{
|
||||
- /* Fill in the rest of the `struct so_list' node. */
|
||||
- if (!solib_map_sections (i))
|
||||
+ /* Fill in the rest of the `struct so_list' node.
|
||||
+ Work around PR libc/13097. */
|
||||
+ if (!solib_map_sections (i)
|
||||
+ && strcmp (i->so_original_name, "linux-vdso.so.1") != 0
|
||||
+ && strcmp (i->so_original_name, "linux-gate.so.1") != 0)
|
||||
{
|
||||
not_found++;
|
||||
if (not_found_filename == NULL)
|
|
@ -1,13 +0,0 @@
|
|||
Index: b/gdb/remote.c
|
||||
===================================================================
|
||||
--- a/gdb/remote.c
|
||||
+++ b/gdb/remote.c
|
||||
@@ -10286,7 +10286,7 @@ compare_sections_command (const char *ar
|
||||
}
|
||||
}
|
||||
if (mismatched > 0)
|
||||
- warning (_("One or more sections of the target image does not match\n\
|
||||
+ warning (_("One or more sections of the target image do not match\n\
|
||||
the loaded file\n"));
|
||||
if (args && !matched)
|
||||
printf_filtered (_("No loaded section named '%s'.\n"), args);
|
|
@ -1,327 +0,0 @@
|
|||
# git clone https://gitlab.com/gbenson/binutils-gdb.git gdb/src
|
||||
# git diff 1f1c02597cc199227226251a2ea51fe5f44b4d6d ec7642f5d7ba9bdbc35f08f3ffa3c360bd4618d0
|
||||
|
||||
gdb/
|
||||
|
||||
2017-06-06 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* proc-service.c (ps_get_register): New function.
|
||||
(ps_foreach_infinity_note): Likewise.
|
||||
(ps_infinity_relocate_addr): New static function.
|
||||
* proc-service.list: Add ps_get_register and
|
||||
ps_foreach_infinity_note.
|
||||
|
||||
2017-06-06 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* gdb_proc_service.h (ps_infinity_reloc_f): New typedef.
|
||||
(ps_visit_infinity_note_f): Likewise.
|
||||
(ps_get_register): New declaration.
|
||||
(ps_foreach_infinity_note): Likewise.
|
||||
|
||||
2017-06-06 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* amd64-tdep.c (amd64_dwarf_regmap): Add AMD64_FSBASE_REGNUM
|
||||
and AMD64_GSBASE_REGNUM.
|
||||
|
||||
bfd/
|
||||
|
||||
2017-06-06 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* elf-bfd.h (struct elf_infinity_note): New structure.
|
||||
(struct elf_obj_tdata): Add new field infinity_note_head.
|
||||
* elf.c (elfobj_grok_gnu_infinity): New function.
|
||||
(elfobj_grok_gnu_note): Call the above.
|
||||
|
||||
include/
|
||||
|
||||
2017-06-06 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* elf/common.h: Add NT_GNU_INFINITY.
|
||||
|
||||
Index: b/bfd/elf-bfd.h
|
||||
===================================================================
|
||||
--- a/bfd/elf-bfd.h
|
||||
+++ b/bfd/elf-bfd.h
|
||||
@@ -1744,6 +1744,15 @@ struct sdt_note
|
||||
bfd_byte data[1];
|
||||
};
|
||||
|
||||
+/* An Infinity note. */
|
||||
+struct elf_infinity_note
|
||||
+{
|
||||
+ struct elf_infinity_note *next;
|
||||
+ bfd_vma fileoffset;
|
||||
+ size_t size;
|
||||
+ bfd_byte data[0];
|
||||
+};
|
||||
+
|
||||
/* tdata information grabbed from an elf core file. */
|
||||
struct core_elf_obj_tdata
|
||||
{
|
||||
@@ -1906,6 +1915,11 @@ struct elf_obj_tdata
|
||||
in the list. */
|
||||
struct sdt_note *sdt_note_head;
|
||||
|
||||
+ /* Linked list containing information about every Infinity note
|
||||
+ found in the object file. Each note corresponds to one entry
|
||||
+ in the list. */
|
||||
+ struct elf_infinity_note *infinity_note_head;
|
||||
+
|
||||
Elf_Internal_Shdr **group_sect_ptr;
|
||||
int num_group;
|
||||
|
||||
Index: b/bfd/elf.c
|
||||
===================================================================
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9814,6 +9814,26 @@ elfobj_grok_gnu_build_id (bfd *abfd, Elf
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
+elfobj_grok_gnu_infinity (bfd *abfd, Elf_Internal_Note *note)
|
||||
+{
|
||||
+ struct elf_infinity_note *cur;
|
||||
+
|
||||
+ if (note->descsz == 0)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ cur = bfd_alloc (abfd, sizeof (struct elf_infinity_note) + note->descsz);
|
||||
+
|
||||
+ cur->next = elf_tdata (abfd)->infinity_note_head;
|
||||
+ cur->fileoffset = note->descpos;
|
||||
+ cur->size = note->descsz;
|
||||
+ memcpy (cur->data, note->descdata, note->descsz);
|
||||
+
|
||||
+ elf_tdata (abfd)->infinity_note_head = cur;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static bfd_boolean
|
||||
elfobj_grok_gnu_note (bfd *abfd, Elf_Internal_Note *note)
|
||||
{
|
||||
switch (note->type)
|
||||
@@ -9826,6 +9846,9 @@ elfobj_grok_gnu_note (bfd *abfd, Elf_Int
|
||||
|
||||
case NT_GNU_BUILD_ID:
|
||||
return elfobj_grok_gnu_build_id (abfd, note);
|
||||
+
|
||||
+ case NT_GNU_INFINITY:
|
||||
+ return elfobj_grok_gnu_infinity (abfd, note);
|
||||
}
|
||||
}
|
||||
|
||||
Index: b/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- a/gdb/amd64-tdep.c
|
||||
+++ b/gdb/amd64-tdep.c
|
||||
@@ -220,8 +220,8 @@ static int amd64_dwarf_regmap[] =
|
||||
-1,
|
||||
|
||||
/* Segment Base Address Registers. */
|
||||
- -1,
|
||||
- -1,
|
||||
+ AMD64_FSBASE_REGNUM,
|
||||
+ AMD64_GSBASE_REGNUM,
|
||||
-1,
|
||||
-1,
|
||||
|
||||
Index: b/gdb/gdb_proc_service.h
|
||||
===================================================================
|
||||
--- a/gdb/gdb_proc_service.h
|
||||
+++ b/gdb/gdb_proc_service.h
|
||||
@@ -175,6 +175,52 @@ typedef gdb_fpregset_t gdb_prfpregset_t;
|
||||
typedef prfpregset_t gdb_prfpregset_t;
|
||||
#endif
|
||||
|
||||
+/* XXX need to check for ps_get_register and ps_foreach_infinity_note
|
||||
+ in ./configure if HAVE_PROC_SERVICE_H and only define them here if
|
||||
+ we don't already have them. */
|
||||
+
|
||||
+EXTERN_C_PUSH
|
||||
+
|
||||
+/* Get the contents of a single register. */
|
||||
+extern ps_err_e ps_get_register (struct ps_prochandle *ph,
|
||||
+ lwpid_t lwpid, int dwarf_regnum,
|
||||
+ psaddr_t *result);
|
||||
+
|
||||
+/* Callback to relocate addresses in Infinity notes. */
|
||||
+typedef ps_err_e ps_infinity_reloc_f (void *rf_arg,
|
||||
+ psaddr_t unrelocated,
|
||||
+ psaddr_t *result);
|
||||
+
|
||||
+/* Callback for iteration over Infinity notes. Should return PS_OK to
|
||||
+ indicate success, or any other value to indicate failure. CB_ARG
|
||||
+ is whatever was passed as CB_ARG to ps_foreach_infinity_note. BUF
|
||||
+ is is a pointer to a buffer of BUFSIZ bytes containing the encoded
|
||||
+ note. SRCNAME is an identifier used to construct error messages,
|
||||
+ typically a filename, and may be NULL if unset. SRCOFFSET is the
|
||||
+ offset into SRCNAME of the start of BUF, and may be -1 if unset.
|
||||
+ RF is a function that should be used to relocate addresses in this
|
||||
+ notes, and RF_ARG is an argument that should be passed as to RF. */
|
||||
+typedef ps_err_e ps_visit_infinity_note_f (void *cb_arg,
|
||||
+ const char *buf,
|
||||
+ size_t bufsiz,
|
||||
+ const char *srcname,
|
||||
+ ssize_t srcoffset,
|
||||
+ ps_infinity_reloc_f *rf,
|
||||
+ void *rf_arg);
|
||||
+
|
||||
+/* Call the callback CB for each Infinity note in the process. The
|
||||
+ callback should return PS_OK to indicate that iteration should
|
||||
+ continue, or any other value to indicate that iteration should stop
|
||||
+ and that ps_foreach_infinity_note should return the non-PS_OK value
|
||||
+ that the callback returned. Return PS_OK if the callback returned
|
||||
+ PS_OK for all Infinity notes, or if there are no Infinity notes in
|
||||
+ the process. */
|
||||
+extern ps_err_e ps_foreach_infinity_note (struct ps_prochandle *ph,
|
||||
+ ps_visit_infinity_note_f *cb,
|
||||
+ void *cb_arg);
|
||||
+
|
||||
+EXTERN_C_POP
|
||||
+
|
||||
/* GDB specific structure that identifies the target process. */
|
||||
struct ps_prochandle
|
||||
{
|
||||
Index: b/gdb/proc-service.c
|
||||
===================================================================
|
||||
--- a/gdb/proc-service.c
|
||||
+++ b/gdb/proc-service.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "target.h"
|
||||
#include "regcache.h"
|
||||
#include "objfiles.h"
|
||||
+#include "elf-bfd.h"
|
||||
|
||||
#include "gdb_proc_service.h"
|
||||
|
||||
@@ -190,6 +191,31 @@ ps_lsetfpregs (struct ps_prochandle *ph,
|
||||
return PS_OK;
|
||||
}
|
||||
|
||||
+/* See gdb_proc_service.h. */
|
||||
+
|
||||
+ps_err_e
|
||||
+ps_get_register (struct ps_prochandle *ph, lwpid_t lwpid,
|
||||
+ int dwarf_reg, psaddr_t *result)
|
||||
+{
|
||||
+ struct gdbarch *gdbarch = target_gdbarch ();
|
||||
+ ptid_t lwp_ptid;
|
||||
+ struct regcache *regcache;
|
||||
+ int reg;enum register_status status;
|
||||
+
|
||||
+ reg = gdbarch_dwarf2_reg_to_regnum (gdbarch, dwarf_reg);
|
||||
+ if (reg == -1)
|
||||
+ {
|
||||
+ warning (_("Bad DWARF register number %d"), dwarf_reg);
|
||||
+ return PS_ERR;
|
||||
+ }
|
||||
+
|
||||
+ lwp_ptid = ptid_build (ptid_get_pid (ph->ptid), lwpid, 0);
|
||||
+ regcache = get_thread_arch_regcache (lwp_ptid, gdbarch);
|
||||
+ status = regcache_raw_read (regcache, reg, (gdb_byte *) result);
|
||||
+
|
||||
+ return status == REG_VALID ? PS_OK : PS_ERR;
|
||||
+}
|
||||
+
|
||||
/* Return overall process id of the target PH. Special for GNU/Linux
|
||||
-- not used on Solaris. */
|
||||
|
||||
@@ -199,6 +225,74 @@ ps_getpid (struct ps_prochandle *ph)
|
||||
return ptid_get_pid (ph->ptid);
|
||||
}
|
||||
|
||||
+/* Callback for ps_foreach_infinity_note to relocate addresses in
|
||||
+ Infinity notes. */
|
||||
+
|
||||
+static ps_err_e
|
||||
+ps_infinity_relocate_addr (void *objfile_p, psaddr_t unrelocated_p,
|
||||
+ psaddr_t *result_p)
|
||||
+{
|
||||
+ struct objfile *objfile = (struct objfile *) objfile_p;
|
||||
+ CORE_ADDR unrelocated = ps_addr_to_core_addr (unrelocated_p);
|
||||
+ struct obj_section *osect;
|
||||
+
|
||||
+ ALL_OBJFILE_OSECTIONS (objfile, osect)
|
||||
+ {
|
||||
+ struct bfd_section *sect = osect->the_bfd_section;
|
||||
+ bfd_vma section_vma = bfd_get_section_vma (objfile->obfd, sect);
|
||||
+
|
||||
+ if (unrelocated < section_vma
|
||||
+ || unrelocated >= (section_vma + bfd_get_section_size (sect)))
|
||||
+ continue;
|
||||
+
|
||||
+ *result_p = core_addr_to_ps_addr (unrelocated - section_vma
|
||||
+ + obj_section_addr (osect));
|
||||
+
|
||||
+ return PS_OK;
|
||||
+ }
|
||||
+
|
||||
+ return PS_ERR;
|
||||
+}
|
||||
+
|
||||
+/* See gdb_proc_service.h. */
|
||||
+
|
||||
+ps_err_e
|
||||
+ps_foreach_infinity_note (struct ps_prochandle *ph,
|
||||
+ ps_visit_infinity_note_f *callback,
|
||||
+ void *cb_arg)
|
||||
+{
|
||||
+ struct cleanup *old_chain = save_current_program_space ();
|
||||
+ struct inferior *inf = find_inferior_ptid (ph->ptid);
|
||||
+ struct objfile *objfile;
|
||||
+ ps_err_e result = PS_OK;
|
||||
+
|
||||
+ set_current_program_space (inf->pspace);
|
||||
+
|
||||
+ ALL_OBJFILES (objfile)
|
||||
+ {
|
||||
+ struct elf_infinity_note *note;
|
||||
+
|
||||
+ if (objfile->obfd == NULL
|
||||
+ || bfd_get_flavour (objfile->obfd) != bfd_target_elf_flavour)
|
||||
+ continue;
|
||||
+
|
||||
+ for (note = elf_tdata (objfile->obfd)->infinity_note_head;
|
||||
+ note != NULL; note = note->next)
|
||||
+ {
|
||||
+ result = callback (cb_arg,
|
||||
+ (const char *) note->data, note->size,
|
||||
+ objfile_name (objfile), note->fileoffset,
|
||||
+ ps_infinity_relocate_addr, objfile);
|
||||
+
|
||||
+ if (result != PS_OK)
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ do_cleanups (old_chain);
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
void
|
||||
_initialize_proc_service (void)
|
||||
{
|
||||
Index: b/gdb/proc-service.list
|
||||
===================================================================
|
||||
--- a/gdb/proc-service.list
|
||||
+++ b/gdb/proc-service.list
|
||||
@@ -37,4 +37,6 @@
|
||||
ps_pstop;
|
||||
ps_ptread;
|
||||
ps_ptwrite;
|
||||
+ ps_foreach_infinity_note;
|
||||
+ ps_get_register;
|
||||
};
|
||||
Index: b/include/elf/common.h
|
||||
===================================================================
|
||||
--- a/include/elf/common.h
|
||||
+++ b/include/elf/common.h
|
||||
@@ -704,6 +704,7 @@
|
||||
#define NT_GNU_BUILD_ID 3 /* Generated by ld --build-id. */
|
||||
#define NT_GNU_GOLD_VERSION 4 /* Generated by gold. */
|
||||
#define NT_GNU_PROPERTY_TYPE_0 5 /* Generated by gcc. */
|
||||
+#define NT_GNU_INFINITY 8995 /* Generated by i8c. */
|
||||
|
||||
#define NT_GNU_BUILD_ATTRIBUTE_OPEN 0x100
|
||||
#define NT_GNU_BUILD_ATTRIBUTE_FUNC 0x101
|
|
@ -1,45 +0,0 @@
|
|||
Description: Temporary support for LinuxThreads signal handling on GNU/kFreeBSD
|
||||
|
||||
Author: Robert Millan <rmh@debian.org>
|
||||
Bug-Debian: http://bugs.debian.org/550361
|
||||
Bug-Debian: http://bugs.debian.org/669043
|
||||
Bug-Debian: http://bugs.debian.org/698200
|
||||
Origin: vendor, http://bugs.debian.org/669043
|
||||
|
||||
Index: b/gdb/common/signals.c
|
||||
===================================================================
|
||||
--- a/gdb/common/signals.c
|
||||
+++ b/gdb/common/signals.c
|
||||
@@ -336,6 +336,15 @@ gdb_signal_from_host (int hostsig)
|
||||
return GDB_SIGNAL_LIBRT;
|
||||
#endif
|
||||
|
||||
+#if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
|
||||
+ if (hostsig == 32)
|
||||
+ return TARGET_SIGNAL_LINUXTHREADS_RESTART;
|
||||
+ if (hostsig == 33)
|
||||
+ return TARGET_SIGNAL_LINUXTHREADS_CANCEL;
|
||||
+ if (hostsig == 34)
|
||||
+ return TARGET_SIGNAL_LINUXTHREADS_DEBUG;
|
||||
+#endif
|
||||
+
|
||||
#if defined (REALTIME_LO)
|
||||
if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI)
|
||||
{
|
||||
Index: b/include/gdb/signals.def
|
||||
===================================================================
|
||||
--- a/include/gdb/signals.def
|
||||
+++ b/include/gdb/signals.def
|
||||
@@ -196,7 +196,11 @@ SET (GDB_EXC_BREAKPOINT, 150, "EXC_BREAK
|
||||
|
||||
SET (GDB_SIGNAL_LIBRT, 151, "SIGLIBRT", "librt internal signal")
|
||||
|
||||
+SET (TARGET_SIGNAL_LINUXTHREADS_RESTART, 152, "32", "LinuxThreads restart signal")
|
||||
+SET (TARGET_SIGNAL_LINUXTHREADS_CANCEL, 153, "33", "LinuxThreads cancel signal")
|
||||
+SET (TARGET_SIGNAL_LINUXTHREADS_DEBUG, 154, "34", "LinuxThreads debug signal")
|
||||
+
|
||||
/* If you are adding a new signal, add it just above this comment. */
|
||||
|
||||
/* Last and unused enum value, for sizing arrays, etc. */
|
||||
-SET (GDB_SIGNAL_LAST, 152, NULL, "GDB_SIGNAL_LAST")
|
||||
+SET (GDB_SIGNAL_LAST, 155, NULL, "GDB_SIGNAL_LAST")
|
|
@ -1,26 +0,0 @@
|
|||
* d/p/load-versioned-libcc1.patch:
|
||||
- load libcc1.so.0 instead unversioned file.
|
||||
Author: Hector Oron <zumbi@debian.org>
|
||||
|
||||
---
|
||||
The information above should follow the Patch Tagging Guidelines, please
|
||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
||||
are templates for supplementary fields that you might want to add:
|
||||
|
||||
Origin: Debian
|
||||
Forwarded: not-needed
|
||||
Last-Update: <2015-03-23>
|
||||
|
||||
Index: b/include/gcc-c-interface.h
|
||||
===================================================================
|
||||
--- a/include/gcc-c-interface.h
|
||||
+++ b/include/gcc-c-interface.h
|
||||
@@ -188,7 +188,7 @@ struct gcc_c_context
|
||||
/* The name of the .so that the compiler builds. We dlopen this
|
||||
later. */
|
||||
|
||||
-#define GCC_C_FE_LIBCC libcc1.so
|
||||
+#define GCC_C_FE_LIBCC libcc1.so.0
|
||||
|
||||
/* The compiler exports a single initialization function. This macro
|
||||
holds its name as a symbol. */
|
|
@ -1,26 +0,0 @@
|
|||
Description: try to make the PTRACE scope sysctl more discoverable via a
|
||||
verbose error message when failures happen.
|
||||
Author: Kees Cook <kees@ubuntu.com>
|
||||
|
||||
Index: b/gdb/inf-ptrace.c
|
||||
===================================================================
|
||||
--- a/gdb/inf-ptrace.c
|
||||
+++ b/gdb/inf-ptrace.c
|
||||
@@ -207,7 +207,16 @@ inf_ptrace_attach (struct target_ops *op
|
||||
errno = 0;
|
||||
ptrace (PT_ATTACH, pid, (PTRACE_TYPE_ARG3)0, 0);
|
||||
if (errno != 0)
|
||||
- perror_with_name (("ptrace"));
|
||||
+ {
|
||||
+ if (errno == EPERM)
|
||||
+ {
|
||||
+ fprintf_unfiltered (gdb_stderr,
|
||||
+ _("Could not attach to process. If your uid matches the uid of the target\n"
|
||||
+ "process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try\n"
|
||||
+ "again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf\n"));
|
||||
+ }
|
||||
+ perror_with_name (("ptrace"));
|
||||
+ }
|
||||
#else
|
||||
error (_("This system does not support attaching to a process"));
|
||||
#endif
|
|
@ -1,295 +0,0 @@
|
|||
Description: Use system python-config if available
|
||||
Author: Matthias Klose <doko@ubuntu.com>
|
||||
Forwarded: https://sourceware.org/ml/gdb-patches/2012-12/msg00751.html
|
||||
|
||||
---
|
||||
gdb/configure | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++----
|
||||
gdb/configure.ac | 14 ++++----
|
||||
2 files changed, 108 insertions(+), 12 deletions(-)
|
||||
|
||||
Index: b/gdb/configure
|
||||
===================================================================
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -713,6 +713,7 @@ HAVE_PYTHON_TRUE
|
||||
PYTHON_LIBS
|
||||
PYTHON_CPPFLAGS
|
||||
PYTHON_CFLAGS
|
||||
+python_config
|
||||
python_prog_path
|
||||
LTLIBMPFR
|
||||
LIBMPFR
|
||||
@@ -823,6 +824,7 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
+runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@@ -956,6 +958,7 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
+runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE}'
|
||||
@@ -1208,6 +1211,15 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
+ | --runstate | --runstat | --runsta | --runst | --runs \
|
||||
+ | --run | --ru | --r)
|
||||
+ ac_prev=runstatedir ;;
|
||||
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
+ | --run=* | --ru=* | --r=*)
|
||||
+ runstatedir=$ac_optarg ;;
|
||||
+
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@@ -1345,7 +1357,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
- libdir localedir mandir
|
||||
+ libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@@ -1498,6 +1510,7 @@ Fine tuning of the installation director
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@@ -4635,7 +4648,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -4681,7 +4694,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -4705,7 +4718,7 @@ rm -f core conftest.err conftest.$ac_obj
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -4750,7 +4763,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -4774,7 +4787,7 @@ rm -f core conftest.err conftest.$ac_obj
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -10456,29 +10469,122 @@ fi
|
||||
esac
|
||||
esac
|
||||
|
||||
+ python_config=
|
||||
if test "${python_prog}" != missing; then
|
||||
+ if test -n "$ac_tool_prefix"; then
|
||||
+ # Extract the first word of "${ac_tool_prefix}${python_prog}-config", so it can be a program name with args.
|
||||
+set dummy ${ac_tool_prefix}${python_prog}-config; ac_word=$2
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
+$as_echo_n "checking for $ac_word... " >&6; }
|
||||
+if ${ac_cv_prog_python_config+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ if test -n "$python_config"; then
|
||||
+ ac_cv_prog_python_config="$python_config" # Let the user override the test.
|
||||
+else
|
||||
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
+for as_dir in $PATH
|
||||
+do
|
||||
+ IFS=$as_save_IFS
|
||||
+ test -z "$as_dir" && as_dir=.
|
||||
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
+ ac_cv_prog_python_config="${ac_tool_prefix}${python_prog}-config"
|
||||
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
+ break 2
|
||||
+ fi
|
||||
+done
|
||||
+ done
|
||||
+IFS=$as_save_IFS
|
||||
+
|
||||
+fi
|
||||
+fi
|
||||
+python_config=$ac_cv_prog_python_config
|
||||
+if test -n "$python_config"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_config" >&5
|
||||
+$as_echo "$python_config" >&6; }
|
||||
+else
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
+$as_echo "no" >&6; }
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+fi
|
||||
+if test -z "$ac_cv_prog_python_config"; then
|
||||
+ ac_ct_python_config=$python_config
|
||||
+ # Extract the first word of "${python_prog}-config", so it can be a program name with args.
|
||||
+set dummy ${python_prog}-config; ac_word=$2
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
+$as_echo_n "checking for $ac_word... " >&6; }
|
||||
+if ${ac_cv_prog_ac_ct_python_config+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ if test -n "$ac_ct_python_config"; then
|
||||
+ ac_cv_prog_ac_ct_python_config="$ac_ct_python_config" # Let the user override the test.
|
||||
+else
|
||||
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
+for as_dir in $PATH
|
||||
+do
|
||||
+ IFS=$as_save_IFS
|
||||
+ test -z "$as_dir" && as_dir=.
|
||||
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
+ ac_cv_prog_ac_ct_python_config="${python_prog}-config"
|
||||
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
+ break 2
|
||||
+ fi
|
||||
+done
|
||||
+ done
|
||||
+IFS=$as_save_IFS
|
||||
+
|
||||
+fi
|
||||
+fi
|
||||
+ac_ct_python_config=$ac_cv_prog_ac_ct_python_config
|
||||
+if test -n "$ac_ct_python_config"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_python_config" >&5
|
||||
+$as_echo "$ac_ct_python_config" >&6; }
|
||||
+else
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
+$as_echo "no" >&6; }
|
||||
+fi
|
||||
+
|
||||
+ if test "x$ac_ct_python_config" = x; then
|
||||
+ python_config="${python_prog} ${srcdir}/python/python-config.py"
|
||||
+ else
|
||||
+ case $cross_compiling:$ac_tool_warned in
|
||||
+yes:)
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
+ac_tool_warned=yes ;;
|
||||
+esac
|
||||
+ python_config=$ac_ct_python_config
|
||||
+ fi
|
||||
+else
|
||||
+ python_config="$ac_cv_prog_python_config"
|
||||
+fi
|
||||
+
|
||||
# We have a python program to use, but it may be too old.
|
||||
# Don't flag an error for --with-python=auto (the default).
|
||||
have_python_config=yes
|
||||
- python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
|
||||
+ python_includes=`${python_config} --includes`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
- as_fn_error $? "failure running python-config --includes" "$LINENO" 5
|
||||
+ as_fn_error $? "failure running ${python_config} --includes" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
- python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
|
||||
+ python_libs=`${python_config} --ldflags`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
- as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
|
||||
+ as_fn_error $? "failure running ${python_config} --ldflags" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
- python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
|
||||
+ python_prefix=`${python_config} --exec-prefix`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
- as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
|
||||
+ as_fn_error $? "failure running ${python_config} --exec-prefix" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
else
|
||||
@@ -13074,6 +13180,8 @@ main ()
|
||||
if (*(data + i) != *(data3 + i))
|
||||
return 14;
|
||||
close (fd);
|
||||
+ free (data);
|
||||
+ free (data3);
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
Index: b/gdb/configure.ac
|
||||
===================================================================
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -857,29 +857,31 @@ else
|
||||
esac
|
||||
esac
|
||||
|
||||
+ python_config=
|
||||
if test "${python_prog}" != missing; then
|
||||
+ AC_CHECK_TOOL(python_config,[${python_prog}-config],[${python_prog} ${srcdir}/python/python-config.py])
|
||||
# We have a python program to use, but it may be too old.
|
||||
# Don't flag an error for --with-python=auto (the default).
|
||||
have_python_config=yes
|
||||
- python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
|
||||
+ python_includes=`${python_config} --includes`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
- AC_ERROR(failure running python-config --includes)
|
||||
+ AC_ERROR(failure running ${python_config} --includes)
|
||||
fi
|
||||
fi
|
||||
- python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
|
||||
+ python_libs=`${python_config} --ldflags`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
- AC_ERROR(failure running python-config --ldflags)
|
||||
+ AC_ERROR(failure running ${python_config} --ldflags)
|
||||
fi
|
||||
fi
|
||||
- python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
|
||||
+ python_prefix=`${python_config} --exec-prefix`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
- AC_ERROR(failure running python-config --exec-prefix)
|
||||
+ AC_ERROR(failure running ${python_config} --exec-prefix)
|
||||
fi
|
||||
fi
|
||||
else
|
|
@ -1,26 +0,0 @@
|
|||
Index: b/gdb/configure.ac
|
||||
===================================================================
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -833,7 +833,7 @@ else
|
||||
AC_ERROR(failure running ${python_config} --includes)
|
||||
fi
|
||||
fi
|
||||
- python_libs=`${python_config} --ldflags`
|
||||
+ python_libs=`${python_config} --ldflags --embed`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
Index: b/gdb/configure
|
||||
===================================================================
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -10587,7 +10587,7 @@ fi
|
||||
as_fn_error $? "failure running ${python_config} --includes" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
- python_libs=`${python_config} --ldflags`
|
||||
+ python_libs=`${python_config} --ldflags --embed`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
File diff suppressed because it is too large
Load Diff
|
@ -1,19 +0,0 @@
|
|||
#branch-updates.diff
|
||||
gdb-fortran-main.patch
|
||||
#linuxthreads_signal_handling.patch
|
||||
solve_PATH_MAX_issue.patch
|
||||
gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
python-config.patch
|
||||
gdb-glibc-vdso-workaround.patch
|
||||
load-versioned-libcc1.patch
|
||||
|
||||
# Ubuntu/Linaro
|
||||
gdb-strings.patch
|
||||
ptrace-error-verbosity.patch
|
||||
#elf-auxv-diff
|
||||
|
||||
# experimental
|
||||
#infinity-notes.diff
|
||||
disable-multi-term-settings-test.diff
|
||||
|
||||
python3.8.diff
|
|
@ -1,42 +0,0 @@
|
|||
Description: Patch out a PATH_MAX usage, for Hurd's benefit
|
||||
|
||||
Author: Svante Signell <svante.signell@gmail.com>
|
||||
Bug-Debian: http://bugs.debian.org/709508
|
||||
Forwarded: http://sourceware.org/ml/gdb-patches/2013-05/msg00878.html
|
||||
Reviewed-By: Héctor Orón Martínez <zumbi@debian.org>
|
||||
Last-Update: 2013-06-08
|
||||
|
||||
Index: b/gdb/nto-tdep.c
|
||||
===================================================================
|
||||
--- a/gdb/nto-tdep.c
|
||||
+++ b/gdb/nto-tdep.c
|
||||
@@ -153,10 +153,12 @@ nto_find_and_open_solib (const char *sol
|
||||
void
|
||||
nto_init_solib_absolute_prefix (void)
|
||||
{
|
||||
- char buf[PATH_MAX * 2], arch_path[PATH_MAX];
|
||||
+ char *buf, *arch_path;
|
||||
char *nto_root;
|
||||
const char *endian;
|
||||
const char *arch;
|
||||
+ int arch_len, len;
|
||||
+#define FMT "set solib-absolute-prefix %s"
|
||||
|
||||
nto_root = nto_target ();
|
||||
if (strcmp (gdbarch_bfd_arch_info (target_gdbarch ())->arch_name, "i386") == 0)
|
||||
@@ -179,9 +181,13 @@ nto_init_solib_absolute_prefix (void)
|
||||
== BFD_ENDIAN_BIG ? "be" : "le";
|
||||
}
|
||||
|
||||
- xsnprintf (arch_path, sizeof (arch_path), "%s/%s%s", nto_root, arch, endian);
|
||||
+ arch_len = strlen (nto_root) + 1 + strlen (arch) + strlen (endian) + 1;
|
||||
+ arch_path = alloca (arch_len);
|
||||
+ xsnprintf (arch_path, arch_len, "%s/%s%s", nto_root, arch, endian);
|
||||
|
||||
- xsnprintf (buf, sizeof (buf), "set solib-absolute-prefix %s", arch_path);
|
||||
+ len = strlen (FMT) - 2 + strlen (arch_path) + 1;
|
||||
+ buf = alloca (len);
|
||||
+ xsnprintf (buf, len, FMT, arch_path);
|
||||
execute_command (buf, 0);
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
3.0 (quilt)
|
||||
3.0 (native)
|
||||
|
|
Loading…
Reference in New Issue