trouble debugging io-net

Hi,

Trying to attach to the io-net process using gdb causes the debugging
machine to freeze - only the mouse pointer moves, and we can only reboot.

Specifically, the sequence is:

mount -Tio-net ourmodule.o

gdb ourmodule.o

(gdb) attach

This is using 6.1 on an x86 box.

Any ideas?

Rony

Rony Shapiro <rshapiro@everbee.com> wrote:

Trying to attach to the io-net process using gdb causes the debugging
machine to freeze - only the mouse pointer moves, and we can only reboot.

If you can move the cursor, your machine is not frozen – quite a few
pieces of Photon are involved in moving the cursor, and they all seem to
be working correctly for you. Hitting Ctrl-Shift-Alt-BackSpace should
let you exit from Photon and restore a sane state of things without
having to reboot.

My guess is that it’s shelf that’s causing the problem: the Load Monitor
plugin tries to talk to io-net and blocks, which prevents some other
plugin (the Launch menu?) from re-emitting keys.

If exiting from shelf doesn’t help, try running gdb from another machine
(in a telnet session) or in text mode.

Specifically, the sequence is:

mount -Tio-net ourmodule.o

gdb ourmodule.o

(gdb) attach <io-net pid

tear hair out> <reboot

This is using 6.1 on an x86 box.

Any ideas?

Rony


Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.

Rony Shapiro <rshapiro@everbee.com> wrote:

Hi,

Trying to attach to the io-net process using gdb causes the debugging
machine to freeze - only the mouse pointer moves, and we can only reboot.

Specifically, the sequence is:

mount -Tio-net ourmodule.o

gdb ourmodule.o

(gdb) attach <io-net pid

tear hair out> <reboot

How did you compile ourmodule.o?
I just tried to debug devn-epic.so and it works fine.
(I assume you are a root when trying to attach io-net’s pid)

This is using 6.1 on an x86 box.

Is it 6.1 GA release? can you post ‘uname -a’.

Regards,

Marcin

Any ideas?

Rony

Wojtek Lerch <wojtek@qnx.com> wrote:

Rony Shapiro <> rshapiro@everbee.com> > wrote:
Trying to attach to the io-net process using gdb causes the debugging
machine to freeze - only the mouse pointer moves, and we can only reboot.

If you can move the cursor, your machine is not frozen – quite a few
pieces of Photon are involved in moving the cursor, and they all seem to
be working correctly for you. Hitting Ctrl-Shift-Alt-BackSpace should
let you exit from Photon and restore a sane state of things without
having to reboot.

My guess is that it’s shelf that’s causing the problem: the Load Monitor
plugin tries to talk to io-net and blocks, which prevents some other
plugin (the Launch menu?) from re-emitting keys.

Yes. There is an internal PR opened on this. You have to either
remove the Load Monitor, or remote the Launch Menu.

-xtang

If exiting from shelf doesn’t help, try running gdb from another machine
(in a telnet session) or in text mode.

Specifically, the sequence is:

mount -Tio-net ourmodule.o

gdb ourmodule.o

(gdb) attach <io-net pid

tear hair out> <reboot

This is using 6.1 on an x86 box.

Any ideas?

Rony


Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.

Hi,

Thanks! Removing the Launch Menu did the trick.

Next problem:

It seems the debugger does not fixup the addresses of a shared library being
debugged. To continue the example below,

mount -Tio-net ourmodule.o

gdb ourmodule.o

(gdb) attach
<works now, with launch menu removed>
(gdb) break ourmoduleInit
(gdb) cannot access address 0x1234

Doing ‘info sharedlibrary’ shows the baseaddress of ourmodule.o examining
the memory (x/20i) at baseaddress+0x1234 shows what appears to be the right
function.

Any ideas/workarounds? (breaking at the address using ‘break *0x…’ is
painful)

Thanks,

Rony

“Xiaodan Tang” <xtang@qnx.com> wrote in message
news:9k7l2o$hcp$2@nntp.qnx.com

Wojtek Lerch <> wojtek@qnx.com> > wrote:
Rony Shapiro <> rshapiro@everbee.com> > wrote:
Trying to attach to the io-net process using gdb causes the debugging
machine to freeze - only the mouse pointer moves, and we can only
reboot.

If you can move the cursor, your machine is not frozen – quite a few
pieces of Photon are involved in moving the cursor, and they all seem to
be working correctly for you. Hitting Ctrl-Shift-Alt-BackSpace should
let you exit from Photon and restore a sane state of things without
having to reboot.

My guess is that it’s shelf that’s causing the problem: the Load Monitor
plugin tries to talk to io-net and blocks, which prevents some other
plugin (the Launch menu?) from re-emitting keys.

Yes. There is an internal PR opened on this. You have to either
remove the Load Monitor, or remote the Launch Menu.

-xtang

If exiting from shelf doesn’t help, try running gdb from another machine
(in a telnet session) or in text mode.

Specifically, the sequence is:

mount -Tio-net ourmodule.o

gdb ourmodule.o

(gdb) attach <io-net pid

tear hair out> <reboot

This is using 6.1 on an x86 box.

Any ideas?

Rony

\

Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.

You are loading it wrong. It should be something like

gdb io-net
(gdb) set solib-search-path /where_your_debug_dll_is:/lib:/usr/lib
(gdb) run
… once your lib is loaded
(gdb) shared
(gdb) info shared

Note that gdb won’t be able to load the symbols for your lib until
the lib has been loaded.

Rony Shapiro <rshapiro@everbee.com> wrote:

Hi,

Thanks! Removing the Launch Menu did the trick.

Next problem:

It seems the debugger does not fixup the addresses of a shared library being
debugged. To continue the example below,

mount -Tio-net ourmodule.o

gdb ourmodule.o

(gdb) attach <io-net pid
works now, with launch menu removed
(gdb) break ourmoduleInit
(gdb) cannot access address 0x1234

Doing ‘info sharedlibrary’ shows the baseaddress of ourmodule.o examining
the memory (x/20i) at baseaddress+0x1234 shows what appears to be the right
function.

Any ideas/workarounds? (breaking at the address using ‘break *0x…’ is
painful)

Thanks,

Rony

“Xiaodan Tang” <> xtang@qnx.com> > wrote in message
news:9k7l2o$hcp$> 2@nntp.qnx.com> …
Wojtek Lerch <> wojtek@qnx.com> > wrote:
Rony Shapiro <> rshapiro@everbee.com> > wrote:
Trying to attach to the io-net process using gdb causes the debugging
machine to freeze - only the mouse pointer moves, and we can only
reboot.

If you can move the cursor, your machine is not frozen – quite a few
pieces of Photon are involved in moving the cursor, and they all seem to
be working correctly for you. Hitting Ctrl-Shift-Alt-BackSpace should
let you exit from Photon and restore a sane state of things without
having to reboot.

My guess is that it’s shelf that’s causing the problem: the Load Monitor
plugin tries to talk to io-net and blocks, which prevents some other
plugin (the Launch menu?) from re-emitting keys.

Yes. There is an internal PR opened on this. You have to either
remove the Load Monitor, or remote the Launch Menu.

-xtang

If exiting from shelf doesn’t help, try running gdb from another machine
(in a telnet session) or in text mode.

Specifically, the sequence is:

mount -Tio-net ourmodule.o

gdb ourmodule.o

(gdb) attach <io-net pid

tear hair out> <reboot

This is using 6.1 on an x86 box.

Any ideas?

Rony

\

Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.


cburgess@qnx.com