Community
Participate
Working Groups
First of all sorry for my english. I create managed make c/c++ project. There is just one file - main.cpp: #include "ace/Log_Msg.h" #include "ace/SOCK_Acceptor.h" #include "ace/SOCK_Stream.h" #include "ace/INET_Addr.h" class Class { public: Class (unsigned int portNo): m_addr (portNo), m_acceptor (m_addr) {} void handleInput () { //... } void acceptConnection () { ACE_INET_Addr remoteAddr; if (m_acceptor.accept (m_stream, &remoteAddr) != -1) { ACE_DEBUG (( LM_DEBUG, "Connection accepted:\n\tHost: %s .\n\tPort: %d .\n", remoteAddr.get_host_name (), remoteAddr.get_port_number () )); //When current instruction pointer points to previous line and I press F6 (Step over) //current instruction pointer (little arrow) disappear. // gdb says: // Warning: //Cannot insert breakpoint 0. //Error accessing memory address 0x1: Input/output error. // //Single stepping until exit from function _dl_debug_state, //which has no line number information. handleInput (); //If I toggle breakpoint on previous line, after current instruction pointer has //disappeared and press F8 (Continue) then it come back. } } private: ACE_INET_Addr m_addr; ACE_SOCK_Acceptor m_acceptor; ACE_SOCK_Stream m_stream; }; int main (int argc, char * argv []) { const int PORT_NO = 50000; Class instance (PORT_NO); instance.acceptConnection(); return 0; } EOF When I try to debug Class::acceptConnection current instruction pointer disappear and F6, F5 does nothing. Please look at comments in source code. To compile this project you need ACE library. I try hard, but I can not reproduce this bug whithout using ACE. ACE is free and open source. You can get it from http://www.cs.wustl.edu/~schmidt/ACE.html.
You are trying to step into a module with no debug information. In this case gdb doesn't know how to step, there is no line information. The instruction pointer disappears because the program is stepping (see the icon and label of the debug target in the Debug view). Same applies to F5 and F6 keys - they do nothing because the program is not suspended.
(In reply to comment #1) > You are trying to step into a module with no debug information. I am sure that this library was built with debug info (-g3 -O0), becouse when I meet this bug this was first what I done. > In this case > gdb doesn't know how to step, there is no line information. The instruction > pointer disappears because the program is stepping (see the icon and label of > the debug target in the Debug view). Same applies to F5 and F6 keys - they do > nothing because the program is not suspended. And anyway when I press _Step Over_ I expect that debugger go to next instruction in my programm not into library module.
Created attachment 25169 [details] How it looks like just before I press F6 (Step Over)
Created attachment 25170 [details] How it looks like just after I press F6 (Step Over)
Please take a look at screenshots.
Please, turn off the "Automatically load symbols" option and try it again. The option is located on the "Debugger" page of the launch configuration dialog under the "Shared Libraries" tab.
(In reply to comment #6) > Please, turn off the "Automatically load symbols" option and try it again. The > option is located on the "Debugger" page of the launch configuration dialog > under the "Shared Libraries" tab. It helps. Thank you!
Another (and better) workaround is to use the debug version of ACE. This bug would go away when we switch to deferred breakpoints in gdb.
(In reply to comment #6) > Please, turn off the "Automatically load symbols" option and try it again. The > option is located on the "Debugger" page of the launch configuration dialog > under the "Shared Libraries" tab. The instruction pointer disappears even in the following simple case (with the "Automatically load symbols" option off): 1: void f() 2: { 3: int a = 0; 4: ++a; 5: } 6: 7: int main( int argc, char** argv ) 8: { 9: f(); 10: 11: return 0; 12: } - Place breakpoint on line 9 - Start debugging -> now the arrow is on line 9 - Step in (F5) -> now the arrow is on line 3 - Step over (F6) -> the arrow disappears Clicking on the "Debug" view makes the arrow reappear (something I would like to avoid, of course :-). I agree with what Nikolay said: "And anyway when I press _Step Over_ I expect that debugger go to next instruction in my programm not into library module." I am using: - Eclipse 3.2.0 M20060629-1905 - CDT 3.1.1.100609270800
Future means you commit to fix it in the Future. Inboxes can't make committments. Moving to '--'.