This forum has been archived. Please start a new discussion on GitHub.

gdb a ice server 3.1.0


ive got a strange problem when i try to gdb my code.
the debuggger stops when i 'next' over InitialisationData initData. when i step into i get over that statement but the server stops when i do another 'next'

because i did not actualy do something with ice yet i think its something in the ice runtime what makes the gdb choke.

i append the debug session for you to see the problem - have you any idea (compile flags, changes in Ice::Application etc) that could cause the problem?
gdb worked with 3.0.1 but did never with 3.1.0. starting the server without debugger works fine too.

thanks for comments
main (argc=1, argv=0x7fffffa4e378) at src/OPIICEServer.cpp:17
17          OPIServer app;
(gdb) l
12      };
14      int
15      main(int argc, char* argv[])
16      {
17          OPIServer app;
18          return app.main(argc, argv);
19      }
21      int
(gdb) n
18          return app.main(argc, argv);
(gdb) s
Ice::Application::main (this=0x7fffffa4e270, argc=1, argv=0x7fffffa4e378) at Application.cpp:224
224         return main(argc, argv, InitializationData());
(gdb) s
InitializationData (this=0x7fffffa4e1c0) at Initialize.cpp:163
163         InitializationData initData;
(gdb) l
160     CommunicatorPtr
161     Ice::initializeWithProperties(int& argc, char* argv[], const PropertiesPtr& properties, Int version)
162     {
163         InitializationData initData;
164 = properties;
165         return initialize(argc, argv, initData, version);
166     }
(gdb) n

[7]+  Stopped                 ./scripts/gdbstartserver


  • That's odd. We use gdb all the time :)

    Can you give us some more details about the environment you are seeing this with? Relevant information might be:

    - OS (if Linux please indicate distro and version)
    - Are you using a binary distribution of Ice or did you build it yourself?
    - Compiler version.
    - GDB version.
    - Anything else that you think might be relevant.

  • Linux 2.6.16-gentoo-r8 #5 SMP Thu Jun 8 14:24:19 CEST 2006 x86_64 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux
    $ gcc --version
    x86_64-pc-linux-gnu-gcc (GCC) 4.1.1 (Gentoo 4.1.1)
    $ gdb --version
    GNU gdb 6.4

    i found the bindist of ice is somewhat windows optimized (just by the volume of the download area) so i thought you might have missed testing the gcc - how narrowsighted of me :(

    this morning i found the iceservers together with the gdb in my ps stopped - it obviously was friday and too hot.
    to investigate my real problem i started the debugger with 3.0.1 and found a segfault in my code.

    i suppose there was a problem with my mixed libs - when i got time ill upgrade to 3.1.0 again and provide more information.

  • process tree

    i figured out a reason:
    when i gdb the ice-server in a mc (midnight commander) subshell (in a screen in a ssh...) this debugging problem happens - if i dont everything is fine

    whatever system boundary i reached there :rolleyes: