From: Pedro Alves <palves@redhat.com>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>, gdb-patches@sourceware.org
Cc: Weimin Pan <weimin.pan@oracle.com>
Subject: Re: Fix gdb 8.1 Solaris/SPARC compilation (PR build/22206)
Date: Tue, 26 Sep 2017 11:33:00 -0000 [thread overview]
Message-ID: <cdfd108a-3460-bd5d-8a97-9f3074883b65@redhat.com> (raw)
In-Reply-To: <yddfub9x0rp.fsf@CeBiTec.Uni-Bielefeld.DE>
On 09/26/2017 10:33 AM, Rainer Orth wrote:
> Apart from the capitalization differences that trip g++, the names
> differ (PSR_VER vs. PSR_VERS), PSR_XCC is included in Solaris' PSR_RSV,
> and there's no PSR_V8PLUS on Solaris either.
What you've done is fine with me to unbreak the build. Though
I'd prefer if we renamed those to avoid ever relying on host
symbols, anywhere. Like:
- #define PSR_S ...
+ #define SPARC64_PSR_S ...
etc.
>
> /vol/src/gnu/gdb/gdb/local/gdb/sparc64-tdep.c: In function âint adi_tag_fd()â:
> /vol/src/gnu/gdb/gdb/local/gdb/sparc64-tdep.c:296:63: error: format â%dâ expects argument of type âintâ, but argument 4 has type âpid_t {aka long int}â [-Werror=format=]
> snprintf (cl_name, sizeof(cl_name), "/proc/%d/adi/tags", pid);
> ^
> /vol/src/gnu/gdb/gdb/local/gdb/sparc64-tdep.c: In function âbool adi_is_addr_mapped(CORE_ADDR, std::size_t)â:
> /vol/src/gnu/gdb/gdb/local/gdb/sparc64-tdep.c:314:64: error: format â%dâ expects argument of type âintâ, but argument 4 has type âpid_t {aka long int}â [-Werror=format=]
> snprintf (filename, sizeof filename, "/proc/%d/adi/maps", pid);
> ^
>
> You cannot always print a pid_t, which can be either int or long on
> Solaris, as an int.
>
> Obviously, the ADI patch which modifies code shared between all SPARC
> targets, hasn't been tested on anything but Linux/SPARC.
>
> The patch below includes the minimal fixes necessary to unbreak the
> Solaris/SPARC build.
>
> However, as detailed in the PR, there's more breakage here: apart from
> not bothering to implement ADI support on Solaris, the code contains
> several more changes to shared/common SPARC code that are simply wrong
> on anything but Linux/SPARC.
>
> The patch was tested on sparcv9-sun-solaris2.10 and
> sparcv9-sun-solaris2.11.4 (build and gdb/gdb gdb/gdb smoke test only).
>
> Ok for mainline?
OK.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-09-26 11:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 9:33 Rainer Orth
2017-09-26 11:33 ` Pedro Alves [this message]
2017-09-26 13:04 ` Rainer Orth
2017-09-26 16:06 ` Wei-min Pan
2017-09-27 9:16 ` Rainer Orth
2017-09-27 20:43 ` Wei-min Pan
2017-09-28 12:40 ` Rainer Orth
2017-09-28 14:19 ` Pedro Alves
2017-09-28 14:37 ` Rainer Orth
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=cdfd108a-3460-bd5d-8a97-9f3074883b65@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
--cc=weimin.pan@oracle.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