From 5b009018d2759269b0fd192077a391c795ebfa97 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 6 Feb 2009 23:06:58 +0000 Subject: * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t) (compat_timer_t, compat_clock_t, struct compat_timeval) (compat_sigval_t, compat_siginfo_t): New types. (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun) (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr) (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines. (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo) (amd64_linux_siginfo_fixup): New. * linux-nat.c (linux_nat_siginfo_fixup): New. (siginfo_fixup): New. (linux_xfer_siginfo): Use siginfo_fixup to convert between the siginfo layout expected by ptrace and the siginfo layout of the inferior. (linux_nat_set_siginfo_fixup): New. * linux-nat.h (linux_nat_set_siginfo_fixup): Declare. --- gdb/linux-nat.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/linux-nat.h') diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h index 0985e84..fec5139 100644 --- a/gdb/linux-nat.h +++ b/gdb/linux-nat.h @@ -125,6 +125,14 @@ void linux_nat_add_target (struct target_ops *); /* Register a method to call whenever a new thread is attached. */ void linux_nat_set_new_thread (struct target_ops *, void (*) (ptid_t)); +/* Register a method that converts a siginfo object between the layout + that ptrace returns, and the layout in the architecture of the + inferior. */ +void linux_nat_set_siginfo_fixup (struct target_ops *, + int (*) (struct siginfo *, + gdb_byte *, + int)); + /* Update linux-nat internal state when changing from one fork to another. */ void linux_nat_switch_fork (ptid_t new_ptid); -- cgit v1.1