aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 004494d..3525a43 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -1016,8 +1016,8 @@ struct target_ops
filesystem seen by the debugger (GDB or, for remote targets, the
remote stub). Return 0 on success, or -1 if an error occurs (and
set *TARGET_ERRNO). */
- virtual int fileio_stat (struct inferior *inf, const char *filename,
- struct stat *sb, fileio_error *target_errno);
+ virtual int fileio_lstat (struct inferior *inf, const char *filename,
+ struct stat *sb, fileio_error *target_errno);
/* Close FD on the target. Return 0, or -1 if an error occurs
(and set *TARGET_ERRNO). */
@@ -1399,6 +1399,23 @@ struct target_ops
virtual void displaced_step_restore_all_in_ptid (inferior *parent_inf,
ptid_t child_ptid)
TARGET_DEFAULT_FUNC (default_displaced_step_restore_all_in_ptid);
+
+ /* Return true if an instance of this target can appear on multiple
+ target stacks, or false if an instance of this target can only
+ appear on a single target stack.
+
+ Returning false doesn't mean that GDB can't create multiple
+ instances of this target, just that each instance will only be used
+ by a single inferior.
+
+ The default return value for this function is true indicating
+ targets can be shared. The only non-shareable targets are some of
+ the process_stratum_target sub-classes, as such, this default is
+ changed in process_stratum_target to return false, then those
+ process_stratum_target sub-classes that are shareable set this to
+ true. */
+ virtual bool is_shareable ()
+ { return true; }
};
/* Deleter for std::unique_ptr. See comments in
@@ -2256,8 +2273,8 @@ extern int target_fileio_fstat (int fd, struct stat *sb,
filesystem seen by the debugger (GDB or, for remote targets, the remote
stub). Return 0 on success, or -1 if an error occurs (and set
*TARGET_ERRNO). */
-extern int target_fileio_stat (struct inferior *inf, const char *filename,
- struct stat *sb, fileio_error *target_errno);
+extern int target_fileio_lstat (struct inferior *inf, const char *filename,
+ struct stat *sb, fileio_error *target_errno);
/* Close FD on the target. Return 0, or -1 if an error occurs
(and set *TARGET_ERRNO). */
@@ -2472,8 +2489,14 @@ extern void target_pre_inferior ();
extern void target_preopen (int);
+/* Using the objfile specified in OBJFILE, find the address for the
+ current thread's thread-local storage with offset OFFSET. If it's
+ provided, NAME might be used to indicate the relevant variable
+ in an error message. */
+
extern CORE_ADDR target_translate_tls_address (struct objfile *objfile,
- CORE_ADDR offset);
+ CORE_ADDR offset,
+ const char *name = nullptr);
/* Return the "section" containing the specified address. */
const struct target_section *target_section_by_addr (struct target_ops *target,