OLD | NEW |
1 // -*- mode: c++ -*- | 1 // -*- mode: c++ -*- |
2 | 2 |
3 // Copyright (c) 2010 Google Inc. | 3 // Copyright (c) 2010 Google Inc. |
4 // All rights reserved. | 4 // All rights reserved. |
5 // | 5 // |
6 // Redistribution and use in source and binary forms, with or without | 6 // Redistribution and use in source and binary forms, with or without |
7 // modification, are permitted provided that the following conditions are | 7 // modification, are permitted provided that the following conditions are |
8 // met: | 8 // met: |
9 // | 9 // |
10 // * Redistributions of source code must retain the above copyright | 10 // * Redistributions of source code must retain the above copyright |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 }; | 71 }; |
72 | 72 |
73 StackFrameX86() | 73 StackFrameX86() |
74 : context(), | 74 : context(), |
75 context_validity(CONTEXT_VALID_NONE), | 75 context_validity(CONTEXT_VALID_NONE), |
76 windows_frame_info(NULL), | 76 windows_frame_info(NULL), |
77 cfi_frame_info(NULL) {} | 77 cfi_frame_info(NULL) {} |
78 ~StackFrameX86(); | 78 ~StackFrameX86(); |
79 | 79 |
80 // Overriden to return the return address as saved on the stack. | 80 // Overriden to return the return address as saved on the stack. |
81 virtual u_int64_t ReturnAddress() const; | 81 virtual uint64_t ReturnAddress() const; |
82 | 82 |
83 // Register state. This is only fully valid for the topmost frame in a | 83 // Register state. This is only fully valid for the topmost frame in a |
84 // stack. In other frames, the values of nonvolatile registers may be | 84 // stack. In other frames, the values of nonvolatile registers may be |
85 // present, given sufficient debugging information. Refer to | 85 // present, given sufficient debugging information. Refer to |
86 // context_validity. | 86 // context_validity. |
87 MDRawContextX86 context; | 87 MDRawContextX86 context; |
88 | 88 |
89 // context_validity is actually ContextValidity, but int is used because | 89 // context_validity is actually ContextValidity, but int is used because |
90 // the OR operator doesn't work well with enumerated types. This indicates | 90 // the OR operator doesn't work well with enumerated types. This indicates |
91 // which fields in context are valid. | 91 // which fields in context are valid. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 CONTEXT_VALID_R13 = 1 << 13, | 144 CONTEXT_VALID_R13 = 1 << 13, |
145 CONTEXT_VALID_R14 = 1 << 14, | 145 CONTEXT_VALID_R14 = 1 << 14, |
146 CONTEXT_VALID_R15 = 1 << 15, | 146 CONTEXT_VALID_R15 = 1 << 15, |
147 CONTEXT_VALID_RIP = 1 << 16, | 147 CONTEXT_VALID_RIP = 1 << 16, |
148 CONTEXT_VALID_ALL = -1 | 148 CONTEXT_VALID_ALL = -1 |
149 }; | 149 }; |
150 | 150 |
151 StackFrameAMD64() : context(), context_validity(CONTEXT_VALID_NONE) {} | 151 StackFrameAMD64() : context(), context_validity(CONTEXT_VALID_NONE) {} |
152 | 152 |
153 // Overriden to return the return address as saved on the stack. | 153 // Overriden to return the return address as saved on the stack. |
154 virtual u_int64_t ReturnAddress() const; | 154 virtual uint64_t ReturnAddress() const; |
155 | 155 |
156 // Register state. This is only fully valid for the topmost frame in a | 156 // Register state. This is only fully valid for the topmost frame in a |
157 // stack. In other frames, which registers are present depends on what | 157 // stack. In other frames, which registers are present depends on what |
158 // debugging information we had available. Refer to context_validity. | 158 // debugging information we had available. Refer to context_validity. |
159 MDRawContextAMD64 context; | 159 MDRawContextAMD64 context; |
160 | 160 |
161 // For each register in context whose value has been recovered, we set | 161 // For each register in context whose value has been recovered, we set |
162 // the corresponding CONTEXT_VALID_ bit in context_validity. | 162 // the corresponding CONTEXT_VALID_ bit in context_validity. |
163 // | 163 // |
164 // context_validity's type should actually be ContextValidity, but | 164 // context_validity's type should actually be ContextValidity, but |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 // context_validity's type should actually be ContextValidity, but | 240 // context_validity's type should actually be ContextValidity, but |
241 // we use int instead because the bitwise inclusive or operator | 241 // we use int instead because the bitwise inclusive or operator |
242 // yields an int when applied to enum values, and C++ doesn't | 242 // yields an int when applied to enum values, and C++ doesn't |
243 // silently convert from ints to enums. | 243 // silently convert from ints to enums. |
244 int context_validity; | 244 int context_validity; |
245 }; | 245 }; |
246 | 246 |
247 } // namespace google_breakpad | 247 } // namespace google_breakpad |
248 | 248 |
249 #endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ | 249 #endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ |
OLD | NEW |