Actually, it is not really working.

Everything works find, until I attach gdb to the process.

I am stucked to this:

(gdb) info thread
* 1 process 2370  pseudo_end ()
    at /opt/genode/genode-r121/base-linux/../base-linux/src/platform/x86_64/lx_syscall.S:29

(gdb) info stack
#0  pseudo_end ()
    at /opt/genode/genode-r121/base-linux/../base-linux/src/platform/x86_64/lx_syscall.S:29
#1  0x0000000001021442 in lx_nanosleep (this=0x103c400)
    at /opt/genode/genode-r121/base-linux/src/platform/linux_syscalls.h:371
#2  thread_stop_myself (this=0x103c400)
    at /opt/genode/genode-r121/base-linux/src/base/lock/lock_helper.h:70
#3  Genode::Cancelable_lock::lock (this=0x103c400)
    at /opt/genode/genode-r121/base/src/base/lock/lock.cc:137
#4  0x000000000101022e in Genode::Lock::lock (this=<value optimized out>)
    at /opt/genode/genode-r121/base/include/base/lock.h:35
#5  Genode::Platform::wait_for_exit (this=<value optimized out>)
    at /opt/genode/genode-r121/base-linux/src/core/platform.cc:50
#6  0x000000000100dfde in main ()
    at /opt/genode/genode-r121/base/src/core/main.cc:229

And I am not able to reach the line where I put "the wait_for_continue" instruction.

/stephane
On Fri, Sep 10, 2010 at 6:09 PM, Sebastian Sumpf <Sebastian.Sumpf@...1...> wrote:
 Hello again,

here is a small HOWTO for debugging Genode apps on Linux:

* The first thing to do is to interrupt Genode at a certain point as you
cannot start core with gdb. So, if you want to debug an application you
have to call 'wait_for_continue' from within your code.
   Somewhere in your code write something like:

   extern "C" void wait_for_continue();

   void some_func_in_your_program()
  {
      wait_for_continue();
  }

   This will cause your program to stall in the function above.

* Compile your app
* Start './core' from the command line
* As mentioned before your program will stop in the 'wait_for_continue'
function
* Now find out the process id of your program, ('ps -efL | grep Genode')
* Start gdb with 'gdb -p <Process ID from ps>' , this will attach gdb to
the process
* Switch to the Genode output console (where you started core) and hit
'enter', this will cause your program to leave the 'wait_for_continue'
function
* Switch back to GDB, you now may step and set breakpoints (note: Does
not work with all gdb versions), inspect variables, ... .

I hope this helps,

Sebastian

On 09/10/2010 05:34 PM, stephane frenot wrote:
> Hello,
> I have a problem while debugging genode with gdb.
>
> When starting gdb ./core it freeezes on 3 LWP.
>
> Is there a specific gdb configuration in order to reach sub services ?
>
> /stephane
> --
> http://perso.citi.insa-lyon.fr/sfrenot
> work here : http://tinyurl.com/2ts4xf
> sleep here : http://tinyurl.com/33p2gt
> play here : http://tinyurl.com/3yarjz
> ---
> Stephane Frenot
> Université de Lyon, INRIA
> INSA-Lyon, CITI, F-69621, France
>
>
> ------------------------------------------------------------------------------
> Automate Storage Tiering Simply
> Optimize IT performance and efficiency through flexible, powerful,
> automated storage tiering capabilities. View this brief to learn how
> you can reduce costs and improve performance.
> http://p.sf.net/sfu/dell-sfdev2dev
>
>
> _______________________________________________
> Genode-main mailing list
> Genode-main@...49....sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main


------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful,
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance.
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
Genode-main mailing list
Genode-main@...12...ceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main



--
http://perso.citi.insa-lyon.fr/sfrenot
work here : http://tinyurl.com/2ts4xf
sleep here : http://tinyurl.com/33p2gt
play here : http://tinyurl.com/3yarjz
---
Stephane Frenot
Université de Lyon, INRIA
INSA-Lyon, CITI, F-69621, France