From owner-freebsd-mozilla Tue Apr 14 19:14:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA20131 for freebsd-mozilla-outgoing; Tue, 14 Apr 1998 19:14:28 -0700 (PDT) (envelope-from owner-freebsd-mozilla@FreeBSD.ORG) Received: from northwest.com (root@port24.northwest.com [204.119.42.36]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA20044 for ; Wed, 15 Apr 1998 02:13:57 GMT (envelope-from stevemw@northwest.com) Received: from fuji (stevemw@localhost [127.0.0.1]) by northwest.com (8.8.8/8.8.7) with ESMTP id TAA00969 for ; Tue, 14 Apr 1998 19:12:25 -0700 (PDT) (envelope-from stevemw@fuji) Message-Id: <199804150212.TAA00969@northwest.com> To: freebsd-mozilla@FreeBSD.ORG Subject: Re: GDB, Memory, and NSPR Threads? In-reply-to: Your message of "14 Apr 1998 18:54:48 PDT." Date: Tue, 14 Apr 1998 19:12:24 -0700 From: Stephen Wynne Sender: owner-freebsd-mozilla@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , 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