Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: Binutils Development <binutils@sourceware.org>,
	       GDB Patches <gdb-patches@sourceware.org>,
	       Jan Kratochvil <jan.kratochvil@redhat.com>,
	       "H. J. Lu" <hongjiu.lu@intel.com>
Subject: Re: [PATCH 1/3] Implement new Linux target vectors on BFD
Date: Thu, 31 Jan 2013 17:19:00 -0000	[thread overview]
Message-ID: <510AA7A3.4010702@redhat.com> (raw)
In-Reply-To: <m3vcaey63y.fsf@redhat.com>

On 01/30/2013 04:42 PM, Sergio Durigan Junior wrote:
> On Wednesday, January 30 2013, Alan Modra wrote:

>> Duplicating targets isn't a really good idea.

> Hm, thank you for the explanation, it didn't occurred to me.

Indeed.  Thanks.

>> You may have noticed that we've already made a mess of targets for
>> ARM, i386, x86_64 and powerpc.  I'd rather not see the same happen for
>> powerpc64 without a really good reason.
>
> Right.  Now I am stuck with this, then.  While Pedro wants this feature
> to be Linux-specific, now there is this problem with target
> duplication.

It's not about what I want.  It's about the fact that different
targets/OSs have different prpsinfo etc. structures.

> I will look for other solutions here, but if you alreay have some idea
> on how to handle it, I'd be glad to read.

My idea is to cut the middle man.  AFAICS, only GDB wants to generate
core files presently.  GDB has a whole OS/arch sniffer mechanism in
place, where we know which target/arch/OS it is that is being
debugged.  So rather than having bfd know which prpsinfo layout we
want, and shoehorn different elf_internal_prpsinfo & friends
structures through the elfcore_write_note/va_args generic interface,
skip the bfd vector, and add new entry points in bfd for each possible
output, and have GDB pick the one it needs.  Since most Linux archs
have the same prpsinfo32 and prpsinfo64 layout, we just put the
default Linux implementations in elf.c.  PPC32, being the odd one out,
gets its own implementation.  I'll send updated bfd and gdb patches
as response to this email.

-- 
Pedro Alves


  reply	other threads:[~2013-01-31 17:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30  6:53 Sergio Durigan Junior
2013-01-30  9:16 ` Alan Modra
2013-01-30 16:43   ` Sergio Durigan Junior
2013-01-31 17:19     ` Pedro Alves [this message]
2013-01-31 23:04       ` [PATCH 1/2] New entry points for writing Linux NT_PRPSINFO notes Pedro Alves
2013-02-01  6:37         ` Alan Modra
2013-02-03  2:51           ` Sergio Durigan Junior
2013-02-04 18:31           ` Sergio Durigan Junior
2013-01-31 23:05       ` [PATCH 2/2] Put more info in NT_PRPSINFO Linux notes Pedro Alves
2013-02-03 21:05         ` Sergio Durigan Junior
2013-02-04 16:36           ` Pedro Alves
2013-02-04 18:41             ` Sergio Durigan Junior
2013-01-30 16:44   ` [PATCH 1/3] Implement new Linux target vectors on BFD H.J. Lu

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=510AA7A3.4010702@redhat.com \
    --to=palves@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=hongjiu.lu@intel.com \
    --cc=jan.kratochvil@redhat.com \
    --cc=sergiodj@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