different pthread support
This commit is contained in:
parent
ed9fe82834
commit
d89ce51a3b
2 changed files with 201 additions and 230 deletions
13
acid/port
13
acid/port
|
|
@ -84,7 +84,7 @@ defn _stkign(frame)
|
|||
// only print the last one.
|
||||
defn _stk(regs, dolocals)
|
||||
{
|
||||
local stk, pc, fn, callerpc, paramlist, locallist;
|
||||
local stk, pc, fn, done, callerpc, paramlist, locallist;
|
||||
|
||||
stk = strace(regs);
|
||||
if stkignore then {
|
||||
|
|
@ -93,7 +93,8 @@ defn _stk(regs, dolocals)
|
|||
}
|
||||
|
||||
callerpc = 0;
|
||||
while stk do {
|
||||
done = 0;
|
||||
while stk && !done do {
|
||||
frame = head stk;
|
||||
stk = tail stk;
|
||||
fn = frame[0];
|
||||
|
|
@ -111,9 +112,15 @@ defn _stk(regs, dolocals)
|
|||
pfl(pc);
|
||||
if dolocals then
|
||||
locals(locallist);
|
||||
if fn == var("threadmain") || fn == var("p9main") then
|
||||
done=1;
|
||||
if fn == var("threadstart") || fn == var("scheduler") then
|
||||
done=1;
|
||||
if callerpc == 0 then
|
||||
done=1;
|
||||
}
|
||||
|
||||
if callerpc then {
|
||||
if callerpc && !done then {
|
||||
print(stkprefix, fmt(callerpc, 'a'), " ");
|
||||
pfl(callerpc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue