/* Interface between GDB and target environments, including files and processes
- Copyright (C) 1990-2018 Free Software Foundation, Inc.
+ Copyright (C) 1990-2019 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by John Gilmore.
struct target_ops
{
+ /* Return this target's stratum. */
+ virtual strata stratum () const = 0;
+
/* To the target under this one. */
target_ops *beneath () const;
/* Documentation of this routine is provided with the corresponding
target_* macro. */
virtual void pass_signals (int,
- unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
+ const unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
TARGET_DEFAULT_IGNORE ();
/* Documentation of this routine is provided with the
corresponding target_* function. */
virtual void program_signals (int,
- unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
+ const unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
TARGET_DEFAULT_IGNORE ();
virtual bool thread_alive (ptid_t ptid)
TARGET_DEFAULT_IGNORE ();
virtual struct target_section_table *get_section_table ()
TARGET_DEFAULT_RETURN (NULL);
- enum strata to_stratum;
/* Provide default values for all "must have" methods. */
virtual bool has_all_memory () { return false; }
to_thread_architecture would return SPU, otherwise PPC32 or PPC64).
This is architecture used to perform decr_pc_after_break adjustment,
and also determines the frame architecture of the innermost frame.
- ptrace operations need to operate according to target_gdbarch ().
-
- The default implementation always returns target_gdbarch (). */
+ ptrace operations need to operate according to target_gdbarch (). */
virtual struct gdbarch *thread_architecture (ptid_t)
- TARGET_DEFAULT_FUNC (default_thread_architecture);
-
- /* Determine current address space of thread PTID.
+ TARGET_DEFAULT_RETURN (NULL);
- The default implementation always returns the inferior's
- address space. */
+ /* Determine current address space of thread PTID. */
virtual struct address_space *thread_address_space (ptid_t)
- TARGET_DEFAULT_FUNC (default_thread_address_space);
+ TARGET_DEFAULT_RETURN (NULL);
/* Target file operations. */
/* Returns true if T is pushed on the target stack. */
bool is_pushed (target_ops *t) const
- { return at (t->to_stratum) == t; }
+ { return at (t->stratum ()) == t; }
/* Return the target at STRATUM. */
target_ops *at (strata stratum) const { return m_stack[stratum]; }
about to receive a signal, it needs to be reported in any case, even
if mentioned in a previous target_pass_signals call. */
-extern void target_pass_signals (int nsig, unsigned char *pass_signals);
+extern void target_pass_signals (int nsig, const unsigned char *pass_signals);
/* Set list of signals the target may pass to the inferior. This
directly maps to the "handle SIGNAL pass/nopass" setting.
example, when detaching (as threads may have been suspended with
pending signals not reported to GDB). */
-extern void target_program_signals (int nsig, unsigned char *program_signals);
+extern void target_program_signals (int nsig,
+ const unsigned char *program_signals);
/* Check to see if a thread is still alive. */
#define target_has_execution target_has_execution_current ()
-/* Default implementations for process_stratum targets. Return true
- if there's a selected inferior, false otherwise. */
-
-extern int default_child_has_all_memory ();
-extern int default_child_has_memory ();
-extern int default_child_has_stack ();
-extern int default_child_has_registers ();
-extern int default_child_has_execution (ptid_t the_ptid);
-
/* Can the target support the debugger control of thread execution?
Can it lock the thread scheduler? */