Hi,
how can I access the identificator used in JDB's thread list in the enqueue method of my ready queue class?
Following code snippet does not work:
include "thread.h" [...] Ready_queue_edf<E>::enqueue(E *i, bool) { printf("%d", static_cast<Thread*>(i->context())->dbg_info()->dbg_id()); }
It results in various compiler errors:
[...] ./kernel/fiasco/src/kern/irq.cpp:504:11: error: ‘class Thread’ has no
member named ‘home_cpu’
./kernel/fiasco/src/kern/irq.cpp:505:15: error: ‘class Thread’ has no
member named ‘drq’
[...] ./kernel/fiasco/src/kern/tcboffset_in.h:11:3: error: ‘class Thread’
has no member named ‘_caller’
./kernel/fiasco/src/kern/tcboffset_in.h:14:3: error: ‘class Thread’
has no member named ‘_timeout’
What else do I have to include that it works?
Best regards, Valentin
On Wed Aug 13, 2014 at 11:45:20 +0200, Valentin Hauner wrote:
how can I access the identificator used in JDB's thread list in the enqueue method of my ready queue class?
Following code snippet does not work:
include "thread.h" [...] Ready_queue_edf<E>::enqueue(E *i, bool) { printf("%d", static_cast<Thread*>(i->context())->dbg_info()->dbg_id()); }
It results in various compiler errors:
[...] ./kernel/fiasco/src/kern/irq.cpp:504:11: error: ‘class Thread’ has no
member named ‘home_cpu’
./kernel/fiasco/src/kern/irq.cpp:505:15: error: ‘class Thread’ has no
member named ‘drq’
[...] ./kernel/fiasco/src/kern/tcboffset_in.h:11:3: error: ‘class Thread’
has no member named ‘_caller’
./kernel/fiasco/src/kern/tcboffset_in.h:14:3: error: ‘class Thread’
has no member named ‘_timeout’
What else do I have to include that it works?
At this point in the code it can get a bit hairy with includes and dependencies etc. Thus, include "kobject_dbg.h" and use this:
printf("%lx\n", Kobject_dbg::obj_to_id(i->context()));
Adam
l4-hackers@os.inf.tu-dresden.de