This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: tracepoint.c memory range requests
- From: Jim Blandy <jimb at red-bean dot com>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 18 Nov 2005 21:26:52 -0800
- Subject: Re: tracepoint.c memory range requests
- References: <8f2776cb0511181737w1f99beb0rec6d4cd40dc7c131@mail.gmail.com> <437E88F0.3070206@redhat.com> <8f2776cb0511182039r19b34aecrbc77d94fa1daaafe@mail.gmail.com>
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;