Commit | Line | Data |
---|---|---|
915a2d21 KB |
1 | /* Definitions for targets without shared libraries for GDB, the GNU Debugger. |
2 | ||
197e01b6 | 3 | Copyright (C) 2004 |
915a2d21 KB |
4 | Free Software Foundation, Inc. |
5 | ||
6 | This file is part of GDB. | |
7 | ||
8 | This program is free software; you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation; either version 2 of the License, or | |
11 | (at your option) any later version. | |
12 | ||
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
19 | along with this program; if not, write to the Free Software | |
197e01b6 EZ |
20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 | Boston, MA 02110-1301, USA. */ | |
915a2d21 KB |
22 | |
23 | #include "defs.h" | |
24 | #include "solist.h" | |
25 | ||
26 | static struct so_list * | |
27 | null_current_sos (void) | |
28 | { | |
29 | return NULL; | |
30 | } | |
31 | ||
32 | static void | |
33 | null_special_symbol_handling (void) | |
34 | { | |
35 | } | |
36 | ||
37 | static void | |
38 | null_solib_create_inferior_hook (void) | |
39 | { | |
40 | } | |
41 | ||
42 | static void | |
43 | null_clear_solib (void) | |
44 | { | |
45 | } | |
46 | ||
47 | static void | |
48 | null_free_so (struct so_list *so) | |
49 | { | |
50 | xfree (so->lm_info); | |
51 | } | |
52 | ||
53 | ||
54 | static void | |
55 | null_relocate_section_addresses (struct so_list *so, | |
56 | struct section_table *sec) | |
57 | { | |
58 | } | |
59 | ||
60 | static int | |
61 | null_open_symbol_file_object (void *from_ttyp) | |
62 | { | |
63 | return 0; | |
64 | } | |
65 | ||
66 | static int | |
67 | null_in_dynsym_resolve_code (CORE_ADDR pc) | |
68 | { | |
69 | return 0; | |
70 | } | |
71 | ||
72 | static struct target_so_ops null_so_ops; | |
73 | ||
74 | extern initialize_file_ftype _initialize_null_solib; /* -Wmissing-prototypes */ | |
75 | ||
76 | void | |
77 | _initialize_null_solib (void) | |
78 | { | |
79 | null_so_ops.relocate_section_addresses = null_relocate_section_addresses; | |
80 | null_so_ops.free_so = null_free_so; | |
81 | null_so_ops.clear_solib = null_clear_solib; | |
82 | null_so_ops.solib_create_inferior_hook = null_solib_create_inferior_hook; | |
83 | null_so_ops.special_symbol_handling = null_special_symbol_handling; | |
84 | null_so_ops.current_sos = null_current_sos; | |
85 | null_so_ops.open_symbol_file_object = null_open_symbol_file_object; | |
86 | null_so_ops.in_dynsym_resolve_code = null_in_dynsym_resolve_code; | |
87 | ||
88 | /* Set current_target_so_ops to null_so_ops if not already set. */ | |
89 | if (current_target_so_ops == 0) | |
90 | current_target_so_ops = &null_so_ops; | |
91 | } |