This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] info breakpoints: handle 64-bit addresses
- To: gdb-patches at sources dot redhat dot com, cagney at cygnus dot com
- Subject: [RFA] info breakpoints: handle 64-bit addresses
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Wed, 14 Mar 2001 18:05:19 -0800
- Organization: Red Hat
I know I'm the maintainer, but I'm gonna ask for approval anyway,
to make sure I haven't violated either portability or aesthetic standards.
2001-03-14 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (print_one_breakpoint): Handle 64-bit addresses.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.27
diff -c -3 -p -r1.27 breakpoint.c
*** breakpoint.c 2001/03/06 08:21:05 1.27
--- breakpoint.c 2001/03/15 02:15:37
*************** print_one_breakpoint (struct breakpoint
*** 3156,3162 ****
/* 5 and 6 */
strcpy (wrap_indent, " ");
if (addressprint)
! strcat (wrap_indent, " ");
switch (b->type)
{
case bp_none:
--- 3156,3167 ----
/* 5 and 6 */
strcpy (wrap_indent, " ");
if (addressprint)
! {
! if (TARGET_ADDR_BIT <= 32)
! strcat (wrap_indent, " ");
! else
! strcat (wrap_indent, " ");
! }
switch (b->type)
{
case bp_none:
*************** print_one_breakpoint (struct breakpoint
*** 3330,3341 ****
#else
if (addressprint)
{
annotate_field (4);
! /* FIXME-32x64: need a print_address_numeric with
! field width */
! printf_filtered ("%s ",
! local_hex_string_custom
! ((unsigned long) b->address, "08l"));
}
annotate_field (5);
*last_addr = b->address;
--- 3335,3350 ----
#else
if (addressprint)
{
+ char *tmp;
+
annotate_field (4);
!
! if (TARGET_ADDR_BIT <= 32)
! tmp = longest_local_hex_string_custom (b->address, "08l");
! else
! tmp = longest_local_hex_string_custom (b->address, "016l");
!
! printf_filtered ("%s ", tmp);
}
annotate_field (5);
*last_addr = b->address;
*************** breakpoint_1 (int bnum, int allflag)
*** 3570,3576 ****
if (addressprint)
{
annotate_field (4);
! ui_out_table_header (uiout, 10, ui_left, "Address"); /* 5 */
}
annotate_field (5);
ui_out_table_header (uiout, 40, ui_noalign, "What"); /* 6 */
--- 3579,3588 ----
if (addressprint)
{
annotate_field (4);
! if (TARGET_ADDR_BIT <= 32)
! ui_out_table_header (uiout, 10, ui_left, "Address"); /* 5 */
! else
! ui_out_table_header (uiout, 18, ui_left, "Address"); /* 5 */
}
annotate_field (5);
ui_out_table_header (uiout, 40, ui_noalign, "What"); /* 6 */
*************** breakpoint_1 (int bnum, int allflag)
*** 3587,3593 ****
if (addressprint)
{
annotate_field (4);
! printf_filtered ("Address ");
}
annotate_field (5);
printf_filtered ("What\n");
--- 3599,3608 ----
if (addressprint)
{
annotate_field (4);
! if (TARGET_ADDR_BIT <= 32)
! printf_filtered ("Address ");
! else
! printf_filtered ("Address ");
}
annotate_field (5);
printf_filtered ("What\n");