​​Hi Aslam,

Here is an example of debugging sel4test on ia32. 
(note that the following assumes that you are running on a x86_64 host machine. 
 If you don't then you will need to install gdb-multiarch)

# Apply a sel4test config for simulating using qemu.
make ia32_release_xml_defconfig

# After building, check that all of the tests run and pass.
make simulate-ia32​

# Invoke qemu with the flags -s -S.  It should block until you attach a gdb 
instance.
#  -s              shorthand for -gdb tcp::1234
# -S              freeze CPU at startup (use 'c' to start execution)
qemu-system-i386 -m 512 -nographic -kernel images/kernel-ia32-pc99 -initrd 
images/sel4test-driver-image-ia32-pc99 -s -S

# Start a gdb instance in another window.
gdb stage/x86/pc99/bin/sel4test-driver # (Or gdb 
stage/x86/pc99/bin/sel4test-tests)

# Attach to the qemu instance using remote gdb serial server protocol.
(gdb) target remote :1234
Remote debugging using :1234
0x0000fff0 in ?? ()

# Set a breakpoint at main.
(gdb) break main
Breakpoint 1 at 0x8048460: file 
/tmp/tmp.hlCOEKke8y/apps/sel4test-driver/src/main.c, line 459.

# Resume the qemu cpu.
(gdb) continue
Continuing.
# It should hit the first breakpoint.
Breakpoint 1, main () at /tmp/tmp.hlCOEKke8y/apps/sel4test-driver/src/main.c:459

I'll also update the wiki with this example on ia32.  Let me know if you have 
any further issues :-).


Kind regards,

Kent.


From: Devel <[email protected]> on behalf of ALVI Aslam (MORPHO) 
<[email protected]>
Sent: Monday, January 22, 2018 10:50 PM
To: [email protected]
Subject: [seL4] Userspace Debugging for ia32
  

Hello Team,
 
I need some help to start a userspace debugging for ia32.
Since as per the instruction mention in the link  
https://wiki.sel4.systems/Debugging%20guide
I was able to use GDB for kzm based defconig.
But how can I start userspace debugging for ia32 based defconig?
 
Thank You & Regards,
Aslam 
     
_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel

Reply via email to