struct target_ops *
find_record_target (void)
{
- return find_target_at (record_stratum);
+ return current_inferior ()->target_at (record_stratum);
}
/* Check that recording is active. Throw an error, if it isn't. */
The idea here is to prefer use of of the target's thread_stratum
method since it should be more accurate. */
if (gdbarch_data->get_tls_dtv_addr == nullptr
- || (find_target_at (thread_stratum) != nullptr
+ || (current_inferior ()->target_at (thread_stratum) != nullptr
&& !force_internal_tls_address_lookup))
{
struct target_ops *target = current_inferior ()->top_target ();
int
target_info_proc (const char *args, enum info_proc_what what)
{
- struct target_ops *t;
-
/* If we're already connected to something that can get us OS
related data, use it. Otherwise, try using the native
target. */
- t = find_target_at (process_stratum);
+ target_ops *t = current_inferior ()->target_at (process_stratum);
if (t == NULL)
t = find_default_run_target (NULL);
std::optional<gdb::char_vector>
target_get_osdata (const char *type)
{
- struct target_ops *t;
-
/* If we're already connected to something that can get us OS
related data, use it. Otherwise, try using the native
target. */
- t = find_target_at (process_stratum);
+ target_ops *t = current_inferior ()->target_at (process_stratum);
if (t == NULL)
t = find_default_run_target ("get OS data");
static struct target_ops *
default_fileio_target (void)
{
- struct target_ops *t;
-
/* If we're already connected to something that can perform
file I/O, use it. Otherwise, try using the native target. */
- t = find_target_at (process_stratum);
+ target_ops *t = current_inferior ()->target_at (process_stratum);
if (t != NULL)
return t;
return find_default_run_target ("file I/O");
return NULL;
}
-/* See target.h. */
-
-struct target_ops *
-find_target_at (enum strata stratum)
-{
- return current_inferior ()->target_at (stratum);
-}
-
-\f
-
/* See target.h */
void
extern void target_require_runnable (void);
-/* Find the target at STRATUM. If no target is at that stratum,
- return NULL. */
-
-struct target_ops *find_target_at (enum strata stratum);
-
/* Read OS data object of type TYPE from the target, and return it in XML
format. The return value follows the same rules as target_read_stralloc. */