[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb
Subject: backtrace from random $fp $pc
From: Love <lha () stacken ! kth ! se>
Date: 1999-12-17 17:48:11
Message-ID: amvh5xpigc.fsf () hummel ! e ! kth ! se
[Download RAW message or body]
In a project I'm writing on we have a custom thread package. It
context-switches on select and do stack mangling when.
Now there is to way to do backtrace:ing on diffrent threads.
I have a patch (on 4.18) that enable us to do that
<http://www.stacken.kth.se/projekt/arla/gdb-4.18-backfrom.diff> by
choosning the right $fp and $sp. Se below for example (the exemple uses
wrong $pc). As you see I use a sequence to find fp/pc.
Now that question is, how should thread support really work for random
thread-packages ? We have the idea that the thread package would provide a
magic variable to a function that gdb sets and the thead package call each
time it does a thread-releated operation that gdb needs to know.
A many related question: What is tfind, since that seam to be releated to
backtrace:ing (but on remote targets ?) would that be possible to use for
the same things that my patch does ?
Love
(gdb) lwp_ps
Runnable[0]
name: IO MANAGER
eventlist:
fp: 0x806aac4
pc: 0x806aac4
name: producer
eventlist: 8048b00
fp: 0x8083b40
pc: 0x8083b40
Runnable[1]
[...]
(gdb) help backfrom
Print backtrace of FRAMEPOINTER and PROGRAMCOUNTER.
(gdb) backfrom 0x8083b40 0x8083b40
#0 0x8083b40 in ?? ()
#1 0x8049e2f in LWP_MwaitProcess (wcount=1, evlist=0x8083b70)
at /afs/e.kth.se/home/staff/lha/src/cvs/arla-foo/lwp/lwp.c:567
#2 0x8049eaf in LWP_WaitProcess (event=0x8048b00)
at /afs/e.kth.se/home/staff/lha/src/cvs/arla-foo/lwp/lwp.c:585
#3 0x8048b12 in Producer (foo=0x0)
at /afs/e.kth.se/home/staff/lha/src/cvs/arla-foo/lwp/testlwp.c:76
#4 0x804a00c in Create_Process_Part2 ()
at /afs/e.kth.se/home/staff/lha/src/cvs/arla-foo/lwp/lwp.c:629
#5 0xfffefdfc in ?? ()
#6 0x8051980 in ?? ()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic