Jump to ID:
QNX Operating System

Project Home

Documents

Discussions

Wiki

Project Info
Forum Topic - Kernel Debugging Wiki: Page 1 of 2 (2 Items)
   
 
 
Kernel Debugging Wiki  
I've been able to debug the kernel over a physical serial port, but I had to do some things a little different than the 
wiki page says.

In the suggested boot section of the build file, on the wiki we have:

[virtual=x86,bios +compress] boot = {
    # Reserve 64k of video memory to handle multiple video cards
    startup-bios -s64k -Dconsole -K3f8..9600

    gdb_kdebug

    # PATH is the *safe* path for executables (confstr(_CS_PATH...))
    # LD_LIBRARY_PATH is the *safe* path for libraries (confstr(_CS_LIBPATH))
    #    i.e. This is the path searched for libs in setuid/setgid executables.
[+keeplinked]
    PATH=/proc/boot:/bin:/usr/bin:/opt/bin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto-instr -P
}


I've only got it to work with:
    # for second serial port
    startup-bios -s64k -Dconsole -K 8250.3f8.9600
    # for first serial port
    startup-bios -s64k -Dconsole -K 8250.2f8.9600


Maybe that's hardware dependent, so is intentionally left out of the wiki.


My other major problem was that I needed the debug variant of procnto-instr, so I had to change the line to reflect that
:

    PATH=/proc/boot:/bin:/usr/bin:/opt/bin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto-instr_g -P


This is actually not built by default, because there is a Makefile.dnm within services/system/proc/x86/o.instr.g, so 
that has to be removed to build this variant.  I probably could have used procnto_g, which does get built by default.

Anyway, without the debug variant built, I wasn't having much luck.  I know that it should be completely obvious, but I 
like to be able to cut and paste sections from guides and trust that they are correct, so I think the wiki should be 
updated.

Thanks

   -SM

PS - I'll be posting a guide on kernel debugging with QEMU shortly.  It will be under the same "QEMU and Neutrino" page 
under debugging on the kernel wiki.