Re: [patch] for mig check in GDB's configure

Thomas Schwinge
2013-05-16T22:10:19Z

[-- Attachment #1: Type: text/plain, Size: 1872 bytes --]

Hi!

On Sun, 5 May 2013 10:35:25 -0700, Doug Evans <dje@google.com> wrote:
> On Sat, May 4, 2013 at 10:30 PM, Yue Lu <hacklu.newborn@gmail.com> wrote:
> > But I have one more question, why the one run on GNU Hurd which
> > targeting arm doesn't need to use MIG? As it run under GNU Hurd, it
> > must use the message transport facility and need to use MIG to
> > generate the interface file automatically or someone write it by
> > hands.
>
> That's a good question (assuming I understand it, it's a bit hard to
> parse as written). I don't know MIG or GNU Hurd.
> This stuff is pretty straightforward though, there's no magic.
> The answer depends on what GDB uses MIG for.
>
> If GDB on Hurd uses MIG like GDB on Linux uses ptrace,
> then that would explain it (again, assuming I understand the question).
> But someone who knows Hurd and MIG will need to step up
> and provide a real answer.

That's basically it. Basically, RPC interface definition files (*.defs,
included with the Hurd system) basically describe all possible "system
calls", including ptrace, and the MIG tool translates these into C code
stub functions.

So, MIG is needed everywhere where a Linux port of GDB would talk to the
kernel. This means in the Hurd context: a) for a native configuration
(GDB host equals GDB target: runs on the host, speaks to the target
(which is the same system, hence native); the only configuration existing
right now), or b) -- to be worked on -- via gdbserver, where the GDB host
can be anything, the GDB target is Hurd (assuming the GDB host is not
Hurd, then MIG is not needed, because that GDB configuration will not
directly interact with a Hurd system), and for gdbserver itself, again
host equals target, as it runs on the host, and speaks to the target
(which is the same system, hence native).

Grüße,
Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]