Is there a tutorial or guide somewhere about how to use remote gdb (from a linux machine) to debug an L4 task? I haven't been able to find much more info about this other than casual mention that it is supported...
I've found this example: oskit10/examples/x86/shared/intr_console.c will let you know how it pans out, looks simple enough barring any caveats.
On 7/27/05, Bert van Leeuwen bert.vanleeuwen@gmail.com wrote:
Is there a tutorial or guide somewhere about how to use remote gdb (from a linux machine) to debug an L4 task? I haven't been able to find much more info about this other than casual mention that it is supported...
On 7/27/05, Bert van Leeuwen bert.vanleeuwen@gmail.com wrote:
I've found this example: oskit10/examples/x86/shared/intr_console.c will let you know how it pans out, looks simple enough barring any caveats.
On 7/27/05, Bert van Leeuwen bert.vanleeuwen@gmail.com wrote:
Is there a tutorial or guide somewhere about how to use remote gdb (from a linux machine) to debug an L4 task? I haven't been able to find much more info about this other than casual mention that it is supported...
I have also been trying to remotely debug an L4 task with GDB over a second serial line, with inspiration from the above example. Using gdb_pc_com_init() to initialise the serial port for GDB works, but when a pagefault occurs JDB is invoked and not GDB. Looking at intr_console.c I saw that it also sets up debug registers to catch null pointer dereferences using the following code:
set_b0(NULL, DR7_LEN_1, DR7_RW_INST); set_b1(NULL, DR7_LEN_4, DR7_RW_DATA);
I then included this in my program, but now it hangs in the set_b0() call. (The OSKit documentation doesn't mention having to set up debug registers when using remote GDB debugging, so I'm not sure whether this is correct.) However, at that point I can connect with GDB and perform all the neat GDB functions like inspecting variable values, etc. Unfortunately, when stepping to the next instruction I get the following pagefault:
test | Dump of trap_state at 0x042ff834: test | EAX 042ffacc EBX 042ff948 ECX 00000001 EDX 01600000 test | ESI 00000000 EDI 042ff93c EBP 042ffaf4 ESP 01730db1 test | EIP 0173287c EFLAGS 00013102 test | CS 001b SS f93c DS 0023 ES 0023 FS 0023 GS 0023 test | trapno 13, error 00000000, from user mode test | terminated due to trap test | test | PANIC. Backtrace: fp=42ff7c8 test | 01704869 01731ebb 01731f1f 0172fe1f 01730ffb 0173140a 0172fe41 test | 01730ffb 0173140a 0172fe41 01600f63 01705561 0170d2b1L4RM: [PF] read at 0x04300000, eip 01705402, src F.02 test | [F.0] l4rm/lib/src/pagefault.c:78:__unknown_pf(): test | unhandled page fault
Can anyone shed some light on how remote GDB debugging should be done under L4? Any help would be greatly appreciated.
Thanks, Derick
On Fri Jul 29, 2005 at 12:17:48 +0200, Derick Swanepoel wrote:
Can anyone shed some light on how remote GDB debugging should be done under L4? Any help would be greatly appreciated.
Just some words from my side. We here use jdb to nearly debug everything, so we don't use gdb at all. If we would there probably would be some support for it. :) Sure, jdb is different to gdb but we haven't had the need to get gdb running for user land debugging up to now. Try jdb, it's cool :)
The jdb manual: http://os.inf.tu-dresden.de/~fm3/doc/fiasco/manual.pdf
Adam
Is it possible (with jdb) to get local symbol/parameter info at every stack frame in the backtrace (e.g. after a PF)? That is the info I am interested in obtaining... Just a plain bt doesn't always help unless you can determine the state at each frame.
On 8/3/05, Adam Lackorzynski adam@os.inf.tu-dresden.de wrote:
On Fri Jul 29, 2005 at 12:17:48 +0200, Derick Swanepoel wrote:
Can anyone shed some light on how remote GDB debugging should be done under L4? Any help would be greatly appreciated.
Just some words from my side. We here use jdb to nearly debug everything, so we don't use gdb at all. If we would there probably would be some support for it. :) Sure, jdb is different to gdb but we haven't had the need to get gdb running for user land debugging up to now. Try jdb, it's cool :)
The jdb manual: http://os.inf.tu-dresden.de/~fm3/doc/fiasco/manual.pdf
Adam
Adam adam@os.inf.tu-dresden.de Lackorzynski http://os.inf.tu-dresden.de/~adam/
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
On Thu Aug 04, 2005 at 07:35:13 +0200, Bert van Leeuwen wrote:
Is it possible (with jdb) to get local symbol/parameter info at every stack frame in the backtrace (e.g. after a PF)? That is the info I am interested in obtaining... Just a plain bt doesn't always help unless you can determine the state at each frame.
The backtrace 'just' does have symbols/lines info, no parameter info. Usually some printfs help in this case.
Adam
l4-hackers@os.inf.tu-dresden.de