Author Topic: A problem while debugging... what's the solution?  (Read 8215 times)

Offline nacitar

  • Multiple posting newcomer
  • *
  • Posts: 27
A problem while debugging... what's the solution?
« on: January 02, 2009, 09:13:04 pm »
I set up a brand new install of 32-bit intrepid ibex, build codeblocks trunk from svn, then started using it no problem.. until I wanted to debug.

A simple hello world application, (or any for that matter) wont work.  I tell it to start debugging, and the program never even executes.. I get the console window and that's it.

Debugger tab says:

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /home/username/development/projects/SocketTest/
Adding source dir: /home/username/development/projects/SocketTest/
Adding file: bin/Debug/SocketTest
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 6.8-debian
(IT JUST SITS HERE FOREVER)


Debugger (debug) (aka, the debug log) says:

LD_LIBRARY_PATH=.:/removed/for/privacy:/also/removed/for/privacy:
Command-line: /usr/bin/gdb -nx -fullname  -quiet -args bin/Debug/SocketTest
Working dir : /home/username/development/projects/SocketTest/
(gdb)
> set prompt >>>>>>cb_gdb:
Executing: xterm -T 'Program Console' -e sleep 89725
>>>>>>cb_gdb:
> show version
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor intel
>>>>>>cb_gdb:
> catch throw
Function "__cxa_throw" not defined.
>>>>>>cb_gdb:
> directory /home/username/development/projects/SocketTest/
>>>>>>cb_gdb:
Executing: ps x -o tty,pid,command
PS result: ?        19477 ps x -o tty,pid,command
PS result: pts/1    19476 sleep 89725
TTY is[/dev/pts/1]
GetConsoleTTY[/dev/pts/1]ConsolePid[19475]
> tty /dev/pts/1
Queued:[tty /dev/pts/1]
>>>>>>cb_gdb:
> run
Couldn't write registers: Input/output error.
>>>>>>cb_gdb:



So... what does "Couldn't write registers: Input/output error." mean?  I haven't had luck with google in finding a resolution for this.
Jacob McIntosh - Software Developer

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem while debugging... what's the solution?
« Reply #1 on: January 02, 2009, 11:28:32 pm »
You can try to uncheck "Settings -> Compiler and debugger settings... -> Debugger settings -> Catch C++ exceptions".

Offline nacitar

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: A problem while debugging... what's the solution?
« Reply #2 on: January 03, 2009, 12:50:46 am »
I figured it out.. I'm using virtualbox... and something about virtualbox is limiting gdb's access to CPU registers.  in vmware player, it works just fine.

So, that error is something to do with virtualbox's support for things gdb is doing.  Error is fixed, not a codeblocks problem.

If you enable VT-X/AMD-V support in the virtualbox vm options, however, it works in virtualbox as well.
Jacob McIntosh - Software Developer