eclipse-cdt debugging doesn't work on FreeBSD 7.0 amd64?

Mungyung Ryu rumuru at gmail.com
Sun Nov 9 19:59:24 PST 2008


Hello BSD guys,

My system information is like this.
- FreeBSD 7.0-RELEASE amd64
- gcc 4.2.1
- gdb 6.1.1
- eclipse-cdt-3.1.2_1

I used ports tree to compile and install eclipse-cdt-3.1.2_1.
Running eclipse and compiling my C++ project are fine.
But, when I try to debug, an error dialog box pops up and says 'Target
selection failed'.
The verbose console mode of the debugger option prints below.

46-gdb-set confirm off
46^done
(gdb)
47-gdb-set width 0
47^done
(gdb)
48-gdb-set height 0
48^done
(gdb)
49-interpreter-exec console echo
49^done
(gdb)
50-gdb-show prompt
50^done,value="(gdb) "
(gdb)
51-gdb-set auto-solib-add on
51^done
(gdb)
52-gdb-set stop-on-solib-events 0
52^done
(gdb)
53-gdb-set stop-on-solib-events 1
53^done
(gdb)
54-gdb-set remotebaud 115200
54^done
(gdb)
55-target-select remote /dev/ttyS0
&"/dev/ttyS0: No such file or directory.\n"
/dev/ttyS0: No such file or directory.
55^error,msg="/dev/ttyS0: No such file or directory."
(gdb)
56-gdb-exit
56^exit

The default debugger option of the eclipse is below.

Debugger: gdbserver Debugger
GDB debugger: gdb
GDB command file: .gdbinit
GDB command set: Standard
Protocol: mi
Connection
  Type: Serial
  Device: /dev/ttyS0
  Speed: 115200

As the error message says, there is no file or directory at /dev/ttyS0 in my
system.

I've also tried another debugger connection option like below.
Connection
  Type: TCP
  Host name or IP address: localhost
  Port number: 10000

It prints message like this.

68-gdb-set confirm off
68^done
(gdb)
69-gdb-set width 0
69^done
(gdb)
70-gdb-set height 0
70^done
(gdb)
71-interpreter-exec console echo
71^done
(gdb)
72-gdb-show prompt
72^done,value="(gdb) "
(gdb)
73-gdb-set auto-solib-add on
73^done
(gdb)
74-gdb-set stop-on-solib-events 0
74^done
(gdb)
75-gdb-set stop-on-solib-events 1
75^done
(gdb)
76-target-select remote localhost:10000
&"localhost:10000: Connection refused.\n"
localhost:10000: Connection refused.
76^error,msg="localhost:10000: Connection refused."
(gdb)
77-gdb-exit
77^exit

I'm using PF for a firewall and opened TCP connection for port 10000 and
I even disabled PF, but it has same error.

There is anybody who've had and solved this kind of problem of eclipse?
I'll really appreciate your solution.
Going back to the command line gdb is quite miserable.
I really wanna use eclipse for C++ debugging.

Thanks.


More information about the freebsd-questions mailing list