+2021-01-18 Tom de Vries <tdevries@suse.de>
+
+ PR tdep/27172
+ * nat/amd64-linux-siginfo.c (cpt_si_lower, cpt_si_upper, SEGV_BNDERR):
+ New macro.
+ (compat_siginfo_from_siginfo): Copy cpt_si_lower and cpt_si_upper
+ for SEGV_BNDERR.
+
2021-01-18 Simon Marchi <simon.marchi@polymtl.ca>
* remote.c (class remote_target) <remote_hostio_send_command,
#define cpt_si_ptr _sifields._rt._sigval.sival_ptr
#define cpt_si_addr _sifields._sigfault._addr
#define cpt_si_addr_lsb _sifields._sigfault._addr_lsb
+#define cpt_si_lower _sifields._sigfault.si_addr_bnd._lower
+#define cpt_si_upper _sifields._sigfault.si_addr_bnd._upper
#define cpt_si_band _sifields._sigpoll._band
#define cpt_si_fd _sifields._sigpoll._fd
#define si_overrun si_timer2
#endif
+#ifndef SEGV_BNDERR
+#define SEGV_BNDERR 3
+#endif
+
/* The type of the siginfo object the kernel returns in
PTRACE_GETSIGINFO. If gdb is built as a x32 program, we get a x32
siginfo. */
to->cpt_si_pid = from_ptrace.cpt_si_pid;
to->cpt_si_uid = from_ptrace.cpt_si_uid;
}
+ else if (to->si_code == SEGV_BNDERR
+ && to->si_signo == SIGSEGV)
+ {
+ to->cpt_si_addr = from_ptrace.cpt_si_addr;
+ to->cpt_si_lower = from_ptrace.cpt_si_lower;
+ to->cpt_si_upper = from_ptrace.cpt_si_upper;
+ }
else if (to->si_code < 0)
{
to->cpt_si_pid = from_ptrace.cpt_si_pid;