This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Word size confusion in display_debug_ranges() in binutils-2.18/binutils/dwarf.c


Hi Jay,

This patch seems to have changed the behaviour of
display_debug_ranges(), such that the range start and end values it
prints no longer include the base address. The relevant lines from the
patch are:

-             printf ("    %8.8lx %8.8lx %8.8lx",
-                     offset, begin + base_address, end + base_address);

+             print_dwarf_vma (begin, pointer_size);
+             print_dwarf_vma (end, pointer_size);

Oops, so it does. Fixed with the attached patch.


Cheers
  Nick

binutils/ChangeLog
2009-03-27  Nick Clifton  <nickc@redhat.com>

	* dwarf.c (display_debug_ranges): Add the base address to the
	displayed values for 'Begin' and 'End'.

Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.43
diff -c -3 -p -r1.43 dwarf.c
*** binutils/dwarf.c	20 Mar 2009 00:05:37 -0000	1.43
--- binutils/dwarf.c	27 Mar 2009 12:40:54 -0000
*************** display_debug_ranges (struct dwarf_secti
*** 3576,3592 ****
  		  break;
  		}
  
- 	      print_dwarf_vma (begin, pointer_size);
- 	      print_dwarf_vma (end, pointer_size);
- 
  	      /* Check base address specifiers.  */
  	      if (begin == (dwarf_vma) -1 && end != (dwarf_vma) -1)
  		{
  		  base_address = end;
  		  printf ("(base address)\n");
  		  continue;
  		}
  
  	      if (begin == end)
  		fputs (_("(start == end)"), stdout);
  	      else if (begin > end)
--- 3576,3594 ----
  		  break;
  		}
  
  	      /* Check base address specifiers.  */
  	      if (begin == (dwarf_vma) -1 && end != (dwarf_vma) -1)
  		{
  		  base_address = end;
+ 		  print_dwarf_vma (begin, pointer_size);
+ 		  print_dwarf_vma (end, pointer_size);
  		  printf ("(base address)\n");
  		  continue;
  		}
  
+ 	      print_dwarf_vma (begin + base_address, pointer_size);
+ 	      print_dwarf_vma (end + base_address, pointer_size);
+ 
  	      if (begin == end)
  		fputs (_("(start == end)"), stdout);
  	      else if (begin > end)

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