This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFA]: printing symbols with > 32 bit addrs.


 
Oddly enough, info functions seems to fail to print addresses of
non-debugging symbols when addresses are greater than 32 bits.
This patch seems a bit crude, so I'm wondering if anyone has
a better suggestion.
	
2001-02-15  Michael Snyder  <msnyder@mvstp600e.cygnus.com>

	* symtab.c (print_msymbol_info): Print addresses > 32 bits.

Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.28
diff -c -3 -p -r1.28 symtab.c
*** symtab.c	2001/01/30 02:49:36	1.28
--- symtab.c	2001/02/15 22:41:21
*************** print_symbol_info (namespace_enum kind, 
*** 2652,2660 ****
  static void
  print_msymbol_info (struct minimal_symbol *msymbol)
  {
!   printf_filtered ("	%08lx  %s\n",
! 		   (unsigned long) SYMBOL_VALUE_ADDRESS (msymbol),
! 		   SYMBOL_SOURCE_NAME (msymbol));
  }
  
  /* This is the guts of the commands "info functions", "info types", and
--- 2652,2665 ----
  static void
  print_msymbol_info (struct minimal_symbol *msymbol)
  {
!   if (TARGET_ADDR_BIT <= 32)
!     printf_filtered ("	%08lx  %s\n",
! 		     (unsigned long) SYMBOL_VALUE_ADDRESS (msymbol),
! 		     SYMBOL_SOURCE_NAME (msymbol));
!   else
!     printf_filtered ("	%016llx  %s\n",
! 		     (LONGEST) SYMBOL_VALUE_ADDRESS (msymbol),
! 		     SYMBOL_SOURCE_NAME (msymbol));
  }
  
  /* This is the guts of the commands "info functions", "info types", and

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]