aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/nat')
-rw-r--r--gdb/nat/linux-btrace.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c
index b51e70f..ef291ec 100644
--- a/gdb/nat/linux-btrace.c
+++ b/gdb/nat/linux-btrace.c
@@ -544,13 +544,11 @@ linux_enable_bts (ptid_t ptid, const struct btrace_config_bts *conf)
bts->bts.size = size;
bts->bts.data_head = &header->data_head;
- bts->bts.mem = (const uint8_t *) data.get () + data_offset;
+ bts->bts.mem = (const uint8_t *) data.release () + data_offset;
bts->bts.last_head = 0ull;
bts->header = header;
bts->file = fd.release ();
- data.release ();
-
tinfo->conf.bts.size = (unsigned int) size;
return tinfo.release ();
}
@@ -667,11 +665,10 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf)
pt->pt.size = aux.size ();
pt->pt.mem = (const uint8_t *) aux.release ();
pt->pt.data_head = &header->aux_head;
- pt->header = header;
+ pt->header = (struct perf_event_mmap_page *) data.release ();
+ gdb_assert (pt->header == header);
pt->file = fd.release ();
- data.release ();
-
tinfo->conf.pt.size = (unsigned int) pt->pt.size;
return tinfo.release ();
}