Date: Tue, 14 Apr 1998 19:12:24 -0700 From: Stephen Wynne <stevemw@northwest.com> To: freebsd-mozilla@FreeBSD.ORG Subject: Re: GDB, Memory, and NSPR Threads? Message-ID: <199804150212.TAA00969@northwest.com> In-Reply-To: Your message of "14 Apr 1998 18:54:48 PDT." <m2emyzalxz.fsf@terror.hungry.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <m2emyzalxz.fsf@terror.hungry.com>, Christoph Toshok writes: yeah, someone has brought it up on mozilla.general some days ago. don't know if they're moving on it, though. Chris, Thanks for your reply. That someone would be I. And we didn't get a response (to that specific question) back from Brendan Eich in that thread, which is why I'm asking here. what exactly are you trying to do? I mean, why do you want to pop between threads? I want to walk through the code that handles plugins in order to more fully understand it. Also, when I start working on a plugin, I want to be able to set breakpoints in it and do the normal things I do with a debugger. Right now, I end up in the main thread (I think), and I never get the chance to enter the other ones. It's all very confusing still. Here's what Brendan advised in mozilla-general: I always end up memorizing the stack-pointer and program-counter offsets in the PRThread's jmpbuf or ucontext or whatever struct, printing them out (the current thread is pointed at by [_pr_currentThread], usually the same as mozilla_thread or lm_InterpretThread), setting $sp and $pc, and voila -- you've convinced gdb to switch threads. I think I might be able follow Brendan's advice if I knew how to find this alleged data structure that describes the threads. I don't know how to use his advice about "ucontext." I didn't see anything I could comprehend as a live thread map (is there such a thing?) when I looked at things declared as PRThread. Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mozilla" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804150212.TAA00969>