Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb-970817 vs i386-pc-solaris2.5.1
@ 1997-09-27 10:59 Jim Meyering
  1997-09-27 14:32 ` Peter.Schauer
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Meyering @ 1997-09-27 10:59 UTC (permalink / raw)
  To: gdb-patches

Hi,

I have the misfortune to run solaris2.5.1 on my nice dual P200 Vectra.
I tried to build gdb-970817 using this version of egcs:

  Reading specs from /p/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.06/specs
  gcc version egcs-2.90.06 970907 (gcc2-970802 experimental)

My first compile failed because neither R_PSR nor PS_FLAG_CARRY was defined.
Here's a kludge to work around that.

--- procfs.c.orig	Sat Sep 27 12:22:02 1997
+++ procfs.c	Sat Sep 27 12:21:50 1997
@@ -5218,6 +5218,7 @@ procfs_lwp_creation_handler (pi, syscall
   /* If lwp_create failed, then nothing interesting happened.  Continue the
      process and go back to sleep. */
 
+#if defined (R_PSR) && defined (PS_FLAG_CARRY)
   if (pi->prstatus.pr_reg[R_PSR] & PS_FLAG_CARRY)
     {				/* _lwp_create failed */
       pi->prrun.pr_flags &= PRSTEP;
@@ -5228,6 +5229,7 @@ procfs_lwp_creation_handler (pi, syscall
 
       return 0;
     }
+#endif
 
   /* At this point, the new thread is stopped at it's first instruction, and
      the parent is stopped at the exit from lwp_create.  */


Next attempt failed because TIDGET is not defined and hence,
procfs_pid_to_str (used below) is not defined.  Here's the really ugly
kludge I used to work around that.

--- sol-thread.c.orig	Sat Sep 27 12:21:09 1997
+++ sol-thread.c	Sat Sep 27 12:20:38 1997
@@ -121,7 +121,11 @@ static int sol_thread_alive PARAMS ((int
 #define THREAD_FLAG 0x80000000
 #define is_thread(ARG) (((ARG) & THREAD_FLAG) != 0)
 #define is_lwp(ARG) (((ARG) & THREAD_FLAG) == 0)
+#ifdef TIDGET
 #define GET_LWP(LWP_ID) (TIDGET(LWP_ID))
+#else
+# define GET_LWP(LWP_ID) 1 /* Kludge!! */
+#endif
 #define GET_THREAD(THREAD_ID) (((THREAD_ID) >> 16) & 0x7fff)
 #define BUILD_LWP(LWP_ID, PID) ((LWP_ID) << 16 | (PID))
 #define BUILD_THREAD(THREAD_ID, PID) (THREAD_FLAG | BUILD_LWP (THREAD_ID, PID))
@@ -1213,9 +1217,11 @@ solaris_pid_to_str (pid)
 {
   static char buf[100];
 
+#ifdef TIDGET
   /* in case init failed to resolve the libthread_db library */
   if (!procfs_suppress_run)
     return procfs_pid_to_str (pid);
+#endif
 
   if (is_thread (pid))
     {

Finally, I got this (inexplicable to me) link error:

  ...
  te.o main.o inflow.o gnu-regex.o     ../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a ../libiberty/libiberty.a -ltermlib    -ldl -lm ../mmalloc/libmmalloc.a ../libiberty/libiberty.a
  ld: fatal: entry point symbol `xport-dynamic' is undefined
  collect2: ld returned 1 exit status
  make[1]: *** [gdb] Error 1
  make[1]: Leaving directory `/tmp/gdb-970817/gdb'
  make: *** [all-gdb] Error 2
  [Exit 2]


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-10-05  6:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-27 10:59 gdb-970817 vs i386-pc-solaris2.5.1 Jim Meyering
1997-09-27 14:32 ` Peter.Schauer
1997-10-05  6:21   ` Jim Meyering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox