Debugging: Add code to print backtrace for guest on SIGSEGV
[nativeclient.git] / ncv / ncdecode_tests.h
blob6bc046015286f2983fddf86a8f6ae450c52a67ff
1 /*
2 * Copyright 2008, Google Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following disclaimer
13 * in the documentation and/or other materials provided with the
14 * distribution.
15 * * Neither the name of Google Inc. nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 char test1[] = {0x55,
34 0x89, 0xe5,
35 0x83, 0xec, 0x08,
36 0xe8, 0x81, 0x00, 0x00, 0x00,
37 0xe8, 0xd3, 0x00, 0x00, 0x00,
38 0xe8, 0xf3, 0x04, 0x00, 0x00,
39 0xc9,
40 0xc3,
41 0x00, 0x00};
43 char test2[] = {
44 0x8d, 0x4c, 0x24, 0x04,
45 0x83, 0xe4, 0xf0,
46 0xff, 0x71, 0xfc,
47 0x55,
48 0x89, 0xe5,
49 0x51,
50 0x66, 0x90,
51 0x83, 0xec, 0x24,
52 0x89, 0x4d, 0xe8,
53 0xc7, 0x45, 0xf4, 0x0a, 0x00, 0x00, 0x00,
54 0x8b, 0x45, 0xe8,
55 0x83, 0x38, 0x01,
56 0x7f, 0x2b,
57 0x8b, 0x55, 0xe8,
58 0x8b, 0x42, 0x04,
59 0x8b, 0x00,
60 0x8d, 0x76, 0x00,
61 0x89, 0x44, 0x24, 0x04,
62 0xc7, 0x04, 0x24, 0x54, 0x14, 0x00, 0x08,
63 0xe8, 0xc0, 0x02, 0x00, 0x00,
64 0xc7, 0x04, 0x24, 0x01, 0x00, 0x00, 0x00,
65 0x8d, 0x74, 0x26, 0x00,
66 0xe8, 0xc0, 0x01, 0x00, 0x00,
67 0x8b, 0x55, 0xe8,
68 0x8b, 0x42, 0x04,
69 0x83, 0xc0, 0x04,
70 0x8b, 0x00,
71 0x89, 0x04, 0x24,
72 0x66, 0x90,
73 0x8d, 0x74, 0x26, 0x00,
74 0x8d, 0xbc, 0x27, 0x00, 0x00, 0x00, 0x00,
75 0xe8, 0x90, 0x09, 0x00, 0x00,
76 0x89, 0x45, 0xf8,
77 0x8b, 0x45, 0xe8,
78 0x83, 0x38, 0x02,
79 0x7e, 0x25,
80 0x8b, 0x55, 0xe8,
81 0x66, 0x90,
82 0x8b, 0x42, 0x04,
83 0x83, 0xc0, 0x08,
84 0x8b, 0x00,
85 0x89, 0x04, 0x24,
86 0xe8, 0x70, 0x09, 0x00, 0x00,
87 0x89, 0x45, 0xf4,
88 0x8d, 0xb6, 0x00, 0x00, 0x00, 0x00,
89 0x8d, 0xbc, 0x27, 0x00, 0x00, 0x00, 0x00,
90 0x8b, 0x45, 0xf4,
91 0xa3, 0x28, 0x2f, 0x00, 0x08,
92 0xeb, 0x26,
93 0x8d, 0xb6, 0x00, 0x00, 0x00, 0x00,
94 0xc7, 0x44, 0x24, 0x08, 0x03, 0x00, 0x00, 0x00,
95 0xc7, 0x44, 0x24, 0x04, 0x01, 0x00, 0x00, 0x00,
96 0x8b, 0x45, 0xf4,
97 0x89, 0x04, 0x24,
98 0x90,
99 0x8d, 0x74, 0x26, 0x00,
100 0xe8, 0x20, 0x00, 0x00, 0x00,
101 0x83, 0x7d, 0xf8, 0x00,
102 0x0f, 0x9f, 0xc0,
103 0x83, 0x6d, 0xf8, 0x01,
104 0x84, 0xc0,
105 0x8d, 0x76, 0x00,
106 0x75, 0xce,
107 0xc7, 0x04, 0x24, 0x00, 0x00, 0x00, 0x00,
108 0x66, 0x90,
109 0xe8, 0x20, 0x01, 0x00, 0x00,
110 0x55,
111 0x89, 0xe5,
112 0x83, 0xec, 0x1c,
113 0x83, 0x7d, 0x08, 0x01,
114 0x75, 0x44,
115 0x8b, 0x55, 0x0c,
116 0x90,
117 0x8b, 0x04, 0x95, 0x24, 0x2f, 0x00, 0x08,
118 0x83, 0xe8, 0x01,
119 0x8d, 0xb6, 0x00, 0x00, 0x00, 0x00,
120 0x89, 0x04, 0x95, 0x24, 0x2f, 0x00, 0x08,
121 0x8b, 0x55, 0x10,
122 0x8d, 0xb6, 0x00, 0x00, 0x00, 0x00,
123 0x8b, 0x04, 0x95, 0x24, 0x2f, 0x00, 0x08,
124 0x83, 0xc0, 0x01,
125 0x8d, 0xb6, 0x00, 0x00, 0x00, 0x00,
126 0x89, 0x04, 0x95, 0x24, 0x2f, 0x00, 0x08,
127 0xeb, 0x77,
128 0x8d, 0xb4, 0x26, 0x00, 0x00, 0x00, 0x00,
129 0x8b, 0x45, 0x10,
130 0x8b, 0x55, 0x0c,
131 0x01, 0xc2,
132 0xb8, 0x06, 0x00, 0x00, 0x00,
133 0x29, 0xd0,
134 0x90