From: Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de>
To: cagney@gnu.org
Cc: gdb@sources.redhat.com
Subject: Re: 32-bit gcore on amd64
Date: Thu, 19 Feb 2004 23:47:00 -0000 [thread overview]
Message-ID: <200402192347.AAA20515@faui1d.informatik.uni-erlangen.de> (raw)
Andrew Cagney wrote:
>This is more questions than answers. I'm trying to figure out how GDB
>should generate 32-bit core files on amd64 (i.e., get gmake check
>'RUNTESTFLAGS=--target_board=unix/-m32 gcore.exp' to pass).
>The problem is, everything I look at feels wrong.
Yup, same problem on s390x. In fact, the gcore tests are the only
failing tests when running the s390-on-s390x bi-arch test suite
(in addition to those that fail on native s390, of course).
[snip elfcore_write_prstatus]
>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.
>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 ...)
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
next reply other threads:[~2004-02-19 23:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 23:47 Ulrich Weigand [this message]
2004-02-20 18:56 ` Andrew Cagney
-- 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=200402192347.AAA20515@faui1d.informatik.uni-erlangen.de \
--to=weigand@i1.informatik.uni-erlangen.de \
--cc=cagney@gnu.org \
--cc=gdb@sources.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