/* Interface between GDB and target environments, including files and processes
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by John Gilmore.
/* 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
};
/* Currently loaded libraries, in XML format. */
TARGET_OBJECT_LIBRARIES,
/* Get OS specific data. The ANNEX specifies the type (running
- processes, etc.). */
+ processes, etc.). The data being transfered is expected to follow
+ the DTD specified in features/osdata.dtd. */
TARGET_OBJECT_OSDATA,
/* Extra signal info. Usually the contents of `siginfo_t' on unix
platforms. */
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,
+ /* 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_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 *);
void (*to_terminal_init) (void);
void (*to_create_inferior) (struct target_ops *,
char *, char *, char **, int);
void (*to_post_startup_inferior) (ptid_t);
- void (*to_insert_fork_catchpoint) (int);
+ int (*to_insert_fork_catchpoint) (int);
int (*to_remove_fork_catchpoint) (int);
- void (*to_insert_vfork_catchpoint) (int);
+ int (*to_insert_vfork_catchpoint) (int);
int (*to_remove_vfork_catchpoint) (int);
int (*to_follow_fork) (struct target_ops *, int);
- void (*to_insert_exec_catchpoint) (int);
+ int (*to_insert_exec_catchpoint) (int);
int (*to_remove_exec_catchpoint) (int);
int (*to_set_syscall_catchpoint) (int, int, int, int, int *);
int (*to_has_exited) (int, int, int *);
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);
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.
/* 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);
This information is updated only when:
- update_thread_list is called
- thread stops
- If the core cannot be determined -- either for the specified thread, or
- right now, or in this debug session, or for this target -- return -1. */
+ If the core cannot be determined -- either for the specified
+ thread, or right now, or in this debug session, or for this
+ target -- return -1. */
int (*to_core_of_thread) (struct target_ops *, ptid_t ptid);
/* Verify that the memory in the [MEMADDR, MEMADDR+SIZE) range
/* 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;
/* On some targets, we can catch an inferior fork or vfork event when
it occurs. These functions insert/remove an already-created
- catchpoint for such events. */
+ catchpoint for such events. They return 0 for success, 1 if the
+ catchpoint type is not supported and -1 for failure. */
#define target_insert_fork_catchpoint(pid) \
(*current_target.to_insert_fork_catchpoint) (pid)
/* On some targets, we can catch an inferior exec event when it
occurs. These functions insert/remove an already-created
- catchpoint for such events. */
+ catchpoint for such events. They return 0 for success, 1 if the
+ catchpoint type is not supported and -1 for failure. */
#define target_insert_exec_catchpoint(pid) \
(*current_target.to_insert_exec_catchpoint) (pid)
TABLE is an array of ints, indexed by syscall number. An element in
this array is nonzero if that syscall should be caught. This argument
- only matters if ANY_COUNT is zero. */
+ only matters if ANY_COUNT is zero.
+
+ Return 0 for success, 1 if syscall catchpoints are not supported or -1
+ for failure. */
#define target_set_syscall_catchpoint(pid, needed, any_count, table_size, table) \
(*current_target.to_set_syscall_catchpoint) (pid, needed, any_count, \
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)
/* From mem-break.c */
-extern int memory_remove_breakpoint (struct gdbarch *, struct bp_target_info *);
+extern int memory_remove_breakpoint (struct gdbarch *,
+ struct bp_target_info *);
-extern int memory_insert_breakpoint (struct gdbarch *, struct bp_target_info *);
+extern int memory_insert_breakpoint (struct gdbarch *,
+ struct bp_target_info *);
-extern int default_memory_remove_breakpoint (struct gdbarch *, struct bp_target_info *);
+extern int default_memory_remove_breakpoint (struct gdbarch *,
+ struct bp_target_info *);
-extern int default_memory_insert_breakpoint (struct gdbarch *, struct bp_target_info *);
+extern int default_memory_insert_breakpoint (struct gdbarch *,
+ struct bp_target_info *);
/* From target.c */
/* 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) */