1/*
2 * This file is part of ltrace.
3 * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc.
4 * Copyright (C) 2006 Ian Wienand
5 * Copyright (C) 2004 Juan Cespedes
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 */
22#ifndef LTRACE_X86_ARCH_H
23#define LTRACE_X86_ARCH_H
24
25#include "vect.h"
26
27#define BREAKPOINT_VALUE {0xcc}
28#define BREAKPOINT_LENGTH 1
29#define DECR_PC_AFTER_BREAK 1
30#define ARCH_HAVE_FETCH_ARG
31#define ARCH_HAVE_SIZEOF
32#define ARCH_HAVE_ALIGNOF
33#define ARCH_ENDIAN_LITTLE
34
35#define ARCH_HAVE_ADD_PLT_ENTRY
36
37#define ARCH_HAVE_LTELF_DATA
38struct arch_ltelf_data {
39	struct vect plt_map;
40};
41
42#ifdef __x86_64__
43#define LT_ELFCLASS	ELFCLASS64
44#define LT_ELF_MACHINE	EM_X86_64
45#endif
46#define LT_ELFCLASS2	ELFCLASS32
47#define LT_ELF_MACHINE2	EM_386
48
49#endif /* LTRACE_X86_ARCH_H */
50