Skip to content

Commit a153733

Browse files
author
Guinevere Larsen
committed
gdb: fix 32 bit build
The recent commit dbbb9cf 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 <[email protected]> Approved-By: Luis Machado <[email protected]>
1 parent 4868f28 commit a153733

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gdb/solib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ info_linker_namespace_command (const char *pattern, int from_tty)
12301230
break;
12311231
}
12321232
uiout->message
1233-
(_ ("There are %ld libraries loaded in linker namespace [[%d]]\n"),
1233+
(_ ("There are %zu libraries loaded in linker namespace [[%d]]\n"),
12341234
solibs_to_print.size (), ns);
12351235
uiout->message
12361236
(_ ("Displaying libraries for linker namespace [[%d]]:\n"), ns);

0 commit comments

Comments
 (0)