ddd pty problems

I’m sure this is a terminal device configuration problem, but I don’t know
how to fix it. When I run my program using ddd, I get an error in the gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

john

John Bowen <John.Bowen@grc.nasa.gov> wrote:

Hello,

I’m sure this is a terminal device configuration problem, but I don’t know
how to fix it. When I run my program using ddd, I get an error in the gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

john

can you post an ouptut from “pidin ar”, with the ddd running (with the error)

regards,

Marcin

“Marcin Dzieciol” <marcind@qnx.com> wrote in message
news:93i7jh$588$1@nntp.qnx.com

John Bowen <> John.Bowen@grc.nasa.gov> > wrote:

Hello,

I’m sure this is a terminal device configuration problem, but I don’t
know
how to fix it. When I run my program using ddd, I get an error in the
gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

john

can you post an ouptut from “pidin ar”, with the ddd running (with the
error)

regards,

Marcin


Here it is!

pid Arguments
1 (n/a)
2 devc-con -n4
4099 pci-bios
4100 /sbin/tinit
4101 devb-eide blk auto=partition cam quiet eide dma eide dma
4102 fs-pkg -a/pkgs/base/safe-config/etc/system/package/packages
8199 slogger
12296 pipe
114697 dumper -d /var/dumps
65546 devc-pty -n32
65547 mqueue
77836 devc-ser8250 -u1 3f8,4 -u2 2f8,3
708621 ddd
94222 devb-fdc cam quiet blk auto=partition,cache=100k
126991 /sbin/io-net -dne2000 -ptcpip
77840 devc-par -p0x378
176145 -sh
77842 spooler -d/dev/par1
176147 login
176148 login
176149 login
249878 Photon
303127 fontsleuth -d /usr/photon/font_repository
380952 pwm
286745 /usr/photon/bin/phfontFA -d /usr/photon/font_repository -j -s 300k
352282 io-graphics -g1024x768x8 -dldevg-vesabios.so -I0 -d0x0,0x0 -R70
368667 devi-hirun kbd fd -d/dev/kbd msoft fd -d /dev/ser2
409628 shelf
446493 bkgdmgr
446494 wmswitch
446495 saver
712736 gdb -q -fullname
774177 pterm
778274 /bin/sh
671779 Xphoton
671780 gtwm
786469 pidin ar

Hello,

Do you have /usr/sbin/pdebug?, how about /usr/bin/pdebug?

regards,

Marcin

John Bowen wrote:

I’m sure this is a terminal device configuration problem, but I don’t know
how to fix it. When I run my program using ddd, I get an error in the gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

Yes … my first idea is to look into the SOURCES
of ddd. ddd is part of the QNX RTP distribution
and must be distributed under the GPL, that means
they must be available for everyone.

So … WHERE are the SOURCES!!

Armin

Armin Steinhoff <A-Steinhoff@web_.de> wrote:


John Bowen wrote:

I’m sure this is a terminal device configuration problem, but I don’t know
how to fix it. When I run my program using ddd, I get an error in the gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

Yes … my first idea is to look into the SOURCES
of ddd. ddd is part of the QNX RTP distribution
and must be distributed under the GPL, that means
they must be available for everyone.

So … WHERE are the SOURCES!!

Armin

As far as I understand (and I am not a lawyer), the sources
have to be available, and anyone who asks will receive them.
The source to the gnu binutils, compiler and gdb are found at:
http://staff.qnx.com/~cburgess/gnu/

‘ddd’ was configured and compiled stock. We made no special
changes. You can find it at:
www.gnu.org

This error is coming from one of our files in gdb:

gdb/ser-qnxpty.c: printf_unfiltered(“fork() failed: %s\n”, strerror(errno));

We are trying to fork gdb, and then exec pdebug so we can talk to it.
I don’t think fork() should be returning EINVAL… Are you running out
of memory?

Please exit Photon to a text console, and try gdb. Let me know how that works.

Thanks,
GP


Graeme Peterson
QNX Tools Group
gp@qnx.com

“Graeme Peterson” <gp@qnx.com> wrote in message
news:93ksnt$lqt$1@nntp.qnx.com

Armin Steinhoff <A-Steinhoff@web_.de> wrote:


John Bowen wrote:

I’m sure this is a terminal device configuration problem, but I don’t
know
how to fix it. When I run my program using ddd, I get an error in the
gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

Yes … my first idea is to look into the SOURCES
of ddd. ddd is part of the QNX RTP distribution
and must be distributed under the GPL, that means
they must be available for everyone.

So … WHERE are the SOURCES!!

Ouch. Did I strike a nerve here?
Armin

As far as I understand (and I am not a lawyer), the sources
have to be available, and anyone who asks will receive them.
The source to the gnu binutils, compiler and gdb are found at:
http://staff.qnx.com/~cburgess/gnu/

‘ddd’ was configured and compiled stock. We made no special
changes. You can find it at:
www.gnu.org

This error is coming from one of our files in gdb:

gdb/ser-qnxpty.c: printf_unfiltered(“fork() failed: %s\n”,
strerror(errno));

We are trying to fork gdb, and then exec pdebug so we can talk to it.
I don’t think fork() should be returning EINVAL… Are you running out
of memory?

That is very possible, but I don’t understand why it should. I have an

embedded 486 PC/104 with 32MB of RAM on it. Even when I’m not running ddd
the memory usage bar is almost pegged. What is hogging it? How can I get
more usable memory?

Please exit Photon to a text console, and try gdb. Let me know how that
works.

Thanks,
GP


Graeme Peterson
QNX Tools Group
gp@qnx.com

John Bowen <John.Bowen@grc.nasa.gov> wrote:

“Graeme Peterson” <> gp@qnx.com> > wrote in message
news:93ksnt$lqt$> 1@nntp.qnx.com> …
Armin Steinhoff <A-Steinhoff@web_.de> wrote:


John Bowen wrote:

I’m sure this is a terminal device configuration problem, but I don’t
know
how to fix it. When I run my program using ddd, I get an error in the
gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

Yes … my first idea is to look into the SOURCES
of ddd. ddd is part of the QNX RTP distribution
and must be distributed under the GPL, that means
they must be available for everyone.

So … WHERE are the SOURCES!!

Ouch. Did I strike a nerve here?
Armin

As far as I understand (and I am not a lawyer), the sources
have to be available, and anyone who asks will receive them.
The source to the gnu binutils, compiler and gdb are found at:
http://staff.qnx.com/~cburgess/gnu/

‘ddd’ was configured and compiled stock. We made no special
changes. You can find it at:
www.gnu.org

This error is coming from one of our files in gdb:

gdb/ser-qnxpty.c: printf_unfiltered(“fork() failed: %s\n”,
strerror(errno));

We are trying to fork gdb, and then exec pdebug so we can talk to it.
I don’t think fork() should be returning EINVAL… Are you running out
of memory?

It looks like we have a winner! No More RAM. The fork() should
probably be returning ENOMEM, as opposed to EINVAL, though. My RTP
development machine has 33 Meg used with only a pterm open (so I can
run ‘pidin in’). Perhaps you should consider getting a bigger, faster,
RAM filled development machine to target your pc/104, then you can do
remote debugging by running pdebug on the pc/104, and ddd/gdb on the
development machine. TCP or serial connections will work. The other
option is to slay off things you don’t need, like fontsleuth, saver, or
any other managers/drivers you are not using.

A monster development box seems safer, though.

Regards,
GP

That is very possible, but I don’t understand why it should. I have an
embedded 486 PC/104 with 32MB of RAM on it. Even when I’m not running ddd
the memory usage bar is almost pegged. What is hogging it? How can I get
more usable memory?
Please exit Photon to a text console, and try gdb. Let me know how that
works.

Thanks,
GP


Graeme Peterson
QNX Tools Group
gp@qnx.com


Graeme Peterson
QNX Tools Group
gp@qnx.com

“Graeme Peterson” <gp@qnx.com> wrote in message
news:93njsb$ak4$1@nntp.qnx.com

John Bowen <> John.Bowen@grc.nasa.gov> > wrote:

“Graeme Peterson” <> gp@qnx.com> > wrote in message
news:93ksnt$lqt$> 1@nntp.qnx.com> …
Armin Steinhoff <A-Steinhoff@web_.de> wrote:


John Bowen wrote:

I’m sure this is a terminal device configuration problem, but I
don’t
know
how to fix it. When I run my program using ddd, I get an error in
the
gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

Yes … my first idea is to look into the SOURCES
of ddd. ddd is part of the QNX RTP distribution
and must be distributed under the GPL, that means
they must be available for everyone.

So … WHERE are the SOURCES!!

Ouch. Did I strike a nerve here?
Armin

As far as I understand (and I am not a lawyer), the sources
have to be available, and anyone who asks will receive them.
The source to the gnu binutils, compiler and gdb are found at:
http://staff.qnx.com/~cburgess/gnu/

‘ddd’ was configured and compiled stock. We made no special
changes. You can find it at:
www.gnu.org

This error is coming from one of our files in gdb:

gdb/ser-qnxpty.c: printf_unfiltered(“fork() failed: %s\n”,
strerror(errno));

We are trying to fork gdb, and then exec pdebug so we can talk to it.
I don’t think fork() should be returning EINVAL… Are you running out
of memory?


It looks like we have a winner! No More RAM. The fork() should
probably be returning ENOMEM, as opposed to EINVAL, though. My RTP
development machine has 33 Meg used with only a pterm open (so I can
run ‘pidin in’). Perhaps you should consider getting a bigger, faster,
RAM filled development machine to target your pc/104, then you can do
remote debugging by running pdebug on the pc/104, and ddd/gdb on the
development machine. TCP or serial connections will work. The other
option is to slay off things you don’t need, like fontsleuth, saver, or
any other managers/drivers you are not using.

A monster development box seems safer, though.

Regards,
GP

Thanks, I’ll try that when I my project gets enough $ to buy another

machine.

John

That is very possible, but I don’t understand why it should. I have an
embedded 486 PC/104 with 32MB of RAM on it. Even when I’m not running
ddd
the memory usage bar is almost pegged. What is hogging it? How can I
get
more usable memory?
Please exit Photon to a text console, and try gdb. Let me know how
that
works.

Thanks,
GP


Graeme Peterson
QNX Tools Group
gp@qnx.com


\


Graeme Peterson
QNX Tools Group
gp@qnx.com

John Bowen wrote:

“Graeme Peterson” <> gp@qnx.com> > wrote in message
news:93ksnt$lqt$> 1@nntp.qnx.com> …
Armin Steinhoff <A-Steinhoff@web_.de> wrote:
John Bowen wrote:
[…]

Ouch. Did I strike a nerve here?

may be… ??

As far as I understand (and I am not a lawyer), the sources
have to be available, and anyone who asks will receive them.

Why this ponderously procedure … it costs much time finding out the
right person to ask etc.

It would be better if the QUICS ftp account would provide all ported GNU
sources.

The source to the gnu binutils, compiler and gdb are found at:
http://staff.qnx.com/~cburgess/gnu/
‘ddd’ was configured and compiled stock. We made no special
changes.

But there are changes. LessTif has been also ported as a base lib for
DDD. So what are the problems to give back the ported sources to the
open source community??

The same game with Python 1.5.2. QSSL provides only a broken BINARY
version of it. Where are the sources? If the sources are provided …
every one could recompile it just to create useful binaries.

This error is coming from one of our files in gdb:

gdb/ser-qnxpty.c: printf_unfiltered(“fork() failed: %s\n”,
strerror(errno));

We are trying to fork gdb, and then exec pdebug so we can talk to it.
I don’t think fork() should be returning EINVAL… Are you running out
of memory?

That is very possible, but I don’t understand why it should. I have an
embedded 486 PC/104 with 32MB of RAM on it. Even when I’m not running ddd
the memory usage bar is almost pegged. What is hogging it? How can I get
more usable memory?

Reduce the cache size of e.g. devb-eide … blk cache=???
Xphoton on top of Photon needs also a lot of memory.
A plain Xfree86 configuration gives you back at least 8MB.

Armin

Armin Steinhoff <A-Steinhoff@web_.de> wrote:

John Bowen wrote:

“Graeme Peterson” <> gp@qnx.com> > wrote in message
news:93ksnt$lqt$> 1@nntp.qnx.com> …
Armin Steinhoff <A-Steinhoff@web_.de> wrote:
John Bowen wrote:
[…]

Ouch. Did I strike a nerve here?

may be… ??

As far as I understand (and I am not a lawyer), the sources
have to be available, and anyone who asks will receive them.

Why this ponderously procedure … it costs much time finding out the
right person to ask etc.

It is our intention to roll any permanent changes back into the
appropriate open source repository when ready. We do not want to
do this prematurely, so we make the source available to whoever
asks for it.

What we are doing complies with any and all legal requirements. For
further discussion on this topic, please start a new thread in some
other appropriate news group. Releasing open sourced code is not an
issue for the devtool newsgroup.

Unless there are further technical issues having to do with
ddd/gdb, I am done here.

Thanks for the additional memory saving suggestions below. They
could definitely help.

GP

It would be better if the QUICS ftp account would provide all ported GNU
sources.

The source to the gnu binutils, compiler and gdb are found at:
http://staff.qnx.com/~cburgess/gnu/
‘ddd’ was configured and compiled stock. We made no special
changes.

But there are changes. LessTif has been also ported as a base lib for
DDD. So what are the problems to give back the ported sources to the
open source community??



The same game with Python 1.5.2. QSSL provides only a broken BINARY
version of it. Where are the sources? If the sources are provided …
every one could recompile it just to create useful binaries.


This error is coming from one of our files in gdb:

gdb/ser-qnxpty.c: printf_unfiltered(“fork() failed: %s\n”,
strerror(errno));

We are trying to fork gdb, and then exec pdebug so we can talk to it.
I don’t think fork() should be returning EINVAL… Are you running out
of memory?

That is very possible, but I don’t understand why it should. I have an
embedded 486 PC/104 with 32MB of RAM on it. Even when I’m not running ddd
the memory usage bar is almost pegged. What is hogging it? How can I get
more usable memory?

Reduce the cache size of e.g. devb-eide … blk cache=???
Xphoton on top of Photon needs also a lot of memory.
A plain Xfree86 configuration gives you back at least 8MB.

Armin


Graeme Peterson
QNX Tools Group
gp@qnx.com

Graeme Peterson <gp@qnx.com> wrote:

Armin Steinhoff <A-Steinhoff@web_.de> wrote:

Hello,

John Bowen wrote:

I’m sure this is a terminal device configuration problem, but I don’t know
how to fix it. When I run my program using ddd, I get an error in the gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

Any ideas?

Yes … my first idea is to look into the SOURCES
of ddd. ddd is part of the QNX RTP distribution
and must be distributed under the GPL, that means
they must be available for everyone.

So … WHERE are the SOURCES!!

Armin

As far as I understand (and I am not a lawyer), the sources
have to be available, and anyone who asks will receive them.
The source to the gnu binutils, compiler and gdb are found at:
http://staff.qnx.com/~cburgess/gnu/

‘ddd’ was configured and compiled stock. We made no special
changes. You can find it at:
www.gnu.org

I have just added this issue to the Knowlege Base at http://qnd.qnx.com.
You can find the solution to this issue, by searching on “source code”.
You’ll also find the answer at the following link:

http://support.qnx.com/support/bok/solution.qnx?10245

Best Regards,

Marcin

This error is coming from one of our files in gdb:

gdb/ser-qnxpty.c: printf_unfiltered(“fork() failed: %s\n”, strerror(errno));

We are trying to fork gdb, and then exec pdebug so we can talk to it.
I don’t think fork() should be returning EINVAL… Are you running out
of memory?

Please exit Photon to a text console, and try gdb. Let me know how that works.

Thanks,
GP


Graeme Peterson
QNX Tools Group
gp@qnx.com

Marcin Dzieciol
Technical Support
QNX Software Systems Ltd.
Email: <marcind@qnx.com>

In article <3A5F5771.409D6A1@web_.de>,
Armin Steinhoff <A-Steinhoff@web_.de> wrote:

‘ddd’ was configured and compiled stock. We made no special
changes.

But there are changes. LessTif has been also ported as a base lib for
DDD. So what are the problems to give back the ported sources to the
open source community??

(slowly, and with feeling… :slight_smile:
No. We made NO changes to the ddd source.
-zero, zilch, not a single character in a single source file
Lesstif was NOT used as a base lib for ddd.
-lesstif has way too many bugs


Garry Turcotte (R&D)
QNX Software Systems, Ltd.

How can I do to debug a source with a line of code such:

ch = fgetc(stdin)

Where can I send my input to have gdb (or ddd) reading it?
I tried gdb --tty or gdb --exec-window but that doesn’t work

John Bowen wrote in message <93hmld$nu$1@inn.qnx.com>…

I’m sure this is a terminal device configuration problem, but I don’t know
how to fix it. When I run my program using ddd, I get an error in the gdb
pane indicating the following:

(gdb) run
Starting program: /home/…
fork() failed: Invalid argument
pty: Invalid argument.
(gdb)

We had something similar and the only way to make it run was:

$ gdb ./prog

target qnx pty
run
break main
n

Fred.