Debugger

Can we use GDB to debug the drivers.? Atleast the documentation seems to say
that, but the DDD does not allow me to load the .so file in the debugger.Am
i doing something wrong ?

Sreekanth

Yes. Make sure you compile and ling with debug.
My ~/.gdbinit looks something like:


set solib-search <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll

set print pretty on
set print array on

set stop-on-solib-events 1

set auto-solib-add 1

  • in gdb:

GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “–host=x86-pc-nto-qnx --target=ntox86”.
(gdb) target qnx pty
Launching on pty /dev/ptyp7
Debug server launched.
Remote debugging using pty
(gdb) shell pidin | grep io-net
61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
(gdb) attach 61423651
Attaching to process 61423651
Reading symbols from /lib/libc.so.2…(no debugging symbols found)…done.
Reading symbols from <fullpath_to_io_net_so>…done.
0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
(gdb) b my_func
Breakpoint 1 at 0xb8262e13: file , line .
(gdb) c
Continuing.

-seanb

Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
: Can we use GDB to debug the drivers.? Atleast the documentation seems to say
: that, but the DDD does not allow me to load the .so file in the debugger.Am
: i doing something wrong ?

: Sreekanth

Sean,
Thanks for the suggestion.But When i am trying to debug on the same
machine(there is no external target machine) the GDB is freezing up after
giving these messages…
Reading symbols from /lib/libc.so.2…(no debugging symbols found)…done.
Reading symbols from /usr/src/npm/x86/dll…done.
0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
(i get a gdb > prompt…) then it freezes…
forcing me to reset it.Is it that we cannot debug on the same machine?
please advise

Thanks

Sreekanth
Sean Boudreau <seanb@qnx.com> wrote in message
news:9qhdot$hhh$1@nntp.qnx.com

Yes. Make sure you compile and ling with debug.
My ~/.gdbinit looks something like:


set solib-search
fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll

set print pretty on
set print array on

set stop-on-solib-events 1

set auto-solib-add 1

  • in gdb:

GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for
details.
This GDB was configured as “–host=x86-pc-nto-qnx --target=ntox86”.
(gdb) target qnx pty
Launching on pty /dev/ptyp7
Debug server launched.
Remote debugging using pty
(gdb) shell pidin | grep io-net
61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
(gdb) attach 61423651
Attaching to process 61423651
Reading symbols from /lib/libc.so.2…(no debugging symbols found)…done.
Reading symbols from <fullpath_to_io_net_so>…done.
0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
(gdb) b my_func
Breakpoint 1 at 0xb8262e13: file , line .
(gdb) c
Continuing.

-seanb

Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
: Can we use GDB to debug the drivers.? Atleast the documentation seems to
say
: that, but the DDD does not allow me to load the .so file in the
debugger.Am
: i doing something wrong ?

: Sreekanth

You are physically at that machine? Not telneted in
or some other remote acccess?

You can debug io-net from the machine it’s running on. I do
it every now and then when I find the rare bug :slight_smile:


-seanb

Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
: Sean,
: Thanks for the suggestion.But When i am trying to debug on the same
: machine(there is no external target machine) the GDB is freezing up after
: giving these messages…
: Reading symbols from /lib/libc.so.2…(no debugging symbols found)…done.
: Reading symbols from /usr/src/npm/x86/dll…done.
: 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
: (i get a gdb > prompt…) then it freezes…
: forcing me to reset it.Is it that we cannot debug on the same machine?
: please advise

: Thanks

: Sreekanth
: Sean Boudreau <seanb@qnx.com> wrote in message
: news:9qhdot$hhh$1@nntp.qnx.com
:>
:> Yes. Make sure you compile and ling with debug.
:> My ~/.gdbinit looks something like:
:>
:>
:> set solib-search
: <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:>
:> set print pretty on
:> set print array on
:> # set stop-on-solib-events 1
:> set auto-solib-add 1
:>
:> - in gdb:
:>
:> GNU gdb 5.0
:> Copyright 2000 Free Software Foundation, Inc.
:> GDB is free software, covered by the GNU General Public License, and you
: are
:> welcome to change it and/or distribute copies of it under certain
: conditions.
:> Type “show copying” to see the conditions.
:> There is absolutely no warranty for GDB. Type “show warranty” for
: details.
:> This GDB was configured as “–host=x86-pc-nto-qnx --target=ntox86”.
:> (gdb) target qnx pty
:> Launching on pty /dev/ptyp7
:> Debug server launched.
:> Remote debugging using pty
:> (gdb) shell pidin | grep io-net
:> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> (gdb) attach 61423651
:> Attaching to process 61423651
:> Reading symbols from /lib/libc.so.2…(no debugging symbols found)…done.
:> Reading symbols from <fullpath_to_io_net_so>…done.
:> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> (gdb) b my_func
:> Breakpoint 1 at 0xb8262e13: file , line .
:> (gdb) c
:> Continuing.
:>
:> -seanb
:>
:> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> : Can we use GDB to debug the drivers.? Atleast the documentation seems to
: say
:> : that, but the DDD does not allow me to load the .so file in the
: debugger.Am
:> : i doing something wrong ?
:>
:> : Sreekanth
:>
:>

Yes …I am physically at that machine…this is not a embedded system.(not
yet).This is pentium III desktop machine.It freezes after showing the
messages and then the keyboard is dead.I have to press the reset switch on
the box to recover.May be i am missing something critical.

Sreekanth


Sean Boudreau <seanb@qnx.com> wrote in message
news:9qp99u$g20$1@nntp.qnx.com

You are physically at that machine? Not telneted in
or some other remote acccess?

You can debug io-net from the machine it’s running on. I do
it every now and then when I find the rare bug > :slight_smile:


-seanb

Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
: Sean,
: Thanks for the suggestion.But When i am trying to debug on the
same
: machine(there is no external target machine) the GDB is freezing up
after
: giving these messages…
: Reading symbols from /lib/libc.so.2…(no debugging symbols
found)…done.
: Reading symbols from /usr/src/npm/x86/dll…done.
: 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
: (i get a gdb > prompt…) then it freezes…
: forcing me to reset it.Is it that we cannot debug on the same machine?
: please advise

: Thanks

: Sreekanth
: Sean Boudreau <> seanb@qnx.com> > wrote in message
: news:9qhdot$hhh$> 1@nntp.qnx.com> …
:
:> Yes. Make sure you compile and ling with debug.
:> My ~/.gdbinit looks something like:
:
:
:> set solib-search
: <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:
:> set print pretty on
:> set print array on
:> # set stop-on-solib-events 1
:> set auto-solib-add 1
:
:> - in gdb:
:
:> GNU gdb 5.0
:> Copyright 2000 Free Software Foundation, Inc.
:> GDB is free software, covered by the GNU General Public License, and
you
: are
:> welcome to change it and/or distribute copies of it under certain
: conditions.
:> Type “show copying” to see the conditions.
:> There is absolutely no warranty for GDB. Type “show warranty” for
: details.
:> This GDB was configured as “–host=x86-pc-nto-qnx --target=ntox86”.
:> (gdb) target qnx pty
:> Launching on pty /dev/ptyp7
:> Debug server launched.
:> Remote debugging using pty
:> (gdb) shell pidin | grep io-net
:> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> (gdb) attach 61423651
:> Attaching to process 61423651
:> Reading symbols from /lib/libc.so.2…(no debugging symbols
found)…done.
:> Reading symbols from <fullpath_to_io_net_so>…done.
:> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> (gdb) b my_func
:> Breakpoint 1 at 0xb8262e13: file , line .
:> (gdb) c
:> Continuing.
:
:> -seanb
:
:> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> : Can we use GDB to debug the drivers.? Atleast the documentation seems
to
: say
:> : that, but the DDD does not allow me to load the .so file in the
: debugger.Am
:> : i doing something wrong ?
:
:> : Sreekanth
:
:

Does it freeze if you attach when running a driver other than
yours?

-seanb


Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
: Yes …I am physically at that machine…this is not a embedded system.(not
: yet).This is pentium III desktop machine.It freezes after showing the
: messages and then the keyboard is dead.I have to press the reset switch on
: the box to recover.May be i am missing something critical.

: Sreekanth


: Sean Boudreau <seanb@qnx.com> wrote in message
: news:9qp99u$g20$1@nntp.qnx.com
:>
:> You are physically at that machine? Not telneted in
:> or some other remote acccess?
:>
:> You can debug io-net from the machine it’s running on. I do
:> it every now and then when I find the rare bug :slight_smile:
:>
:>
:> -seanb
:>
:> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> : Sean,
:> : Thanks for the suggestion.But When i am trying to debug on the
: same
:> : machine(there is no external target machine) the GDB is freezing up
: after
:> : giving these messages…
:> : Reading symbols from /lib/libc.so.2…(no debugging symbols
: found)…done.
:> : Reading symbols from /usr/src/npm/x86/dll…done.
:> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> : (i get a gdb > prompt…) then it freezes…
:> : forcing me to reset it.Is it that we cannot debug on the same machine?
:> : please advise
:>
:> : Thanks
:>
:> : Sreekanth
:> : Sean Boudreau <seanb@qnx.com> wrote in message
:> : news:9qhdot$hhh$1@nntp.qnx.com
:> :>
:> :> Yes. Make sure you compile and ling with debug.
:> :> My ~/.gdbinit looks something like:
:> :>
:> :>
:> :> set solib-search
:> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> :>
:> :> set print pretty on
:> :> set print array on
:> :> # set stop-on-solib-events 1
:> :> set auto-solib-add 1
:> :>
:> :> - in gdb:
:> :>
:> :> GNU gdb 5.0
:> :> Copyright 2000 Free Software Foundation, Inc.
:> :> GDB is free software, covered by the GNU General Public License, and
: you
:> : are
:> :> welcome to change it and/or distribute copies of it under certain
:> : conditions.
:> :> Type “show copying” to see the conditions.
:> :> There is absolutely no warranty for GDB. Type “show warranty” for
:> : details.
:> :> This GDB was configured as “–host=x86-pc-nto-qnx --target=ntox86”.
:> :> (gdb) target qnx pty
:> :> Launching on pty /dev/ptyp7
:> :> Debug server launched.
:> :> Remote debugging using pty
:> :> (gdb) shell pidin | grep io-net
:> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> :> (gdb) attach 61423651
:> :> Attaching to process 61423651
:> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
: found)…done.
:> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> (gdb) b my_func
:> :> Breakpoint 1 at 0xb8262e13: file , line .
:> :> (gdb) c
:> :> Continuing.
:> :>
:> :> -seanb
:> :>
:> :> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> :> : Can we use GDB to debug the drivers.? Atleast the documentation seems
: to
:> : say
:> :> : that, but the DDD does not allow me to load the .so file in the
:> : debugger.Am
:> :> : i doing something wrong ?
:> :>
:> :> : Sreekanth
:> :>
:> :>
:>
:>

Infact it is freezing no matter my driver is loaded or not…Btw i am
mounting my driver before calling gdb.

thanks

Sreekanth
Sean Boudreau <seanb@qnx.com> wrote in message
news:9qpkre$mqj$1@nntp.qnx.com

Does it freeze if you attach when running a driver other than
yours?

-seanb


Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
: Yes …I am physically at that machine…this is not a embedded
system.(not
: yet).This is pentium III desktop machine.It freezes after showing the
: messages and then the keyboard is dead.I have to press the reset switch
on
: the box to recover.May be i am missing something critical.

: Sreekanth


: Sean Boudreau <> seanb@qnx.com> > wrote in message
: news:9qp99u$g20$> 1@nntp.qnx.com> …
:
:> You are physically at that machine? Not telneted in
:> or some other remote acccess?
:
:> You can debug io-net from the machine it’s running on. I do
:> it every now and then when I find the rare bug > :slight_smile:
:
:
:> -seanb
:
:> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> : Sean,
:> : Thanks for the suggestion.But When i am trying to debug on
the
: same
:> : machine(there is no external target machine) the GDB is freezing up
: after
:> : giving these messages…
:> : Reading symbols from /lib/libc.so.2…(no debugging symbols
: found)…done.
:> : Reading symbols from /usr/src/npm/x86/dll…done.
:> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> : (i get a gdb > prompt…) then it freezes…
:> : forcing me to reset it.Is it that we cannot debug on the same
machine?
:> : please advise
:
:> : Thanks
:
:> : Sreekanth
:> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> : news:9qhdot$hhh$> 1@nntp.qnx.com> …
:> :
:> :> Yes. Make sure you compile and ling with debug.
:> :> My ~/.gdbinit looks something like:
:> :
:> :
:> :> set solib-search
:> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> :
:> :> set print pretty on
:> :> set print array on
:> :> # set stop-on-solib-events 1
:> :> set auto-solib-add 1
:> :
:> :> - in gdb:
:> :
:> :> GNU gdb 5.0
:> :> Copyright 2000 Free Software Foundation, Inc.
:> :> GDB is free software, covered by the GNU General Public License, and
: you
:> : are
:> :> welcome to change it and/or distribute copies of it under certain
:> : conditions.
:> :> Type “show copying” to see the conditions.
:> :> There is absolutely no warranty for GDB. Type “show warranty” for
:> : details.
:> :> This GDB was configured as “–host=x86-pc-nto-qnx --target=ntox86”.
:> :> (gdb) target qnx pty
:> :> Launching on pty /dev/ptyp7
:> :> Debug server launched.
:> :> Remote debugging using pty
:> :> (gdb) shell pidin | grep io-net
:> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> :> (gdb) attach 61423651
:> :> Attaching to process 61423651
:> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
: found)…done.
:> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> (gdb) b my_func
:> :> Breakpoint 1 at 0xb8262e13: file , line .
:> :> (gdb) c
:> :> Continuing.
:> :
:> :> -seanb
:> :
:> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> : Can we use GDB to debug the drivers.? Atleast the documentation
seems
: to
:> : say
:> :> : that, but the DDD does not allow me to load the .so file in the
:> : debugger.Am
:> :> : i doing something wrong ?
:> :
:> :> : Sreekanth
:> :
:> :
:
:

Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:

Infact it is freezing no matter my driver is loaded or not…Btw i am
mounting my driver before calling gdb.

Have you tried to delete the “system monitor” in shelf?
There is a known bug that the system monitor try to talk to
io-net, and if io-net not reply (cause it’s stopped in debuger),
the system monitor won’t let go photon events.

You probably not dead, if you ctrl-alt-shift-backspace, you could
drop out of photon.

-xtang


thanks

Sreekanth
Sean Boudreau <> seanb@qnx.com> > wrote in message
news:9qpkre$mqj$> 1@nntp.qnx.com> …

Does it freeze if you attach when running a driver other than
yours?

-seanb


Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
: Yes …I am physically at that machine…this is not a embedded
system.(not
: yet).This is pentium III desktop machine.It freezes after showing the
: messages and then the keyboard is dead.I have to press the reset switch
on
: the box to recover.May be i am missing something critical.

: Sreekanth


: Sean Boudreau <> seanb@qnx.com> > wrote in message
: news:9qp99u$g20$> 1@nntp.qnx.com> …
:
:> You are physically at that machine? Not telneted in
:> or some other remote acccess?
:
:> You can debug io-net from the machine it’s running on. I do
:> it every now and then when I find the rare bug > :slight_smile:
:
:
:> -seanb
:
:> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> : Sean,
:> : Thanks for the suggestion.But When i am trying to debug on
the
: same
:> : machine(there is no external target machine) the GDB is freezing up
: after
:> : giving these messages…
:> : Reading symbols from /lib/libc.so.2…(no debugging symbols
: found)…done.
:> : Reading symbols from /usr/src/npm/x86/dll…done.
:> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> : (i get a gdb > prompt…) then it freezes…
:> : forcing me to reset it.Is it that we cannot debug on the same
machine?
:> : please advise
:
:> : Thanks
:
:> : Sreekanth
:> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> : news:9qhdot$hhh$> 1@nntp.qnx.com> …
:> :
:> :> Yes. Make sure you compile and ling with debug.
:> :> My ~/.gdbinit looks something like:
:> :
:> :
:> :> set solib-search
:> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> :
:> :> set print pretty on
:> :> set print array on
:> :> # set stop-on-solib-events 1
:> :> set auto-solib-add 1
:> :
:> :> - in gdb:
:> :
:> :> GNU gdb 5.0
:> :> Copyright 2000 Free Software Foundation, Inc.
:> :> GDB is free software, covered by the GNU General Public License, and
: you
:> : are
:> :> welcome to change it and/or distribute copies of it under certain
:> : conditions.
:> :> Type “show copying” to see the conditions.
:> :> There is absolutely no warranty for GDB. Type “show warranty” for
:> : details.
:> :> This GDB was configured as “–host=x86-pc-nto-qnx --target=ntox86”.
:> :> (gdb) target qnx pty
:> :> Launching on pty /dev/ptyp7
:> :> Debug server launched.
:> :> Remote debugging using pty
:> :> (gdb) shell pidin | grep io-net
:> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> :> (gdb) attach 61423651
:> :> Attaching to process 61423651
:> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
: found)…done.
:> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> (gdb) b my_func
:> :> Breakpoint 1 at 0xb8262e13: file , line .
:> :> (gdb) c
:> :> Continuing.
:> :
:> :> -seanb
:> :
:> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> : Can we use GDB to debug the drivers.? Atleast the documentation
seems
: to
:> : say
:> :> : that, but the DDD does not allow me to load the .so file in the
:> : debugger.Am
:> :> : i doing something wrong ?
:> :
:> :> : Sreekanth
:> :
:> :
:
:

Xtang,
Thanks for the tip.Infact it is not hanging after i removed the
“system monitor”.But I am facing this problem.This was happening earlier
also but now it is happening almost everytime.
when i do attch 86031 (pid of io-net)
I get the following messages.
Attaching to process 86031
0xb0327bbd in ??() from /x86/lib/libc.so.2

Any help is greatly appreciated

Thanks

Sreekanth

Readl

Xiaodan Tang <xtang@qnx.com> wrote in message
news:9qt5hr$pv5$1@nntp.qnx.com

Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
Infact it is freezing no matter my driver is loaded or not…Btw i am
mounting my driver before calling gdb.

Have you tried to delete the “system monitor” in shelf?
There is a known bug that the system monitor try to talk to
io-net, and if io-net not reply (cause it’s stopped in debuger),
the system monitor won’t let go photon events.

You probably not dead, if you ctrl-alt-shift-backspace, you could
drop out of photon.

-xtang


thanks

Sreekanth
Sean Boudreau <> seanb@qnx.com> > wrote in message
news:9qpkre$mqj$> 1@nntp.qnx.com> …

Does it freeze if you attach when running a driver other than
yours?

-seanb


Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
: Yes …I am physically at that machine…this is not a embedded
system.(not
: yet).This is pentium III desktop machine.It freezes after showing the
: messages and then the keyboard is dead.I have to press the reset
switch
on
: the box to recover.May be i am missing something critical.

: Sreekanth


: Sean Boudreau <> seanb@qnx.com> > wrote in message
: news:9qp99u$g20$> 1@nntp.qnx.com> …
:
:> You are physically at that machine? Not telneted in
:> or some other remote acccess?
:
:> You can debug io-net from the machine it’s running on. I do
:> it every now and then when I find the rare bug > :slight_smile:
:
:
:> -seanb
:
:> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> : Sean,
:> : Thanks for the suggestion.But When i am trying to debug on
the
: same
:> : machine(there is no external target machine) the GDB is freezing
up
: after
:> : giving these messages…
:> : Reading symbols from /lib/libc.so.2…(no debugging symbols
: found)…done.
:> : Reading symbols from /usr/src/npm/x86/dll…done.
:> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> : (i get a gdb > prompt…) then it freezes…
:> : forcing me to reset it.Is it that we cannot debug on the same
machine?
:> : please advise
:
:> : Thanks
:
:> : Sreekanth
:> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> : news:9qhdot$hhh$> 1@nntp.qnx.com> …
:> :
:> :> Yes. Make sure you compile and ling with debug.
:> :> My ~/.gdbinit looks something like:
:> :
:> :
:> :> set solib-search
:> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> :
:> :> set print pretty on
:> :> set print array on
:> :> # set stop-on-solib-events 1
:> :> set auto-solib-add 1
:> :
:> :> - in gdb:
:> :
:> :> GNU gdb 5.0
:> :> Copyright 2000 Free Software Foundation, Inc.
:> :> GDB is free software, covered by the GNU General Public License,
and
: you
:> : are
:> :> welcome to change it and/or distribute copies of it under certain
:> : conditions.
:> :> Type “show copying” to see the conditions.
:> :> There is absolutely no warranty for GDB. Type “show warranty”
for
:> : details.
:> :> This GDB was configured as
“–host=x86-pc-nto-qnx --target=ntox86”.
:> :> (gdb) target qnx pty
:> :> Launching on pty /dev/ptyp7
:> :> Debug server launched.
:> :> Remote debugging using pty
:> :> (gdb) shell pidin | grep io-net
:> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> :> (gdb) attach 61423651
:> :> Attaching to process 61423651
:> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
: found)…done.
:> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> (gdb) b my_func
:> :> Breakpoint 1 at 0xb8262e13: file , line .
:> :> (gdb) c
:> :> Continuing.
:> :
:> :> -seanb
:> :
:> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> : Can we use GDB to debug the drivers.? Atleast the documentation
seems
: to
:> : say
:> :> : that, but the DDD does not allow me to load the .so file in
the
:> : debugger.Am
:> :> : i doing something wrong ?
:> :
:> :> : Sreekanth
:> :
:> :
:
:
\

You just happen to be in libc, for which you have
no symbols, when you attached. If you’ve found the
symbols for your shared library, you should be
able to set a breakpoint in one of your functions
and continue (‘c’).

-seanb

Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
: Xtang,
: Thanks for the tip.Infact it is not hanging after i removed the
: “system monitor”.But I am facing this problem.This was happening earlier
: also but now it is happening almost everytime.
: when i do attch 86031 (pid of io-net)
: I get the following messages.
: Attaching to process 86031
: 0xb0327bbd in ??() from /x86/lib/libc.so.2

: Any help is greatly appreciated

: Thanks

: Sreekanth

: Readl

: Xiaodan Tang <xtang@qnx.com> wrote in message
: news:9qt5hr$pv5$1@nntp.qnx.com
:> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> > Infact it is freezing no matter my driver is loaded or not…Btw i am
:> > mounting my driver before calling gdb.
:>
:> Have you tried to delete the “system monitor” in shelf?
:> There is a known bug that the system monitor try to talk to
:> io-net, and if io-net not reply (cause it’s stopped in debuger),
:> the system monitor won’t let go photon events.
:>
:> You probably not dead, if you ctrl-alt-shift-backspace, you could
:> drop out of photon.
:>
:> -xtang
:>
:>
:> > thanks
:>
:> > Sreekanth
:> > Sean Boudreau <seanb@qnx.com> wrote in message
:> > news:9qpkre$mqj$1@nntp.qnx.com
:> >>
:> >> Does it freeze if you attach when running a driver other than
:> >> yours?
:> >>
:> >> -seanb
:> >>
:> >>
:> >> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> >> : Yes …I am physically at that machine…this is not a embedded
:> > system.(not
:> >> : yet).This is pentium III desktop machine.It freezes after showing the
:> >> : messages and then the keyboard is dead.I have to press the reset
: switch
:> > on
:> >> : the box to recover.May be i am missing something critical.
:> >>
:> >> : Sreekanth
:> >>
:> >>
:> >> : Sean Boudreau <seanb@qnx.com> wrote in message
:> >> : news:9qp99u$g20$1@nntp.qnx.com
:> >> :>
:> >> :> You are physically at that machine? Not telneted in
:> >> :> or some other remote acccess?
:> >> :>
:> >> :> You can debug io-net from the machine it’s running on. I do
:> >> :> it every now and then when I find the rare bug :slight_smile:
:> >> :>
:> >> :>
:> >> :> -seanb
:> >> :>
:> >> :> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> >> :> : Sean,
:> >> :> : Thanks for the suggestion.But When i am trying to debug on
:> > the
:> >> : same
:> >> :> : machine(there is no external target machine) the GDB is freezing
: up
:> >> : after
:> >> :> : giving these messages…
:> >> :> : Reading symbols from /lib/libc.so.2…(no debugging symbols
:> >> : found)…done.
:> >> :> : Reading symbols from /usr/src/npm/x86/dll…done.
:> >> :> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> >> :> : (i get a gdb > prompt…) then it freezes…
:> >> :> : forcing me to reset it.Is it that we cannot debug on the same
:> > machine?
:> >> :> : please advise
:> >> :>
:> >> :> : Thanks
:> >> :>
:> >> :> : Sreekanth
:> >> :> : Sean Boudreau <seanb@qnx.com> wrote in message
:> >> :> : news:9qhdot$hhh$1@nntp.qnx.com
:> >> :> :>
:> >> :> :> Yes. Make sure you compile and ling with debug.
:> >> :> :> My ~/.gdbinit looks something like:
:> >> :> :>
:> >> :> :>
:> >> :> :> set solib-search
:> >> :> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> >> :> :>
:> >> :> :> set print pretty on
:> >> :> :> set print array on
:> >> :> :> # set stop-on-solib-events 1
:> >> :> :> set auto-solib-add 1
:> >> :> :>
:> >> :> :> - in gdb:
:> >> :> :>
:> >> :> :> GNU gdb 5.0
:> >> :> :> Copyright 2000 Free Software Foundation, Inc.
:> >> :> :> GDB is free software, covered by the GNU General Public License,
: and
:> >> : you
:> >> :> : are
:> >> :> :> welcome to change it and/or distribute copies of it under certain
:> >> :> : conditions.
:> >> :> :> Type “show copying” to see the conditions.
:> >> :> :> There is absolutely no warranty for GDB. Type “show warranty”
: for
:> >> :> : details.
:> >> :> :> This GDB was configured as
: “–host=x86-pc-nto-qnx --target=ntox86”.
:> >> :> :> (gdb) target qnx pty
:> >> :> :> Launching on pty /dev/ptyp7
:> >> :> :> Debug server launched.
:> >> :> :> Remote debugging using pty
:> >> :> :> (gdb) shell pidin | grep io-net
:> >> :> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> >> :> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> >> :> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> >> :> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> >> :> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> >> :> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> >> :> :> (gdb) attach 61423651
:> >> :> :> Attaching to process 61423651
:> >> :> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
:> >> : found)…done.
:> >> :> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> >> :> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> >> :> :> (gdb) b my_func
:> >> :> :> Breakpoint 1 at 0xb8262e13: file , line .
:> >> :> :> (gdb) c
:> >> :> :> Continuing.
:> >> :> :>
:> >> :> :> -seanb
:> >> :> :>
:> >> :> :> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> >> :> :> : Can we use GDB to debug the drivers.? Atleast the documentation
:> > seems
:> >> : to
:> >> :> : say
:> >> :> :> : that, but the DDD does not allow me to load the .so file in
: the
:> >> :> : debugger.Am
:> >> :> :> : i doing something wrong ?
:> >> :> :>
:> >> :> :> : Sreekanth
:> >> :> :>
:> >> :> :>
:> >> :>
:> >> :>
:> >>
:> >>
:>
:>

No… the problem is, sometimes it tells me that it read symbols from
/x86/lib/libc.so.2 but most of the times it gives this particular error.How
is this possible when i am using the same file everytime.

Thanks
Sreekanth
Sean Boudreau <seanb@qnx.com> wrote in message
news:9r3pgl$1gk$1@nntp.qnx.com

You just happen to be in libc, for which you have
no symbols, when you attached. If you’ve found the
symbols for your shared library, you should be
able to set a breakpoint in one of your functions
and continue (‘c’).

-seanb

Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
: Xtang,
: Thanks for the tip.Infact it is not hanging after i removed
the
: “system monitor”.But I am facing this problem.This was happening earlier
: also but now it is happening almost everytime.
: when i do attch 86031 (pid of io-net)
: I get the following messages.
: Attaching to process 86031
: 0xb0327bbd in ??() from /x86/lib/libc.so.2

: Any help is greatly appreciated

: Thanks

: Sreekanth

: Readl

: Xiaodan Tang <> xtang@qnx.com> > wrote in message
: news:9qt5hr$pv5$> 1@nntp.qnx.com> …
:> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> > Infact it is freezing no matter my driver is loaded or not…Btw i am
:> > mounting my driver before calling gdb.
:
:> Have you tried to delete the “system monitor” in shelf?
:> There is a known bug that the system monitor try to talk to
:> io-net, and if io-net not reply (cause it’s stopped in debuger),
:> the system monitor won’t let go photon events.
:
:> You probably not dead, if you ctrl-alt-shift-backspace, you could
:> drop out of photon.
:
:> -xtang
:
:
:> > thanks
:
:> > Sreekanth
:> > Sean Boudreau <> seanb@qnx.com> > wrote in message
:> > news:9qpkre$mqj$> 1@nntp.qnx.com> …
:
:> >> Does it freeze if you attach when running a driver other than
:> >> yours?
:
:> >> -seanb
:
:
:> >> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> >> : Yes …I am physically at that machine…this is not a embedded
:> > system.(not
:> >> : yet).This is pentium III desktop machine.It freezes after showing
the
:> >> : messages and then the keyboard is dead.I have to press the reset
: switch
:> > on
:> >> : the box to recover.May be i am missing something critical.
:
:> >> : Sreekanth
:
:
:> >> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> >> : news:9qp99u$g20$> 1@nntp.qnx.com> …
:> >> :
:> >> :> You are physically at that machine? Not telneted in
:> >> :> or some other remote acccess?
:> >> :
:> >> :> You can debug io-net from the machine it’s running on. I do
:> >> :> it every now and then when I find the rare bug > :slight_smile:
:> >> :
:> >> :
:> >> :> -seanb
:> >> :
:> >> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> >> :> : Sean,
:> >> :> : Thanks for the suggestion.But When i am trying to debug
on
:> > the
:> >> : same
:> >> :> : machine(there is no external target machine) the GDB is
freezing
: up
:> >> : after
:> >> :> : giving these messages…
:> >> :> : Reading symbols from /lib/libc.so.2…(no debugging symbols
:> >> : found)…done.
:> >> :> : Reading symbols from /usr/src/npm/x86/dll…done.
:> >> :> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> >> :> : (i get a gdb > prompt…) then it freezes…
:> >> :> : forcing me to reset it.Is it that we cannot debug on the same
:> > machine?
:> >> :> : please advise
:> >> :
:> >> :> : Thanks
:> >> :
:> >> :> : Sreekanth
:> >> :> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> >> :> : news:9qhdot$hhh$> 1@nntp.qnx.com> …
:> >> :> :
:> >> :> :> Yes. Make sure you compile and ling with debug.
:> >> :> :> My ~/.gdbinit looks something like:
:> >> :> :
:> >> :> :
:> >> :> :> set solib-search
:> >> :> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> >> :> :
:> >> :> :> set print pretty on
:> >> :> :> set print array on
:> >> :> :> # set stop-on-solib-events 1
:> >> :> :> set auto-solib-add 1
:> >> :> :
:> >> :> :> - in gdb:
:> >> :> :
:> >> :> :> GNU gdb 5.0
:> >> :> :> Copyright 2000 Free Software Foundation, Inc.
:> >> :> :> GDB is free software, covered by the GNU General Public
License,
: and
:> >> : you
:> >> :> : are
:> >> :> :> welcome to change it and/or distribute copies of it under
certain
:> >> :> : conditions.
:> >> :> :> Type “show copying” to see the conditions.
:> >> :> :> There is absolutely no warranty for GDB. Type “show warranty”
: for
:> >> :> : details.
:> >> :> :> This GDB was configured as
: “–host=x86-pc-nto-qnx --target=ntox86”.
:> >> :> :> (gdb) target qnx pty
:> >> :> :> Launching on pty /dev/ptyp7
:> >> :> :> Debug server launched.
:> >> :> :> Remote debugging using pty
:> >> :> :> (gdb) shell pidin | grep io-net
:> >> :> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> >> :> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> >> :> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> >> :> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> >> :> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> >> :> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> >> :> :> (gdb) attach 61423651
:> >> :> :> Attaching to process 61423651
:> >> :> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
:> >> : found)…done.
:> >> :> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> >> :> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> >> :> :> (gdb) b my_func
:> >> :> :> Breakpoint 1 at 0xb8262e13: file , line .
:> >> :> :> (gdb) c
:> >> :> :> Continuing.
:> >> :> :
:> >> :> :> -seanb
:> >> :> :
:> >> :> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> >> :> :> : Can we use GDB to debug the drivers.? Atleast the
documentation
:> > seems
:> >> : to
:> >> :> : say
:> >> :> :> : that, but the DDD does not allow me to load the .so file in
: the
:> >> :> : debugger.Am
:> >> :> :> : i doing something wrong ?
:> >> :> :
:> >> :> :> : Sreekanth
:> >> :> :
:> >> :> :
:> >> :
:> >> :
:
:
:
:
\

I’m not a libc c expert, but 0xb0300000 is generally where
it’s put on X86. Maybe not all of it has the same
level of symbols. My comments about your code should still
apply.

-seanb

Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
: No… the problem is, sometimes it tells me that it read symbols from
: /x86/lib/libc.so.2 but most of the times it gives this particular error.How
: is this possible when i am using the same file everytime.

: Thanks
: Sreekanth
: Sean Boudreau <seanb@qnx.com> wrote in message
: news:9r3pgl$1gk$1@nntp.qnx.com
:>
:> You just happen to be in libc, for which you have
:> no symbols, when you attached. If you’ve found the
:> symbols for your shared library, you should be
:> able to set a breakpoint in one of your functions
:> and continue (‘c’).
:>
:> -seanb
:>
:> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> : Xtang,
:> : Thanks for the tip.Infact it is not hanging after i removed
: the
:> : “system monitor”.But I am facing this problem.This was happening earlier
:> : also but now it is happening almost everytime.
:> : when i do attch 86031 (pid of io-net)
:> : I get the following messages.
:> : Attaching to process 86031
:> : 0xb0327bbd in ??() from /x86/lib/libc.so.2
:>
:> : Any help is greatly appreciated
:>
:> : Thanks
:>
:> : Sreekanth
:>
:> : Readl
:>
:> : Xiaodan Tang <xtang@qnx.com> wrote in message
:> : news:9qt5hr$pv5$1@nntp.qnx.com
:> :> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> :> > Infact it is freezing no matter my driver is loaded or not…Btw i am
:> :> > mounting my driver before calling gdb.
:> :>
:> :> Have you tried to delete the “system monitor” in shelf?
:> :> There is a known bug that the system monitor try to talk to
:> :> io-net, and if io-net not reply (cause it’s stopped in debuger),
:> :> the system monitor won’t let go photon events.
:> :>
:> :> You probably not dead, if you ctrl-alt-shift-backspace, you could
:> :> drop out of photon.
:> :>
:> :> -xtang
:> :>
:> :>
:> :> > thanks
:> :>
:> :> > Sreekanth
:> :> > Sean Boudreau <seanb@qnx.com> wrote in message
:> :> > news:9qpkre$mqj$1@nntp.qnx.com
:> :> >>
:> :> >> Does it freeze if you attach when running a driver other than
:> :> >> yours?
:> :> >>
:> :> >> -seanb
:> :> >>
:> :> >>
:> :> >> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> :> >> : Yes …I am physically at that machine…this is not a embedded
:> :> > system.(not
:> :> >> : yet).This is pentium III desktop machine.It freezes after showing
: the
:> :> >> : messages and then the keyboard is dead.I have to press the reset
:> : switch
:> :> > on
:> :> >> : the box to recover.May be i am missing something critical.
:> :> >>
:> :> >> : Sreekanth
:> :> >>
:> :> >>
:> :> >> : Sean Boudreau <seanb@qnx.com> wrote in message
:> :> >> : news:9qp99u$g20$1@nntp.qnx.com
:> :> >> :>
:> :> >> :> You are physically at that machine? Not telneted in
:> :> >> :> or some other remote acccess?
:> :> >> :>
:> :> >> :> You can debug io-net from the machine it’s running on. I do
:> :> >> :> it every now and then when I find the rare bug :slight_smile:
:> :> >> :>
:> :> >> :>
:> :> >> :> -seanb
:> :> >> :>
:> :> >> :> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> :> >> :> : Sean,
:> :> >> :> : Thanks for the suggestion.But When i am trying to debug
: on
:> :> > the
:> :> >> : same
:> :> >> :> : machine(there is no external target machine) the GDB is
: freezing
:> : up
:> :> >> : after
:> :> >> :> : giving these messages…
:> :> >> :> : Reading symbols from /lib/libc.so.2…(no debugging symbols
:> :> >> : found)…done.
:> :> >> :> : Reading symbols from /usr/src/npm/x86/dll…done.
:> :> >> :> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> >> :> : (i get a gdb > prompt…) then it freezes…
:> :> >> :> : forcing me to reset it.Is it that we cannot debug on the same
:> :> > machine?
:> :> >> :> : please advise
:> :> >> :>
:> :> >> :> : Thanks
:> :> >> :>
:> :> >> :> : Sreekanth
:> :> >> :> : Sean Boudreau <seanb@qnx.com> wrote in message
:> :> >> :> : news:9qhdot$hhh$1@nntp.qnx.com
:> :> >> :> :>
:> :> >> :> :> Yes. Make sure you compile and ling with debug.
:> :> >> :> :> My ~/.gdbinit looks something like:
:> :> >> :> :>
:> :> >> :> :>
:> :> >> :> :> set solib-search
:> :> >> :> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> :> >> :> :>
:> :> >> :> :> set print pretty on
:> :> >> :> :> set print array on
:> :> >> :> :> # set stop-on-solib-events 1
:> :> >> :> :> set auto-solib-add 1
:> :> >> :> :>
:> :> >> :> :> - in gdb:
:> :> >> :> :>
:> :> >> :> :> GNU gdb 5.0
:> :> >> :> :> Copyright 2000 Free Software Foundation, Inc.
:> :> >> :> :> GDB is free software, covered by the GNU General Public
: License,
:> : and
:> :> >> : you
:> :> >> :> : are
:> :> >> :> :> welcome to change it and/or distribute copies of it under
: certain
:> :> >> :> : conditions.
:> :> >> :> :> Type “show copying” to see the conditions.
:> :> >> :> :> There is absolutely no warranty for GDB. Type “show warranty”
:> : for
:> :> >> :> : details.
:> :> >> :> :> This GDB was configured as
:> : “–host=x86-pc-nto-qnx --target=ntox86”.
:> :> >> :> :> (gdb) target qnx pty
:> :> >> :> :> Launching on pty /dev/ptyp7
:> :> >> :> :> Debug server launched.
:> :> >> :> :> Remote debugging using pty
:> :> >> :> :> (gdb) shell pidin | grep io-net
:> :> >> :> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> :> >> :> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> :> >> :> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> :> >> :> :> (gdb) attach 61423651
:> :> >> :> :> Attaching to process 61423651
:> :> >> :> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
:> :> >> : found)…done.
:> :> >> :> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> :> >> :> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> >> :> :> (gdb) b my_func
:> :> >> :> :> Breakpoint 1 at 0xb8262e13: file , line .
:> :> >> :> :> (gdb) c
:> :> >> :> :> Continuing.
:> :> >> :> :>
:> :> >> :> :> -seanb
:> :> >> :> :>
:> :> >> :> :> Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:
:> :> >> :> :> : Can we use GDB to debug the drivers.? Atleast the
: documentation
:> :> > seems
:> :> >> : to
:> :> >> :> : say
:> :> >> :> :> : that, but the DDD does not allow me to load the .so file in
:> : the
:> :> >> :> : debugger.Am
:> :> >> :> :> : i doing something wrong ?
:> :> >> :> :>
:> :> >> :> :> : Sreekanth
:> :> >> :> :>
:> :> >> :> :>
:> :> >> :>
:> :> >> :>
:> :> >>
:> :> >>
:> :>
:> :>
:>
:>
:>
:>

Thanks everyone especially sean boudreau and xtang for their help.I have
somewhat managed to work through my way in the debugger.when the message
0xb0327bbd in ??() from /x86/lib/libc.so.2
is seen i simply did (gdb) sharedlibrary
It works like a charm now.
So two things to be remembered.

  1. Kill the system monitor agent
  2. Sharedlibrary.
    But my question that why it loads the symbols sometimes but not on someother
    time remains unanswered.

Thanks

Sreekanth

Sean Boudreau <seanb@qnx.com> wrote in message
news:9r4a45$bqd$1@nntp.qnx.com

I’m not a libc c expert, but 0xb0300000 is generally where
it’s put on X86. Maybe not all of it has the same
level of symbols. My comments about your code should still
apply.

-seanb

Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
: No… the problem is, sometimes it tells me that it read symbols from
: /x86/lib/libc.so.2 but most of the times it gives this particular
error.How
: is this possible when i am using the same file everytime.

: Thanks
: Sreekanth
: Sean Boudreau <> seanb@qnx.com> > wrote in message
: news:9r3pgl$1gk$> 1@nntp.qnx.com> …
:
:> You just happen to be in libc, for which you have
:> no symbols, when you attached. If you’ve found the
:> symbols for your shared library, you should be
:> able to set a breakpoint in one of your functions
:> and continue (‘c’).
:
:> -seanb
:
:> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> : Xtang,
:> : Thanks for the tip.Infact it is not hanging after i removed
: the
:> : “system monitor”.But I am facing this problem.This was happening
earlier
:> : also but now it is happening almost everytime.
:> : when i do attch 86031 (pid of io-net)
:> : I get the following messages.
:> : Attaching to process 86031
:> : 0xb0327bbd in ??() from /x86/lib/libc.so.2
:
:> : Any help is greatly appreciated
:
:> : Thanks
:
:> : Sreekanth
:
:> : Readl
:
:> : Xiaodan Tang <> xtang@qnx.com> > wrote in message
:> : news:9qt5hr$pv5$> 1@nntp.qnx.com> …
:> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> > Infact it is freezing no matter my driver is loaded or not…Btw i
am
:> :> > mounting my driver before calling gdb.
:> :
:> :> Have you tried to delete the “system monitor” in shelf?
:> :> There is a known bug that the system monitor try to talk to
:> :> io-net, and if io-net not reply (cause it’s stopped in debuger),
:> :> the system monitor won’t let go photon events.
:> :
:> :> You probably not dead, if you ctrl-alt-shift-backspace, you could
:> :> drop out of photon.
:> :
:> :> -xtang
:> :
:> :
:> :> > thanks
:> :
:> :> > Sreekanth
:> :> > Sean Boudreau <> seanb@qnx.com> > wrote in message
:> :> > news:9qpkre$mqj$> 1@nntp.qnx.com> …
:> :
:> :> >> Does it freeze if you attach when running a driver other than
:> :> >> yours?
:> :
:> :> >> -seanb
:> :
:> :
:> :> >> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> >> : Yes …I am physically at that machine…this is not a embedded
:> :> > system.(not
:> :> >> : yet).This is pentium III desktop machine.It freezes after
showing
: the
:> :> >> : messages and then the keyboard is dead.I have to press the
reset
:> : switch
:> :> > on
:> :> >> : the box to recover.May be i am missing something critical.
:> :
:> :> >> : Sreekanth
:> :
:> :
:> :> >> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> :> >> : news:9qp99u$g20$> 1@nntp.qnx.com> …
:> :> >> :
:> :> >> :> You are physically at that machine? Not telneted in
:> :> >> :> or some other remote acccess?
:> :> >> :
:> :> >> :> You can debug io-net from the machine it’s running on. I do
:> :> >> :> it every now and then when I find the rare bug > :slight_smile:
:> :> >> :
:> :> >> :
:> :> >> :> -seanb
:> :> >> :
:> :> >> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> >> :> : Sean,
:> :> >> :> : Thanks for the suggestion.But When i am trying to
debug
: on
:> :> > the
:> :> >> : same
:> :> >> :> : machine(there is no external target machine) the GDB is
: freezing
:> : up
:> :> >> : after
:> :> >> :> : giving these messages…
:> :> >> :> : Reading symbols from /lib/libc.so.2…(no debugging symbols
:> :> >> : found)…done.
:> :> >> :> : Reading symbols from /usr/src/npm/x86/dll…done.
:> :> >> :> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> >> :> : (i get a gdb > prompt…) then it freezes…
:> :> >> :> : forcing me to reset it.Is it that we cannot debug on the
same
:> :> > machine?
:> :> >> :> : please advise
:> :> >> :
:> :> >> :> : Thanks
:> :> >> :
:> :> >> :> : Sreekanth
:> :> >> :> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> :> >> :> : news:9qhdot$hhh$> 1@nntp.qnx.com> …
:> :> >> :> :
:> :> >> :> :> Yes. Make sure you compile and ling with debug.
:> :> >> :> :> My ~/.gdbinit looks something like:
:> :> >> :> :
:> :> >> :> :
:> :> >> :> :> set solib-search
:> :> >> :> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> :> >> :> :
:> :> >> :> :> set print pretty on
:> :> >> :> :> set print array on
:> :> >> :> :> # set stop-on-solib-events 1
:> :> >> :> :> set auto-solib-add 1
:> :> >> :> :
:> :> >> :> :> - in gdb:
:> :> >> :> :
:> :> >> :> :> GNU gdb 5.0
:> :> >> :> :> Copyright 2000 Free Software Foundation, Inc.
:> :> >> :> :> GDB is free software, covered by the GNU General Public
: License,
:> : and
:> :> >> : you
:> :> >> :> : are
:> :> >> :> :> welcome to change it and/or distribute copies of it under
: certain
:> :> >> :> : conditions.
:> :> >> :> :> Type “show copying” to see the conditions.
:> :> >> :> :> There is absolutely no warranty for GDB. Type “show
warranty”
:> : for
:> :> >> :> : details.
:> :> >> :> :> This GDB was configured as
:> : “–host=x86-pc-nto-qnx --target=ntox86”.
:> :> >> :> :> (gdb) target qnx pty
:> :> >> :> :> Launching on pty /dev/ptyp7
:> :> >> :> :> Debug server launched.
:> :> >> :> :> Remote debugging using pty
:> :> >> :> :> (gdb) shell pidin | grep io-net
:> :> >> :> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> :> >> :> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> :> >> :> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> :> >> :> :> (gdb) attach 61423651
:> :> >> :> :> Attaching to process 61423651
:> :> >> :> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
:> :> >> : found)…done.
:> :> >> :> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> :> >> :> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> >> :> :> (gdb) b my_func
:> :> >> :> :> Breakpoint 1 at 0xb8262e13: file , line .
:> :> >> :> :> (gdb) c
:> :> >> :> :> Continuing.
:> :> >> :> :
:> :> >> :> :> -seanb
:> :> >> :> :
:> :> >> :> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> >> :> :> : Can we use GDB to debug the drivers.? Atleast the
: documentation
:> :> > seems
:> :> >> : to
:> :> >> :> : say
:> :> >> :> :> : that, but the DDD does not allow me to load the .so file
in
:> : the
:> :> >> :> : debugger.Am
:> :> >> :> :> : i doing something wrong ?
:> :> >> :> :
:> :> >> :> :> : Sreekanth
:> :> >> :> :
:> :> >> :> :
:> :> >> :
:> :> >> :
:> :
:> :
:> :
:> :
:
:
:
:

Sreekanth Rupavatharam <sreekanth.r@cambira.com> wrote:

Thanks everyone especially sean boudreau and xtang for their help.I have
somewhat managed to work through my way in the debugger.when the message
0xb0327bbd in ??() from /x86/lib/libc.so.2
is seen i simply did (gdb) sharedlibrary
It works like a charm now.
So two things to be remembered.

  1. Kill the system monitor agent
  2. Sharedlibrary.
    But my question that why it loads the symbols sometimes but not on someother
    time remains unanswered.

In most case, when you attach to io-net, threads are in some
sort of libc (kernel) call. If you do a pidin before you attach,
if a thread is “REPLY” block, then it must in “MsgSend()” call,
which means when you attach, you will see a libc address.

Gdb will also try to load a shared lib symble, when the shared lib
first loaded. Check gdb “set auto-solib-add” command, and
“set solib-search-path” command.

That means, if you “gdb /sbin/io-net”, and run, continue it,
you should see gdb try to load libc symbal. Also, if you have
auto-solib-add and solib-search-path properly set, you can then
do a “mount -Tio-net /your/own/devn-driver.so” in another terminal,
you could see gdb auto load your driver symbal for you, while
io-net loading your driver.

-xtang

Thanks

Sreekanth

Sean Boudreau <> seanb@qnx.com> > wrote in message
news:9r4a45$bqd$> 1@nntp.qnx.com> …

I’m not a libc c expert, but 0xb0300000 is generally where
it’s put on X86. Maybe not all of it has the same
level of symbols. My comments about your code should still
apply.

-seanb

Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
: No… the problem is, sometimes it tells me that it read symbols from
: /x86/lib/libc.so.2 but most of the times it gives this particular
error.How
: is this possible when i am using the same file everytime.

: Thanks
: Sreekanth
: Sean Boudreau <> seanb@qnx.com> > wrote in message
: news:9r3pgl$1gk$> 1@nntp.qnx.com> …
:
:> You just happen to be in libc, for which you have
:> no symbols, when you attached. If you’ve found the
:> symbols for your shared library, you should be
:> able to set a breakpoint in one of your functions
:> and continue (‘c’).
:
:> -seanb
:
:> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> : Xtang,
:> : Thanks for the tip.Infact it is not hanging after i removed
: the
:> : “system monitor”.But I am facing this problem.This was happening
earlier
:> : also but now it is happening almost everytime.
:> : when i do attch 86031 (pid of io-net)
:> : I get the following messages.
:> : Attaching to process 86031
:> : 0xb0327bbd in ??() from /x86/lib/libc.so.2
:
:> : Any help is greatly appreciated
:
:> : Thanks
:
:> : Sreekanth
:
:> : Readl
:
:> : Xiaodan Tang <> xtang@qnx.com> > wrote in message
:> : news:9qt5hr$pv5$> 1@nntp.qnx.com> …
:> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> > Infact it is freezing no matter my driver is loaded or not…Btw i
am
:> :> > mounting my driver before calling gdb.
:> :
:> :> Have you tried to delete the “system monitor” in shelf?
:> :> There is a known bug that the system monitor try to talk to
:> :> io-net, and if io-net not reply (cause it’s stopped in debuger),
:> :> the system monitor won’t let go photon events.
:> :
:> :> You probably not dead, if you ctrl-alt-shift-backspace, you could
:> :> drop out of photon.
:> :
:> :> -xtang
:> :
:> :
:> :> > thanks
:> :
:> :> > Sreekanth
:> :> > Sean Boudreau <> seanb@qnx.com> > wrote in message
:> :> > news:9qpkre$mqj$> 1@nntp.qnx.com> …
:> :
:> :> >> Does it freeze if you attach when running a driver other than
:> :> >> yours?
:> :
:> :> >> -seanb
:> :
:> :
:> :> >> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> >> : Yes …I am physically at that machine…this is not a embedded
:> :> > system.(not
:> :> >> : yet).This is pentium III desktop machine.It freezes after
showing
: the
:> :> >> : messages and then the keyboard is dead.I have to press the
reset
:> : switch
:> :> > on
:> :> >> : the box to recover.May be i am missing something critical.
:> :
:> :> >> : Sreekanth
:> :
:> :
:> :> >> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> :> >> : news:9qp99u$g20$> 1@nntp.qnx.com> …
:> :> >> :
:> :> >> :> You are physically at that machine? Not telneted in
:> :> >> :> or some other remote acccess?
:> :> >> :
:> :> >> :> You can debug io-net from the machine it’s running on. I do
:> :> >> :> it every now and then when I find the rare bug > :slight_smile:
:> :> >> :
:> :> >> :
:> :> >> :> -seanb
:> :> >> :
:> :> >> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> >> :> : Sean,
:> :> >> :> : Thanks for the suggestion.But When i am trying to
debug
: on
:> :> > the
:> :> >> : same
:> :> >> :> : machine(there is no external target machine) the GDB is
: freezing
:> : up
:> :> >> : after
:> :> >> :> : giving these messages…
:> :> >> :> : Reading symbols from /lib/libc.so.2…(no debugging symbols
:> :> >> : found)…done.
:> :> >> :> : Reading symbols from /usr/src/npm/x86/dll…done.
:> :> >> :> : 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> >> :> : (i get a gdb > prompt…) then it freezes…
:> :> >> :> : forcing me to reset it.Is it that we cannot debug on the
same
:> :> > machine?
:> :> >> :> : please advise
:> :> >> :
:> :> >> :> : Thanks
:> :> >> :
:> :> >> :> : Sreekanth
:> :> >> :> : Sean Boudreau <> seanb@qnx.com> > wrote in message
:> :> >> :> : news:9qhdot$hhh$> 1@nntp.qnx.com> …
:> :> >> :> :
:> :> >> :> :> Yes. Make sure you compile and ling with debug.
:> :> >> :> :> My ~/.gdbinit looks something like:
:> :> >> :> :
:> :> >> :> :
:> :> >> :> :> set solib-search
:> :> >> :> : <fullpath_to_io_net_so_dir>/x86/dll.g:/lib:/usr/lib:/lib/dll
:> :> >> :> :
:> :> >> :> :> set print pretty on
:> :> >> :> :> set print array on
:> :> >> :> :> # set stop-on-solib-events 1
:> :> >> :> :> set auto-solib-add 1
:> :> >> :> :
:> :> >> :> :> - in gdb:
:> :> >> :> :
:> :> >> :> :> GNU gdb 5.0
:> :> >> :> :> Copyright 2000 Free Software Foundation, Inc.
:> :> >> :> :> GDB is free software, covered by the GNU General Public
: License,
:> : and
:> :> >> : you
:> :> >> :> : are
:> :> >> :> :> welcome to change it and/or distribute copies of it under
: certain
:> :> >> :> : conditions.
:> :> >> :> :> Type “show copying” to see the conditions.
:> :> >> :> :> There is absolutely no warranty for GDB. Type “show
warranty”
:> : for
:> :> >> :> : details.
:> :> >> :> :> This GDB was configured as
:> : “–host=x86-pc-nto-qnx --target=ntox86”.
:> :> >> :> :> (gdb) target qnx pty
:> :> >> :> :> Launching on pty /dev/ptyp7
:> :> >> :> :> Debug server launched.
:> :> >> :> :> Remote debugging using pty
:> :> >> :> :> (gdb) shell pidin | grep io-net
:> :> >> :> :> 61423651 1 t/x86/o.g/io-net_g 10r SIGWAITINFO
:> :> >> :> :> 61423651 2 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 3 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 4 t/x86/o.g/io-net_g 10r RECEIVE 1
:> :> >> :> :> 61423651 5 t/x86/o.g/io-net_g 21r RECEIVE 5
:> :> >> :> :> 61423651 6 t/x86/o.g/io-net_g 20r RECEIVE 9
:> :> >> :> :> (gdb) attach 61423651
:> :> >> :> :> Attaching to process 61423651
:> :> >> :> :> Reading symbols from /lib/libc.so.2…(no debugging symbols
:> :> >> : found)…done.
:> :> >> :> :> Reading symbols from <fullpath_to_io_net_so>…done.
:> :> >> :> :> 0xb0327bbd in SignalWaitinfo () from /lib/libc.so.2
:> :> >> :> :> (gdb) b my_func
:> :> >> :> :> Breakpoint 1 at 0xb8262e13: file , line .
:> :> >> :> :> (gdb) c
:> :> >> :> :> Continuing.
:> :> >> :> :
:> :> >> :> :> -seanb
:> :> >> :> :
:> :> >> :> :> Sreekanth Rupavatharam <> sreekanth.r@cambira.com> > wrote:
:> :> >> :> :> : Can we use GDB to debug the drivers.? Atleast the
: documentation
:> :> > seems
:> :> >> : to
:> :> >> :> : say
:> :> >> :> :> : that, but the DDD does not allow me to load the .so file
in
:> : the
:> :> >> :> : debugger.Am
:> :> >> :> :> : i doing something wrong ?
:> :> >> :> :
:> :> >> :> :> : Sreekanth
:> :> >> :> :
:> :> >> :> :
:> :> >> :
:> :> >> :
:> :
:> :
:> :
:> :
:
:
:
: