Trivial patch to remove dependency on host unsigned long type
[deliverable/binutils-gdb.git] / gdb / ctf.c
index 240e909aa11fa5c58612c11b11a72327cee6daec..23ee36d440a681dca553207c9a5e3dd391656e1b 100644 (file)
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -1212,6 +1212,8 @@ ctf_close (void)
   ctf_destroy ();
   xfree (trace_dirname);
   trace_dirname = NULL;
+
+  trace_reset_local_state ();
 }
 
 /* This is the implementation of target_ops method to_files_info.
@@ -1234,7 +1236,7 @@ ctf_fetch_registers (struct target_ops *ops,
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   int offset, regn, regsize, pc_regno;
-  char *regs = NULL;
+  gdb_byte *regs = NULL;
   struct bt_ctf_event *event = NULL;
   struct bt_iter_pos *pos;
 
@@ -1280,7 +1282,7 @@ ctf_fetch_registers (struct target_ops *ops,
       const struct bt_definition *array
        = bt_ctf_get_field (event, scope, "contents");
 
-      regs = bt_ctf_get_char_array (array);
+      regs = (gdb_byte *) bt_ctf_get_char_array (array);
       /* Assume the block is laid out in GDB register number order,
         each register with the size that it has in GDB.  */
       offset = 0;
@@ -1776,6 +1778,18 @@ ctf_traceframe_info (void)
          def = bt_ctf_get_field (event, scope, "length");
          r->length = (uint16_t) bt_ctf_get_uint64 (def);
        }
+      else if (strcmp (name, "tsv") == 0)
+       {
+         int vnum;
+         const struct bt_definition *scope
+           = bt_ctf_get_top_level_scope (event,
+                                         BT_EVENT_FIELDS);
+         const struct bt_definition *def;
+
+         def = bt_ctf_get_field (event, scope, "num");
+         vnum = (int) bt_ctf_get_int64 (def);
+         VEC_safe_push (int, info->tvars, vnum);
+       }
       else
        {
          warning (_("Unhandled trace block type (%s) "
This page took 0.024406 seconds and 4 git commands to generate.