Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de>
Cc: gdb@sources.redhat.com
Subject: Re: 32-bit gcore on amd64
Date: Fri, 20 Feb 2004 18:56:00 -0000	[thread overview]
Message-ID: <4036585A.8010805@gnu.org> (raw)
In-Reply-To: <200402192347.AAA20515@faui1d.informatik.uni-erlangen.de>


>>>This function totally assumes that it's creating a 64-bit note section. 
>>>How does BFD figure out that it should instead use 32-bit note code?
> 
> 
> It doesn't, as far as I can see.

Ah, "good", at least I wasn't missing anything.

>>>As a somewhat amazing PS: bigcore.exp does pass 32-bit mode on 
>>>AMD-64 ->> the 32-bit read path is ok.
> 
> 
> That's because there are tons of special-cased code pieces in
> the *read* path to handle this; check for HAVE_PRPSINFO32_T
> and HAVE_PRSTATUS32_T in bfd/elf.c.  (This relies on sys/procfs.h
> to provide both 32-bit and 64-bit versions -- reading cores
> didn't work initially on s390x because those were missing.)
> 
> Such special cases are completely absent from the write path,
> however.
> 
> (The other question is whether these 32-on-64 special cases are
> really the right way to solve the problem -- a generic solution
> should preferably solve the any-on-any cross-gdb core dump 
> access problem ...)

That's why I'm thinking that:

> #4  0x00000000004583f8 in linux_make_note_section (obfd=0x87fc90,
>     note_size=0x7fbfffed8c) at /home/cygnus/cagney/GDB/src/gdb/linux-proc.c:302
> 
> Here, I'm thinking that if this is to be portable, this would have to be an architecture method (also parameterized with the target).

belongs in the architecture vector.

Andrew



  reply	other threads:[~2004-02-20 18:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-19 23:47 Ulrich Weigand
2004-02-20 18:56 ` Andrew Cagney [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-02-19 23:12 Andrew Cagney
2004-02-19 23:24 ` Daniel Jacobowitz
2004-02-20  0:17   ` Andrew Cagney
2004-02-21  2:25     ` Daniel Jacobowitz
2004-02-20 19:59 ` Mark Kettenis
2004-02-20 21:06   ` Andrew Cagney
2004-02-20 23:44     ` Mark Kettenis

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=4036585A.8010805@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=weigand@i1.informatik.uni-erlangen.de \
    /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