mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
fbsd-nat: Add helper routine to fetch siginfo_t for a ptid.
This commit is contained in:
@ -1766,6 +1766,22 @@ fbsd_nat_target::store_register_set (struct regcache *regcache, int regnum,
|
||||
return false;
|
||||
}
|
||||
|
||||
/* See fbsd-nat.h. */
|
||||
|
||||
bool
|
||||
fbsd_nat_get_siginfo (ptid_t ptid, siginfo_t *siginfo)
|
||||
{
|
||||
struct ptrace_lwpinfo pl;
|
||||
pid_t pid = get_ptrace_pid (ptid);
|
||||
|
||||
if (ptrace (PT_LWPINFO, pid, (caddr_t) &pl, sizeof pl) == -1)
|
||||
return false;
|
||||
if (!(pl.pl_flags & PL_FLAG_SI))
|
||||
return false;;
|
||||
*siginfo = pl.pl_siginfo;
|
||||
return (true);
|
||||
}
|
||||
|
||||
void _initialize_fbsd_nat ();
|
||||
void
|
||||
_initialize_fbsd_nat ()
|
||||
|
@ -166,4 +166,8 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
/* Fetch the signal information for PTID and store it in *SIGINFO.
|
||||
Return true if successful. */
|
||||
bool fbsd_nat_get_siginfo (ptid_t ptid, siginfo_t *siginfo);
|
||||
|
||||
#endif /* fbsd-nat.h */
|
||||
|
Reference in New Issue
Block a user