gdbserver: Use std::list for all_dlls
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 14 Oct 2017 13:09:21 +0000 (09:09 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Sat, 14 Oct 2017 13:09:22 +0000 (09:09 -0400)
commitc9cb8905b489d094c6c42e103d4bc6e231e00cf0
treeb8bfecc29cc70d3e58901eff2a358ec824202437
parent2098b39391a5ade9ed308d76f2dfc7ceedd2d9a3
gdbserver: Use std::list for all_dlls

As a small step towards removing inferior_list/inferior_list_entry, this
patch replaces the usage of inferior_list for the list of dlls by an
std::list.  The dll_info type now uses an std::string for name and has a
simple constructor.

I am able to build gdbserver with mingw on Linux, but I am not able to
test this on a Windows machine (the only platform that uses this code).

gdb/gdbserver/ChangeLog:

* dll.h: Include <list>.
(struct dll_info): Add constructor.
<entry>: Remove field.
(all_dlls): Change type to std::list<dll_info>.
* dll.c: Include <algorithm>.
(get_dll): Remove macro.
(all_dlls): Change type to std::list<dll_info *>.
(free_one_dll): Remove.
(match_dll): Likewise.
(loaded_dll): Adjust.
(unloaded_dll): Adjust to all_dlls type change, use
std::find_if.  Inline code from match_dll.
(clear_dlls): Adjust to all_dlls type change.
* server.c (emit_dll_description): Remove.
(handle_qxfer_libraries): Adjust to all_dlls type change,
integrate emit_dll_description's functionality.
gdb/gdbserver/ChangeLog
gdb/gdbserver/dll.c
gdb/gdbserver/dll.h
gdb/gdbserver/server.c
This page took 0.031897 seconds and 4 git commands to generate.