This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: tracepoint.c memory range requests


How's this?

gdb/ChangeLog:
2005-11-18  Jim Blandy  <jimb@redhat.com>

	* tracepoint.c (stringify_collection_list): Indicate absolute
	memory ranges by using "-1" as the memory range's base register
	number, not "FFFFFFFF".
gdb/ChangeLog:
2005-11-18  Jim Blandy  <jimb@redhat.com>

	* tracepoint.c (stringify_collection_list): Indicate absolute
	memory ranges by using "-1" as the memory range's base register
	number, not "FFFFFFFF".

Index: gdb/tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.80
diff -c -p -r1.80 tracepoint.c
*** gdb/tracepoint.c	19 Nov 2005 04:44:43 -0000	1.80
--- gdb/tracepoint.c	19 Nov 2005 05:24:58 -0000
*************** stringify_collection_list (struct collec
*** 1437,1446 ****
  	  end = temp_buf;
  	}
  
!       sprintf (end, "M%X,%s,%lX", 
! 	       list->list[i].type,
! 	       tmp2,
! 	       (long) (list->list[i].end - list->list[i].start));
  
        count += strlen (end);
        end = temp_buf + count;
--- 1437,1453 ----
  	  end = temp_buf;
  	}
  
!       {
!         bfd_signed_vma length = list->list[i].end - list->list[i].start;
! 
!         /* The "%X" conversion specifier expects an unsigned argument,
!            so passing -1 to it directly gives you "FFFFFFFF" (or more,
!            depending on sizeof (unsigned)).  Special-case it.  */
!         if (list->list[i].type == -1)
!           sprintf (end, "M-1,%s,%lX", tmp2, (long) length);
!         else
!           sprintf (end, "M%X,%s,%lX", list->list[i].type, tmp2, (long) length);
!       }
  
        count += strlen (end);
        end = temp_buf + count;

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