diff options
author | Kevin Buettner <kevinb@redhat.com> | 2004-11-18 17:23:05 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2004-11-18 17:23:05 +0000 |
commit | 915a2d21dd9c2838971b7800795fa6ece49baedc (patch) | |
tree | d9c7cab170ae3499c6f89f38a5e52186470899f3 /gdb/solib-null.c | |
parent | 444bf5f39e21b0ff755f500c7f62a34f20c0dcc4 (diff) | |
download | gdb-915a2d21dd9c2838971b7800795fa6ece49baedc.zip gdb-915a2d21dd9c2838971b7800795fa6ece49baedc.tar.gz gdb-915a2d21dd9c2838971b7800795fa6ece49baedc.tar.bz2 |
* solib-null.c: New file.
Diffstat (limited to 'gdb/solib-null.c')
-rw-r--r-- | gdb/solib-null.c | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/gdb/solib-null.c b/gdb/solib-null.c new file mode 100644 index 0000000..41ad93a --- /dev/null +++ b/gdb/solib-null.c @@ -0,0 +1,91 @@ +/* Definitions for targets without shared libraries for GDB, the GNU Debugger. + + Copyright 2004 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "solist.h" + +static struct so_list * +null_current_sos (void) +{ + return NULL; +} + +static void +null_special_symbol_handling (void) +{ +} + +static void +null_solib_create_inferior_hook (void) +{ +} + +static void +null_clear_solib (void) +{ +} + +static void +null_free_so (struct so_list *so) +{ + xfree (so->lm_info); +} + + +static void +null_relocate_section_addresses (struct so_list *so, + struct section_table *sec) +{ +} + +static int +null_open_symbol_file_object (void *from_ttyp) +{ + return 0; +} + +static int +null_in_dynsym_resolve_code (CORE_ADDR pc) +{ + return 0; +} + +static struct target_so_ops null_so_ops; + +extern initialize_file_ftype _initialize_null_solib; /* -Wmissing-prototypes */ + +void +_initialize_null_solib (void) +{ + null_so_ops.relocate_section_addresses = null_relocate_section_addresses; + null_so_ops.free_so = null_free_so; + null_so_ops.clear_solib = null_clear_solib; + null_so_ops.solib_create_inferior_hook = null_solib_create_inferior_hook; + null_so_ops.special_symbol_handling = null_special_symbol_handling; + null_so_ops.current_sos = null_current_sos; + null_so_ops.open_symbol_file_object = null_open_symbol_file_object; + null_so_ops.in_dynsym_resolve_code = null_in_dynsym_resolve_code; + + /* Set current_target_so_ops to null_so_ops if not already set. */ + if (current_target_so_ops == 0) + current_target_so_ops = &null_so_ops; +} |