On Sunday 17 December 2006 18:03, Nicholas Mc Guire wrote:
> Hi !
>
>   System: Slackware 11.0
>   Kernel: 2.6.15.5 (host + UML)
>   Patches: skas-2.6.15-v9-pre8.patch (host kernel only)
>   Arch: i386 (AMD K7)
>
>   After building the host kernel with SKAS support and building the UML
>   kenrel with SKAS and TT support I tried running it in gdb - but I am
>   not able to reproduce the output from the uml home-page SKAS debug
>   session - that is it seems like only kernel functions are visible in
>   the backtrace but none of the libc or application functions.
What you mean by "application" functions? To debug an application inside UML 
you need to run gdb *inside* uml.

>   the trace on the web-page shows:
All the functions shown there are in the UML (i.e. kernel) stack.
>   ...
> #6  0xa00e52a2 in run_kernel_thread (fn=0xa00f38d0 <start_kernel_proc>,
>      arg=0x0, jmp_ptr=0xa020c554) at process.c:239
> #7  0xa00f36de in new_thread_handler (sig=10) at process_kern.c:67
> #8  <signal handler called>
> #9  0xa01891d1 in __kill ()
> #10 0xa0188f85 in siglongjmp () at ../sysdeps/generic/longjmp.c:39
> #11 0xa00f32e3 in start_idle_thread (stack=0xa020e000,
>      switch_buf_ptr=0xa020c57c, fork_buf_ptr=0xa020c580) at process.c:275
> #12 0xa00f3947 in start_uml_skas () at process_kern.c:169
> #13 0xa00ee779 in linux_main (argc=8, argv=0xbffff814) at um_arch.c:376
> #14 0xa000c3d2 in main (argc=8, argv=0xbffff814, envp=0xbffff838)
>      at arch/um/main.c:143
> #15 0xa0188d52 in __libc_start_main (main=0xa000c1dc <main>, argc=8,
>      ubp_av=0xbffff814, init=0xa01c6520 <_init>, fini=0xa01c6cb0 <_fini>,
>      rtld_fini=0, stack_end=0xbffff80c) at
> ../sysdeps/generic/libc-start.c:129
> (gdb) c
> Continuing.
>
>    after sending a SIGINT the output I get looks like this:
>
>   gdb ./linux
> (gdb) handle SIGSEGV pass nostop noprint
> ...
> (gdb) handle SIGUSR1 pass nostop noprint
> ...
> (gdb) run
> ...
> Starting pid 15, console /dev/console: '/bin/sh'
>
>
> BusyBox v1.2.2 (2006.12.16-16:18+0000) Built-in shell (ash)
> Enter 'help' for a list of built-in commands.
>
> #
> Program received signal SIGINT, Interrupt.
> 0xa014cb3a in nanosleep () at swab.h:134
> 134     {
> (gdb) bt
> ...
> #8  0xa00222a6 in run_kernel_thread (fn=0xa001712d <start_kernel_proc>,
>      arg=0x0, jmp_ptr=0x0) at arch/um/os-Linux/process.c:216
> #9  0xa0016eba in new_thread_handler (sig=10) at thread_info.h:47
> #10 <signal handler called>
> #11 0xa0140531 in kill () at swab.h:134
> #12 0xbffff498 in ?? ()
> #13 0xa014028c in siglongjmp () at swab.h:134
> #14 0x00000000 in ?? ()
> #15 0xa2800000 in ?? ()
> #16 0x00000001 in ?? ()
> #17 0xbffff4bc in ?? ()
> #18 0xa0016c5b in start_idle_thread (stack=Cannot access memory at address
> 0x9
> )
>      at arch/um/kernel/skas/process.c:514
> Previous frame inner to this frame (corrupt stack?)
About the '??' stack frames, UML and process startup has changed (even about 
the stack layout), and since you compiled with CONFIG_FRAME_POINTER that 
trace is ok. Using "stack unwind info" (maybe it does not exist on 2.6.15 
kernels) may improve the stacktrace (I don't trust gdb enough for this). But 
if you're trying to debug applications, nothing of this can help, the problem 
is what I said above.

>   glibc is not stripped and the applications are compiled with -g3 (the
>   later should be irrelevant for this problem).
>
>   UML kenrel compiled with:
>   CONFIG_DEBUG_INFO=y
>   CONFIG_FRAME_POINTER=y
>
>   any hint what Im doing wrong ?
>
> thx !
> hofrat

-- 
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to