jit: c++-ify gdb_block
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 16 Dec 2019 21:30:50 +0000 (16:30 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 16 Dec 2019 21:30:50 +0000 (16:30 -0500)
commitb61121178ec07f9da1242e439fe1a23a314ad30e
treea8049a4df7e4ab02933f0ee393ec43ea3c53c3c0
parent1b61f46da5e55bf2df243215f34ffbca4bcf6d9e
jit: c++-ify gdb_block

Add a constructor to gdb_block, change the name field to be a
gdb::unique_xmalloc_ptr.  This is in preparation for using an
std::forward_list<gdb_block> in the next patch.

gdb/ChangeLog:

* jit.c (struct gdb_block): Add constructor, initialize
real_block and next fields.
<name>: Change type to gdb::unique_xmalloc_ptr.
(struct gdb_symtab) <~gdb_symtab>: Free blocks with delete.
(jit_block_open_impl): Allocate gdb_block with new.
(finalize_symtab): Adjust to gdb::unique_xmalloc_ptr.
gdb/ChangeLog
gdb/jit.c