# ddd(1) debugger connection problems



## morl (Oct 5, 2014)

I need a simple GUI front-end to gdb(1) and devel/ddd ought to be the perfect tool of choice, but I'm having trouble starting it.

```
$ ddd --debugger gdb &
gdb: cannot open master pty: No such file or directory
gdb: communication setup failed
$
```
ddd starts but can not perform anything useful, e.g. attach to a process or open a program. When started with the --trace option (also ~/.ddd/log) shows the following:

```
GNU DDD 3.3.12 (amd64-portbld-freebsd10.0)
Copyright (C) 1995-1999 Technische Universität Braunschweig, Ge
Copyright (C) 1999-2001 Universität Passau, Germany.
Copyright (C) 2001 Universität des Saarlandes, Germany.
Copyright (C) 2001-2009 Free Software Foundation, Inc.

Compiled with GCC 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELE
Requires X11R6, Xt11R6, Motif 2.3.4 (Motif Version 2.3.4)
Includes XPM 3.4.11, Athena Panner (7000002L), DDD core
Built 2014-10-03 by Charlie  <unknown>.
$  ddd --trace
+  /bin/sh -c 'exec gdb -q -fullname'
#  Hello, world!
#  Starting GDB...
gdb: cannot open master pty: No such file or directory
gdb: communication setup failed
#  Current language: C/C++
#  Searching "vsllib/ddd.vsl"...
#  Trying "/root/.ddd/vsllib/ddd.vsl"
#  Trying "/usr/local/share/ddd-3.3.12/vsllib/ddd.vsl"
#  Searching "vsllib/ddd.vsl"..."/usr/local/share/ddd-3.3.12/vsllib/ddd.vsl"
```
I installed the program using the binary package management, but have also compiled it from the ports tree to no effect. I searched the web quite thoroughly for those messages and found some mailing list entries from the ancient days, suggesting to delete the ~/.ddd/init , ~/.ddd/.gdbinit or even the whole .ddd/, but I've had no success with those methods.

Also:

```
$ find /usr/local/share -name "ddd.vsl"
/usr/local/share/ddd-3.3.12/vsllib/ddd.vsl
```
Exactly the same thing happens with the Perl debugger too; I don't have other debuggers installed but it appears, at least to my untrained opinion, that this is ddd related. I have hoped that someone might have some valuable information or insight to share which could help me alleviate the problem and start enjoying some ddd until which I should satisfy myself with bare gdb.

P.S. I'll gladly receive suggestions for other debug front-ends.

[ Use [file] tags for program names, not [highlight] -- Mod. ]


----------



## freethread (Oct 6, 2014)

Perhaps ddd needs a more updated gdb version. Try installing devel/gdb (version 7.8). It will be installed in the tree /usr/local with the name gdb78.


----------



## morl (Oct 8, 2014)

The problem persists even with the suggested gdb version.

```
$ ddd --debugger "/usr/local/bin/gdb78" --gdb
gdb: cannot open master pty: No such file or directory
gdb: communication setup failed
```
Anyway, thank you for the idea, I wasn't even aware of how old was the version I used.


----------



## Terry Cheng (Nov 24, 2014)

*T*ry `kldload pty`

(ref: https://forums.freebsd.org/threads/solved-no-dev-ptmx-in-freebsd-10.43673/)


----------



## morl (Nov 26, 2014)

Terry Cheng said:


> *T*ry `kldload pty`
> 
> (ref: https://forums.freebsd.org/threads/solved-no-dev-ptmx-in-freebsd-10.43673/)



It works! Thank you so much Terry! 
I was about to install Linux in the VM just to do some less painful debugging, thanks to you I was spared of this experience!


----------

