Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Alex Bennee <kernel-hacker@bennee.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: What has replaced fork to launch external commands?
Date: Mon, 17 Feb 2003 17:46:00 -0000	[thread overview]
Message-ID: <1045503576.2505.30.camel@cambridge.braddahead> (raw)
In-Reply-To: <20030217172738.GA19524@nevyn.them.org>

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


  reply	other threads:[~2003-02-17 17:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-17 16:55 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 [this message]
2003-02-17 17:04 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1045503576.2505.30.camel@cambridge.braddahead \
    --to=kernel-hacker@bennee.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox