Author Topic: Unable to enter input when stepping line by line in the debugger?  (Read 29099 times)

Offline phoenixy

  • Single posting newcomer
  • *
  • Posts: 5
Hi,

I most recently was using Code::Blocks 10.5 on Windows, and this worked fine.  However, now it doesn't in Code::Blocks 12.11:

I am running a console app line-by-line in the debugger--I have a breakpoint set at the beginning of the function, then use F7 to progress line by line.  However, when I get to a cin statement, I cannot actually input anything; the console window doesn't accept input, even once I am past the cin statement.  If I use F7 again, the debugger seems to get stuck and the only way to exit it is to terminate the Code::Blocks process.  Did this behavior change and is there something different I need to do in order to step line by line through a function?  Thanks.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #1 on: February 25, 2013, 07:07:36 am »
Does it still fail to work if you use c::b 10.05 or command line gdb, with your current compiler/debugger setup?
I think this should work fine, but I've not tried it on windows.
Can you post the full debugger's log?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline phoenixy

  • Single posting newcomer
  • *
  • Posts: 5
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #2 on: February 26, 2013, 05:58:38 am »
Thanks for the response!  Yeah, it works OK in Code::Blocks 10.05 even with the same debugger and compiler versions.  (Debugger is gdb 7.5, as you can see from the logs; compiler is minGW 4.7.1)

Here's my debugger log from Code::Blocks 12.11:

Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: c:\aaaa\
Adding source dir: c:\aaaa\
Adding file: c:\aaaa\bin\Debug\aaaa.exe
Changing directory to: c:/aaaa/.
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\QuickTime\QTSystem;C:\Windows\System32\WindowsPowerShell\v1.0
Starting debugger: c:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args c:/aaaa/bin/Debug/aaaa.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 6736
At c:\aaaa\main.cpp:19
At c:\aaaa\main.cpp:20
In std::istream::operator>>(double&) () ()
In std::istream& std::istream::_M_extract<double>(double&) () ()
#1  0x004013f5 in main () at c:\aaaa\main.cpp:20
c:\aaaa\main.cpp:20:360:beg:0x4013f5
At c:\aaaa\main.cpp:20

Here's the debugger log from Code::Blocks 10.05 (where it works):

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: c:\aaaa\
Adding source dir: c:\aaaa\
Adding file: bin\Debug\aaaa.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 5308
At c:\aaaa\main.cpp:19
At c:\aaaa\main.cpp:20
In std::istream::operator>>(double&) () ()
In std::istream& std::istream::_M_extract<double>(double&) () ()
In TlsGetValue@4 () ()
In KERNEL32!GetPrivateProfileStructA () (C:\Windows\syswow64\kernel32.dll)
In TlsGetValue () (C:\Windows\syswow64\KernelBase.dll)
In SetLastError@4 () ()
In KERNEL32!GetPrivateProfileStructA () (C:\Windows\syswow64\kernel32.dll)
In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!NlsAnsiCodePage () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)
In TlsSetValue@8 () ()
In KERNEL32!GetPrivateProfileStructA () (C:\Windows\syswow64\kernel32.dll)
In TlsSetValue () (C:\Windows\syswow64\KernelBase.dll)
In std::istream& std::istream::_M_extract<double>(double&) () ()

And for reference, here's the code:

#include <iostream>
using namespace std;

double computeInterest (double base_val, double rate, int years)
{
   double final_multiplier;
   for ( int i = 0; i < years; i++ )
   {
      final_multiplier *= (1 + rate);
   }
   return base_val * final_multiplier;
}

int main ()
{
   double base_val;
   double rate;
   int years;
   cout << "Enter a base value: ";
   cin >> base_val; //this is line 20
   cout << "Enter an interest rate: ";
   cin >> rate;
   cout << "Enter the number of years to compound: ";
   cin >> years;

   cout << "After " << years << " you will have " << computeInterest( base_val, rate, years ) << " money" << endl;
}

Let me know if there's any other info I can provide!
« Last Edit: February 26, 2013, 07:18:25 am by phoenixy »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #3 on: February 26, 2013, 08:45:59 am »
@phoenixy
I don't have such issue. Can you enable the debugger-debug log, and paste the full log here. (Enable this by check on: Settings->Debugger->Commom->Full (debug) log)

Also, please use the Code/Quote Tags. (Do not directly paste log message)

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline phoenixy

  • Single posting newcomer
  • *
  • Posts: 5
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #4 on: February 26, 2013, 05:41:15 pm »
Sure, here you go.  These logs are from a different computer and project name than the logs above, but I can reproduce the problem on both:

Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\la\
Adding source dir: C:\la\
Adding file: C:\la\bin\Debug\la.exe
Changing directory to: C:/la/.
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Program Files (x86)\QuickTime\QTSystem;C:\Windows\System32\WindowsPowerShell\v1.0;c:\Program Files (x86)\Common Files\Adobe\AGL;C:\Program Files\Microsoft SQL Server\110\Tools\Binn

[debug]Command-line: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/la/bin/Debug/la.exe
[debug]Working dir : C:\la

Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/la/bin/Debug/la.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from C:\la\bin\Debug\la.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.5

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/la/
[debug]Source directories searched: C:/la;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/la/main.cpp:19"
[debug]Breakpoint 2 at 0x4013ce: file C:\la\main.cpp, line 19.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\la\bin\Debug\la.exe

Child process PID: 6496

[debug][New Thread 6496.0x1940]
[debug]Breakpoint 2, main () at C:\la\main.cpp:19
[debug]C:\la\main.cpp:19:335:beg:0x4013ce
[debug]>>>>>>cb_gdb:

At C:\la\main.cpp:19

[debug]> next
[debug]C:\la\main.cpp:20:369:beg:0x4013e9
[debug]>>>>>>cb_gdb:

At C:\la\main.cpp:20

[debug]> next
[debug]0x00446a8c in std::istream::operator>>(double&) ()
[debug]>>>>>>cb_gdb:

In std::istream::operator>>(double&) () ()

[debug]> bt 30
[debug]#0  0x00446a8c in std::istream::operator>>(double&) ()
[debug]#1  0x770cfaca in ntdll!RtlUpdateClonedSRWLock () from C:\Windows\system32\ntdll.dll
[debug]#2  0x770f1022 in ntdll!LdrLoadAlternateResourceModule () from C:\Windows\system32\ntdll.dll
[debug]#3  0xffffffff in ?? ()
[debug]#4  0x00000024 in ?? ()
[debug]#5  0x0028fe98 in ?? ()
[debug]#6  0x0040bb50 in (anonymous namespace)::generic_error_category::~generic_error_category() ()
[debug]#7  0x0040bb5c in __tcf_0 ()
[debug]#8  0x004037e0 in __cxa_rethrow ()
[debug]#9  0x004166b0 in _pei386_runtime_relocator ()
[debug]#10 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]Single stepping until exit from function _ZNSirsERd,
[debug]which has no line number information.
[debug]0x0044344c in std::istream& std::istream::_M_extract<double>(double&) ()
[debug]>>>>>>cb_gdb:

In std::istream& std::istream::_M_extract<double>(double&) () ()

[debug]> bt 30
[debug]#0  0x0044344c in std::istream& std::istream::_M_extract<double>(double&) ()
[debug]#1  0x004013f9 in main () at C:\la\main.cpp:20
[debug]>>>>>>cb_gdb:
[debug]> frame 1
[debug]#1  0x004013f9 in main () at C:\la\main.cpp:20
[debug]C:\la\main.cpp:20:369:beg:0x4013f9
[debug]>>>>>>cb_gdb:

#1  0x004013f9 in main () at C:\la\main.cpp:20
C:\la\main.cpp:20:369:beg:0x4013f9
At C:\la\main.cpp:20

[debug]> next
[debug]Single stepping until exit from function _ZNSi10_M_extractIdEERSiRT_,
[debug]127 ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c: No such file or directory.
[debug]which has no line number information.
[debug]_Unwind_SjLj_Register (fc=0x28fe0c) at ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:127
[debug]>>>>>>cb_gdb:


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #5 on: February 27, 2013, 01:01:14 am »
Hm, that bug again. I suppose you'll have to disable catching of exceptions in the settings of the debugger.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline phoenixy

  • Single posting newcomer
  • *
  • Posts: 5
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #6 on: February 27, 2013, 05:13:07 am »
Hmmm...I turned off the "Catch C++ Exceptions" checkbox in the debugger settings per your post and then restarted Code::Blocks but the problem didn't go away...any other ideas for steps I might try?

Offline phoenixy

  • Single posting newcomer
  • *
  • Posts: 5
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #7 on: February 27, 2013, 05:53:18 am »
Oh, hey, I just upgraded to gdb 7.5.1, and it works now! 

Offline jvmorren

  • Single posting newcomer
  • *
  • Posts: 8
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #8 on: April 08, 2015, 04:11:41 pm »
I am having this problem too, but with Code::Blocks 13.12 Can someone please help me?  I am using the same code as phoenix and am getting the same set of debugger messages.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #9 on: April 08, 2015, 09:02:59 pm »
Have you tried a recent night build? I think there was a fix for a similar issue.

And if it doesn't work post the full log from the debug session.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jvmorren

  • Single posting newcomer
  • *
  • Posts: 8
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #10 on: April 09, 2015, 02:43:59 pm »
Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\
Adding source dir: C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\
Adding file: C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\bin\Debug\Debugginb Bug #1.exe
Changing directory to: C:/Users/Jeremy/DOCUME~1/PROGRA~1/C__~1/DEBUGG~1/.
Set variable: PATH=.;C:\TDM-GCC-32\bin;C:\TDM-GCC-32;C:\Program Files (x86)\Lenovo\FusionEngine;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Common Files\LENOVO\easyplussdk\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit

[debug]Command-line: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/Users/Jeremy/DOCUME~1/PROGRA~1/C__~1/DEBUGG~1/bin/Debug/DEBUGG~1.EXE
[debug]Working dir : C:\Users\Jeremy\DOCUME~1\PROGRA~1\C__~1\DEBUGG~1

Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/Users/Jeremy/DOCUME~1/PROGRA~1/C__~1/DEBUGG~1/bin/Debug/DEBUGG~1.EXE
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from C:\Users\Jeremy\DOCUME~1\PROGRA~1\C__~1\DEBUGG~1\bin\Debug\DEBUGG~1.EXE...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.5

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Users/Jeremy/DOCUME~1/PROGRA~1/C__~1/DEBUGG~1/
[debug]Source directories searched: C:/Users/Jeremy/DOCUME~1/PROGRA~1/C__~1/DEBUGG~1;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Users/Jeremy/Documents/Programming/C++/Debugginb Bug #1/main.cpp:16"
[debug]Breakpoint 1 at 0x4013ca: file C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp, line 16.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Users\Jeremy\DOCUME~1\PROGRA~1\C__~1\DEBUGG~1\bin\Debug\DEBUGG~1.EXE

Child process PID: 5788

[debug][New Thread 5788.0x1680]
[debug]Breakpoint 1, main () at C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:19
[debug]C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:19:308:beg:0x4013ca
[debug]>>>>>>cb_gdb:

At C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:19

[debug]> info locals
[debug]base_val = 7.392408938139541e+264
[debug]rate = 5.6595430699783754e-216
[debug]years = 2686924
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:20:341:beg:0x4013e5
[debug]>>>>>>cb_gdb:

At C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:20

[debug]> info locals
[debug]base_val = 7.392408938139541e+264
[debug]rate = 5.6595430699783754e-216
[debug]years = 2686924
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]0x00446a7c in std::istream::operator>>(double&) ()
[debug]>>>>>>cb_gdb:

In std::istream::operator>>(double&) () ()

[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x00446a7c in std::istream::operator>>(double&) ()
[debug]#1  0x77759b97 in ?? ()
[debug]#2  0x1e0019b8 in ?? ()
[debug]#3  0x15ff6400 in ?? ()
[debug]#4  0x000000c0 in ?? ()
[debug]#5  0x900014c2 in ?? ()
[debug]#6  0x1a001ab8 in ?? ()
[debug]#7  0x15ff6400 in ?? ()
[debug]#8  0x000000c0 in ?? ()
[debug]#9  0x900024c2 in ?? ()
[debug]#10 0x00001bb8 in ?? ()
[debug]#11 0x15ff6400 in ?? ()
[debug]#12 0x000000c0 in ?? ()
[debug]#13 0x900010c2 in ?? ()
[debug]#14 0x00001cb8 in ?? ()
[debug]#15 0x15ff6400 in ?? ()
[debug]#16 0x000000c0 in ?? ()
[debug]#17 0x90001cc2 in ?? ()
[debug]#18 0x00001db8 in ?? ()
[debug]#19 0x15ff6400 in ?? ()
[debug]#20 0x000000c0 in ?? ()
[debug]#21 0x900010c2 in ?? ()
[debug]#22 0x07001eb8 in ?? ()
[debug]#23 0x15ff6400 in ?? ()
[debug]#24 0x000000c0 in ?? ()
[debug]#25 0x900008c2 in ?? ()
[debug]#26 0x07001fb8 in ?? ()
[debug]#27 0x15ff6400 in ?? ()
[debug]#28 0x000000c0 in ?? ()
[debug]#29 0x900008c2 in ?? ()
[debug](More stack frames follow...)
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]Single stepping until exit from function _ZNSirsERd,
[debug]which has no line number information.
[debug]0x0044343c in std::istream& std::istream::_M_extract<double>(double&) ()
[debug]>>>>>>cb_gdb:

In std::istream& std::istream::_M_extract<double>(double&) () ()

[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x0044343c in std::istream& std::istream::_M_extract<double>(double&) ()
[debug]#1  0x004013f5 in main () at C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:20
[debug]>>>>>>cb_gdb:
[debug]> frame 1
[debug]#1  0x004013f5 in main () at C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:20
[debug]C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:20:341:beg:0x4013f5
[debug]>>>>>>cb_gdb:

#1  0x004013f5 in main () at C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:20
C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:20:341:beg:0x4013f5
At C:\Users\Jeremy\Documents\Programming\C++\Debugginb Bug #1\main.cpp:20

[debug]> info locals
[debug]base_val = 7.392408938139541e+264
[debug]rate = 5.6595430699783754e-216
[debug]years = 2686924
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]Single stepping until exit from function _ZNSi10_M_extractIdEERSiRT_,
[debug]which has no line number information.
[debug]127 ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c: No such file or directory.
[debug]_Unwind_SjLj_Register (fc=0x28fe0c) at ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:127
[debug]>>>>>>cb_gdb:
[debug]> info frame
[debug]Stack level 0, frame at 0x28fde0:
[debug] eip = 0x416cb8 in _Unwind_SjLj_Register (../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:127); saved eip 0x44347b
[debug] called by frame at 0x28fdf4
[debug] source language c.
[debug] Arglist at 0x28fdd8, args: fc=0x28fe0c
[debug] Locals at 0x28fdd8, Previous frame's sp is 0x28fde0
[debug] Saved registers:
[debug]  eip at 0x28fddc
[debug]>>>>>>cb_gdb:

Cannot open file: ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c
At ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:127

[debug]> info locals
[debug]No locals.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]fc = 0x28fe0c
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]129 in ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c
[debug]>>>>>>cb_gdb:
[debug]> info frame
[debug]Stack level 0, frame at 0x28fde0:
[debug] eip = 0x416cc2 in _Unwind_SjLj_Register (../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:129); saved eip 0x44347b
[debug] called by frame at 0x28fdf4
[debug] source language c.
[debug] Arglist at 0x28fdc8, args: fc=0x28fe0c
[debug] Locals at 0x28fdc8, Previous frame's sp is 0x28fde0
[debug] Saved registers:
[debug]  ebx at 0x28fdd0, esi at 0x28fdd4, edi at 0x28fdd8, eip at 0x28fddc
[debug]>>>>>>cb_gdb:

Cannot open file: ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c
At ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:129

[debug]> info locals
[debug]No locals.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]fc = 0x28fe0c
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]132 in ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c
[debug]>>>>>>cb_gdb:
[debug]> info frame
[debug]Stack level 0, frame at 0x28fde0:
[debug] eip = 0x416cd9 in _Unwind_SjLj_Register (../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:132); saved eip 0x44347b
[debug] called by frame at 0x28fdf4
[debug] source language c.
[debug] Arglist at 0x28fdc8, args: fc=0x28fe0c
[debug] Locals at 0x28fdc8, Previous frame's sp is 0x28fde0
[debug] Saved registers:
[debug]  ebx at 0x28fdd0, esi at 0x28fdd4, edi at 0x28fdd8, eip at 0x28fddc
[debug]>>>>>>cb_gdb:

Cannot open file: ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c
At ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:132

[debug]> info locals
[debug]No locals.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]fc = 0x28fe0c
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]134 in ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c
[debug]>>>>>>cb_gdb:
[debug]> info frame
[debug]Stack level 0, frame at 0x28fde0:
[debug] eip = 0x416cec in _Unwind_SjLj_Register (../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:134); saved eip 0x44347b
[debug] called by frame at 0x28fdf4
[debug] source language c.
[debug] Arglist at 0x28fdc8, args: fc=0x28fe0c
[debug] Locals at 0x28fdc8, Previous frame's sp is 0x28fde0
[debug] Saved registers:
[debug]  ebx at 0x28fdd0, esi at 0x28fdd4, edi at 0x28fdd8, eip at 0x28fddc
[debug]>>>>>>cb_gdb:

Cannot open file: ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c
At ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:134

[debug]> info locals
[debug]No locals.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]fc = 0x28fe0c
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]0x0042014c in TlsGetValue@4 ()
[debug]>>>>>>cb_gdb:

In TlsGetValue@4 () ()

[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x0042014c in TlsGetValue@4 ()
[debug]#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611
[debug]#2  _Unwind_SjLj_Register (fc=0x28fe0c) at ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:134
[debug]#3  0x00401280 in _gnu_exception_handler@4 ()
[debug]#4  0x0028fe0c in ?? ()
[debug]#5  0x004010fd in __mingw_CRTStartup ()
[debug]#6  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> frame 1
[debug]611 ./gthr-default.h: No such file or directory.
[debug]#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611
[debug]>>>>>>cb_gdb:

611 ./gthr-default.h: No such file or directory.
#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611

[debug]> next
[debug]Single stepping until exit from function TlsGetValue@4,
[debug]which has no line number information.
[debug]0x76941940 in KERNEL32!GetDynamicTimeZoneInformation () from C:\windows\SysWOW64\kernel32.dll
[debug]>>>>>>cb_gdb:

In KERNEL32!GetDynamicTimeZoneInformation () (C:\windows\SysWOW64\kernel32.dll)

[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x76941940 in KERNEL32!GetDynamicTimeZoneInformation () from C:\windows\SysWOW64\kernel32.dll
[debug]#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611
[debug]#2  _Unwind_SjLj_Register (fc=0x28fe0c) at ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:134
[debug]#3  0x00401280 in _gnu_exception_handler@4 ()
[debug]#4  0x0028fe0c in ?? ()
[debug]#5  0x004010fd in __mingw_CRTStartup ()
[debug]#6  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> frame 1
[debug]#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611
[debug]611 in ./gthr-default.h
[debug]>>>>>>cb_gdb:

#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611
611 in ./gthr-default.h

[debug]> next
[debug]Single stepping until exit from function KERNEL32!GetDynamicTimeZoneInformation,
[debug]which has no line number information.
[debug]0x7731d3e0 in TlsGetValue () from C:\windows\SysWOW64\KernelBase.dll
[debug]>>>>>>cb_gdb:

In TlsGetValue () (C:\windows\SysWOW64\KernelBase.dll)

[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x7731d3e0 in TlsGetValue () from C:\windows\SysWOW64\KernelBase.dll
[debug]#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611
[debug]#2  _Unwind_SjLj_Register (fc=0x28fe0c) at ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:134
[debug]#3  0x00401280 in _gnu_exception_handler@4 ()
[debug]#4  0x0028fe0c in ?? ()
[debug]#5  0x004010fd in __mingw_CRTStartup ()
[debug]#6  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> frame 1
[debug]#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611
[debug]611 in ./gthr-default.h
[debug]>>>>>>cb_gdb:

#1  0x00416d0a in __gthread_getspecific (__key=1) at ./gthr-default.h:611
611 in ./gthr-default.h

[debug]> next
[debug]Single stepping until exit from function TlsGetValue,
[debug]which has no line number information.
[debug]__gthread_getspecific (__key=<optimized out>) at ./gthr-default.h:613
[debug]613 in ./gthr-default.h
[debug]>>>>>>cb_gdb:
[debug]> info frame
[debug]Stack level 0, frame at 0x28fde0:
[debug] eip = 0x416d0d in __gthread_getspecific (./gthr-default.h:613); saved eip 0x44347b
[debug] inlined into frame 1
[debug] source language c.
[debug] Arglist at unknown address.
[debug] Locals at unknown address, Previous frame's sp in esp
[debug]>>>>>>cb_gdb:

Cannot open file: ./gthr-default.h
At ./gthr-default.h:613

[debug]> info locals
[debug]__lasterror = 2
[debug]__ptr = 0x28feac
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]__key = <optimized out>
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]0x00420194 in SetLastError@4 ()
[debug]>>>>>>cb_gdb:

In SetLastError@4 () ()

[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x00420194 in SetLastError@4 ()
[debug]#1  0x00416d15 in __gthread_getspecific (__key=<optimized out>) at ./gthr-default.h:613
[debug]#2  _Unwind_SjLj_Register (fc=0x28fe0c) at ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:134
[debug]#3  0x00401280 in _gnu_exception_handler@4 ()
[debug]#4  0x0028fe0c in ?? ()
[debug]#5  0x004010fd in __mingw_CRTStartup ()
[debug]#6  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> frame 1
[debug]#1  0x00416d15 in __gthread_getspecific (__key=<optimized out>) at ./gthr-default.h:613
[debug]613 in ./gthr-default.h
[debug]>>>>>>cb_gdb:

#1  0x00416d15 in __gthread_getspecific (__key=<optimized out>) at ./gthr-default.h:613
613 in ./gthr-default.h

[debug]> next
[debug]Single stepping until exit from function SetLastError@4,
[debug]which has no line number information.
[debug]0x76943360 in KERNEL32!BasepIsProcessAllowed () from C:\windows\SysWOW64\kernel32.dll
[debug]>>>>>>cb_gdb:

In KERNEL32!BasepIsProcessAllowed () (C:\windows\SysWOW64\kernel32.dll)

[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x76943360 in KERNEL32!BasepIsProcessAllowed () from C:\windows\SysWOW64\kernel32.dll
[debug]#1  0x00416d15 in __gthread_getspecific (__key=<optimized out>) at ./gthr-default.h:613
[debug]#2  _Unwind_SjLj_Register (fc=0x28fe0c) at ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:134
[debug]#3  0x00401280 in _gnu_exception_handler@4 ()
[debug]#4  0x0028fe0c in ?? ()
[debug]#5  0x004010fd in __mingw_CRTStartup ()
[debug]#6  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> frame 1
[debug]#1  0x00416d15 in __gthread_getspecific (__key=<optimized out>) at ./gthr-default.h:613
[debug]613 in ./gthr-default.h
[debug]>>>>>>cb_gdb:

#1  0x00416d15 in __gthread_getspecific (__key=<optimized out>) at ./gthr-default.h:613
613 in ./gthr-default.h

[debug]> next
[debug]Single stepping until exit from function KERNEL32!BasepIsProcessAllowed,
[debug]which has no line number information.
[debug]0x77751130 in ?? ()
[debug]>>>>>>cb_gdb:

In ?? () ()

[debug]> info locals
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No symbol table info available.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x77751130 in ?? ()
[debug]#1  0x004010fd in __mingw_CRTStartup ()
[debug]#2  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]Cannot find bounds of current function
[debug]>>>>>>cb_gdb:

Cannot find bounds of current function

[debug]> next
[debug]Cannot find bounds of current function
[debug]>>>>>>cb_gdb:

Cannot find bounds of current function

[debug]> next
[debug]Cannot find bounds of current function
[debug]>>>>>>cb_gdb:

Cannot find bounds of current function

[debug]> next
[debug]Cannot find bounds of current function
[debug]>>>>>>cb_gdb:

Cannot find bounds of current function

[debug]> next
[debug]Cannot find bounds of current function
[debug]>>>>>>cb_gdb:

Cannot find bounds of current function

[debug]> next
[debug]Cannot find bounds of current function
[debug]>>>>>>cb_gdb:

Cannot find bounds of current function

[debug]> next
[debug]Cannot find bounds of current function
[debug]>>>>>>cb_gdb:

Cannot find bounds of current function
« Last Edit: April 09, 2015, 02:45:43 pm by jvmorren »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #11 on: April 10, 2015, 12:53:39 am »
Ok, the log seems pretty awkward. Why on earth does a next gdb command behaves as though you've executed step command?

Can you try to start gdb from the command line and repeat most of the commands?
Also what are the gdb and gcc versions you're using?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jvmorren

  • Single posting newcomer
  • *
  • Posts: 8
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #12 on: April 10, 2015, 03:16:21 am »
I've just had the weirdest thing happen to me.  I opened up gdb in command line (via the folder under My PC) and basically did nothing except type in help.  I then went back to Code::Blocks and it worked fine!! I seriously don't understand why!  And because I never really needed any expert assistance, I would like to apologize for wasting your time, seriously.  Thanks for the help.

Offline ehabr9

  • Single posting newcomer
  • *
  • Posts: 8
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #13 on: May 06, 2015, 03:49:27 pm »
I have same issue...any help please

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Unable to enter input when stepping line by line in the debugger?
« Reply #14 on: May 06, 2015, 04:10:36 pm »
@ehabr9:

Have you tried a recent night build? I think there was a fix for a similar issue.

And if it doesn't work post the full log from the debug session.

Also post cb version, os version, compiler and debugger version.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]