This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] info_sharedlibrary_command patch
- To: <gdb-patches at sources dot redhat dot com>
- Subject: [RFA] info_sharedlibrary_command patch
- From: "Martin M. Hunt" <hunt at redhat dot com>
- Date: Mon, 19 Feb 2001 16:52:45 -0800 (PST)
info_sharedlibrary_command() currently casts all addresses to long before
printing them. Obviously this fails if pointers are larger than longs.
2001-02-19 Martin M. Hunt <hunt@redhat.com>
* solib.c (info_sharedlibrary_command): Don't assume pointers
are the same size of long, call longest_local_hex_string_custom().
Index: solib.c
===================================================================
RCS file: /cvs/src/src/gdb/solib.c,v
retrieving revision 1.34
diff -u -p -r1.34 solib.c
--- solib.c 2001/02/19 11:47:16 1.34
+++ solib.c 2001/02/20 00:19:51
@@ -638,14 +638,14 @@ info_sharedlibrary_command (char *ignore
printf_unfiltered ("%-*s", addr_width,
so->textsection != NULL
- ? local_hex_string_custom (
- (unsigned long) so->textsection->addr,
+ ? longest_local_hex_string_custom (
+ (LONGEST) so->textsection->addr,
addr_fmt)
: "");
printf_unfiltered ("%-*s", addr_width,
so->textsection != NULL
- ? local_hex_string_custom (
- (unsigned long) so->textsection->endaddr,
+ ? longest_local_hex_string_custom (
+ (LONGEST) so->textsection->endaddr,
addr_fmt)
: "");
printf_unfiltered ("%-12s", so->symbols_loaded ? "Yes" : "No");