DDD: Execution Window putpkt error

Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)



What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark

I see the same problem, but I believe it happened before patch A too. It
does not happen every time though, just often enough to be real pain.

m.hinton@computer.org wrote:

Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)

What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark

Thanks, I’ll take a look.

m.hinton@computer.org wrote:

Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)



What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


cburgess@qnx.com

Igor Kovalenko wrote:

I see the same problem, but I believe it happened before patch A too. It
does not happen every time though, just often enough to be real pain.

I never saw it under XFree86 :slight_smile:

Armin

m.hinton@computer.org > wrote:

Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)

What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark

At the risk of being obnoxious (I wouldn’t want to stand out in these
newsgroups as the only such person!)… had a chance to look yet,
Colin?

–Mark

In article <95pdhk$ljn$2@nntp.qnx.com>, Colin Burgess
<cburgess@qnx.com> wrote:

Thanks, I’ll take a look.

m.hinton@computer.org > wrote:
Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)



What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark

Mark Hinton <mark.hinton@mmt.bellhowell.com> wrote:

At the risk of being obnoxious (I wouldn’t want to stand out in these
newsgroups as the only such person!)… had a chance to look yet,
Colin?

No DDD for you!! Come back - one year!!! ;v)

We are looking into it. DDD is evil code.

–Mark

In article <95pdhk$ljn$> 2@nntp.qnx.com> >, Colin Burgess
cburgess@qnx.com> > wrote:

Thanks, I’ll take a look.

m.hinton@computer.org > wrote:
Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)



What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


cburgess@qnx.com

Colin Burgess wrote:

Mark Hinton <> mark.hinton@mmt.bellhowell.com> > wrote:
At the risk of being obnoxious (I wouldn’t want to stand out in these
newsgroups as the only such person!)… had a chance to look yet,
Colin?

No DDD for you!! Come back - one year!!! ;v)

We are looking into it. DDD is evil code.

Well now. Why did it became evil all of a sudden with patch A? I still
have that feature working on previous release (although I use gdb-4.18
there).

By the way, glsaver stopped to work with patch A as well.
You might try to look for evil somewhere else Colin :slight_smile:

  • igor

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

Colin Burgess wrote:

Mark Hinton <> mark.hinton@mmt.bellhowell.com> > wrote:
At the risk of being obnoxious (I wouldn’t want to stand out in these
newsgroups as the only such person!)… had a chance to look yet,
Colin?

No DDD for you!! Come back - one year!!! ;v)

We are looking into it. DDD is evil code.


Well now. Why did it became evil all of a sudden with patch A? I still
have that feature working on previous release (although I use gdb-4.18
there).

Hmmmm. There were a lot of io-char changes with patch A. Maybe that
has something to do with it.

By the way, glsaver stopped to work with patch A as well.
You might try to look for evil somewhere else Colin > :slight_smile:

I see evil everywhere, Igor! ;v)

However, DDD is evil.


cburgess@qnx.com

By the way, glsaver stopped to work with patch A as well.
You might try to look for evil somewhere else Colin > :slight_smile:

  • igor

It still works for me, Igor… Maybe because I didn’t install DDD :wink:
Markus

Hello everyone,

I’ve been looking into what ddd does when it creates an execution window
and here is what I have uncovered:

ddd spawns a shell in a window and then monkeys around with gdb’s arguments
that will be passed to the program which will be executed. You can see this
by spawning an execution window from ddd and then typing ‘show args’ at the
gdb prompt. It tells you that the program arguments will be something like
“< /dev/ttyp6 > /dev/ttyp6 2>&1” (depending on your shell) where ttyp6 is
the terminal that was just spawned.

Now the main problem we have is that our gdb communicates (by tcp or serial)
with a pdebug process so when we try to connect things up, things go wrong.
I didn’t quite see what was happening but when you’re running pdebug on the
local machine, some wires seem to get crossed somewhere in all the pty/tty
connections and nothing works.

You may not know this but our version of gdb didn’t support interaction with
a process at all up until now. The light at the end of the tunnel is,
however, that Colin and Graeme’s hard work on the current gdb 5 has resulted
in a gdb that runs natively (using our own procfs) rather than through
pdebug. What this means is that the execution window works just fine and
behaves exactly as expected. In fact, I just ran vi with full termcap in
an execution window from ddd. So the good news is that gdb 5 now supports
interaction with processes, both locally AND remotely through pdebug.

With good news comes bad however and the bad news is that this will NOT work
with ddd debugging a target on a remote machine running pdebug. It’s pretty
obvious why not (process on target says, “You want me to hook up to ttyp6 on
host? No way!”) So the question remains: is this fixable?

When you run gdb in a normal fashion, you, as the user, are hooked up to
stdin/out/err and interact with gdb. As soon as you start running the program,
however, gdb redirects these streams to the process so that you can interact
with it instead. So, my thought is that the way to solve this would be to
hook the execution window up to gdb instead of the actual debugged process,
and have gdb switch back and forth (depending on whether the debugged process
is running or not) between the terminal and the prompt.

This is just an idea: we don’t support DDD (other than creating a package
for people) and this would require hacking of both gdb and ddd. So, the
short answer is, when we get gdb5 out (should be real soon now…) the
execution window will work on local targets but remote will not likely work
anytime soon (unless one of you enterprising fellows wants to take a look…).
In any event, at least you will be able to debug interactive programs through
the gdb prompt.


Cheers,


m.hinton@computer.org wrote:

Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)



What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Well something got crossed just in patch A so it is probably new
io-char. Bun indeed, pdebug-less gdb 4.18 works fine, which however does
not mean problem is solved. You still got to fix whatever was broken by
patch A.

Speaking about remote debugging, how about making host & target to
communicate though qnet?
Then target should have no problems hooking up to /dev/ttypX on host :slight_smile:

  • igor

Kris Warkentin wrote:

Hello everyone,

I’ve been looking into what ddd does when it creates an execution window
and here is what I have uncovered:

ddd spawns a shell in a window and then monkeys around with gdb’s arguments
that will be passed to the program which will be executed. You can see this
by spawning an execution window from ddd and then typing ‘show args’ at the
gdb prompt. It tells you that the program arguments will be something like
“< /dev/ttyp6 > /dev/ttyp6 2>&1” (depending on your shell) where ttyp6 is
the terminal that was just spawned.

Now the main problem we have is that our gdb communicates (by tcp or serial)
with a pdebug process so when we try to connect things up, things go wrong.
I didn’t quite see what was happening but when you’re running pdebug on the
local machine, some wires seem to get crossed somewhere in all the pty/tty
connections and nothing works.

You may not know this but our version of gdb didn’t support interaction with
a process at all up until now. The light at the end of the tunnel is,
however, that Colin and Graeme’s hard work on the current gdb 5 has resulted
in a gdb that runs natively (using our own procfs) rather than through
pdebug. What this means is that the execution window works just fine and
behaves exactly as expected. In fact, I just ran vi with full termcap in
an execution window from ddd. So the good news is that gdb 5 now supports
interaction with processes, both locally AND remotely through pdebug.

With good news comes bad however and the bad news is that this will NOT work
with ddd debugging a target on a remote machine running pdebug. It’s pretty
obvious why not (process on target says, “You want me to hook up to ttyp6 on
host? No way!”) So the question remains: is this fixable?

When you run gdb in a normal fashion, you, as the user, are hooked up to
stdin/out/err and interact with gdb. As soon as you start running the program,
however, gdb redirects these streams to the process so that you can interact
with it instead. So, my thought is that the way to solve this would be to
hook the execution window up to gdb instead of the actual debugged process,
and have gdb switch back and forth (depending on whether the debugged process
is running or not) between the terminal and the prompt.

This is just an idea: we don’t support DDD (other than creating a package
for people) and this would require hacking of both gdb and ddd. So, the
short answer is, when we get gdb5 out (should be real soon now…) the
execution window will work on local targets but remote will not likely work
anytime soon (unless one of you enterprising fellows wants to take a look…).
In any event, at least you will be able to debug interactive programs through
the gdb prompt.

Cheers,

m.hinton@computer.org > wrote:
Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)

What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Indeed, Graeme is, even as we speak, attempting to do just that. It turns
out that in the QNX specific part of gdb that deals with the pdebug protocol,
there is a parsing of any redirection symbols (so as to not bugger up the
remote client). So, the simple (and transparent to DDD hopefully) solution
involves parsing out the redirection and letting gdb take turns talking to
the console and the remote execution window. Then everthing will just go over
the wire to the pdebug process. Of course sometimes these things are simpler
in the theory than the implementation.

As far as Patch A breaking things, I’m not sure. I was under the impression
that it never worked because it wasn’t implemented. I’ll have to look further
into it.

Cheers,

Kris

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

Well something got crossed just in patch A so it is probably new
io-char. Bun indeed, pdebug-less gdb 4.18 works fine, which however does
not mean problem is solved. You still got to fix whatever was broken by
patch A.

Speaking about remote debugging, how about making host & target to
communicate though qnet?
Then target should have no problems hooking up to /dev/ttypX on host > :slight_smile:

  • igor

Kris Warkentin wrote:

Hello everyone,

I’ve been looking into what ddd does when it creates an execution window
and here is what I have uncovered:

ddd spawns a shell in a window and then monkeys around with gdb’s arguments
that will be passed to the program which will be executed. You can see this
by spawning an execution window from ddd and then typing ‘show args’ at the
gdb prompt. It tells you that the program arguments will be something like
“< /dev/ttyp6 > /dev/ttyp6 2>&1” (depending on your shell) where ttyp6 is
the terminal that was just spawned.

Now the main problem we have is that our gdb communicates (by tcp or serial)
with a pdebug process so when we try to connect things up, things go wrong.
I didn’t quite see what was happening but when you’re running pdebug on the
local machine, some wires seem to get crossed somewhere in all the pty/tty
connections and nothing works.

You may not know this but our version of gdb didn’t support interaction with
a process at all up until now. The light at the end of the tunnel is,
however, that Colin and Graeme’s hard work on the current gdb 5 has resulted
in a gdb that runs natively (using our own procfs) rather than through
pdebug. What this means is that the execution window works just fine and
behaves exactly as expected. In fact, I just ran vi with full termcap in
an execution window from ddd. So the good news is that gdb 5 now supports
interaction with processes, both locally AND remotely through pdebug.

With good news comes bad however and the bad news is that this will NOT work
with ddd debugging a target on a remote machine running pdebug. It’s pretty
obvious why not (process on target says, “You want me to hook up to ttyp6 on
host? No way!”) So the question remains: is this fixable?

When you run gdb in a normal fashion, you, as the user, are hooked up to
stdin/out/err and interact with gdb. As soon as you start running the program,
however, gdb redirects these streams to the process so that you can interact
with it instead. So, my thought is that the way to solve this would be to
hook the execution window up to gdb instead of the actual debugged process,
and have gdb switch back and forth (depending on whether the debugged process
is running or not) between the terminal and the prompt.

This is just an idea: we don’t support DDD (other than creating a package
for people) and this would require hacking of both gdb and ddd. So, the
short answer is, when we get gdb5 out (should be real soon now…) the
execution window will work on local targets but remote will not likely work
anytime soon (unless one of you enterprising fellows wants to take a look…).
In any event, at least you will be able to debug interactive programs through
the gdb prompt.

Cheers,

m.hinton@computer.org > wrote:
Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)

What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Igor, please clarify - what was broken by patch A? As far as
I know, the execution window has never worked except with the
procfs interface that you have in 4.18, and that I have brought
forward to 5.0.

You might have seen something on a local machine using pdebug
to imitate a native debug session, because then the target’s devc-pty
happens to be the host’s devc-pty, but this would have been a fluke,
and not a true functioning feature of gdb/pdebug. I am working on it.

GP


Kris Warkentin <kewarken@qnx.com> wrote:

Indeed, Graeme is, even as we speak, attempting to do just that. It turns
out that in the QNX specific part of gdb that deals with the pdebug protocol,
there is a parsing of any redirection symbols (so as to not bugger up the
remote client). So, the simple (and transparent to DDD hopefully) solution
involves parsing out the redirection and letting gdb take turns talking to
the console and the remote execution window. Then everthing will just go over
the wire to the pdebug process. Of course sometimes these things are simpler
in the theory than the implementation.

As far as Patch A breaking things, I’m not sure. I was under the impression
that it never worked because it wasn’t implemented. I’ll have to look further
into it.

Cheers,

Kris

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Well something got crossed just in patch A so it is probably new
io-char. Bun indeed, pdebug-less gdb 4.18 works fine, which however does
not mean problem is solved. You still got to fix whatever was broken by
patch A.

Speaking about remote debugging, how about making host & target to
communicate though qnet?
Then target should have no problems hooking up to /dev/ttypX on host > :slight_smile:

  • igor

Kris Warkentin wrote:

Hello everyone,

I’ve been looking into what ddd does when it creates an execution window
and here is what I have uncovered:

ddd spawns a shell in a window and then monkeys around with gdb’s arguments
that will be passed to the program which will be executed. You can see this
by spawning an execution window from ddd and then typing ‘show args’ at the
gdb prompt. It tells you that the program arguments will be something like
“< /dev/ttyp6 > /dev/ttyp6 2>&1” (depending on your shell) where ttyp6 is
the terminal that was just spawned.

Now the main problem we have is that our gdb communicates (by tcp or serial)
with a pdebug process so when we try to connect things up, things go wrong.
I didn’t quite see what was happening but when you’re running pdebug on the
local machine, some wires seem to get crossed somewhere in all the pty/tty
connections and nothing works.

You may not know this but our version of gdb didn’t support interaction with
a process at all up until now. The light at the end of the tunnel is,
however, that Colin and Graeme’s hard work on the current gdb 5 has resulted
in a gdb that runs natively (using our own procfs) rather than through
pdebug. What this means is that the execution window works just fine and
behaves exactly as expected. In fact, I just ran vi with full termcap in
an execution window from ddd. So the good news is that gdb 5 now supports
interaction with processes, both locally AND remotely through pdebug.

With good news comes bad however and the bad news is that this will NOT work
with ddd debugging a target on a remote machine running pdebug. It’s pretty
obvious why not (process on target says, “You want me to hook up to ttyp6 on
host? No way!”) So the question remains: is this fixable?

When you run gdb in a normal fashion, you, as the user, are hooked up to
stdin/out/err and interact with gdb. As soon as you start running the program,
however, gdb redirects these streams to the process so that you can interact
with it instead. So, my thought is that the way to solve this would be to
hook the execution window up to gdb instead of the actual debugged process,
and have gdb switch back and forth (depending on whether the debugged process
is running or not) between the terminal and the prompt.

This is just an idea: we don’t support DDD (other than creating a package
for people) and this would require hacking of both gdb and ddd. So, the
short answer is, when we get gdb5 out (should be real soon now…) the
execution window will work on local targets but remote will not likely work
anytime soon (unless one of you enterprising fellows wants to take a look…).
In any event, at least you will be able to debug interactive programs through
the gdb prompt.

Cheers,

m.hinton@computer.org > wrote:
Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)

What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Graeme Peterson
QNX Tools Group
gp@qnx.com

Actually, the execution window seemed to be working for me with the
original download of RTP. But when I did a “pristine” install of the
new “Patch A” version, I found that execution windows no longer worked.
Interestingly, my “pristine Patch A” system contains gdb 4.17, not
4.18. Hmmm.

In article <96919t$nef$1@nntp.qnx.com>, Graeme Peterson <gp@qnx.com>
wrote:

Igor, please clarify - what was broken by patch A? As far as
I know, the execution window has never worked except with the
procfs interface that you have in 4.18, and that I have brought
forward to 5.0.

You might have seen something on a local machine using pdebug
to imitate a native debug session, because then the target’s devc-pty
happens to be the host’s devc-pty, but this would have been a fluke,
and not a true functioning feature of gdb/pdebug. I am working on it.

GP


Kris Warkentin <> kewarken@qnx.com> > wrote:
Indeed, Graeme is, even as we speak, attempting to do just that. It turns
out that in the QNX specific part of gdb that deals with the pdebug
protocol,
there is a parsing of any redirection symbols (so as to not bugger up the
remote client). So, the simple (and transparent to DDD hopefully) solution
involves parsing out the redirection and letting gdb take turns talking to
the console and the remote execution window. Then everthing will just go
over
the wire to the pdebug process. Of course sometimes these things are
simpler
in the theory than the implementation.

As far as Patch A breaking things, I’m not sure. I was under the impression
that it never worked because it wasn’t implemented. I’ll have to look
further
into it.

Cheers,

Kris

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Well something got crossed just in patch A so it is probably new
io-char. Bun indeed, pdebug-less gdb 4.18 works fine, which however does
not mean problem is solved. You still got to fix whatever was broken by
patch A.

Speaking about remote debugging, how about making host & target to
communicate though qnet?
Then target should have no problems hooking up to /dev/ttypX on host > :slight_smile:

  • igor

Kris Warkentin wrote:

Hello everyone,

I’ve been looking into what ddd does when it creates an execution window
and here is what I have uncovered:

ddd spawns a shell in a window and then monkeys around with gdb’s
arguments
that will be passed to the program which will be executed. You can see
this
by spawning an execution window from ddd and then typing ‘show args’ at
the
gdb prompt. It tells you that the program arguments will be something
like
“< /dev/ttyp6 > /dev/ttyp6 2>&1” (depending on your shell) where ttyp6 is
the terminal that was just spawned.

Now the main problem we have is that our gdb communicates (by tcp or
serial)
with a pdebug process so when we try to connect things up, things go
wrong.
I didn’t quite see what was happening but when you’re running pdebug on
the
local machine, some wires seem to get crossed somewhere in all the pty/tty
connections and nothing works.

You may not know this but our version of gdb didn’t support interaction
with
a process at all up until now. The light at the end of the tunnel is,
however, that Colin and Graeme’s hard work on the current gdb 5 has
resulted
in a gdb that runs natively (using our own procfs) rather than through
pdebug. What this means is that the execution window works just fine and
behaves exactly as expected. In fact, I just ran vi with full termcap in
an execution window from ddd. So the good news is that gdb 5 now supports
interaction with processes, both locally AND remotely through pdebug.

With good news comes bad however and the bad news is that this will NOT
work
with ddd debugging a target on a remote machine running pdebug. It’s
pretty
obvious why not (process on target says, “You want me to hook up to ttyp6
on
host? No way!”) So the question remains: is this fixable?

When you run gdb in a normal fashion, you, as the user, are hooked up to
stdin/out/err and interact with gdb. As soon as you start running the
program,
however, gdb redirects these streams to the process so that you can
interact
with it instead. So, my thought is that the way to solve this would be to
hook the execution window up to gdb instead of the actual debugged
process,
and have gdb switch back and forth (depending on whether the debugged
process
is running or not) between the terminal and the prompt.

This is just an idea: we don’t support DDD (other than creating a package
for people) and this would require hacking of both gdb and ddd. So, the
short answer is, when we get gdb5 out (should be real soon now…) the
execution window will work on local targets but remote will not likely
work
anytime soon (unless one of you enterprising fellows wants to take a
look…).
In any event, at least you will be able to debug interactive programs
through
the gdb prompt.

Cheers,

m.hinton@computer.org > wrote:
Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)

What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Mark Hinton <mark.hinton@mmt.bellhowell.com> wrote:

Actually, the execution window seemed to be working for me with the
original download of RTP. But when I did a “pristine” install of the
new “Patch A” version, I found that execution windows no longer worked.
Interestingly, my “pristine Patch A” system contains gdb 4.17, not
4.18. Hmmm.

“Hmmm” indeed! I will look into that. I have no idea why/how it would
have worked, particularly considering that I just did a bunch of work
to modify GDB5 so that it now works with pdebug and remote targetting.
I can assure you that there was nothing in place in 4.17 to make it work.

4.17 didn’t even support stdin! The xterm’s pty/tty pair must have
matched the pty/tty pair being used by pdebug for the inferior process
running on a native setup…
…but how?

Ah well. We have intentional code to support this now. :slight_smile:

Kind of cool - DDD with an executable window talking over TCP to pdebug
running /bin/vi… :slight_smile: This gdb5 is almost ready for the beta’s. I will
have an internal package put together to give it some miles, and then submit
it to QA for the next beta after that. RSN ™.

GP

In article <96919t$nef$> 1@nntp.qnx.com> >, Graeme Peterson <> gp@qnx.com
wrote:

Igor, please clarify - what was broken by patch A? As far as
I know, the execution window has never worked except with the
procfs interface that you have in 4.18, and that I have brought
forward to 5.0.

You might have seen something on a local machine using pdebug
to imitate a native debug session, because then the target’s devc-pty
happens to be the host’s devc-pty, but this would have been a fluke,
and not a true functioning feature of gdb/pdebug. I am working on it.

GP


Kris Warkentin <> kewarken@qnx.com> > wrote:
Indeed, Graeme is, even as we speak, attempting to do just that. It turns
out that in the QNX specific part of gdb that deals with the pdebug
protocol,
there is a parsing of any redirection symbols (so as to not bugger up the
remote client). So, the simple (and transparent to DDD hopefully) solution
involves parsing out the redirection and letting gdb take turns talking to
the console and the remote execution window. Then everthing will just go
over
the wire to the pdebug process. Of course sometimes these things are
simpler
in the theory than the implementation.

As far as Patch A breaking things, I’m not sure. I was under the impression
that it never worked because it wasn’t implemented. I’ll have to look
further
into it.

Cheers,

Kris

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Well something got crossed just in patch A so it is probably new
io-char. Bun indeed, pdebug-less gdb 4.18 works fine, which however does
not mean problem is solved. You still got to fix whatever was broken by
patch A.

Speaking about remote debugging, how about making host & target to
communicate though qnet?
Then target should have no problems hooking up to /dev/ttypX on host > :slight_smile:

  • igor

Kris Warkentin wrote:

Hello everyone,

I’ve been looking into what ddd does when it creates an execution window
and here is what I have uncovered:

ddd spawns a shell in a window and then monkeys around with gdb’s
arguments
that will be passed to the program which will be executed. You can see
this
by spawning an execution window from ddd and then typing ‘show args’ at
the
gdb prompt. It tells you that the program arguments will be something
like
“< /dev/ttyp6 > /dev/ttyp6 2>&1” (depending on your shell) where ttyp6 is
the terminal that was just spawned.

Now the main problem we have is that our gdb communicates (by tcp or
serial)
with a pdebug process so when we try to connect things up, things go
wrong.
I didn’t quite see what was happening but when you’re running pdebug on
the
local machine, some wires seem to get crossed somewhere in all the pty/tty
connections and nothing works.

You may not know this but our version of gdb didn’t support interaction
with
a process at all up until now. The light at the end of the tunnel is,
however, that Colin and Graeme’s hard work on the current gdb 5 has
resulted
in a gdb that runs natively (using our own procfs) rather than through
pdebug. What this means is that the execution window works just fine and
behaves exactly as expected. In fact, I just ran vi with full termcap in
an execution window from ddd. So the good news is that gdb 5 now supports
interaction with processes, both locally AND remotely through pdebug.

With good news comes bad however and the bad news is that this will NOT
work
with ddd debugging a target on a remote machine running pdebug. It’s
pretty
obvious why not (process on target says, “You want me to hook up to ttyp6
on
host? No way!”) So the question remains: is this fixable?

When you run gdb in a normal fashion, you, as the user, are hooked up to
stdin/out/err and interact with gdb. As soon as you start running the
program,
however, gdb redirects these streams to the process so that you can
interact
with it instead. So, my thought is that the way to solve this would be to
hook the execution window up to gdb instead of the actual debugged
process,
and have gdb switch back and forth (depending on whether the debugged
process
is running or not) between the terminal and the prompt.

This is just an idea: we don’t support DDD (other than creating a package
for people) and this would require hacking of both gdb and ddd. So, the
short answer is, when we get gdb5 out (should be real soon now…) the
execution window will work on local targets but remote will not likely
work
anytime soon (unless one of you enterprising fellows wants to take a
look…).
In any event, at least you will be able to debug interactive programs
through
the gdb prompt.

Cheers,

m.hinton@computer.org > wrote:
Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)

What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Graeme Peterson
QNX Tools Group
gp@qnx.com

GDB 4.18 was not in patch A. It took some begging to get it :wink:

Mark Hinton wrote:

Actually, the execution window seemed to be working for me with the
original download of RTP. But when I did a “pristine” install of the
new “Patch A” version, I found that execution windows no longer worked.
Interestingly, my “pristine Patch A” system contains gdb 4.17, not
4.18. Hmmm.

In article <96919t$nef$> 1@nntp.qnx.com> >, Graeme Peterson <> gp@qnx.com
wrote:

Igor, please clarify - what was broken by patch A? As far as
I know, the execution window has never worked except with the
procfs interface that you have in 4.18, and that I have brought
forward to 5.0.

You might have seen something on a local machine using pdebug
to imitate a native debug session, because then the target’s devc-pty
happens to be the host’s devc-pty, but this would have been a fluke,
and not a true functioning feature of gdb/pdebug. I am working on it.

GP


Kris Warkentin <> kewarken@qnx.com> > wrote:
Indeed, Graeme is, even as we speak, attempting to do just that. It turns
out that in the QNX specific part of gdb that deals with the pdebug
protocol,
there is a parsing of any redirection symbols (so as to not bugger up the
remote client). So, the simple (and transparent to DDD hopefully) solution
involves parsing out the redirection and letting gdb take turns talking to
the console and the remote execution window. Then everthing will just go
over
the wire to the pdebug process. Of course sometimes these things are
simpler
in the theory than the implementation.

As far as Patch A breaking things, I’m not sure. I was under the impression
that it never worked because it wasn’t implemented. I’ll have to look
further
into it.

Cheers,

Kris

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Well something got crossed just in patch A so it is probably new
io-char. Bun indeed, pdebug-less gdb 4.18 works fine, which however does
not mean problem is solved. You still got to fix whatever was broken by
patch A.

Speaking about remote debugging, how about making host & target to
communicate though qnet?
Then target should have no problems hooking up to /dev/ttypX on host > :slight_smile:

  • igor

Kris Warkentin wrote:

Hello everyone,

I’ve been looking into what ddd does when it creates an execution window
and here is what I have uncovered:

ddd spawns a shell in a window and then monkeys around with gdb’s
arguments
that will be passed to the program which will be executed. You can see
this
by spawning an execution window from ddd and then typing ‘show args’ at
the
gdb prompt. It tells you that the program arguments will be something
like
“< /dev/ttyp6 > /dev/ttyp6 2>&1” (depending on your shell) where ttyp6 is
the terminal that was just spawned.

Now the main problem we have is that our gdb communicates (by tcp or
serial)
with a pdebug process so when we try to connect things up, things go
wrong.
I didn’t quite see what was happening but when you’re running pdebug on
the
local machine, some wires seem to get crossed somewhere in all the pty/tty
connections and nothing works.

You may not know this but our version of gdb didn’t support interaction
with
a process at all up until now. The light at the end of the tunnel is,
however, that Colin and Graeme’s hard work on the current gdb 5 has
resulted
in a gdb that runs natively (using our own procfs) rather than through
pdebug. What this means is that the execution window works just fine and
behaves exactly as expected. In fact, I just ran vi with full termcap in
an execution window from ddd. So the good news is that gdb 5 now supports
interaction with processes, both locally AND remotely through pdebug.

With good news comes bad however and the bad news is that this will NOT
work
with ddd debugging a target on a remote machine running pdebug. It’s
pretty
obvious why not (process on target says, “You want me to hook up to ttyp6
on
host? No way!”) So the question remains: is this fixable?

When you run gdb in a normal fashion, you, as the user, are hooked up to
stdin/out/err and interact with gdb. As soon as you start running the
program,
however, gdb redirects these streams to the process so that you can
interact
with it instead. So, my thought is that the way to solve this would be to
hook the execution window up to gdb instead of the actual debugged
process,
and have gdb switch back and forth (depending on whether the debugged
process
is running or not) between the terminal and the prompt.

This is just an idea: we don’t support DDD (other than creating a package
for people) and this would require hacking of both gdb and ddd. So, the
short answer is, when we get gdb5 out (should be real soon now…) the
execution window will work on local targets but remote will not likely
work
anytime soon (unless one of you enterprising fellows wants to take a
look…).
In any event, at least you will be able to debug interactive programs
through
the gdb prompt.

Cheers,

m.hinton@computer.org > wrote:
Since installing the QNXRTP update (Patch A), I’ve had difficulty using
a seperate execution window in DDD for the application-under-test
console support. When I select View -Execution WIndow, and then Run DDD
on my program, I immediately receive an error message in the gdb
interaction pane. The gdb interaction looks like this:

(gdb) run
Starting program: a.out
putpkt: write failed: Input/output error.
(gdb)

What makes this even more curious is that the Execution Window appears
normal when created, but once “Run” is attempted, the window title
acquires the gdb output from the “Run” attempt. In other words, after
attempting to run, the DDD Execution Window’s title-bar says:

DDD: a.outputpkt: write failed: Input/output error.

So evidently, DDD (I’m running GNU DDD 3.2.1 (x86-pc-nto-qnx)) is
sending output destined for the gdb interaction pane to the title bar
of the execution window as well. No wonder there’s a problem!

Since Patch A broke Emacs, I’m a little suspicious. Looks like I may
need to download source for DDD and emacs and rebuild both. If you have
any ideas or suggestions, they’d be most welcome!

Thanks,
Mark


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth