Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: Daniel Jacobowitz <drow@mvista.com>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] add-symbol-file-from-memory command
Date: Mon, 06 Oct 2003 15:30:00 -0000	[thread overview]
Message-ID: <vt2he2mwfjy.fsf@zenia.home> (raw)
In-Reply-To: <vt2isn6f17v.fsf@zenia.home>


It seems I'm confused about where the vsyscall support is useful.  I
thought it was Linux-specific, but folks disagreed.  I think it's
important to get this right, because that determines where the code
goes in GDB and what the interfaces are.

(This message rambles in a whiney sort of way, and then asks specific
questions at bottom.)

One of the sources of my confusion is whether it's Linux-specific or
ELF-specific.  The vsyscall DSO only appears on Linux --- at the
moment.  But supporting it in GDB can be done without reference to
anything Linux-specific: you need to check the auxilliary vector (an
ELF thing) and read an ELF file out of memory.  It never makes
Linux-specific system calls, or relies on Linux-specific filesystem
layout stuff, for example.  So leaving linux-tdep.c and
config/nm-linux.h out of the picture entirely, and doing everything as
ELF-related code, will not introduce any interface violations.

But although I understand that the Linux system call interface is
changing, and that the new interface requires the kernel to provide
unwinding information, because the old way of unwinding from system
calls no longer works, I've never understood why the system call
interface had to change in the first place.

In a sense, it's irrelevant --- the interface *is* changing, and GDB
must continue to work.  But not understanding why the system call
interface must change makes it difficult for me to assess how likely
other systems are to adopt vsyscall DSO's, and thus whether it's
better to isolate the additional complexity to Linux-specific files,
even though the work is portable to all ELF targets, or whether it's
better to make it ELF-specific, to make it easy (or unnecessary) to
adapt GDB when the feature appears elsewhere.

I think there's a good argument that one should simply always
implement everything using the smallest interface you can stand, even
if it's only used in a specific situation, because it makes the code
easier to reuse.  Since the vsyscall DSO support only really depends
on ELF stuff, and it automatically detects when it's needed (by the
presence of a specific element in the auxilliary vector), maybe that's
the best thing to do.


So, why did the kernel system call interface need to change?  How
likely are other Unices to begin using vsyscall DSO's?  I've seen
x86-64 and IA-64 mentioned; would it be useful on PPC and the S/390,
too?  (Just to pick random architectures out of the air.)


  parent reply	other threads:[~2003-10-06 15:30 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-03  4:27 Roland McGrath
2003-10-03 21:41 ` Jim Blandy
2003-10-03 21:45   ` Daniel Jacobowitz
2003-10-03 22:08   ` Roland McGrath
2003-10-03 22:19   ` Elena Zannoni
2003-10-03 23:00     ` Roland McGrath
2003-10-04 12:57       ` Elena Zannoni
2003-10-04 20:14         ` Roland McGrath
2003-10-07  1:42           ` Andrew Cagney
2003-10-03 22:34   ` Andrew Cagney
2003-10-03 23:02     ` Roland McGrath
2003-10-04 14:39       ` Andrew Cagney
2003-10-06 15:30   ` Jim Blandy [this message]
2003-10-06 15:43     ` Daniel Jacobowitz
2003-10-06 19:57       ` Roland McGrath
2003-10-07 23:32       ` Michael Snyder
  -- strict thread matches above, loose matches on Subject: below --
2004-04-08 22:38 Roland McGrath
2004-04-15 18:11 ` Jim Blandy
2004-04-15 18:49   ` Andrew Cagney
2004-04-15 21:42   ` Roland McGrath
2004-04-08 20:47 Roland McGrath
2004-04-08 22:13 ` Jim Blandy
2004-04-08 22:28   ` Roland McGrath
2004-04-08 22:32     ` Daniel Jacobowitz
2004-04-08 22:35   ` Andrew Cagney
2004-04-08 22:42     ` Roland McGrath
2004-04-15 18:52       ` Andrew Cagney
2004-02-12  0:34 Roland McGrath
2004-02-13 15:54 ` Andrew Cagney
2004-02-13 19:13   ` Roland McGrath
2004-02-02  3:38 Roland McGrath
2004-02-02  4:06 ` Daniel Jacobowitz
2004-02-02  4:47   ` Roland McGrath
2004-02-02 15:02     ` Daniel Jacobowitz
2004-02-02 23:31       ` Roland McGrath
2004-02-02 23:34         ` Daniel Jacobowitz
2004-02-02  6:19 ` Eli Zaretskii
2004-02-02  7:35   ` Roland McGrath
2004-02-02 17:29     ` Eli Zaretskii
2003-05-20  7:01 Roland McGrath

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=vt2he2mwfjy.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=roland@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