summaryrefslogtreecommitdiff
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
commit5ce0b954dcc13ea86f832476de5de421d0197486 (patch)
tree990f5e9ce38da78eff1f168cffd0932baacb82e4
parentef4ba80932ed6e662efc9882b5fbfae9e42b1e9f (diff)
downloadgdb-5ce0b954dcc13ea86f832476de5de421d0197486.tar.gz
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".
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/tracepoint.c15
2 files changed, 17 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 362dd426e7d..fa8f07fcd39 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+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".
+
2005-11-19 Randolph Chung <tausq@debian.org>
* dwarf2loc.c (dwarf2_tracepoint_var_ref): Remove extra add for
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 1858681314c..42326638f03 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;