Actually, it is not really working. <br><br>Everything works find, until I attach gdb to the process. <br><br>I am stucked to this:<br><br>(gdb) info thread<br>* 1 process 2370  pseudo_end ()<br>    at /opt/genode/genode-r121/base-linux/../base-linux/src/platform/x86_64/lx_syscall.S:29<br>
<br>(gdb) info stack<br>#0  pseudo_end ()<br>    at /opt/genode/genode-r121/base-linux/../base-linux/src/platform/x86_64/lx_syscall.S:29<br>#1  0x0000000001021442 in lx_nanosleep (this=0x103c400)<br>    at /opt/genode/genode-r121/base-linux/src/platform/linux_syscalls.h:371<br>
#2  thread_stop_myself (this=0x103c400)<br>    at /opt/genode/genode-r121/base-linux/src/base/lock/lock_helper.h:70<br>#3  Genode::Cancelable_lock::lock (this=0x103c400)<br>    at /opt/genode/genode-r121/base/src/base/lock/lock.cc:137<br>
#4  0x000000000101022e in Genode::Lock::lock (this=<value optimized out>)<br>    at /opt/genode/genode-r121/base/include/base/lock.h:35<br>#5  Genode::Platform::wait_for_exit (this=<value optimized out>)<br>    at /opt/genode/genode-r121/base-linux/src/core/platform.cc:50<br>
#6  0x000000000100dfde in main ()<br>    at /opt/genode/genode-r121/base/src/core/main.cc:229<br><br>And I am not able to reach the line where I put "the wait_for_continue" instruction.<br><br>/stephane<br><div class="gmail_quote">
On Fri, Sep 10, 2010 at 6:09 PM, Sebastian Sumpf <span dir="ltr"><<a href="mailto:Sebastian.Sumpf@...1...">Sebastian.Sumpf@...1...</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 Hello again,<br>
<br>
here is a small HOWTO for debugging Genode apps on Linux:<br>
<br>
* The first thing to do is to interrupt Genode at a certain point as you<br>
cannot start core with gdb. So, if you want to debug an application you<br>
have to call 'wait_for_continue' from within your code.<br>
    Somewhere in your code write something like:<br>
<br>
    extern "C" void wait_for_continue();<br>
<br>
    void some_func_in_your_program()<br>
   {<br>
       wait_for_continue();<br>
   }<br>
<br>
    This will cause your program to stall in the function above.<br>
<br>
* Compile your app<br>
* Start './core' from the command line<br>
* As mentioned before your program will stop in the 'wait_for_continue'<br>
function<br>
* Now find out the process id of your program, ('ps -efL | grep Genode')<br>
* Start gdb with 'gdb -p <Process ID from ps>' , this will attach gdb to<br>
the process<br>
* Switch to the Genode output console (where you started core) and hit<br>
'enter', this will cause your program to leave the 'wait_for_continue'<br>
function<br>
* Switch back to GDB, you now may step and set breakpoints (note: Does<br>
not work with all gdb versions), inspect variables, ... .<br>
<br>
I hope this helps,<br>
<br>
Sebastian<br>
<div><div></div><div class="h5"><br>
On 09/10/2010 05:34 PM, stephane frenot wrote:<br>
> Hello,<br>
> I have a problem while debugging genode with gdb.<br>
><br>
> When starting gdb ./core it freeezes on 3 LWP.<br>
><br>
> Is there a specific gdb configuration in order to reach sub services ?<br>
><br>
> /stephane<br>
> --<br>
> <a href="http://perso.citi.insa-lyon.fr/sfrenot" target="_blank">http://perso.citi.insa-lyon.fr/sfrenot</a><br>
> work here : <a href="http://tinyurl.com/2ts4xf" target="_blank">http://tinyurl.com/2ts4xf</a><br>
> sleep here : <a href="http://tinyurl.com/33p2gt" target="_blank">http://tinyurl.com/33p2gt</a><br>
> play here : <a href="http://tinyurl.com/3yarjz" target="_blank">http://tinyurl.com/3yarjz</a><br>
> ---<br>
> Stephane Frenot<br>
> Université de Lyon, INRIA<br>
> INSA-Lyon, CITI, F-69621, France<br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------------<br>
> Automate Storage Tiering Simply<br>
> Optimize IT performance and efficiency through flexible, powerful,<br>
> automated storage tiering capabilities. View this brief to learn how<br>
> you can reduce costs and improve performance.<br>
> <a href="http://p.sf.net/sfu/dell-sfdev2dev" target="_blank">http://p.sf.net/sfu/dell-sfdev2dev</a><br>
><br>
><br>
> _______________________________________________<br>
> Genode-main mailing list<br>
> <a href="mailto:Genode-main@lists.sourceforge.net">Genode-main@...49....sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/genode-main" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
<br>
<br>
------------------------------------------------------------------------------<br>
Automate Storage Tiering Simply<br>
Optimize IT performance and efficiency through flexible, powerful,<br>
automated storage tiering capabilities. View this brief to learn how<br>
you can reduce costs and improve performance.<br>
<a href="http://p.sf.net/sfu/dell-sfdev2dev" target="_blank">http://p.sf.net/sfu/dell-sfdev2dev</a><br>
_______________________________________________<br>
Genode-main mailing list<br>
<a href="mailto:Genode-main@lists.sourceforge.net">Genode-main@...12...ceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/genode-main" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://perso.citi.insa-lyon.fr/sfrenot">http://perso.citi.insa-lyon.fr/sfrenot</a><br>work here : <a href="http://tinyurl.com/2ts4xf">http://tinyurl.com/2ts4xf</a><br>
sleep here : <a href="http://tinyurl.com/33p2gt">http://tinyurl.com/33p2gt</a> <br>play here : <a href="http://tinyurl.com/3yarjz">http://tinyurl.com/3yarjz</a><br>---<br>Stephane Frenot<br>Université de Lyon, INRIA<br>INSA-Lyon, CITI, F-69621, France<br>