This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] [gdb, hurd] Repair build after "Share fork_inferior et al with gdbserver" changes


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6c6ef69fb4e95d991fa5462d067d3f71a73fedce

commit 6c6ef69fb4e95d991fa5462d067d3f71a73fedce
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Wed Jul 4 13:27:09 2018 +0200

    [gdb, hurd] Repair build after "Share fork_inferior et al with gdbserver" changes
    
    ..., that is commit 2090129c36c7e582943b7d300968d19b46160d84 causing:
    
        [...]/gdb/gnu-nat.c: In function 'void gnu_ptrace_me()':
        [...]/gdb/gnu-nat.c:2133:5: error: 'trace_start_error_with_name' was not declared in this scope
             trace_start_error_with_name ("ptrace");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
        [...]/gdb/gnu-nat.c:2133:5: note: suggested alternative: 'throw_perror_with_name'
             trace_start_error_with_name ("ptrace");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
             throw_perror_with_name
        [...]/gdb/gnu-nat.c: In function 'void gnu_create_inferior(target_ops*, const char*, const string&, char**, int)':
        [...]/gdb/gnu-nat.c:2147:9: error: 'fork_inferior' was not declared in this scope
           pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me,
                 ^~~~~~~~~~~~~
        [...]/gdb/gnu-nat.c:2147:9: note: suggested alternative: 'exit_inferior'
           pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me,
                 ^~~~~~~~~~~~~
                 exit_inferior
        [...]/gdb/gnu-nat.c:2174:30: error: 'START_INFERIOR_TRAPS_EXPECTED' was not declared in this scope
           gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        /usr/bin/ld: gnu-nat.o: in function `gnu_ptrace_me()':
        [...]/gdb/gnu-nat.c:2134: undefined reference to `trace_start_error_with_name(char const*)'
        /usr/bin/ld: gnu-nat.o: in function `gnu_create_inferior(target_ops*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char**, int)':
        [...]/gdb/gnu-nat.c:2148: undefined reference to `fork_inferior(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))'
        /usr/bin/ld: fork-child.o: in function `gdb_startup_inferior(int, int)':
        [...]/gdb/fork-child.c:136: undefined reference to `startup_inferior(int, int, target_waitstatus*, ptid_t*)'
        collect2: error: ld returned 1 exit status
    
    	gdb/
    	* configure.nat [gdb_host == i386gnu] (NATDEPFILES): Add
    	'nat/fork-inferior.o'.
    	* gnu-nat.c: #include "nat/fork-inferior.h".

Diff:
---
 gdb/ChangeLog     | 4 ++++
 gdb/configure.nat | 1 +
 gdb/gnu-nat.c     | 1 +
 3 files changed, 6 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fcaae61..2974d72 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2019-02-14  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* configure.nat [gdb_host == i386gnu] (NATDEPFILES): Add
+	'nat/fork-inferior.o'.
+	* gnu-nat.c: #include "nat/fork-inferior.h".
+
 	* gnu-nat.c (gnu_nat_target::detach): Instead of
 	'inf_child_maybe_unpush_target (ops)' call 'maybe_unpush_target'.
 	* gnu-nat.h: #include "inf-child.h".
diff --git a/gdb/configure.nat b/gdb/configure.nat
index 3118263..64ee101 100644
--- a/gdb/configure.nat
+++ b/gdb/configure.nat
@@ -215,6 +215,7 @@ case ${gdb_host} in
 		# Host: Intel 386 running the GNU Hurd
 		NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
 		     x86-nat.o nat/x86-dregs.o fork-child.o \
+		     nat/fork-inferior.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
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 78966c8..5a47cb7 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -69,6 +69,7 @@ extern "C"
 #include "gdbthread.h"
 #include "gdb_obstack.h"
 #include "tid-parse.h"
+#include "nat/fork-inferior.h"
 
 #include "inf-child.h"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]