mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
f9e148520a
* breakpoint.h (handle_solib_event): Moved function declaration to solib.h. * breakpoint.c (handle_solib_event): Moved function to solib.c. (bpstat_stop_status): Pass new argument to handle_solib_event. * solib.h (update_solib_breakpoints): New function declaration. (handle_solib_event): Moved function declaration from breakpoint.h. * solib.c (update_solib_breakpoints): New function. (handle_solib_event): Moved function from breakpoint.c. Updated to call solib_ops->handle_event if not NULL. * solist.h (target_so_ops): New fields "update_breakpoints" and "handle_event". * infrun.c (set_stop_on_solib_events): New function. (_initialize_infrun): Use the above for "set stop-on-solib-events". (handle_inferior_event): Pass new argument to handle_solib_event. * solib-svr4.c (probe.h): New include. (svr4_free_library_list): New forward declaration. (probe_action): New enum. (probe_info): New struct. (probe_info): New static variable. (NUM_PROBES): New definition. (svr4_info): New fields "using_xfer", "probes_table" and "solib_list". (free_probes_table): New function. (free_solib_list): New function. (svr4_pspace_data_cleanup): Free probes table and solib list. (svr4_copy_library_list): New function. (svr4_current_sos_via_xfer_libraries): New parameter "annex". (svr4_read_so_list): New parameter "prev_lm". (svr4_current_sos_direct): Renamed from "svr4_current_sos". (svr4_current_sos): New function. (probe_and_action): New struct. (hash_probe_and_action): New function. (equal_probe_and_action): Likewise. (register_solib_event_probe): Likewise. (solib_event_probe_at): Likewise. (solib_event_probe_action): Likewise. (solist_update_full): Likewise. (solist_update_incremental): Likewise. (disable_probes_interface_cleanup): Likewise. (svr4_handle_solib_event): Likewise. (svr4_update_solib_event_breakpoint): Likewise. (svr4_update_solib_event_breakpoints): Likewise. (svr4_create_solib_event_breakpoints): Likewise. (enable_break): Free probes table before creating breakpoints. Use svr4_create_solib_event_breakpoints to create breakpoints. (svr4_solib_create_inferior_hook): Free the solib list. (_initialize_svr4_solib): Initialise svr4_so_ops.handle_solib_event and svr4_so_ops.update_breakpoints.
102 lines
3.3 KiB
C
102 lines
3.3 KiB
C
/* Shared library declarations for GDB, the GNU Debugger.
|
|
|
|
Copyright (C) 1992-2013 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 3 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, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef SOLIB_H
|
|
#define SOLIB_H
|
|
|
|
/* Forward decl's for prototypes */
|
|
struct so_list;
|
|
struct target_ops;
|
|
struct target_so_ops;
|
|
struct program_space;
|
|
|
|
/* Called when we free all symtabs, to free the shared library information
|
|
as well. */
|
|
|
|
extern void clear_solib (void);
|
|
|
|
/* Called to add symbols from a shared library to gdb's symbol table. */
|
|
|
|
extern void solib_add (char *, int, struct target_ops *, int);
|
|
extern int solib_read_symbols (struct so_list *, int);
|
|
|
|
/* Function to be called when the inferior starts up, to discover the
|
|
names of shared libraries that are dynamically linked, the base
|
|
addresses to which they are linked, and sufficient information to
|
|
read in their symbols at a later time. */
|
|
|
|
extern void solib_create_inferior_hook (int from_tty);
|
|
|
|
/* If ADDR lies in a shared library, return its name. */
|
|
|
|
extern char *solib_name_from_address (struct program_space *, CORE_ADDR);
|
|
|
|
/* Return 1 if ADDR lies within SOLIB. */
|
|
|
|
extern int solib_contains_address_p (const struct so_list *, CORE_ADDR);
|
|
|
|
/* Return whether the data starting at VADDR, size SIZE, must be kept
|
|
in a core file for shared libraries loaded before "gcore" is used
|
|
to be handled correctly when the core file is loaded. This only
|
|
applies when the section would otherwise not be kept in the core
|
|
file (in particular, for readonly sections). */
|
|
|
|
extern int solib_keep_data_in_core (CORE_ADDR vaddr, unsigned long size);
|
|
|
|
/* Return 1 if PC lies in the dynamic symbol resolution code of the
|
|
run time loader. */
|
|
|
|
extern int in_solib_dynsym_resolve_code (CORE_ADDR);
|
|
|
|
/* Discard symbols that were auto-loaded from shared libraries. */
|
|
|
|
extern void no_shared_libraries (char *ignored, int from_tty);
|
|
|
|
/* Set the solib operations for GDBARCH to NEW_OPS. */
|
|
|
|
extern void set_solib_ops (struct gdbarch *gdbarch,
|
|
const struct target_so_ops *new_ops);
|
|
|
|
/* Return non-zero if NAME is the libpthread shared library. */
|
|
|
|
extern int libpthread_name_p (const char *name);
|
|
|
|
/* Look up symbol from both symbol table and dynamic string table. */
|
|
|
|
extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd,
|
|
int (*match_sym) (asymbol *, void *),
|
|
void *data);
|
|
|
|
/* Look up symbol from symbol table. */
|
|
|
|
extern CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
|
|
int (*match_sym) (asymbol *,
|
|
void *),
|
|
void *data);
|
|
|
|
/* Enable or disable optional solib event breakpoints as appropriate. */
|
|
|
|
extern void update_solib_breakpoints (void);
|
|
|
|
/* Handle an solib event by calling solib_add. */
|
|
|
|
extern void handle_solib_event (void);
|
|
|
|
#endif /* SOLIB_H */
|