]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/solib-null.c
* win32-low.c (win32_add_one_solib): If the dll name is
[thirdparty/binutils-gdb.git] / gdb / solib-null.c
CommitLineData
915a2d21
KB
1/* Definitions for targets without shared libraries for GDB, the GNU Debugger.
2
0fb0cc75 3 Copyright (C) 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
915a2d21
KB
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
a9762ec7 9 the Free Software Foundation; either version 3 of the License, or
915a2d21
KB
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
a9762ec7 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
915a2d21
KB
19
20#include "defs.h"
21#include "solist.h"
22
23static struct so_list *
24null_current_sos (void)
25{
26 return NULL;
27}
28
29static void
30null_special_symbol_handling (void)
31{
32}
33
34static void
35null_solib_create_inferior_hook (void)
36{
37}
38
39static void
40null_clear_solib (void)
41{
42}
43
44static void
45null_free_so (struct so_list *so)
46{
47 xfree (so->lm_info);
48}
49
50
51static void
52null_relocate_section_addresses (struct so_list *so,
0542c86d 53 struct target_section *sec)
915a2d21
KB
54{
55}
56
57static int
58null_open_symbol_file_object (void *from_ttyp)
59{
60 return 0;
61}
62
63static int
64null_in_dynsym_resolve_code (CORE_ADDR pc)
65{
66 return 0;
67}
68
69static struct target_so_ops null_so_ops;
70
71extern initialize_file_ftype _initialize_null_solib; /* -Wmissing-prototypes */
72
73void
74_initialize_null_solib (void)
75{
76 null_so_ops.relocate_section_addresses = null_relocate_section_addresses;
77 null_so_ops.free_so = null_free_so;
78 null_so_ops.clear_solib = null_clear_solib;
79 null_so_ops.solib_create_inferior_hook = null_solib_create_inferior_hook;
80 null_so_ops.special_symbol_handling = null_special_symbol_handling;
81 null_so_ops.current_sos = null_current_sos;
82 null_so_ops.open_symbol_file_object = null_open_symbol_file_object;
83 null_so_ops.in_dynsym_resolve_code = null_in_dynsym_resolve_code;
831a0c44 84 null_so_ops.bfd_open = solib_bfd_open;
915a2d21
KB
85
86 /* Set current_target_so_ops to null_so_ops if not already set. */
87 if (current_target_so_ops == 0)
88 current_target_so_ops = &null_so_ops;
89}