This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: Procfs error for multithreaded apps in Solaris 2.9 for gdb 6.8


Thanks for investigating the bug and diving into gdb's sources.

On Wednesday 15 July 2009 17:52:42, Wang Ke wrote:
> --- gdb/infrun.c????????2009-07-15 12:48:41.000022000 -0400
> +++ ../gdb-6.8-original/gdb/infrun.c????2008-01-29 17:47:19.000000000 

You've posted a reverted patch. :-)  Please put 'old/original' first:

diff -rau ../gdb-6.8-original/gdb/infrun.c gdb/infrun.c 

But while we're talking about this, please try a CVS head
GDB, and check if you can reproduce the bug there.  Then you
can produce a patch using cvs itself, if you'd like, with
"cvs diff -up".  (The -p switch really helps when reviewing patches.  the
diff utility also understands it.)

Some things have changed on the Solaris support since gdb 6.8, but
in any case, patches should always be tested against a recent
checkout or snapshot, since that's where the patch will be applied.

About the change itself: I think you're not tacking it at the right
level yet.  It would be much better if a couple of things were fixed:

 1 - when reporting TARGET_WAITKIND_SPURIOUS, make sure to return a
     valid ptid.

 1.1 - make sure handle_inferior_event context switches to the
     event ptid before resuming (see the bunch of context_switch
     calls in handle_inferior_event).

Alternatively, or in cases where there's no valid ptid to return:

 2 - don't return TARGET_WAITKIND_SPURIOUS at all.  handle the
     spurious stop and resume all within procfs_wait.

-- 
Pedro Alves


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