Skip to content

Commit 5ff9b2f

Browse files
authored
libdb: implement qfThreadInfo & qsThreadInfo (#154)
1 parent 7672736 commit 5ff9b2f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

libdb/debug.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,26 @@ static void process_query(const char *inp,char *outp,s32 thread)
360360
packqmheader(outp,i,done,athread);
361361
}
362362
break;
363+
case 'f':
364+
if(!strncmp(&inp[2],"ThreadInfo",10)) {
365+
optr = outp;
366+
*optr++ = 'm';
367+
s32 rthread = gdbstub_getnextthread(0);
368+
optr = thread2vhstr(optr,rthread);
369+
while ((rthread = gdbstub_getnextthread(rthread))) {
370+
*optr++=',';
371+
optr = thread2vhstr(optr,rthread);
372+
};
373+
*optr = 0;
374+
}
375+
break;
376+
case 's':
377+
if(!strncmp(&inp[2],"ThreadInfo",10)) {
378+
optr = outp;
379+
*optr++ = 'l';
380+
*optr = 0;
381+
}
382+
break;
363383
default:
364384
break;
365385
}

0 commit comments

Comments
 (0)