From: Andrew Cagney <ac131313@cygnus.com>
To: tromey@redhat.com
Cc: Eli Zaretskii <eliz@is.elta.co.il>, gdb-patches@sources.redhat.com
Subject: Re: PATCH: gdb --args
Date: Thu, 11 Oct 2001 10:49:00 -0000 [thread overview]
Message-ID: <3BC5DB7E.3000908@cygnus.com> (raw)
In-Reply-To: <87g08qxeb4.fsf@creche.redhat.com>
>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>
>
> Andrew> The target's operating system. I think the target's operating
> Andrew> system is something independant of the actual interface
> Andrew> (ptrace, procfs, remote, ...) GDB uses to control the target
> Andrew> program.
>
> Is there a target OS vector or something like that?
> I don't understand how the code would look if I made this change.
Yes. Only thanks to a legacy of unfortunate name choices (target.[hc])
it is called gdbarch.
The code would look almost identical only instead of calling a
target.[hc] method it would call an architecture method.
I'll resist the temptation of suggesting that ``register_read'' would
make a good example - the x86 isn't multi-arch and wouldn't be able to
use it :-/ Can I instead suggest something like target_read_pc.
--
I think most of the other changes are CLI and (a little) top.c related
(even though the sit in infcmd.c). I'll defer to other maintainers for
comments on that.
Andrew
PS: The below is for reference, and was part of a reply to an earlier
e-mail.
> As I understood it, to_create_inferior assumed that ARGS was properly
> quoted for the target. To me this implies that the transformation
> from argv[] to string must be done in a target-dependent way -- that
> is, in a way that matches what the corresponding to_create_inferior
> expects.
GDB suffers from some really badly chosen terminology. ``target'' is
badly overloaded.
I wasn't exactly clear in what I ment by ``architecture (well OS)'', sorry.
The system being debugged will have:
- an interface to control the target being debugged
In GDB that is the target.[hc] jumbo object.
GDB uses this interface to perform operations such as step, continue,
kill and start the system being debugged. It might use ptrace, procfs,
remote or nothing (core).
- an interface describing the systems ISA, ABI and OS
In GDB that is the gdbarch.[hc] jumbo object.
GDB calls on the gdbarch object when doing things that are dependant on
the target architecture rather than the details of the target interface.
For instance, shared library support, an OS feature, is managed by
gdbarch and not the target vector.
I think what you're doing is independant of the control interface
(target.[hc]) but is target operating system dependant. Hence
suggesting that it live in gdbarch.
next prev parent reply other threads:[~2001-10-11 10:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-10 15:28 Tom Tromey
2001-10-11 1:02 ` Eli Zaretskii
2001-10-11 8:32 ` Andrew Cagney
2001-10-11 9:56 ` Eli Zaretskii
2001-10-11 10:24 ` Andrew Cagney
2001-10-11 10:29 ` Tom Tromey
2001-10-11 10:49 ` Andrew Cagney [this message]
2001-10-11 10:14 ` Tom Tromey
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=3BC5DB7E.3000908@cygnus.com \
--to=ac131313@cygnus.com \
--cc=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
--cc=tromey@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