This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
move procfs_first_available declaration out of inferior.h
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 7 Jun 2009 19:44:11 +0100
- Subject: move procfs_first_available declaration out of inferior.h
While I'm looking at inferior.h, might as well move this
to a procfs related header.
Checked in, after making sure solaris gdb still builds.
--
Pedro Alves
2009-06-07 Pedro Alves <pedro@codesourcery.com>
* inferior.h (procfs_first_available): Move declaration to...
* proc-utils.h: ... here.
* sol-thread.c: Include procfs.h and proc-utils.h.
---
gdb/inferior.h | 4 ----
gdb/proc-utils.h | 9 +++++++++
gdb/sol-thread.c | 3 ++-
3 files changed, 11 insertions(+), 5 deletions(-)
Index: src/gdb/inferior.h
===================================================================
--- src.orig/gdb/inferior.h 2009-06-07 19:26:07.000000000 +0100
+++ src/gdb/inferior.h 2009-06-07 19:27:10.000000000 +0100
@@ -196,10 +196,6 @@ extern void terminal_init_inferior (void
extern void terminal_init_inferior_with_pgrp (int pgrp);
-/* From procfs.c */
-
-extern ptid_t procfs_first_available (void);
-
/* From fork-child.c */
extern int fork_inferior (char *, char *, char **,
Index: src/gdb/proc-utils.h
===================================================================
--- src.orig/gdb/proc-utils.h 2009-06-07 19:26:07.000000000 +0100
+++ src/gdb/proc-utils.h 2009-06-07 19:38:46.000000000 +0100
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* From proc-why.c */
/*
* Pretty-print functions for /proc data
@@ -53,6 +54,9 @@ extern void proc_prettyfprint_syscalls (
extern void proc_prettyfprint_status (long, int, int, int);
+
+/* From proc-api.c */
+
/*
* Trace functions for /proc api.
*/
@@ -92,3 +96,8 @@ typedef PROC_CTL_WORD_TYPE procfs_ctl_t;
#else
typedef long procfs_ctl_t;
#endif
+
+
+/* From procfs.c */
+
+extern ptid_t procfs_first_available (void);
Index: src/gdb/sol-thread.c
===================================================================
--- src.orig/gdb/sol-thread.c 2009-06-07 19:26:59.000000000 +0100
+++ src/gdb/sol-thread.c 2009-06-07 19:34:11.000000000 +0100
@@ -65,8 +65,9 @@
#include "solib.h"
#include "symfile.h"
#include "observer.h"
-
#include "gdb_string.h"
+#include <sys/procfs.h>
+#include "proc-utils.h"
struct target_ops sol_thread_ops;