From: Joel Brobecker <brobecker@gnat.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: native or target?
Date: Thu, 05 Sep 2002 18:02:00 -0000 [thread overview]
Message-ID: <20020906010247.GX1169@gnat.com> (raw)
In-Reply-To: <3D77F391.85509705@redhat.com>
> A more accurate definition is that gdb is using the "native"
> (ie. OS-provided) mechanism for controlling the target
> program (eg. /proc or ptrace).
Thank you. With your explainations and Daniel's message, I think it's
much clearer in my head now.
> > I would like to move the code in [b.] to the right place, and then
> > remplace the #ifdef __INTERIX section by the proper runtime test.
> > But I am confused as to where the right place for this code would
> > be.
>
> I would say this is target code. Correct me of I am wrong, but
> I think you would use the same code regardless of how you were
> debugging the target program (procfs or remote).
This is where I am wondering whetherour approach is flawed or not. It
seems very awkward at the very least: procfs is definitely native, but
at the same time the procfinfo data contains these addresses that are
useful for a method which is target dependent...
I need to spend a bit more time understanding why the computation is
done here. I need to do some more research to see if there is no other
way to get these addresses.
> But I am confused -- you said that GDB is not running on the
> target platform, but on a 386-linux machine. So how can you
> use procfs.c?
That's my fault. I confused you with my first example for a question
that was unrelated to the case we are discussing.
I am actually using a native debugger on i386-interix. But I am trying
to fix the few places where we have target-dependent code in native-only
modules. I don't think this is an option to leave these changes there
if I want our interix port to be integrated :-).
BTW: Is it a requirement for a new port to be buildable as a target
only, or can we provide a native-only port as a first step, and then
eventually improve it to support "--host=--target=interix"? This is
out-of-the-box thinking, I don't see how this would help the problem we
have been discussing, but I think this is an interesting piece of
information to know.
> > What would you do?
>
> Move them out of procfs, and probably into interix-tdep.
I thought about this. There were several issues that made me
a bit cautious:
1. interix-tdep can not know about the procinfo structure, since
this structure is used in native-only debugging. I can still
get the information because I know the offset of these addresses
in the procinfo structure. A bit crude, and probably hard to
maintain as versions of interix evolve, but doable.
2. I still need somehow to call this function from procfs.c.
Could it be a new architecture method?
As I said above, I think it is best that I investigate a bit more with
Donn Terry to see if there is no other way to implement PC_IN_SIGTRAMP
in a completely target-oriented way before any of us spends more time on
this.
--
Joel
next prev parent reply other threads:[~2002-09-06 1:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20020905232440.GV1169@gnat.com>
2002-09-05 16:29 ` Joel Brobecker
2002-09-05 16:35 ` Daniel Jacobowitz
2002-09-05 17:15 ` Michael Snyder
2002-09-05 18:02 ` Joel Brobecker [this message]
2002-09-06 11:00 ` Michael Snyder
2002-09-06 12:48 ` Mark Kettenis
2002-09-09 12:14 ` Andrew Cagney
2002-09-05 17:47 ` Kevin Buettner
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=20020906010247.GX1169@gnat.com \
--to=brobecker@gnat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@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