struct ui_file;
struct mem_attrib;
struct target_ops;
+struct bp_location;
struct bp_target_info;
struct regcache;
struct target_section_table;
struct uploaded_tsv;
struct uploaded_tp;
struct static_tracepoint_marker;
-
+struct traceframe_info;
struct expression;
/* This include file defines the interface between the main part
/* The program has entered or returned from a system call. On
HP-UX, this is used in the hardware watchpoint implementation.
- The syscall's unique integer ID number is in value.syscall_id */
+ The syscall's unique integer ID number is in value.syscall_id. */
TARGET_WAITKIND_SYSCALL_ENTRY,
TARGET_WAITKIND_SYSCALL_RETURN,
/* An event has occured, but we should wait again.
Remote_async_wait() returns this when there is an event
on the inferior, but the rest of the world is not interested in
- it. The inferior has not stopped, but has just sent some output
- to the console, for instance. In this case, we want to go back
+ it. The inferior has not stopped, but has just sent some output
+ to the console, for instance. In this case, we want to go back
to the event loop and wait there for another event from the
inferior, rather than being stuck in the remote_async_wait()
- function. This way the event loop is responsive to other events,
+ function. sThis way the event loop is responsive to other events,
like for instance the user typing. */
TARGET_WAITKIND_IGNORE,
INF_EXEC_COMPLETE,
/* We are called to do some stuff after the inferior stops, but we
are expected to reenter the proceed() and
- handle_inferior_event() functions. This is used only in case of
+ handle_inferior_event() functions. This is used only in case of
'step n' like commands. */
INF_EXEC_CONTINUE
};
TARGET_OBJECT_THREADS,
/* Collected static trace data. */
TARGET_OBJECT_STATIC_TRACE_DATA,
- /* Possible future objects: TARGET_OBJECT_FILE, ... */
+ /* The HP-UX registers (those that can be obtained or modified by using
+ the TT_LWP_RUREGS/TT_LWP_WUREGS ttrace requests). */
+ TARGET_OBJECT_HPUX_UREGS,
+ /* The HP-UX shared library linkage pointer. ANNEX should be a string
+ image of the code address whose linkage pointer we are looking for.
+
+ The size of the data transfered is always 8 bytes (the size of an
+ address on ia64). */
+ TARGET_OBJECT_HPUX_SOLIB_GOT,
+ /* Traceframe info, in XML format. */
+ TARGET_OBJECT_TRACEFRAME_INFO,
+ /* Possible future objects: TARGET_OBJECT_FILE, ... */
};
/* Enumeration of the kinds of traceframe searches that a target may
struct memory_read_result
{
- /* First address that was read. */
+ /* First address that was read. */
ULONGEST begin;
/* Past-the-end address. */
ULONGEST end;
int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *);
int (*to_remove_breakpoint) (struct gdbarch *, struct bp_target_info *);
int (*to_can_use_hw_breakpoint) (int, int, int);
+ int (*to_ranged_break_num_registers) (struct target_ops *);
int (*to_insert_hw_breakpoint) (struct gdbarch *, struct bp_target_info *);
int (*to_remove_hw_breakpoint) (struct gdbarch *, struct bp_target_info *);
int (*to_remove_watchpoint) (CORE_ADDR, int, int, struct expression *);
int (*to_insert_watchpoint) (CORE_ADDR, int, int, struct expression *);
+ int (*to_insert_mask_watchpoint) (struct target_ops *,
+ CORE_ADDR, CORE_ADDR, int);
+ int (*to_remove_mask_watchpoint) (struct target_ops *,
+ CORE_ADDR, CORE_ADDR, int);
int (*to_stopped_by_watchpoint) (void);
int to_have_steppable_watchpoint;
int to_have_continuable_watchpoint;
int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
int (*to_watchpoint_addr_within_range) (struct target_ops *,
CORE_ADDR, CORE_ADDR, int);
+
+ /* Documentation of this routine is provided with the corresponding
+ target_* macro. */
int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, int);
+
int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int,
struct expression *);
+ int (*to_masked_watch_num_registers) (struct target_ops *,
+ CORE_ADDR, CORE_ADDR);
void (*to_terminal_init) (void);
void (*to_terminal_inferior) (void);
void (*to_terminal_ours_for_output) (void);
void (*to_terminal_info) (char *, int);
void (*to_kill) (struct target_ops *);
void (*to_load) (char *, int);
- int (*to_lookup_symbol) (char *, CORE_ADDR *);
void (*to_create_inferior) (struct target_ops *,
char *, char *, char **, int);
void (*to_post_startup_inferior) (ptid_t);
int (*to_has_exited) (int, int, int *);
void (*to_mourn_inferior) (struct target_ops *);
int (*to_can_run) (void);
- void (*to_notice_signals) (ptid_t ptid);
+
+ /* Documentation of this routine is provided with the corresponding
+ target_* macro. */
+ void (*to_pass_signals) (int, unsigned char *);
+
int (*to_thread_alive) (struct target_ops *, ptid_t ptid);
void (*to_find_new_threads) (struct target_ops *);
char *(*to_pid_to_str) (struct target_ops *, ptid_t);
char *(*to_extra_thread_info) (struct thread_info *);
+ char *(*to_thread_name) (struct thread_info *);
void (*to_stop) (ptid_t);
void (*to_rcmd) (char *command, struct ui_file *output);
char *(*to_pid_to_exec_file) (int pid);
int (*to_has_memory) (struct target_ops *);
int (*to_has_stack) (struct target_ops *);
int (*to_has_registers) (struct target_ops *);
- int (*to_has_execution) (struct target_ops *);
+ int (*to_has_execution) (struct target_ops *, ptid_t);
int to_has_thread_control; /* control thread execution */
int to_attach_no_wait;
/* ASYNC target controls */
RAM. The returned memory regions should not overlap.
The order of regions does not matter; target_memory_map will
- sort regions by starting address. For that reason, this
+ sort regions by starting address. For that reason, this
function should not be called directly except via
target_memory_map.
simultaneously? */
int (*to_supports_multi_process) (void);
+ /* Does this target support enabling and disabling tracepoints while a trace
+ experiment is running? */
+ int (*to_supports_enable_disable_tracepoint) (void);
+
/* Determine current architecture of thread PTID.
The target is supposed to determine the architecture of the code where
/* Send full details of a trace state variable to the target. */
void (*to_download_trace_state_variable) (struct trace_state_variable *tsv);
+ /* Enable a tracepoint on the target. */
+ void (*to_enable_tracepoint) (struct bp_location *location);
+
+ /* Disable a tracepoint on the target. */
+ void (*to_disable_tracepoint) (struct bp_location *location);
+
/* Inform the target info of memory regions that are readonly
(such as text sections), and so it should return data from
those rather than look in the trace buffer. */
/* Ask the target to find a trace frame of the given type TYPE,
using NUM, ADDR1, and ADDR2 as search parameters. Returns the
number of the trace frame, and also the tracepoint number at
- TPP. If no trace frame matches, return -1. May throw if the
+ TPP. If no trace frame matches, return -1. May throw if the
operation fails. */
int (*to_trace_find) (enum trace_find_type type, int num,
ULONGEST addr1, ULONGEST addr2, int *tpp);
VEC(static_tracepoint_marker_p) *(*to_static_tracepoint_markers_by_strid)
(const char *id);
+ /* Return a traceframe info object describing the current
+ traceframe's contents. This method should not cache data;
+ higher layers take care of caching, invalidating, and
+ re-fetching when necessary. */
+ struct traceframe_info *(*to_traceframe_info) (void);
+
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/
#define target_supports_multi_process() \
(*current_target.to_supports_multi_process) ()
+/* Returns true if this target can enable and disable tracepoints
+ while a trace experiment is running. */
+
+#define target_supports_enable_disable_tracepoint() \
+ (*current_target.to_supports_enable_disable_tracepoint) ()
+
/* Invalidate all target dcaches. */
extern void target_dcache_invalidate (void);
/* Describes a request for a memory write operation. */
struct memory_write_request
{
- /* Begining address that must be written. */
+ /* Begining address that must be written. */
ULONGEST begin;
- /* Past-the-end address. */
+ /* Past-the-end address. */
ULONGEST end;
- /* The data to write. */
+ /* The data to write. */
gdb_byte *data;
/* A callback baton for progress reporting for this request. */
void *baton;
extern void target_load (char *arg, int from_tty);
-/* Look up a symbol in the target's symbol table. NAME is the symbol
- name. ADDRP is a CORE_ADDR * pointing to where the value of the
- symbol should be returned. The result is 0 if successful, nonzero
- if the symbol does not exist in the target environment. This
- function should not call error() if communication with the target
- is interrupted, since it is called from symbol reading, but should
- return nonzero, possibly doing a complain(). */
-
-#define target_lookup_symbol(name, addrp) \
- (*current_target.to_lookup_symbol) (name, addrp)
-
/* Start an inferior process and set inferior_ptid to its pid.
EXEC_FILE is the file to run.
ALLARGS is a string containing the arguments to the program.
#define target_can_run(t) \
((t)->to_can_run) ()
-/* post process changes to signal handling in the inferior. */
+/* Set list of signals to be handled in the target.
-#define target_notice_signals(ptid) \
- (*current_target.to_notice_signals) (ptid)
+ PASS_SIGNALS is an array of size NSIG, indexed by target signal number
+ (enum target_signal). For every signal whose entry in this array is
+ non-zero, the target is allowed -but not required- to skip reporting
+ arrival of the signal to the GDB core by returning from target_wait,
+ and to pass the signal directly to the inferior instead.
+
+ However, if the target is hardware single-stepping a thread that is
+ 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);
/* Check to see if a thread is still alive. */
case this will become true after target_create_inferior or
target_attach. */
-extern int target_has_execution_1 (void);
-#define target_has_execution target_has_execution_1 ()
+extern int target_has_execution_1 (ptid_t);
+
+/* Like target_has_execution_1, but always passes inferior_ptid. */
+
+extern int target_has_execution_current (void);
+
+#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_memory (struct target_ops *ops);
extern int default_child_has_stack (struct target_ops *ops);
extern int default_child_has_registers (struct target_ops *ops);
-extern int default_child_has_execution (struct target_ops *ops);
+extern int default_child_has_execution (struct target_ops *ops,
+ ptid_t the_ptid);
/* Can the target support the debugger control of thread execution?
Can it lock the thread scheduler? */
cludge until async mode is a strict superset of sync mode. */
extern int target_async_permitted;
-/* Can the target support asynchronous execution? */
+/* Can the target support asynchronous execution? */
#define target_can_async_p() (current_target.to_can_async_p ())
-/* Is the target in asynchronous execution mode? */
+/* Is the target in asynchronous execution mode? */
#define target_is_async_p() (current_target.to_is_async_p ())
int target_supports_non_stop (void);
-/* Put the target in async mode with the specified callback function. */
+/* Put the target in async mode with the specified callback function. */
#define target_async(CALLBACK,CONTEXT) \
(current_target.to_async ((CALLBACK), (CONTEXT)))
-/* This is to be used ONLY within call_function_by_hand(). It provides
+/* This is to be used ONLY within call_function_by_hand(). It provides
a workaround, to have inferior function calls done in sychronous
- mode, even though the target is asynchronous. After
+ mode, even though the target is asynchronous. After
target_async_mask(0) is called, calls to target_can_async_p() will
return FALSE , so that target_resume() will not try to start the
- target asynchronously. After the inferior stops, we IMMEDIATELY
+ target asynchronously. After the inferior stops, we IMMEDIATELY
restore the previous nature of the target, by calling
- target_async_mask(1). After that, target_can_async_p() will return
- TRUE. ANY OTHER USE OF THIS FEATURE IS DEPRECATED.
+ target_async_mask(1). After that, target_can_async_p() will return
+ TRUE. ANY OTHER USE OF THIS FEATURE IS DEPRECATED.
FIXME ezannoni 1999-12-13: we won't need this once we move
the turning async on and off to the single execution commands,
#define target_extra_thread_info(TP) \
(current_target.to_extra_thread_info (TP))
+/* Return the thread's name. A NULL result means that the target
+ could not determine this thread's name. */
+
+extern char *target_thread_name (struct thread_info *);
+
/* Attempts to find the pathname of the executable file
that was run to create a specified process.
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
(*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
+/* Returns the number of debug registers needed to watch the given
+ memory region, or zero if not supported. */
+
#define target_region_ok_for_hw_watchpoint(addr, len) \
(*current_target.to_region_ok_for_hw_watchpoint) (addr, len)
#define target_remove_watchpoint(addr, len, type, cond) \
(*current_target.to_remove_watchpoint) (addr, len, type, cond)
+/* Insert a new masked watchpoint at ADDR using the mask MASK.
+ RW may be hw_read for a read watchpoint, hw_write for a write watchpoint
+ or hw_access for an access watchpoint. Returns 0 for success, 1 if
+ masked watchpoints are not supported, -1 for failure. */
+
+extern int target_insert_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
+
+/* Remove a masked watchpoint at ADDR with the mask MASK.
+ RW may be hw_read for a read watchpoint, hw_write for a write watchpoint
+ or hw_access for an access watchpoint. Returns 0 for success, non-zero
+ for failure. */
+
+extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
+
#define target_insert_hw_breakpoint(gdbarch, bp_tgt) \
(*current_target.to_insert_hw_breakpoint) (gdbarch, bp_tgt)
#define target_remove_hw_breakpoint(gdbarch, bp_tgt) \
(*current_target.to_remove_hw_breakpoint) (gdbarch, bp_tgt)
+/* Return number of debug registers needed for a ranged breakpoint,
+ or -1 if ranged breakpoints are not supported. */
+
+extern int target_ranged_break_num_registers (void);
+
/* Return non-zero if target knows the data address which triggered this
target_stopped_by_watchpoint, in such case place it to *ADDR_P. Only the
INFERIOR_PTID task is being queried. */
#define target_can_accel_watchpoint_condition(addr, len, type, cond) \
(*current_target.to_can_accel_watchpoint_condition) (addr, len, type, cond)
+/* Return number of debug registers needed for a masked watchpoint,
+ -1 if masked watchpoints are not supported or -2 if the given address
+ and mask combination cannot be used. */
+
+extern int target_masked_watch_num_registers (CORE_ADDR addr, CORE_ADDR mask);
+
/* Target can execute in reverse? */
#define target_can_execute_reverse \
(current_target.to_can_execute_reverse ? \
#define target_download_trace_state_variable(tsv) \
(*current_target.to_download_trace_state_variable) (tsv)
+#define target_enable_tracepoint(loc) \
+ (*current_target.to_enable_tracepoint) (loc)
+
+#define target_disable_tracepoint(loc) \
+ (*current_target.to_disable_tracepoint) (loc)
+
#define target_trace_start() \
(*current_target.to_trace_start) ()
#define target_static_tracepoint_markers_by_strid(marker_id) \
(*current_target.to_static_tracepoint_markers_by_strid) (marker_id)
+#define target_traceframe_info() \
+ (*current_target.to_traceframe_info) ()
+
/* Command logging facility. */
#define target_log_command(p) \
/* Speed in bits per second, or -1 which means don't mess with the speed. */
extern int baud_rate;
-/* Timeout limit for response from target. */
+/* Timeout limit for response from target. */
extern int remote_timeout;
\f
extern void update_target_permissions (void);
\f
-/* Imported from machine dependent code */
+/* Imported from machine dependent code. */
-/* Blank target vector entries are initialized to target_ignore. */
+/* Blank target vector entries are initialized to target_ignore. */
void target_ignore (void);
-extern struct target_ops deprecated_child_ops;
-
#endif /* !defined (TARGET_H) */