Introduce gdb_dlhandle_up
authorTom Tromey <tom@tromey.com>
Fri, 7 Apr 2017 02:09:42 +0000 (20:09 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 12 Apr 2017 17:16:17 +0000 (11:16 -0600)
commit0e8621a0bec2d0840b853c4104614f345f0569ca
treefa5779e127946671f39a06a99e53de560ff0272b
parent67d89901506da74d00a482b7560237dce404b41c
Introduce gdb_dlhandle_up

This introduces gdb_dlhandle_up, a unique_ptr that can close a
dlopen'd library.  All the functions working with dlopen handles are
updated to use this new type.

I did not try to build this on Windows.

gdb/ChangeLog
2017-04-12  Tom Tromey  <tom@tromey.com>

* jit.c (struct jit_reader): Declare separately.  Add constructor
and destructor.  Change type of "handle".
(loaded_jit_reader): Define separately.
(jit_reader_load): Update.  New "new".
(jit_reader_unload_command): Use "delete".
* gdb-dlfcn.h (struct dlclose_deleter): New.
(gdb_dlhandle_up): New typedef.
(gdb_dlopen, gdb_dlsym): Update types.
(gdb_dlclose): Remove.
* gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
(gdb_dlsym): Change type of "handle".
(make_cleanup_dlclose): Remove.
(dlclose_deleter::operator()): Rename from gdb_dlclose.
* compile/compile-c-support.c (load_libcc): Update.
gdb/ChangeLog
gdb/compile/compile-c-support.c
gdb/gdb-dlfcn.c
gdb/gdb-dlfcn.h
gdb/jit.c
This page took 0.027508 seconds and 4 git commands to generate.