From: John Baldwin Date: Mon, 6 Mar 2017 21:55:05 +0000 (-0800) Subject: Make 'info sharedlibrary' more readable with CHERI. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=079ef6a1c166712894adfea3f5551175cbe068c0;p=thirdparty%2Fbinutils-gdb.git Make 'info sharedlibrary' more readable with CHERI. In particular, use the smaller of address or pointer bit count to determine the size of the address field. --- diff --git a/gdb/solib.c b/gdb/solib.c index adeb3a1a411..7618cde05b1 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -1036,7 +1036,8 @@ info_sharedlibrary_command (const char *pattern, int from_tty) } /* "0x", a little whitespace, and two hex digits per byte of pointers. */ - addr_width = 4 + (gdbarch_ptr_bit (gdbarch) / 4); + addr_width = 4 + (std::min (gdbarch_ptr_bit (gdbarch), + gdbarch_addr_bit (gdbarch)) / 4); update_solib_list (from_tty);