This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/4] Add procfs_find_LDT_entry declaration (procfs.h).
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Thu, 20 Sep 2012 18:34:00 +0200
- Subject: [PATCH 3/4] Add procfs_find_LDT_entry declaration (procfs.h).
- References: <1348158841-2313-1-git-send-email-brobecker@adacore.com>
Add a declaration for procfs_find_LDT_entry in order to prevent
a compiler warning about this function missing one. This also
helps making sure that declaration and definition remain consistent.
gdb/ChangeLog:
* procfs.h (procfs_find_LDT_entry): Add declaration.
* sol-thread.c (ps_lgetLDT): Delete local declaration of
function procfs_find_LDT_entry.
---
gdb/procfs.h | 7 +++++++
gdb/sol-thread.c | 1 -
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/gdb/procfs.h b/gdb/procfs.h
index 8293322..9dbf531 100644
--- a/gdb/procfs.h
+++ b/gdb/procfs.h
@@ -34,3 +34,10 @@ extern void procfs_use_watchpoints (struct target_ops *t);
'live' procinfo. */
extern ptid_t procfs_first_available (void);
+
+#if (defined(__i386__) || defined(__x86_64__)) && defined (sun)
+struct ssd;
+
+extern struct ssd *procfs_find_LDT_entry (ptid_t);
+#endif
+
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 3577b5a..cd37615 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -1108,7 +1108,6 @@ ps_lgetLDT (gdb_ps_prochandle_t ph, lwpid_t lwpid,
struct ssd *pldt)
{
/* NOTE: only used on Solaris, therefore OK to refer to procfs.c. */
- extern struct ssd *procfs_find_LDT_entry (ptid_t);
struct ssd *ret;
/* FIXME: can't I get the process ID from the prochandle or
--
1.6.5.rc2