]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/solib-null.c
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / solib-null.c
CommitLineData
915a2d21
KB
1/* Definitions for targets without shared libraries for GDB, the GNU Debugger.
2
6aba47ca 3 Copyright (C) 2004, 2007 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
9 the Free Software Foundation; either version 2 of the License, or
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
18 along with this program; if not, write to the Free Software
197e01b6
EZ
19 Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
915a2d21
KB
21
22#include "defs.h"
23#include "solist.h"
24
25static struct so_list *
26null_current_sos (void)
27{
28 return NULL;
29}
30
31static void
32null_special_symbol_handling (void)
33{
34}
35
36static void
37null_solib_create_inferior_hook (void)
38{
39}
40
41static void
42null_clear_solib (void)
43{
44}
45
46static void
47null_free_so (struct so_list *so)
48{
49 xfree (so->lm_info);
50}
51
52
53static void
54null_relocate_section_addresses (struct so_list *so,
55 struct section_table *sec)
56{
57}
58
59static int
60null_open_symbol_file_object (void *from_ttyp)
61{
62 return 0;
63}
64
65static int
66null_in_dynsym_resolve_code (CORE_ADDR pc)
67{
68 return 0;
69}
70
71static struct target_so_ops null_so_ops;
72
73extern initialize_file_ftype _initialize_null_solib; /* -Wmissing-prototypes */
74
75void
76_initialize_null_solib (void)
77{
78 null_so_ops.relocate_section_addresses = null_relocate_section_addresses;
79 null_so_ops.free_so = null_free_so;
80 null_so_ops.clear_solib = null_clear_solib;
81 null_so_ops.solib_create_inferior_hook = null_solib_create_inferior_hook;
82 null_so_ops.special_symbol_handling = null_special_symbol_handling;
83 null_so_ops.current_sos = null_current_sos;
84 null_so_ops.open_symbol_file_object = null_open_symbol_file_object;
85 null_so_ops.in_dynsym_resolve_code = null_in_dynsym_resolve_code;
86
87 /* Set current_target_so_ops to null_so_ops if not already set. */
88 if (current_target_so_ops == 0)
89 current_target_so_ops = &null_so_ops;
90}