Add procfs_find_LDT_entry declaration (procfs.h).
authorJoel Brobecker <brobecker@gnat.com>
Thu, 27 Sep 2012 12:52:10 +0000 (12:52 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 27 Sep 2012 12:52:10 +0000 (12:52 +0000)
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/ChangeLog
gdb/procfs.h
gdb/sol-thread.c

index a61ac64..eb35a8d 100644 (file)
@@ -1,5 +1,11 @@
 2012-09-27  Joel Brobecker  <brobecker@adacore.com>
 
+       * procfs.h (procfs_find_LDT_entry): Add declaration.
+       * sol-thread.c (ps_lgetLDT): Delete local declaration of
+       function procfs_find_LDT_entry.
+
+2012-09-27  Joel Brobecker  <brobecker@adacore.com>
+
        * procfs.c (proc_get_LDT_entry): Make static.
 
 2012-09-27  Joel Brobecker  <brobecker@adacore.com>
index 8293322..6c4e137 100644 (file)
@@ -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
+
index 3577b5a..cd37615 100644 (file)
@@ -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