{
struct ctf_trace_file_writer *writer
= (struct ctf_trace_file_writer *) self;
- int i;
mode_t hmode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH;
/* Create DIRNAME. */
struct ctf_trace_file_writer *writer
= (struct ctf_trace_file_writer *) self;
uint32_t id;
- int32_t int32;
ctf_save_write_metadata (&writer->tcs, "\n");
ctf_save_write_metadata (&writer->tcs,
= (struct ctf_trace_file_writer *) self;
int32_t int32;
int64_t int64;
- unsigned int len;
const gdb_byte zero = 0;
/* Event Id. */
static void
ctf_write_definition_end (struct trace_file_writer *self)
{
- struct ctf_trace_file_writer *writer
- = (struct ctf_trace_file_writer *) self;
-
self->ops->frame_ops->end (self);
}
ctf_open_dir (const char *dirname)
{
struct bt_iter_pos begin_pos;
- struct bt_iter_pos *pos;
unsigned int count, i;
struct bt_ctf_event_decl * const *list;
for (i = 0; i < count; i++)
if (strcmp ("register", bt_ctf_get_decl_event_name (list[i])) == 0)
{
- unsigned int j;
const struct bt_ctf_field_decl * const *field_list;
const struct bt_declaration *decl;
ctf_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
struct bt_ctf_event *event = NULL;
struct bt_iter_pos *pos;
if (get_traceframe_number () != -1)
{
struct bt_iter_pos *pos;
- int i = 0;
enum target_xfer_status res;
/* Records the lowest available address of all blocks that
intersects the requested range. */
ULONGEST amt;
uint64_t maddr;
uint16_t mlen;
- enum bfd_endian byte_order
- = gdbarch_byte_order (target_gdbarch ());
const struct bt_definition *scope;
const struct bt_definition *def;
struct bt_ctf_event *event
{
const struct bt_definition *array
= bt_ctf_get_field (event, scope, "contents");
- const struct bt_declaration *decl
- = bt_ctf_get_decl_from_def (array);
gdb_byte *contents;
int k;
ctf_trace_find (struct target_ops *self, enum trace_find_type type, int num,
CORE_ADDR addr1, CORE_ADDR addr2, int *tpp)
{
- int ret = -1;
int tfnum = 0;
int found = 0;
- struct bt_iter_pos pos;
if (num == -1)
{
while (1)
{
- int id;
struct bt_ctf_event *event;
const char *name;
frame, extract memory range information, and return them in
traceframe_info. */
-static struct traceframe_info *
+static traceframe_info_up
ctf_traceframe_info (struct target_ops *self)
{
- struct traceframe_info *info = XCNEW (struct traceframe_info);
+ traceframe_info_up info (new traceframe_info);
const char *name;
struct bt_iter_pos *pos;
= bt_ctf_get_top_level_scope (event,
BT_EVENT_FIELDS);
const struct bt_definition *def;
- struct mem_range *r;
- r = VEC_safe_push (mem_range_s, info->memory, NULL);
def = bt_ctf_get_field (event, scope, "address");
- r->start = bt_ctf_get_uint64 (def);
+ CORE_ADDR start = bt_ctf_get_uint64 (def);
def = bt_ctf_get_field (event, scope, "length");
- r->length = (uint16_t) bt_ctf_get_uint64 (def);
+ int length = (uint16_t) bt_ctf_get_uint64 (def);
+
+ info->memory.emplace_back (start, length);
}
else if (strcmp (name, "tsv") == 0)
{
def = bt_ctf_get_field (event, scope, "num");
vnum = (int) bt_ctf_get_uint64 (def);
- VEC_safe_push (int, info->tvars, vnum);
+ info->tvars.push_back (vnum);
}
else
{