ddd

Hi,

I cannot ‘step in’ with ddd, Step or Next don’t enter in a sub routine.

Every action cause the following message to be displayed:
HostNotify: query of pty input buf failed: Inappropriate I/O control
operation

Any idea?

thanks,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

Hi,

I cannot ‘step in’ with ddd, Step or Next don’t enter in a sub routine.

Every action cause the following message to be displayed:
HostNotify: query of pty input buf failed: Inappropriate I/O control
operation

This is an error message from pdebug. It has nothing to do with
your inability to step, however. Have you loaded all symbols for
your program, including shared objects? Can you set a break point
on the function you are trying to step into and successfully break
in that function? Is this ‘native’ (using target qnx pty)? If not,
what is your target?

The error message you are seeing is an fprintf that should have been
(and now is) dependant upon a request for verbose output. It is
telling you that pdebug was unable to wait upon the program’s stdout
before stopping the program, so some stdout may still be pending.

Thanks.
GP

Any idea?

thanks,
Alain.

Graeme Peterson a écrit :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Hi,

I cannot ‘step in’ with ddd, Step or Next don’t enter in a sub routine.

Every action cause the following message to be displayed:
HostNotify: query of pty input buf failed: Inappropriate I/O control
operation

This is an error message from pdebug. It has nothing to do with
your inability to step, however. Have you loaded all symbols for
your program, including shared objects?

yes and I can step in the shared objects but I cannot step IN the functions.

Can you set a break point
on the function you are trying to step into and successfully break
in that function?

yes if I put the breakpoint IN the sub routine and execute a next or a step,
I enter and stop in the sub routine. It’ s the only possibility I found.
without putting a breakpoint inside, I cannot going in.

Is this ‘native’ (using target qnx pty)? If not,
what is your target?

yes I’m debugging my application on the host.

The error message you are seeing is an fprintf that should have been
(and now is) dependant upon a request for verbose output. It is
telling you that pdebug was unable to wait upon the program’s stdout
before stopping the program, so some stdout may still be pending.

I launch DDD without any special options and verbosity is not checked in the
GDB settings dialog box.

thanks,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

Graeme Peterson wrote :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Hi,

I cannot ‘step in’ with ddd, Step or Next don’t enter in a sub routine.

Every action cause the following message to be displayed:
HostNotify: query of pty input buf failed: Inappropriate I/O control
operation

This is an error message from pdebug. It has nothing to do with
your inability to step, however. Have you loaded all symbols for
your program, including shared objects?

yes and I can step in the shared objects but I cannot step IN the functions.

This works fine for me here. I have a simple test case, with a main()
that calls ‘myfunc()’ in libmyshlib.so that I compile with debug info.

Can you post a test case that demonstrates your incorrect behavior?
Also, please include the commands that you use to compile and debug
the test case.

Thanks.
GP

Can you set a break point
on the function you are trying to step into and successfully break
in that function?

yes if I put the breakpoint IN the sub routine and execute a next or a step,
I enter and stop in the sub routine. It’ s the only possibility I found.
without putting a breakpoint inside, I cannot going in.

Is this ‘native’ (using target qnx pty)? If not,
what is your target?

yes I’m debugging my application on the host.



The error message you are seeing is an fprintf that should have been
(and now is) dependant upon a request for verbose output. It is
telling you that pdebug was unable to wait upon the program’s stdout
before stopping the program, so some stdout may still be pending.


I launch DDD without any special options and verbosity is not checked in the
GDB settings dialog box.

thanks,
Alain.

Graeme Peterson a écrit :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Graeme Peterson wrote :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Hi,

I cannot ‘step in’ with ddd, Step or Next don’t enter in a sub routine.

Every action cause the following message to be displayed:
HostNotify: query of pty input buf failed: Inappropriate I/O control
operation

This is an error message from pdebug. It has nothing to do with
your inability to step, however. Have you loaded all symbols for
your program, including shared objects?

yes and I can step in the shared objects but I cannot step IN the functions.

This works fine for me here. I have a simple test case, with a main()
that calls ‘myfunc()’ in libmyshlib.so that I compile with debug info.

Can you post a test case that demonstrates your incorrect behavior?
Also, please include the commands that you use to compile and debug
the test case.

Thanks.
GP

Can you set a break point
on the function you are trying to step into and successfully break
in that function?

yes if I put the breakpoint IN the sub routine and execute a next or a step,
I enter and stop in the sub routine. It’ s the only possibility I found.
without putting a breakpoint inside, I cannot going in.

Is this ‘native’ (using target qnx pty)? If not,
what is your target?

yes I’m debugging my application on the host.



The error message you are seeing is an fprintf that should have been
(and now is) dependant upon a request for verbose output. It is
telling you that pdebug was unable to wait upon the program’s stdout
before stopping the program, so some stdout may still be pending.


I launch DDD without any special options and verbosity is not checked in the
GDB settings dialog box.

thanks,
Alain.

In fact, after more tests, my problem occurs while debugging a shared library. In
that case, I cannot step in a sub function, even if this sub function belongs to
the library, and even if the subfunction is in the same source file!
I also tried to change the current directory to be located in the shared library’s
source files directory. … Same…

Here is my make:
make -j 1 -Cgesecr all && make -j 1 -Ctest all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr' make -j 1 -Cnto all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto’
make -j 1 -Cx86 all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86' make -j 1 -Cso all && make -j 1 -Cso.g all make[4]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I.
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto -I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/include -I/usr/local/include -I/usr/support/include
-I/usr/include -D FAV_T3 -shared -DVARIANT_so
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr.so.1
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so consol.o
ctrl_ge.o fct_nto.o gesaff.o geschk.o gesecr.o -L. -L/usr/lib
-L/usr/local/lib -L/usr/support/nto/x86/gcc/lib -L/usr/support/nto/x86/lib
-L/x86/lib -L/x86/usr/lib -lncurses -lDataServer_API -lm
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so' make[4]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -I.
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto -I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/include -I/usr/local/include -I/usr/support/include
-I/usr/include -D FAV_T3 -g -shared -DVARIANT_so -DVARIANT_g
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr_g.so.1
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so consol.o
ctrl_ge.o fct_nto.o gesaff.o geschk.o gesecr.o -L. -L/usr/lib
-L/usr/local/lib -L/usr/support/nto/x86/gcc/lib -L/usr/support/nto/x86/lib
-L/x86/lib -L/x86/usr/lib -lncurses -lDataServer_API -lm -g
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g' make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr’
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test' make -j 1 -Cnto all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto’
make -j 1 -Cx86 all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make -j 1 -Co all && make -j 1 -Co.g all make[4]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[4]: Nothing to be done for all'. make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[4]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[4]: Nothing to be done for all’.
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/test’

Of course, I use the libgesecr_g library, I repeat that I can execute source lines
step by step. The only function that doesn’t work is going inside a sub function
while stepping.

thanks,
Alain.

Thanks, Alain.

I have duplicated this here and am looking into it.

Regards,
GP

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

Graeme Peterson wrote :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Graeme Peterson wrote :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Hi,

I cannot ‘step in’ with ddd, Step or Next don’t enter in a sub routine.

Every action cause the following message to be displayed:
HostNotify: query of pty input buf failed: Inappropriate I/O control
operation

This is an error message from pdebug. It has nothing to do with
your inability to step, however. Have you loaded all symbols for
your program, including shared objects?

yes and I can step in the shared objects but I cannot step IN the functions.

This works fine for me here. I have a simple test case, with a main()
that calls ‘myfunc()’ in libmyshlib.so that I compile with debug info.

Can you post a test case that demonstrates your incorrect behavior?
Also, please include the commands that you use to compile and debug
the test case.

Thanks.
GP

Can you set a break point
on the function you are trying to step into and successfully break
in that function?

yes if I put the breakpoint IN the sub routine and execute a next or a step,
I enter and stop in the sub routine. It’ s the only possibility I found.
without putting a breakpoint inside, I cannot going in.

Is this ‘native’ (using target qnx pty)? If not,
what is your target?

yes I’m debugging my application on the host.



The error message you are seeing is an fprintf that should have been
(and now is) dependant upon a request for verbose output. It is
telling you that pdebug was unable to wait upon the program’s stdout
before stopping the program, so some stdout may still be pending.


I launch DDD without any special options and verbosity is not checked in the
GDB settings dialog box.

thanks,
Alain.

In fact, after more tests, my problem occurs while debugging a shared library. In
that case, I cannot step in a sub function, even if this sub function belongs to
the library, and even if the subfunction is in the same source file!
I also tried to change the current directory to be located in the shared library’s
source files directory. … Same…

Here is my make:
make -j 1 -Cgesecr all && make -j 1 -Ctest all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr' make -j 1 -Cnto all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto’
make -j 1 -Cx86 all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86' make -j 1 -Cso all && make -j 1 -Cso.g all make[4]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I.
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto -I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/include -I/usr/local/include -I/usr/support/include
-I/usr/include -D FAV_T3 -shared -DVARIANT_so
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr.so.1
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so consol.o
ctrl_ge.o fct_nto.o gesaff.o geschk.o gesecr.o -L. -L/usr/lib
-L/usr/local/lib -L/usr/support/nto/x86/gcc/lib -L/usr/support/nto/x86/lib
-L/x86/lib -L/x86/usr/lib -lncurses -lDataServer_API -lm
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so' make[4]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -I.
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto -I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/include -I/usr/local/include -I/usr/support/include
-I/usr/include -D FAV_T3 -g -shared -DVARIANT_so -DVARIANT_g
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr_g.so.1
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so consol.o
ctrl_ge.o fct_nto.o gesaff.o geschk.o gesecr.o -L. -L/usr/lib
-L/usr/local/lib -L/usr/support/nto/x86/gcc/lib -L/usr/support/nto/x86/lib
-L/x86/lib -L/x86/usr/lib -lncurses -lDataServer_API -lm -g
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g' make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr’
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test' make -j 1 -Cnto all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto’
make -j 1 -Cx86 all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make -j 1 -Co all && make -j 1 -Co.g all make[4]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[4]: Nothing to be done for all'. make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[4]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[4]: Nothing to be done for all’.
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/test’

Of course, I use the libgesecr_g library, I repeat that I can execute source lines
step by step. The only function that doesn’t work is going inside a sub function
while stepping.

thanks,
Alain.

I think we may have found a workaround, at least for
libs that you can compile yourself.

Try declaring your function in the shared library as
static.

Let me know. I am still chasing the bug.

GP

Graeme Peterson <gp@qnx.com> wrote:

Thanks, Alain.

I have duplicated this here and am looking into it.

Regards,
GP

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Graeme Peterson wrote :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Graeme Peterson wrote :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Hi,

I cannot ‘step in’ with ddd, Step or Next don’t enter in a sub routine.

Every action cause the following message to be displayed:
HostNotify: query of pty input buf failed: Inappropriate I/O control
operation

This is an error message from pdebug. It has nothing to do with
your inability to step, however. Have you loaded all symbols for
your program, including shared objects?

yes and I can step in the shared objects but I cannot step IN the functions.

This works fine for me here. I have a simple test case, with a main()
that calls ‘myfunc()’ in libmyshlib.so that I compile with debug info.

Can you post a test case that demonstrates your incorrect behavior?
Also, please include the commands that you use to compile and debug
the test case.

Thanks.
GP

Can you set a break point
on the function you are trying to step into and successfully break
in that function?

yes if I put the breakpoint IN the sub routine and execute a next or a step,
I enter and stop in the sub routine. It’ s the only possibility I found.
without putting a breakpoint inside, I cannot going in.

Is this ‘native’ (using target qnx pty)? If not,
what is your target?

yes I’m debugging my application on the host.



The error message you are seeing is an fprintf that should have been
(and now is) dependant upon a request for verbose output. It is
telling you that pdebug was unable to wait upon the program’s stdout
before stopping the program, so some stdout may still be pending.


I launch DDD without any special options and verbosity is not checked in the
GDB settings dialog box.

thanks,
Alain.

In fact, after more tests, my problem occurs while debugging a shared library. In
that case, I cannot step in a sub function, even if this sub function belongs to
the library, and even if the subfunction is in the same source file!
I also tried to change the current directory to be located in the shared library’s
source files directory. … Same…

Here is my make:
make -j 1 -Cgesecr all && make -j 1 -Ctest all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr' make -j 1 -Cnto all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto’
make -j 1 -Cx86 all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86' make -j 1 -Cso all && make -j 1 -Cso.g all make[4]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I.
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto -I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/include -I/usr/local/include -I/usr/support/include
-I/usr/include -D FAV_T3 -shared -DVARIANT_so
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr.so.1
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so consol.o
ctrl_ge.o fct_nto.o gesaff.o geschk.o gesecr.o -L. -L/usr/lib
-L/usr/local/lib -L/usr/support/nto/x86/gcc/lib -L/usr/support/nto/x86/lib
-L/x86/lib -L/x86/usr/lib -lncurses -lDataServer_API -lm
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so' make[4]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -I.
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto -I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/include -I/usr/local/include -I/usr/support/include
-I/usr/include -D FAV_T3 -g -shared -DVARIANT_so -DVARIANT_g
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr_g.so.1
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so consol.o
ctrl_ge.o fct_nto.o gesaff.o geschk.o gesecr.o -L. -L/usr/lib
-L/usr/local/lib -L/usr/support/nto/x86/gcc/lib -L/usr/support/nto/x86/lib
-L/x86/lib -L/x86/usr/lib -lncurses -lDataServer_API -lm -g
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g' make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr’
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test' make -j 1 -Cnto all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto’
make -j 1 -Cx86 all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make -j 1 -Co all && make -j 1 -Co.g all make[4]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[4]: Nothing to be done for all'. make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[4]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[4]: Nothing to be done for all’.
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/test’

Of course, I use the libgesecr_g library, I repeat that I can execute source lines
step by step. The only function that doesn’t work is going inside a sub function
while stepping.

thanks,
Alain.

Graeme Peterson a écrit :

I think we may have found a workaround, at least for
libs that you can compile yourself.

Try declaring your function in the shared library as
static.

Let me know. I am still chasing the bug.

GP

Graeme Peterson <> gp@qnx.com> > wrote:
Thanks, Alain.

I have duplicated this here and am looking into it.

Regards,
GP

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Graeme Peterson wrote :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Graeme Peterson wrote :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Hi,

I cannot ‘step in’ with ddd, Step or Next don’t enter in a sub routine.

Every action cause the following message to be displayed:
HostNotify: query of pty input buf failed: Inappropriate I/O control
operation

This is an error message from pdebug. It has nothing to do with
your inability to step, however. Have you loaded all symbols for
your program, including shared objects?

yes and I can step in the shared objects but I cannot step IN the functions.

This works fine for me here. I have a simple test case, with a main()
that calls ‘myfunc()’ in libmyshlib.so that I compile with debug info.

Can you post a test case that demonstrates your incorrect behavior?
Also, please include the commands that you use to compile and debug
the test case.

Thanks.
GP

Can you set a break point
on the function you are trying to step into and successfully break
in that function?

yes if I put the breakpoint IN the sub routine and execute a next or a step,
I enter and stop in the sub routine. It’ s the only possibility I found.
without putting a breakpoint inside, I cannot going in.

Is this ‘native’ (using target qnx pty)? If not,
what is your target?

yes I’m debugging my application on the host.



The error message you are seeing is an fprintf that should have been
(and now is) dependant upon a request for verbose output. It is
telling you that pdebug was unable to wait upon the program’s stdout
before stopping the program, so some stdout may still be pending.


I launch DDD without any special options and verbosity is not checked in the
GDB settings dialog box.

thanks,
Alain.

In fact, after more tests, my problem occurs while debugging a shared library. In
that case, I cannot step in a sub function, even if this sub function belongs to
the library, and even if the subfunction is in the same source file!
I also tried to change the current directory to be located in the shared library’s
source files directory. … Same…

Here is my make:
make -j 1 -Cgesecr all && make -j 1 -Ctest all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr' make -j 1 -Cnto all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto’
make -j 1 -Cx86 all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86' make -j 1 -Cso all && make -j 1 -Cso.g all make[4]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I.
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto -I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/include -I/usr/local/include -I/usr/support/include
-I/usr/include -D FAV_T3 -shared -DVARIANT_so
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr.so.1
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so consol.o
ctrl_ge.o fct_nto.o gesaff.o geschk.o gesecr.o -L. -L/usr/lib
-L/usr/local/lib -L/usr/support/nto/x86/gcc/lib -L/usr/support/nto/x86/lib
-L/x86/lib -L/x86/usr/lib -lncurses -lDataServer_API -lm
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so' make[4]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -I.
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto -I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/include -I/usr/local/include -I/usr/support/include
-I/usr/include -D FAV_T3 -g -shared -DVARIANT_so -DVARIANT_g
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr_g.so.1
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so consol.o
ctrl_ge.o fct_nto.o gesaff.o geschk.o gesecr.o -L. -L/usr/lib
-L/usr/local/lib -L/usr/support/nto/x86/gcc/lib -L/usr/support/nto/x86/lib
-L/x86/lib -L/x86/usr/lib -lncurses -lDataServer_API -lm -g
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g' make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr’
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test' make -j 1 -Cnto all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto’
make -j 1 -Cx86 all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make -j 1 -Co all && make -j 1 -Co.g all make[4]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[4]: Nothing to be done for all'. make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[4]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[4]: Nothing to be done for all’.
make[4]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/test’

Of course, I use the libgesecr_g library, I repeat that I can execute source lines
step by step. The only function that doesn’t work is going inside a sub function
while stepping.

thanks,
Alain.

hmm, strange!
According to my tests, within a shared library, a static function is stepped into.
About the functions belonging to the library, it seems unable to step into a function
located in a different source file, if the function (not static) is located in the same
source file, sometimes it jumps into, sometimes no !?!?!, until now, I cannot say why!
it’s able, from a shared library execution line, to step into a function located in the
executable. (incredible)

Does that correspond to your tests?

Thanks,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

Graeme Peterson wrote :

<\snip>

Yes, more or less.

The mechanism used in GDB for single stepping and shared objects is:

  • If the current instruction is in the ‘trampoline’ code that is used
    for calling functions in shared objects, then skip to the instruction
    that corresponds to the first line number in that function.

I think I have fixed it so we now consistantly recognize that we are in
trampoline code. I am still trying to figure out why we don’t always find
the right line/address/symbol info.

GP

hmm, strange!
According to my tests, within a shared library, a static function is stepped into.
About the functions belonging to the library, it seems unable to step into a function
located in a different source file, if the function (not static) is located in the same
source file, sometimes it jumps into, sometimes no !?!?!, until now, I cannot say why!
it’s able, from a shared library execution line, to step into a function located in the
executable. (incredible)

Does that correspond to your tests?

Thanks,
Alain.