Skip to content

Commit c29af2b

Browse files
committed
gdb/solib: make solib_ops::solib_create_inferior_hook optional
The solib-target implementation of solib_create_inferior_hook is empty. Make that method / function pointer optional. Change-Id: Ie27b8d2c4fc6df74069ac8f88fbe69cf88a6662d Reviewed-By: Guinevere Larsen <[email protected]>
1 parent d5ef1fc commit c29af2b

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

gdb/solib-target.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,6 @@ solib_target_current_sos (void)
256256
return sos;
257257
}
258258

259-
static void
260-
solib_target_solib_create_inferior_hook (int from_tty)
261-
{
262-
/* Nothing needed. */
263-
}
264-
265259
static void
266260
solib_target_relocate_section_addresses (solib &so, target_section *sec)
267261
{
@@ -396,7 +390,7 @@ const solib_ops solib_target_so_ops =
396390
solib_target_relocate_section_addresses,
397391
nullptr,
398392
nullptr,
399-
solib_target_solib_create_inferior_hook,
393+
nullptr,
400394
solib_target_current_sos,
401395
nullptr,
402396
solib_target_in_dynsym_resolve_code,

gdb/solib.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,8 @@ solib_create_inferior_hook (int from_tty)
13171317
{
13181318
const solib_ops *ops = gdbarch_so_ops (current_inferior ()->arch ());
13191319

1320-
ops->solib_create_inferior_hook (from_tty);
1320+
if (ops->solib_create_inferior_hook != nullptr)
1321+
ops->solib_create_inferior_hook (from_tty);
13211322
}
13221323

13231324
/* See solib.h. */

0 commit comments

Comments
 (0)