OLD | NEW |
1 // Copyright (c) 2010, Google Inc. | 1 // Copyright (c) 2010, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 D32(context.cpsr); | 186 D32(context.cpsr); |
187 D64(context.float_save.fpscr); | 187 D64(context.float_save.fpscr); |
188 for (int i = 0; i < MD_FLOATINGSAVEAREA_ARM_FPR_COUNT; ++i) | 188 for (int i = 0; i < MD_FLOATINGSAVEAREA_ARM_FPR_COUNT; ++i) |
189 D64(context.float_save.regs[i]); | 189 D64(context.float_save.regs[i]); |
190 for (int i = 0; i < MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT; ++i) | 190 for (int i = 0; i < MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT; ++i) |
191 D32(context.float_save.extra[i]); | 191 D32(context.float_save.extra[i]); |
192 assert(Size() == sizeof(MDRawContextARM)); | 192 assert(Size() == sizeof(MDRawContextARM)); |
193 } | 193 } |
194 | 194 |
195 Thread::Thread(const Dump &dump, | 195 Thread::Thread(const Dump &dump, |
196 u_int32_t thread_id, const Memory &stack, const Context &context, | 196 uint32_t thread_id, const Memory &stack, const Context &context, |
197 u_int32_t suspend_count, u_int32_t priority_class, | 197 uint32_t suspend_count, uint32_t priority_class, |
198 u_int32_t priority, u_int64_t teb) : Section(dump) { | 198 uint32_t priority, uint64_t teb) : Section(dump) { |
199 D32(thread_id); | 199 D32(thread_id); |
200 D32(suspend_count); | 200 D32(suspend_count); |
201 D32(priority_class); | 201 D32(priority_class); |
202 D32(priority); | 202 D32(priority); |
203 D64(teb); | 203 D64(teb); |
204 stack.CiteMemoryIn(this); | 204 stack.CiteMemoryIn(this); |
205 context.CiteLocationIn(this); | 205 context.CiteLocationIn(this); |
206 assert(Size() == sizeof(MDRawThread)); | 206 assert(Size() == sizeof(MDRawThread)); |
207 } | 207 } |
208 | 208 |
209 Module::Module(const Dump &dump, | 209 Module::Module(const Dump &dump, |
210 u_int64_t base_of_image, | 210 uint64_t base_of_image, |
211 u_int32_t size_of_image, | 211 uint32_t size_of_image, |
212 const String &name, | 212 const String &name, |
213 u_int32_t time_date_stamp, | 213 uint32_t time_date_stamp, |
214 u_int32_t checksum, | 214 uint32_t checksum, |
215 const MDVSFixedFileInfo &version_info, | 215 const MDVSFixedFileInfo &version_info, |
216 const Section *cv_record, | 216 const Section *cv_record, |
217 const Section *misc_record) : Section(dump) { | 217 const Section *misc_record) : Section(dump) { |
218 D64(base_of_image); | 218 D64(base_of_image); |
219 D32(size_of_image); | 219 D32(size_of_image); |
220 D32(checksum); | 220 D32(checksum); |
221 D32(time_date_stamp); | 221 D32(time_date_stamp); |
222 name.CiteStringIn(this); | 222 name.CiteStringIn(this); |
223 D32(version_info.signature); | 223 D32(version_info.signature); |
224 D32(version_info.struct_version); | 224 D32(version_info.struct_version); |
(...skipping 25 matching lines...) Expand all Loading... |
250 MD_VSFIXEDFILEINFO_FILE_OS_NT | MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS32, | 250 MD_VSFIXEDFILEINFO_FILE_OS_NT | MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS32, |
251 // file_os | 251 // file_os |
252 MD_VSFIXEDFILEINFO_FILE_TYPE_APP, // file_type | 252 MD_VSFIXEDFILEINFO_FILE_TYPE_APP, // file_type |
253 MD_VSFIXEDFILEINFO_FILE_SUBTYPE_UNKNOWN, // file_subtype | 253 MD_VSFIXEDFILEINFO_FILE_SUBTYPE_UNKNOWN, // file_subtype |
254 0, // file_date_hi | 254 0, // file_date_hi |
255 0 // file_date_lo | 255 0 // file_date_lo |
256 }; | 256 }; |
257 | 257 |
258 Exception::Exception(const Dump &dump, | 258 Exception::Exception(const Dump &dump, |
259 const Context &context, | 259 const Context &context, |
260 u_int32_t thread_id, | 260 uint32_t thread_id, |
261 u_int32_t exception_code, | 261 uint32_t exception_code, |
262 u_int32_t exception_flags, | 262 uint32_t exception_flags, |
263 u_int64_t exception_address) | 263 uint64_t exception_address) |
264 : Stream(dump, MD_EXCEPTION_STREAM) { | 264 : Stream(dump, MD_EXCEPTION_STREAM) { |
265 D32(thread_id); | 265 D32(thread_id); |
266 D32(0); // __align | 266 D32(0); // __align |
267 D32(exception_code); | 267 D32(exception_code); |
268 D32(exception_flags); | 268 D32(exception_flags); |
269 D64(0); // exception_record | 269 D64(0); // exception_record |
270 D64(exception_address); | 270 D64(exception_address); |
271 D32(0); // number_parameters | 271 D32(0); // number_parameters |
272 D32(0); // __align | 272 D32(0); // __align |
273 for (int i = 0; i < MD_EXCEPTION_MAXIMUM_PARAMETERS; ++i) | 273 for (int i = 0; i < MD_EXCEPTION_MAXIMUM_PARAMETERS; ++i) |
274 D64(0); // exception_information | 274 D64(0); // exception_information |
275 context.CiteLocationIn(this); | 275 context.CiteLocationIn(this); |
276 assert(Size() == sizeof(MDRawExceptionStream)); | 276 assert(Size() == sizeof(MDRawExceptionStream)); |
277 } | 277 } |
278 | 278 |
279 Dump::Dump(u_int64_t flags, | 279 Dump::Dump(uint64_t flags, |
280 Endianness endianness, | 280 Endianness endianness, |
281 u_int32_t version, | 281 uint32_t version, |
282 u_int32_t date_time_stamp) | 282 uint32_t date_time_stamp) |
283 : test_assembler::Section(endianness), | 283 : test_assembler::Section(endianness), |
284 file_start_(0), | 284 file_start_(0), |
285 stream_directory_(*this), | 285 stream_directory_(*this), |
286 stream_count_(0), | 286 stream_count_(0), |
287 thread_list_(*this, MD_THREAD_LIST_STREAM), | 287 thread_list_(*this, MD_THREAD_LIST_STREAM), |
288 module_list_(*this, MD_MODULE_LIST_STREAM), | 288 module_list_(*this, MD_MODULE_LIST_STREAM), |
289 memory_list_(*this, MD_MEMORY_LIST_STREAM) | 289 memory_list_(*this, MD_MEMORY_LIST_STREAM) |
290 { | 290 { |
291 D32(MD_HEADER_SIGNATURE); | 291 D32(MD_HEADER_SIGNATURE); |
292 D32(version); | 292 D32(version); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 // cited using a location descriptor; rather, the Minidump header | 343 // cited using a location descriptor; rather, the Minidump header |
344 // has the stream count and MDRVA. | 344 // has the stream count and MDRVA. |
345 stream_count_label_ = stream_count_; | 345 stream_count_label_ = stream_count_; |
346 stream_directory_rva_ = file_start_ + Size(); | 346 stream_directory_rva_ = file_start_ + Size(); |
347 Append(static_cast<test_assembler::Section &>(stream_directory_)); | 347 Append(static_cast<test_assembler::Section &>(stream_directory_)); |
348 } | 348 } |
349 | 349 |
350 } // namespace SynthMinidump | 350 } // namespace SynthMinidump |
351 | 351 |
352 } // namespace google_breakpad | 352 } // namespace google_breakpad |
OLD | NEW |