From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix jit-reader.h for multilib
Date: Sun, 11 Jan 2015 13:14:00 -0000 [thread overview]
Message-ID: <20150111131353.GA9107@host2.jankratochvil.net> (raw)
In-Reply-To: <87387htths.fsf@codesourcery.com>
On Sun, 11 Jan 2015 13:02:55 +0100, Yao Qi wrote:
> Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>
> > I got reported jit-reader.h is not multi-lib safe:
> >
> > --- /usr/include/gdb/jit-reader.h on x86_64 2015-01-07 11:54:27.705802129 -0500
> > +++ /usr/include/gdb/jit-reader.h on i686 2015-01-07 11:54:46.853774165 -0500
> > @@ -56,7 +56,7 @@ extern "C" {
> >
> > /* Represents an address on the target system. */
> >
> > -typedef unsigned long GDB_CORE_ADDR;
> > +typedef unsigned long long GDB_CORE_ADDR;
> >
> > /* Return status codes. */
> >
> >
> > multi-lib safety means that files with the same pathname (which is
> > /usr/include, contrary to /usr/lib vs. /usr/lib64 for example).
>
> I am sorry I can't understand what you mean here, can you elaborate?
Sorry I see I haven't finished the sentence, it should have been:
# multi-lib safety means that files with the same pathname (which is
# /usr/include, contrary to /usr/lib vs. /usr/lib64 for example)
# contain exactly the same content.
See also:
https://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks#File_conflicts
When we discuss it personally I do not think multilib should be applied to the
GDB package as there is nothing like /usr/lib{,64}/libgdb.so. There is only
/usr/bin/gdb and that has always just one arch on one system. So installing
gdb.i686 and gdb.x86_64 simultaneously does not have any benefits / makes
sense. But despites this I need it for Red Hat packaging so I am fine to also
keep it just as a downstream patch. OTOH I guess other OS packagers may also
face it so it may be easier for everyone to do it upstream.
> Do you mean sizeof (GDB_CORE_ADDR) should be the same on different
> multi-lib (i686 vs x86_64)?
For multilib it does not matter what is the runtime GDB_CORE_ADDR type but the
text defining it (in /usr/include/gdb/jit-reader.h) has to be the same for
archs sharing multilib.
IIUC GDB requires for GDB_CORE_ADDR:
* sizeof (GDB_CORE_ADDR) >= sizeof (CORE_ADDR)
* sizeof (GDB_CORE_ADDR) is preferrably the smallest available size
Jan
next prev parent reply other threads:[~2015-01-11 13:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 17:36 Jan Kratochvil
2015-01-11 12:02 ` Yao Qi
2015-01-11 13:14 ` Jan Kratochvil [this message]
2015-01-12 2:33 ` Yao Qi
2015-01-12 8:42 ` Jan Kratochvil
2015-01-12 9:57 ` Joel Brobecker
2015-06-03 19:42 ` ping: " Jan Kratochvil
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=20150111131353.GA9107@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).