* What has replaced fork to launch external commands?
@ 2003-02-17 16:55 Alex Bennee
2003-02-17 17:00 ` Daniel Jacobowitz
2003-02-17 17:04 ` Andrew Cagney
0 siblings, 2 replies; 6+ messages in thread
From: Alex Bennee @ 2003-02-17 16:55 UTC (permalink / raw)
To: gdb
I thought I would give the latest gdb(5.3) a spin and see if it could
interface with ST's gdb server to talk to my ICE. The original gcc is
dated 20020211.
Happy that it all built ok for my target system it fell over on startup
because the "fork" command used to lauch the gdbserver seems to of
disapeared:
fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1
noposixconsole
Is there a drop-in replacement? I greped the Changelogs but all the fork
references seem to be talking about debugged processes rather than
commands.
--
Alex, homepage: http://www.bennee.com/~alex/
"I'm a cat person, myself," she said, vaguely. A low-level voice said:
"Yeah? Yeah? Wash in your own spit, do you?"
-- It's a dog's life
(Terry Pratchett, Moving Pictures)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What has replaced fork to launch external commands?
2003-02-17 16:55 What has replaced fork to launch external commands? Alex Bennee
@ 2003-02-17 17:00 ` Daniel Jacobowitz
2003-02-17 17:14 ` Alex Bennee
2003-02-17 17:04 ` Andrew Cagney
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-02-17 17:00 UTC (permalink / raw)
To: Alex Bennee; +Cc: gdb
On Mon, Feb 17, 2003 at 04:49:25PM +0000, Alex Bennee wrote:
> I thought I would give the latest gdb(5.3) a spin and see if it could
> interface with ST's gdb server to talk to my ICE. The original gcc is
> dated 20020211.
>
> Happy that it all built ok for my target system it fell over on startup
> because the "fork" command used to lauch the gdbserver seems to of
> disapeared:
> fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1
> noposixconsole
>
> Is there a drop-in replacement? I greped the Changelogs but all the fork
> references seem to be talking about debugged processes rather than
> commands.
Where'd you get this 20020211 GDB? I don't remember GDB ever having a
"fork" command.
Meanwhile you can probably roughly use "shell" if I'm understanding
what you're doing.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What has replaced fork to launch external commands?
2003-02-17 16:55 What has replaced fork to launch external commands? Alex Bennee
2003-02-17 17:00 ` Daniel Jacobowitz
@ 2003-02-17 17:04 ` Andrew Cagney
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-02-17 17:04 UTC (permalink / raw)
To: Alex Bennee; +Cc: gdb
> I thought I would give the latest gdb(5.3) a spin and see if it could
> interface with ST's gdb server to talk to my ICE. The original gcc is
> dated 20020211.
What did you upgrade from? GDB has a shell command, but not fork.
Andrew
> Happy that it all built ok for my target system it fell over on startup
> because the "fork" command used to lauch the gdbserver seems to of
> disapeared:
> fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1
Try:
shell shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1 &
> noposixconsole
>
> Is there a drop-in replacement? I greped the Changelogs but all the fork
> references seem to be talking about debugged processes rather than
> commands.
>
> -- Alex, homepage: http://www.bennee.com/~alex/ "I'm a cat person, myself," she said, vaguely. A low-level voice said: "Yeah? Yeah? Wash in your own spit, do you?" -- It's a dog's life (Terry Pratchett, Moving Pictures)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What has replaced fork to launch external commands?
2003-02-17 17:00 ` Daniel Jacobowitz
@ 2003-02-17 17:14 ` Alex Bennee
2003-02-17 17:27 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Alex Bennee @ 2003-02-17 17:14 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
On Mon, 2003-02-17 at 17:00, Daniel Jacobowitz wrote:
> On Mon, Feb 17, 2003 at 04:49:25PM +0000, Alex Bennee wrote:
> Where'd you get this 20020211 GDB? I don't remember GDB ever having a
> "fork" command.
From ST's SH linux tools. Based on the original Monta Vista ones IIRC. I
guess they must of patched gdb. If I can check-out the 20020211 source
code from CVS I'll diff against the supplied sources and see what they
changed.
It would help if I knew which branch it came from.
> Meanwhile you can probably roughly use "shell" if I'm understanding
> what you're doing.
Mmm, tried that but it ends up echoing gdb server stuff to the gdb
command line.
--
Alex, homepage: http://www.bennee.com/~alex/
Even the clearest and most perfect circumstantial evidence is likely to be at
fault, after all, and therefore ought to be received with great caution. Take
the case of any pencil, sharpened by any woman; if you have witnesses, you will
find she did it with a knife; but if you take simply the aspect of the pencil,
you will say that she did it with her teeth.
-- Mark Twain, "Pudd'nhead Wilson's Calendar"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What has replaced fork to launch external commands?
2003-02-17 17:14 ` Alex Bennee
@ 2003-02-17 17:27 ` Daniel Jacobowitz
2003-02-17 17:46 ` Alex Bennee
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-02-17 17:27 UTC (permalink / raw)
To: Alex Bennee; +Cc: gdb
On Mon, Feb 17, 2003 at 05:07:52PM +0000, Alex Bennee wrote:
> On Mon, 2003-02-17 at 17:00, Daniel Jacobowitz wrote:
> > On Mon, Feb 17, 2003 at 04:49:25PM +0000, Alex Bennee wrote:
> > Where'd you get this 20020211 GDB? I don't remember GDB ever having a
> > "fork" command.
>
> >From ST's SH linux tools. Based on the original Monta Vista ones IIRC. I
> guess they must of patched gdb. If I can check-out the 20020211 source
> code from CVS I'll diff against the supplied sources and see what they
> changed.
>
> It would help if I knew which branch it came from.
If so I'm guessing it came from ST; MontaVista didn't add this command
either.
> > Meanwhile you can probably roughly use "shell" if I'm understanding
> > what you're doing.
>
> Mmm, tried that but it ends up echoing gdb server stuff to the gdb
> command line.
Eh? An example, please? I guess it depends what the fork command is
actually _doing_.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What has replaced fork to launch external commands?
2003-02-17 17:27 ` Daniel Jacobowitz
@ 2003-02-17 17:46 ` Alex Bennee
0 siblings, 0 replies; 6+ messages in thread
From: Alex Bennee @ 2003-02-17 17:46 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
On Mon, 2003-02-17 at 17:27, Daniel Jacobowitz wrote:
> <snip>
> > > Meanwhile you can probably roughly use "shell" if I'm understanding
> > > what you're doing.
> >
> > Mmm, tried that but it ends up echoing gdb server stuff to the gdb
> > command line.
>
> Eh? An example, please? I guess it depends what the fork command is
> actually _doing_.
I modified the _connectsh4 script command:
define _connectsh4
set endian $arg0
set architecture sh4
if ($NoPosixConsole)
# fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1
noposixconsole
printf "Attempting to fork gdbserver NoPosixConsole\n"
shell /opt/STM/ST40R2.0.5/bin/shlaunch -si $arg0 -gdbserv host=$arg1
-cid0 host=$arg1 noposixconsole &
else
if ($KeepPosixConsole)
#fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1
keepposixopen
shell /opt/STM/ST40R2.0.5/bin/shlaunch -si $arg0 -gdbserv host=$arg1
-cid0 host=$arg1 keepposixopen &
printf "Attempting to fork gdbserver KeepPosixConsole\n"
else
# fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1
shell /opt/STM/ST40R2.0.5/bin/shlaunch -si $arg0 -gdbserv host=$arg1
-cid0 host=$arg1 &
printf "Attempting to fork gdbserver\n"
end
end
if (!$SHLaunchErrorCode)
$arg2
end
end
And gdb fails with:
[alex@cambridge linux-2.4.20]$ ~/sources/gdb/gdb-5.3-sh/gdb/gdb -nw -x
loadlinux
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=sh4-gnu-linux".
`uX~a1Missing argument 1 in user function.
I'm *assuming* the `uX bit is part of the gdbserver protocol getting
echoed back. Once I've finsihed checking out the gdb source I may be
able to see what this fork command does different from the shell command
already provided. I assume something subtle otherwise why add the
feature instead of enhancing shell?
--
Alex, homepage: http://www.bennee.com/~alex/
Whenever I date a guy, I think, is this the man I want my children
to spend their weekends with?
-- Rita Rudner
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-02-17 17:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-17 16:55 What has replaced fork to launch external commands? Alex Bennee
2003-02-17 17:00 ` Daniel Jacobowitz
2003-02-17 17:14 ` Alex Bennee
2003-02-17 17:27 ` Daniel Jacobowitz
2003-02-17 17:46 ` Alex Bennee
2003-02-17 17:04 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox