aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2005-11-19 18:57:28 +0000
committerJim Blandy <jimb@codesourcery.com>2005-11-19 18:57:28 +0000
commitd194871675d5430f0993982376dbde351ea12539 (patch)
treeed66e3665a88542d11c81fb503c02160d949ca1b /gdb/tracepoint.c
parent9c23835799161e27e2223564295f53c0a97d5689 (diff)
downloadgdb-d194871675d5430f0993982376dbde351ea12539.zip
gdb-d194871675d5430f0993982376dbde351ea12539.tar.gz
gdb-d194871675d5430f0993982376dbde351ea12539.tar.bz2
2005-11-19 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".
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 1858681..4232663 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1437,10 +1437,17 @@ stringify_collection_list (struct collection_list *list, char *string)
end = temp_buf;
}
- sprintf (end, "M%X,%s,%lX",
- list->list[i].type,
- tmp2,
- (long) (list->list[i].end - list->list[i].start));
+ {
+ 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;