#include "record.h"
#include "command.h"
#include "disasm.h"
+#include "tracepoint.h"
#include "break-common.h" /* For enum target_hw_bp_type. */
extern const char *
target_xfer_status_to_string (enum target_xfer_status status);
-/* Enumeration of the kinds of traceframe searches that a target may
- be able to perform. */
-
-enum trace_find_type
- {
- tfind_number,
- tfind_pc,
- tfind_tp,
- tfind_range,
- tfind_outside,
- };
-
typedef struct static_tracepoint_marker *static_tracepoint_marker_p;
DEF_VEC_P(static_tracepoint_marker_p);
ULONGEST offset, LONGEST len);
struct memory_read_result
+{
+ memory_read_result (ULONGEST begin_, ULONGEST end_,
+ gdb::unique_xmalloc_ptr<gdb_byte> &&data_)
+ : begin (begin_),
+ end (end_),
+ data (std::move (data_))
{
- /* First address that was read. */
- ULONGEST begin;
- /* Past-the-end address. */
- ULONGEST end;
- /* The data. */
- gdb_byte *data;
-};
-typedef struct memory_read_result memory_read_result_s;
-DEF_VEC_O(memory_read_result_s);
+ }
+
+ ~memory_read_result () = default;
+
+ memory_read_result (memory_read_result &&other) = default;
-extern void free_memory_read_result_vector (void *);
+ DISABLE_COPY_AND_ASSIGN (memory_read_result);
+
+ /* First address that was read. */
+ ULONGEST begin;
+ /* Past-the-end address. */
+ ULONGEST end;
+ /* The data. */
+ gdb::unique_xmalloc_ptr<gdb_byte> data;
+};
-extern VEC(memory_read_result_s)* read_memory_robust (struct target_ops *ops,
- const ULONGEST offset,
- const LONGEST len);
+extern std::vector<memory_read_result> read_memory_robust
+ (struct target_ops *ops, const ULONGEST offset, const LONGEST len);
/* Request that OPS transfer up to LEN addressable units from BUF to the
target's OBJECT. When writing to a memory object, the addressable unit
TARGET_DEFAULT_RETURN (NULL);
const char *(*to_thread_name) (struct target_ops *, struct thread_info *)
TARGET_DEFAULT_RETURN (NULL);
+ struct thread_info *(*to_thread_handle_to_thread_info) (struct target_ops *,
+ const gdb_byte *,
+ int,
+ struct inferior *inf)
+ TARGET_DEFAULT_RETURN (NULL);
void (*to_stop) (struct target_ops *, ptid_t)
TARGET_DEFAULT_IGNORE ();
void (*to_interrupt) (struct target_ops *, ptid_t)
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) (struct target_ops *)
- TARGET_DEFAULT_NORETURN (tcomplain ());
+ traceframe_info_up (*to_traceframe_info) (struct target_ops *)
+ TARGET_DEFAULT_NORETURN (tcomplain ());
/* Ask the target to use or not to use agent according to USE. Return 1
successful, 0 otherwise. */
coalesce multiple resumption requests in a single vCont packet. */
extern void target_commit_resume ();
-/* Setup to defer target_commit_resume calls, and return a cleanup
- that reactivates target_commit_resume, if it was previously
+/* Setup to defer target_commit_resume calls, and reactivate
+ target_commit_resume on destruction, if it was previously
active. */
-struct cleanup *make_cleanup_defer_target_commit_resume ();
+extern scoped_restore_tmpl<int> make_scoped_defer_target_commit_resume ();
/* For target_read_memory see target/target.h. */
extern const char *target_thread_name (struct thread_info *);
+/* Given a pointer to a thread library specific thread handle and
+ its length, return a pointer to the corresponding thread_info struct. */
+
+extern struct thread_info *target_thread_handle_to_thread_info
+ (const gdb_byte *thread_handle, int handle_len, struct inferior *inf);
+
/* Attempts to find the pathname of the executable file
that was run to create a specified process.