diff options
author | Tom Tromey <tromey@adacore.com> | 2020-04-08 14:33:35 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-08 14:47:58 -0600 |
commit | a816ba1897ae6939518d628cb58d6281c9b64a4f (patch) | |
tree | 179eba68f717d61dac25ea5221d8c834944fdfe4 /gdb/windows-nat.c | |
parent | a00caa12790706017c9331ad984b4f6b102db1b6 (diff) | |
download | gdb-a816ba1897ae6939518d628cb58d6281c9b64a4f.zip gdb-a816ba1897ae6939518d628cb58d6281c9b64a4f.tar.gz gdb-a816ba1897ae6939518d628cb58d6281c9b64a4f.tar.bz2 |
Share handle_load_dll and handle_unload_dll declarations
This changes nat/windows-nat.h to declare handle_load_dll and
handle_unload_dll. The embedding application is required to implement
these -- while the actual code was difficult to share due to some
other differences between the two programs, sharing the declaration
lets a subsequent patch share more code that uses these as callbacks.
gdb/ChangeLog
2020-04-08 Tom Tromey <tromey@adacore.com>
* windows-nat.c (windows_nat::handle_load_dll)
(windows_nat::handle_unload_dll): Rename. No longer static.
* nat/windows-nat.h (handle_load_dll, handle_unload_dll):
Declare.
gdbserver/ChangeLog
2020-04-08 Tom Tromey <tromey@adacore.com>
* win32-low.c (windows_nat::handle_load_dll): Rename from
handle_load_dll. No longer static.
(windows_nat::handle_unload_dll): Rename from handle_unload_dll.
No longer static.
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r-- | gdb/windows-nat.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 7ccd124..8181168 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -870,15 +870,10 @@ windows_make_so (const char *name, LPVOID load_addr) return so; } -/* Handle a DLL load event, and return 1. - - This function assumes that this event did not occur during inferior - initialization, where their event info may be incomplete (see - do_initial_windows_stuff and windows_add_all_dlls for more info - on how we handle DLL loading during that phase). */ +/* See nat/windows-nat.h. */ -static void -handle_load_dll () +void +windows_nat::handle_load_dll () { LOAD_DLL_DEBUG_INFO *event = ¤t_event.u.LoadDll; const char *dll_name; @@ -911,16 +906,10 @@ windows_free_so (struct so_list *so) xfree (so); } -/* Handle a DLL unload event. - Return 1 if successful, or zero otherwise. - - This function assumes that this event did not occur during inferior - initialization, where their event info may be incomplete (see - do_initial_windows_stuff and windows_add_all_dlls for more info - on how we handle DLL loading during that phase). */ +/* See nat/windows-nat.h. */ -static void -handle_unload_dll () +void +windows_nat::handle_unload_dll () { LPVOID lpBaseOfDll = current_event.u.UnloadDll.lpBaseOfDll; struct so_list *so; |