This is the mail archive of the gdb-patches@sources.redhat.com 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]

PATCH infttrace.c, somread.c hpux11 warnings.


Remove the following warnings on hppa1.1-hp-hpux11.00 - the executable
still hangs on the child process.

0803/gdb/infttrace.c: In function `get_raw_pc':
0803/gdb/infttrace.c:401: warning: \
     implicit declaration of function `read_from_register_save_state'
0803/gdb/infttrace.c: In function `map_to_gdb_tid':
0803/gdb/infttrace.c:814: warning: \
     suggest explicit braces to avoid ambiguous `else'
0803/gdb/infttrace.c: In function `child_acknowledge_created_inferior':
0803/gdb/infttrace.c:3126: warning: \
     implicit declaration of function `add_thread'
0803/gdb/infttrace.c: In function `hppa_pid_or_tid_to_str':
0803/gdb/infttrace.c:5642: warning: \
     implicit declaration of function `pid_to_thread_id'
0803/gdb/somread.c: In function `som_symfile_read':
0803/gdb/somread.c:363: warning: \
     implicit declaration of function `init_import_symbols'


2001-08-08  Rodney Brown  <rbrown64@csc.com.au>

     * infttrace.c (read_from_register_save_state): Prototype.
     Include "gdbthread.h" for add_thread prototype.
     (child_acknowledge_created_inferior): Correct add_thread argument.
     (update_thread_state_after_attach): Correct add_thread argument.

     * somread.c: Prototype init_import_symbols.

--- infttrace.c.orig     Sun Jul 29 09:44:53 2001
+++ infttrace.c     Wed Aug  8 11:47:19 2001
@@ -24,6 +24,7 @@
 #include "frame.h"
 #include "inferior.h"
 #include "target.h"
+#include "gdbthread.h"
 #include "gdb_string.h"
 #include "gdb_wait.h"
 #include "command.h"
@@ -390,6 +391,9 @@ static ptid_t saved_real_ptid;
  *          Debugging support functions          *
  *************************************************
  */
+
+int read_from_register_save_state (int , TTRACE_ARG_TYPE , char *, int );
+
 CORE_ADDR
 get_raw_pc (lwpid_t ttid)
 {
@@ -812,10 +816,12 @@ map_to_gdb_tid (lwpid_t real_tid)
   for (p = deleted_threads.head; p; p = p->next)
     {
       if (p->tid == real_tid)
-    if (p->am_pseudo)
-      return p->pid;    /* Error? */
-    else
-      return real_tid;
+    {
+      if (p->am_pseudo)
+        return p->pid;  /* Error? */
+      else
+        return real_tid;
+    }
     }

   return 0;             /* Error?  Never heard of this thread! */
@@ -3123,7 +3129,7 @@ child_acknowledge_created_inferior (int
    *    the process safely to ask what it is.  Anyway, we'll
    *    add it when it gets the EXEC event.
    */
-  add_thread (pid);          /* in thread.c */
+  add_thread (pid_to_ptid (pid));       /* in thread.c */

   /* We can now set the child's ttrace event mask.
    */
@@ -4773,7 +4779,7 @@ update_thread_state_after_attach (int pi
         }
     }

-      add_thread (tid);      /* in thread.c */
+      add_thread (ptid_build (pid, tid, 0));           /* in thread.c */
     }

 #ifdef PARANOIA
--- somread.c.orig  Tue Mar  6 18:21:17 2001
+++ somread.c  Tue Aug  7 12:36:17 2001
@@ -61,6 +61,8 @@ extern void hpread_symfile_init (struct

 extern void do_pxdb (bfd *);

+int init_import_symbols (struct objfile *);
+
 /*

    LOCAL FUNCTION


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