| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 //! \brief A list of ::RVA pointers. | 316 //! \brief A list of ::RVA pointers. |
| 317 struct ALIGNAS(4) PACKED MinidumpRVAList { | 317 struct ALIGNAS(4) PACKED MinidumpRVAList { |
| 318 //! \brief The number of children present in the #children array. | 318 //! \brief The number of children present in the #children array. |
| 319 uint32_t count; | 319 uint32_t count; |
| 320 | 320 |
| 321 //! \brief Pointers to other structures in the minidump file. | 321 //! \brief Pointers to other structures in the minidump file. |
| 322 RVA children[0]; | 322 RVA children[0]; |
| 323 }; | 323 }; |
| 324 | 324 |
| 325 //! \brief A list of MINIDUMP_LOCATION_DESCRIPTOR objects. | |
| 326 struct ALIGNAS(4) PACKED MinidumpLocationDescriptorList { | |
| 327 //! \brief The number of children present in the #children array. | |
| 328 uint32_t count; | |
| 329 | |
| 330 //! \brief Pointers to other structures in the minidump file. | |
| 331 MINIDUMP_LOCATION_DESCRIPTOR children[0]; | |
| 332 }; | |
| 333 | |
| 334 //! \brief A key-value pair. | 325 //! \brief A key-value pair. |
| 335 struct ALIGNAS(4) PACKED MinidumpSimpleStringDictionaryEntry { | 326 struct ALIGNAS(4) PACKED MinidumpSimpleStringDictionaryEntry { |
| 336 //! \brief ::RVA of a MinidumpUTF8String containing the key of a key-value | 327 //! \brief ::RVA of a MinidumpUTF8String containing the key of a key-value |
| 337 //! pair. | 328 //! pair. |
| 338 RVA key; | 329 RVA key; |
| 339 | 330 |
| 340 //! \brief ::RVA of a MinidumpUTF8String containing the value of a key-value | 331 //! \brief ::RVA of a MinidumpUTF8String containing the value of a key-value |
| 341 //! pair. | 332 //! pair. |
| 342 RVA value; | 333 RVA value; |
| 343 }; | 334 }; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 //! | 367 //! |
| 377 //! Readers can use this field to determine which other fields in the | 368 //! Readers can use this field to determine which other fields in the |
| 378 //! structure are valid. Upon encountering a value greater than #kVersion, a | 369 //! structure are valid. Upon encountering a value greater than #kVersion, a |
| 379 //! reader should assume that the structure’s layout is compatible with the | 370 //! reader should assume that the structure’s layout is compatible with the |
| 380 //! structure defined as having value #kVersion. | 371 //! structure defined as having value #kVersion. |
| 381 //! | 372 //! |
| 382 //! Writers may produce values less than #kVersion in this field if there is | 373 //! Writers may produce values less than #kVersion in this field if there is |
| 383 //! no need for any fields present in later versions. | 374 //! no need for any fields present in later versions. |
| 384 uint32_t version; | 375 uint32_t version; |
| 385 | 376 |
| 386 //! \brief A link to a MINIDUMP_MODULE structure in the module list stream. | |
| 387 //! | |
| 388 //! This field is an index into MINIDUMP_MODULE_LIST::Modules. This field’s | |
| 389 //! value must be in the range of MINIDUMP_MODULE_LIST::NumberOfEntries. | |
| 390 //! | |
| 391 //! This field is present when #version is at least `1`. | |
| 392 uint32_t minidump_module_list_index; | |
| 393 | |
| 394 //! \brief A MinidumpRVAList pointing to MinidumpUTF8String objects. The | 377 //! \brief A MinidumpRVAList pointing to MinidumpUTF8String objects. The |
| 395 //! module controls the data that appears here. | 378 //! module controls the data that appears here. |
| 396 //! | 379 //! |
| 397 //! These strings correspond to ModuleSnapshot::AnnotationsVector() and do not | 380 //! These strings correspond to ModuleSnapshot::AnnotationsVector() and do not |
| 398 //! duplicate anything in #simple_annotations. | 381 //! duplicate anything in #simple_annotations. |
| 399 //! | 382 //! |
| 400 //! This field is present when #version is at least `1`. | 383 //! This field is present when #version is at least `1`. |
| 401 MINIDUMP_LOCATION_DESCRIPTOR list_annotations; | 384 MINIDUMP_LOCATION_DESCRIPTOR list_annotations; |
| 402 | 385 |
| 403 //! \brief A MinidumpSimpleStringDictionary pointing to strings interpreted as | 386 //! \brief A MinidumpSimpleStringDictionary pointing to strings interpreted as |
| 404 //! key-value pairs. The module controls the data that appears here. | 387 //! key-value pairs. The module controls the data that appears here. |
| 405 //! | 388 //! |
| 406 //! These key-value pairs correspond to | 389 //! These key-value pairs correspond to |
| 407 //! ModuleSnapshot::AnnotationsSimpleMap() and do not duplicate anything in | 390 //! ModuleSnapshot::AnnotationsSimpleMap() and do not duplicate anything in |
| 408 //! #list_annotations. | 391 //! #list_annotations. |
| 409 //! | 392 //! |
| 410 //! This field is present when #version is at least `1`. | 393 //! This field is present when #version is at least `1`. |
| 411 MINIDUMP_LOCATION_DESCRIPTOR simple_annotations; | 394 MINIDUMP_LOCATION_DESCRIPTOR simple_annotations; |
| 412 }; | 395 }; |
| 413 | 396 |
| 397 //! \brief A link between a MINIDUMP_MODULE structure and additional |
| 398 //! Crashpad-specific information about a module carried within a minidump |
| 399 //! file. |
| 400 struct ALIGNAS(4) PACKED MinidumpModuleCrashpadInfoLink { |
| 401 //! \brief A link to a MINIDUMP_MODULE structure in the module list stream. |
| 402 //! |
| 403 //! This field is an index into MINIDUMP_MODULE_LIST::Modules. This field’s |
| 404 //! value must be in the range of MINIDUMP_MODULE_LIST::NumberOfEntries. |
| 405 uint32_t minidump_module_list_index; |
| 406 |
| 407 //! \brief A link to a MinidumpModuleCrashpadInfo structure. |
| 408 //! |
| 409 //! MinidumpModuleCrashpadInfo structures are accessed indirectly through |
| 410 //! MINIDUMP_LOCATION_DESCRIPTOR pointers to allow for future growth of the |
| 411 //! MinidumpModuleCrashpadInfo structure. |
| 412 MINIDUMP_LOCATION_DESCRIPTOR location; |
| 413 }; |
| 414 |
| 414 //! \brief Additional Crashpad-specific information about modules carried within | 415 //! \brief Additional Crashpad-specific information about modules carried within |
| 415 //! a minidump file. | 416 //! a minidump file. |
| 416 //! | 417 //! |
| 417 //! This structure augments the information provided by | 418 //! This structure augments the information provided by |
| 418 //! MINIDUMP_MODULE_LIST. The minidump file must contain a module list stream | 419 //! MINIDUMP_MODULE_LIST. The minidump file must contain a module list stream |
| 419 //! (::kMinidumpStreamTypeModuleList) in order for this structure to appear. | 420 //! (::kMinidumpStreamTypeModuleList) in order for this structure to appear. |
| 420 //! | 421 //! |
| 421 //! MinidumpModuleCrashpadInfoList::count may be less than the value of | 422 //! MinidumpModuleCrashpadInfoList::count may be less than the value of |
| 422 //! MINIDUMP_MODULE_LIST::NumberOfModules because not every MINIDUMP_MODULE | 423 //! MINIDUMP_MODULE_LIST::NumberOfModules because not every MINIDUMP_MODULE |
| 423 //! structure carried within the minidump file will necessarily have | 424 //! structure carried within the minidump file will necessarily have |
| 424 //! Crashpad-specific information provided by a MinidumpModuleCrashpadInfo | 425 //! Crashpad-specific information provided by a MinidumpModuleCrashpadInfo |
| 425 //! structure. | 426 //! structure. |
| 426 //! | 427 struct ALIGNAS(4) PACKED MinidumpModuleCrashpadInfoList { |
| 427 //! MinidumpModuleCrashpadInfoList::children references | 428 //! \brief The number of children present in the #modules array. |
| 428 //! MinidumpModuleCrashpadInfo children indirectly through | 429 uint32_t count; |
| 429 //! MINIDUMP_LOCATION_DESCRIPTOR pointers to allow for future growth of the | 430 |
| 430 //! MinidumpModuleCrashpadInfo structure. | 431 //! \brief Crashpad-specific information about modules, along with links to |
| 431 using MinidumpModuleCrashpadInfoList = MinidumpLocationDescriptorList; | 432 //! MINIDUMP_MODULE structures that contain module information |
| 433 //! traditionally carried within minidump files. |
| 434 MinidumpModuleCrashpadInfoLink modules[0]; |
| 435 }; |
| 432 | 436 |
| 433 //! \brief Additional Crashpad-specific information carried within a minidump | 437 //! \brief Additional Crashpad-specific information carried within a minidump |
| 434 //! file. | 438 //! file. |
| 435 //! | 439 //! |
| 436 //! This structure is versioned. When changing this structure, leave the | 440 //! This structure is versioned. When changing this structure, leave the |
| 437 //! existing structure intact so that earlier parsers will be able to understand | 441 //! existing structure intact so that earlier parsers will be able to understand |
| 438 //! the fields they are aware of, and make additions at the end of the | 442 //! the fields they are aware of, and make additions at the end of the |
| 439 //! structure. Revise #kVersion and document each field’s validity based on | 443 //! structure. Revise #kVersion and document each field’s validity based on |
| 440 //! #version, so that newer parsers will be able to determine whether the added | 444 //! #version, so that newer parsers will be able to determine whether the added |
| 441 //! fields are valid or not. | 445 //! fields are valid or not. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 #if defined(COMPILER_MSVC) | 478 #if defined(COMPILER_MSVC) |
| 475 #pragma pack(pop) | 479 #pragma pack(pop) |
| 476 #endif // COMPILER_MSVC | 480 #endif // COMPILER_MSVC |
| 477 #undef PACKED | 481 #undef PACKED |
| 478 | 482 |
| 479 MSVC_POP_WARNING(); // C4200 | 483 MSVC_POP_WARNING(); // C4200 |
| 480 | 484 |
| 481 } // namespace crashpad | 485 } // namespace crashpad |
| 482 | 486 |
| 483 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ | 487 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ |
| OLD | NEW |