Author Topic: A problem while debugging... what's the solution?  (Read 5747 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:
Adding source dir: /home/username/development/projects/SocketTest/
Adding source dir: /home/username/development/projects/SocketTest/
Adding file: bin/Debug/SocketTest
Starting debugger:
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

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

Command-line: /usr/bin/gdb -nx -fullname  -quiet -args bin/Debug/SocketTest
Working dir : /home/username/development/projects/SocketTest/
> set prompt >>>>>>cb_gdb:
Executing: xterm -T 'Program Console' -e sleep 89725
> show version
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
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".
> set confirm off
> set width 0
> set height 0
> set breakpoint pending on
> set print asm-demangle on
> set unwindonsignal on
> set disassembly-flavor intel
> catch throw
Function "__cxa_throw" not defined.
> directory /home/username/development/projects/SocketTest/
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]
> tty /dev/pts/1
Queued:[tty /dev/pts/1]
> run
Couldn't write registers: Input/output error.

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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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