return 0;
}
-/* Provide thread local base, i.e. Thread Information Block address.
- Returns 1 if ptid is found and thread_local_base is non zero. */
-
bool
remote_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr)
{
CORE_ADDR memaddr, ULONGEST size)
TARGET_DEFAULT_FUNC (default_verify_memory);
- /* Return the address of the start of the Thread Information Block
- a Windows OS specific feature. */
+ /* Set *ADDR to the address of the start of the Thread Information
+ Block (TIB) for thread PTID. Return true on success and false
+ otherwise.
+
+ ADDR may be nullptr, in which case the checks will be done but
+ the result will be discarded. */
virtual bool get_tib_address (ptid_t ptid, CORE_ADDR *addr)
TARGET_DEFAULT_NORETURN (tcomplain ());
extern bool target_set_trace_notes (const char *user, const char *notes,
const char *stopnotes);
+/* A wrapper that calls get_tib_address on the top target of the
+ current inferior. */
extern bool target_get_tib_address (ptid_t ptid, CORE_ADDR *addr);
extern void target_set_permissions ();
tib = (gdb_byte *) alloca (tib_size);
- if (target_get_tib_address (ptid, &thread_local_base) == 0)
+ if (!target_get_tib_address (ptid, &thread_local_base))
{
gdb_printf (_("Unable to get thread local base for %s\n"),
target_pid_to_str (ptid).c_str ());