Patch for linuxthreads_db/td_thr_getgregs.c

Andreas Jaeger aj@suse.de
Wed Jan 12 23:50:00 GMT 2000


>>>>> Andreas Schwab writes:

 > Ulrich Drepper <drepper@cygnus.com> writes:
 > |> Andreas Jaeger <aj@suse.de> writes:
 > |> 
 > |> > Uli, if those function declarations are indeed correct (which I
 > |> > doubt), you need to change td_thr_getgregs.c accordingly (memset
 > |> > (&greg,...)).
 > |> 
 > |> Well, the form I have in the moment is acutally what Solaris has.  It
 > |> was strange when I saw it but I haven't really spend time looking at
 > |> it.  But you are right, it cannot be correct.

 > The problem is that gregset_t is sometimes an array (i386), sometimes a
 > struct (mips).  The array decays to a pointer, so you won't see the
 > different types, but the sizeof in td_thr_getregs will return the wrong
 > value (size of a pointer instead of the whole array).


Uli, you reverted my patch - without fixing the problem. Why? Could
you tell me how to fix the problem?  The interface itself seems to be
broken - at least if gregset_t is a struct!

Here's the compiler error again I get on MIPS:
td_thr_getgregs.c: In function `td_thr_getgregs':
td_thr_getgregs.c:38: incompatible types in initialization
td_thr_getgregs.c:38: incompatible type for argument 1 of `memset'

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de


More information about the Libc-hacker mailing list