Path: blob/master/arch/um/sys-x86_64/shared/sysdep/faultinfo.h
10820 views
/*1* Copyright (C) 2004 Fujitsu Siemens Computers GmbH2* Author: Bodo Stroesser <[email protected]>3* Licensed under the GPL4*/56#ifndef __FAULTINFO_X86_64_H7#define __FAULTINFO_X86_64_H89/* this structure contains the full arch-specific faultinfo10* from the traps.11* On i386, ptrace_faultinfo unfortunately doesn't provide12* all the info, since trap_no is missing.13* All common elements are defined at the same position in14* both structures, thus making it easy to copy the15* contents without knowledge about the structure elements.16*/17struct faultinfo {18int error_code; /* in ptrace_faultinfo misleadingly called is_write */19unsigned long cr2; /* in ptrace_faultinfo called addr */20int trap_no; /* missing in ptrace_faultinfo */21};2223#define FAULT_WRITE(fi) ((fi).error_code & 2)24#define FAULT_ADDRESS(fi) ((fi).cr2)2526#define PTRACE_FULL_FAULTINFO 12728#endif293031