binutils-gdb/gdb/solib-null.c

90 lines
2.2 KiB
C
Raw Normal View History

2004-11-18 18:23:05 +01:00
/* Definitions for targets without shared libraries for GDB, the GNU Debugger.
Copyright (C) 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
2004-11-18 18:23:05 +01:00
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 3 of the License, or
2004-11-18 18:23:05 +01:00
(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, see <http://www.gnu.org/licenses/>. */
2004-11-18 18:23:05 +01:00
#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
gdb/ Add from_tty to solib_create_inferior_hook. * infcmd.c (post_create_inferior): Move solib_add after solib_create_inferior_hook. Pass from_tty to solib_create_inferior_hook. Call solib_add and SOLIB_ADD with 0 from_tty and comment why. * infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0. * linux-nat.c (linux_child_follow_fork): Likewise. * nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise. * solib-darwin.c (darwin_solib_create_inferior_hook): New parameter from_tty. * solib-frv.c (frv_solib_create_inferior_hook): Likewise. * solib-irix.c (irix_solib_create_inferior_hook): Likewise. * solib-null.c (null_solib_create_inferior_hook): Likewise. * solib-osf.c (osf_solib_create_inferior_hook): Likewise. * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise. * solib-som.c (som_solib_create_inferior_hook): Likewise. * solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty. Pass it to svr4_so_ops.solib_create_inferior_hook. * solib-sunos.c (sunos_solib_create_inferior_hook): New parameter from_tty. * solib-svr4.c (enable_break): New parameter from_tty. Pass it to solib_add. (svr4_solib_create_inferior_hook): New parameter from_tty. Pass it to enable_break. * solib-target.c (solib_target_solib_create_inferior_hook): New parameter from_tty. * solib.c (solib_create_inferior_hook): New parameter from_tty. Pass it to ops->solib_create_inferior_hook. (reload_shared_libraries): Pass from_tty to solib_create_inferior_hook. Move solib_add after solib_create_inferior_hook, call it now with from_tty as 0. New comment there. * solib.h (solib_create_inferior_hook): New parameter from_tty. * solist.h (struct target_so_ops <solib_create_inferior_hook>): Likewise.
2010-01-08 23:52:04 +01:00
null_solib_create_inferior_hook (int from_tty)
2004-11-18 18:23:05 +01:00
{
}
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 target_section *sec)
2004-11-18 18:23:05 +01:00
{
}
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;
null_so_ops.bfd_open = solib_bfd_open;
2004-11-18 18:23:05 +01:00
/* 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;
}