From 079ef6a1c166712894adfea3f5551175cbe068c0 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 6 Mar 2017 13:55:05 -0800 Subject: [PATCH] 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. --- gdb/solib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.2