From: Luis Machado <luis.machado@arm.com>
To: Guinevere Larsen <guinevere@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: fix 32 bit build
Date: Thu, 24 Apr 2025 14:21:53 +0100 [thread overview]
Message-ID: <4ddb13a5-00cf-48fd-ab53-39a5f837beb6@arm.com> (raw)
In-Reply-To: <e1ed9b97-7e8b-4c32-ab9a-009d9e4e07dd@redhat.com>
On 4/24/25 12:48, Guinevere Larsen wrote:
> On 4/24/25 8:47 AM, Guinevere Larsen wrote:
>> The recent commit dbbb9cfd3708a5b09b449c6cbc4d74dfec13904d added a
>> message using %ld to print an std::vector::size, which is of size_t
>> type. on 64 bit machines, size_t will be an unsigned long int, making
>> %ld work just fine, but on 32 bit ones, size_t will be unsigned int,
>> which causes build to fail.
Pedantically...
s/build/the build
>>
>> This commit fixes that by using %zu instead.
>
> After sending the email I realized I forgot the bug trailer. I'll add
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32901
>
> locally
>
>> ---
>> gdb/solib.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gdb/solib.c b/gdb/solib.c
>> index 5c5cfbdd9b9..85ec6bb2f1e 100644
>> --- a/gdb/solib.c
>> +++ b/gdb/solib.c
>> @@ -1230,7 +1230,7 @@ info_linker_namespace_command (const char *pattern, int from_tty)
>> break;
>> }
>> uiout->message
>> - (_ ("There are %ld libraries loaded in linker namespace [[%d]]\n"),
>> + (_ ("There are %zu libraries loaded in linker namespace [[%d]]\n"),
>> solibs_to_print.size (), ns);
>> uiout->message
>> (_ ("Displaying libraries for linker namespace [[%d]]:\n"), ns);
>>
>> base-commit: 8c8e5b1f1abfbce913783da0f1cd1f85c60bd445
>
>
Thanks for the quick patch. This is OK.
Tested-By: Luis Machado <luis.machado@arm.com>
Approved-By: Luis Machado <luis.machado@arm.com>
next prev parent reply other threads:[~2025-04-24 13:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 11:47 Guinevere Larsen
2025-04-24 11:48 ` Guinevere Larsen
2025-04-24 13:21 ` Luis Machado [this message]
2025-04-24 18:50 ` Guinevere Larsen
2025-04-25 11:05 ` Luis Machado
2025-04-25 11:40 ` Guinevere Larsen
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=4ddb13a5-00cf-48fd-ab53-39a5f837beb6@arm.com \
--to=luis.machado@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=guinevere@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