jit: c++-ify gdb_symtab
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 16 Dec 2019 21:30:49 +0000 (16:30 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 16 Dec 2019 21:30:49 +0000 (16:30 -0500)
commit89867184294da399078d77bae3cd4b27ce640f27
treef5e655fde291286da3523a949b2e65cf99210857
parentd043f8c867f85f1c36cc957da8204fe2907b3aea
jit: c++-ify gdb_symtab

This patch makes the gdb_symtab bit more c++y, in preparation for the
next patch that will use an std::forward_list<gdb_symtab>.  It changes
the fields to use automatic memory management, in the form of
std::string and gdb::unique_xmalloc_ptr, and adds a constructor and a
destructor.

gdb/ChangeLog:

* jit.c (struct gdb_symtab): Add constructor, destructor,
initialize fields.
<linetable>: Change type to unique_xmalloc_ptr.
<file_name>: Change type to std::string.
(jit_symtab_open_impl): Allocate gdb_symtab with new.
(jit_symtab_line_mapping_add_impl): Adjust.
(finalize_symtab): Adjust, call delete on stab.
gdb/ChangeLog
gdb/jit.c
This page took 0.023583 seconds and 4 git commands to generate.