This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob/hppa] Extern in .c is bad m'kay :-)
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 06 Apr 2004 13:56:55 -0400
- Subject: [ob/hppa] Extern in .c is bad m'kay :-)
This moves some extern declarations found in .c files into a .h file.
committed,
Andrew
2004-04-06 Andrew Cagney <cagney@redhat.com>
* hppah-nat.c (hpux_has_forked, hpux_has_vforked)
(hpux_has_execd, hpux_has_syscall_event): Include "infttrace.h",
move extern declarations from here ...
* infttrace.h: ... to here.
* Makefile.in (hppah-nat.o): Update dependencies.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.531
diff -u -r1.531 Makefile.in
--- Makefile.in 29 Mar 2004 18:07:13 -0000 1.531
+++ Makefile.in 6 Apr 2004 17:53:00 -0000
@@ -1816,7 +1816,7 @@
hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
$(gdbtypes_h) $(gdbcore_h) $(cp_abi_h)
hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
- $(gdb_wait_h) $(regcache_h) $(gdb_string_h)
+ $(gdb_wait_h) $(regcache_h) $(gdb_string_h) $(infttrace_h)
hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
$(osabi_h) $(gdb_string_h) $(frame_h)
hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \
Index: hppah-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/hppah-nat.c,v
retrieving revision 1.29
diff -u -r1.29 hppah-nat.c
--- hppah-nat.c 2 Oct 2003 20:28:29 -0000 1.29
+++ hppah-nat.c 6 Apr 2004 17:53:00 -0000
@@ -32,13 +32,9 @@
#include "gdb_wait.h"
#include "regcache.h"
#include "gdb_string.h"
+#include "infttrace.h"
#include <signal.h>
-extern int hpux_has_forked (int pid, int *childpid);
-extern int hpux_has_vforked (int pid, int *childpid);
-extern int hpux_has_execd (int pid, char **execd_pathname);
-extern int hpux_has_syscall_event (int pid, enum target_waitkind *kind,
- int *syscall_id);
static CORE_ADDR text_end;
Index: infttrace.h
===================================================================
RCS file: /cvs/src/src/gdb/infttrace.h,v
retrieving revision 1.1
diff -u -r1.1 infttrace.h
--- infttrace.h 29 Mar 2003 23:29:47 -0000 1.1
+++ infttrace.h 6 Apr 2004 17:53:00 -0000
@@ -1,6 +1,6 @@
/* Low level Unix child interface to ttrace, for GDB when running under HP-UX.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,5 +24,10 @@
extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int);
extern pid_t hppa_switched_threads (pid_t gdb_pid);
+extern int hpux_has_forked (int pid, int *childpid);
+extern int hpux_has_vforked (int pid, int *childpid);
+extern int hpux_has_execd (int pid, char **execd_pathname);
+extern int hpux_has_syscall_event (int pid, enum target_waitkind *kind,
+ int *syscall_id);
#endif