diff options
author | Guinevere Larsen <guinevere@redhat.com> | 2025-04-24 08:42:12 -0300 |
---|---|---|
committer | Guinevere Larsen <guinevere@redhat.com> | 2025-04-25 08:43:13 -0300 |
commit | a1537331abaf66fddd3553dd827381a01bcda46c (patch) | |
tree | d89df55bc6847b374ee63eff964844da49e83160 /gdb/solib.c | |
parent | 4868f287d036a12b09541757a046ce4f8f6aac44 (diff) | |
download | binutils-a1537331abaf66fddd3553dd827381a01bcda46c.zip binutils-a1537331abaf66fddd3553dd827381a01bcda46c.tar.gz binutils-a1537331abaf66fddd3553dd827381a01bcda46c.tar.bz2 |
gdb: fix 32 bit build
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 the build to fail.
This commit fixes that by using %zu instead.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32901
Tested-By: Luis Machado <luis.machado@arm.com>
Approved-By: Luis Machado <luis.machado@arm.com>
Diffstat (limited to 'gdb/solib.c')
-rw-r--r-- | gdb/solib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/solib.c b/gdb/solib.c index 5c5cfbd..85ec6bb 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); |