Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: minidump/minidump_extensions.h

Issue 707543002: MinidumpLocationDescriptorListWriter (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 //! \brief The path or file name of the `.pdb` file associated with the 290 //! \brief The path or file name of the `.pdb` file associated with the
291 //! module. 291 //! module.
292 //! 292 //!
293 //! This is a NUL-terminated string. On Windows, it will be encoded in the 293 //! This is a NUL-terminated string. On Windows, it will be encoded in the
294 //! code page of the system that linked the module. On other operating 294 //! code page of the system that linked the module. On other operating
295 //! systems, UTF-8 may be used. 295 //! systems, UTF-8 may be used.
296 uint8_t pdb_name[1]; 296 uint8_t pdb_name[1];
297 }; 297 };
298 298
299 //! \brief A list of MINIDUMP_LOCATION_DESCRIPTOR objects.
300 struct __attribute__((packed, aligned(4))) MinidumpLocationDescriptorList {
301 //! \brief The number of children present in the #children array.
302 uint32_t count;
303
304 //! \brief Pointers to other structures in the minidump file.
305 MINIDUMP_LOCATION_DESCRIPTOR children[0];
306 };
307
299 //! \brief A key-value pair. 308 //! \brief A key-value pair.
300 struct __attribute__((packed, aligned(4))) MinidumpSimpleStringDictionaryEntry { 309 struct __attribute__((packed, aligned(4))) MinidumpSimpleStringDictionaryEntry {
301 //! \brief ::RVA of a MinidumpUTF8String containing the key of a key-value 310 //! \brief ::RVA of a MinidumpUTF8String containing the key of a key-value
302 //! pair. 311 //! pair.
303 RVA key; 312 RVA key;
304 313
305 //! \brief ::RVA of a MinidumpUTF8String containing the value of a key-value 314 //! \brief ::RVA of a MinidumpUTF8String containing the value of a key-value
306 //! pair. 315 //! pair.
307 RVA value; 316 RVA value;
308 }; 317 };
(...skipping 14 matching lines...) Expand all
323 //! minidump file must contain a module list stream 332 //! minidump file must contain a module list stream
324 //! (::kMinidumpStreamTypeModuleList) in order for this structure to appear. 333 //! (::kMinidumpStreamTypeModuleList) in order for this structure to appear.
325 //! 334 //!
326 //! This structure is versioned. When changing this structure, leave the 335 //! This structure is versioned. When changing this structure, leave the
327 //! existing structure intact so that earlier parsers will be able to understand 336 //! existing structure intact so that earlier parsers will be able to understand
328 //! the fields they are aware of, and make additions at the end of the 337 //! the fields they are aware of, and make additions at the end of the
329 //! structure. Revise #kVersion and document each field’s validity based on 338 //! structure. Revise #kVersion and document each field’s validity based on
330 //! #version, so that newer parsers will be able to determine whether the added 339 //! #version, so that newer parsers will be able to determine whether the added
331 //! fields are valid or not. 340 //! fields are valid or not.
332 //! 341 //!
333 //! \sa MinidumpModuleCrashpadInfoList 342 //! \sa #MinidumpModuleCrashpadInfoList
334 struct __attribute__((packed, aligned(4))) MinidumpModuleCrashpadInfo { 343 struct __attribute__((packed, aligned(4))) MinidumpModuleCrashpadInfo {
335 //! \brief The structure’s currently-defined version number. 344 //! \brief The structure’s currently-defined version number.
336 //! 345 //!
337 //! \sa version 346 //! \sa version
338 static const uint32_t kVersion = 1; 347 static const uint32_t kVersion = 1;
339 348
340 //! \brief The structure’s version number. 349 //! \brief The structure’s version number.
341 //! 350 //!
342 //! Readers can use this field to determine which other fields in the 351 //! Readers can use this field to determine which other fields in the
343 //! structure are valid. Upon encountering a value greater than #kVersion, a 352 //! structure are valid. Upon encountering a value greater than #kVersion, a
(...skipping 18 matching lines...) Expand all
362 //! This field is present when #version is at least `1`. 371 //! This field is present when #version is at least `1`.
363 MINIDUMP_LOCATION_DESCRIPTOR simple_annotations; 372 MINIDUMP_LOCATION_DESCRIPTOR simple_annotations;
364 }; 373 };
365 374
366 //! \brief Additional Crashpad-specific information about modules carried within 375 //! \brief Additional Crashpad-specific information about modules carried within
367 //! a minidump file. 376 //! a minidump file.
368 //! 377 //!
369 //! This structure augments the information provided by 378 //! This structure augments the information provided by
370 //! MINIDUMP_MODULE_LIST. The minidump file must contain a module list stream 379 //! MINIDUMP_MODULE_LIST. The minidump file must contain a module list stream
371 //! (::kMinidumpStreamTypeModuleList) in order for this structure to appear. 380 //! (::kMinidumpStreamTypeModuleList) in order for this structure to appear.
372 struct __attribute__((packed, aligned(4))) MinidumpModuleCrashpadInfoList { 381 //!
373 //! \brief The number of modules present in the #modules array. 382 //! MinidumpModuleCrashpadInfoList::count may be less than the value of
374 //! 383 //! MINIDUMP_MODULE_LIST::NumberOfModules because not every MINIDUMP_MODULE
375 //! This may be less than the value of MINIDUMP_MODULE_LIST::NumberOfModules 384 //! structure carried within the minidump file will necessarily have
376 //! because not every MINIDUMP_MODULE structure carried within the minidump 385 //! Crashpad-specific information provided by a MinidumpModuleCrashpadInfo
377 //! file will necessarily have Crashpad-specific information provided by a 386 //! structure.
378 //! MinidumpModuleCrashpadInfo structure. 387 //!
379 uint32_t count; 388 //! MinidumpModuleCrashpadInfoList::children references
380 389 //! MinidumpModuleCrashpadInfo children indirectly through
381 //! \brief Pointers to MinidumpModuleCrashpadInfo structures. 390 //! MINIDUMP_LOCATION_DESCRIPTOR pointers to allow for future growth of the
382 //! 391 //! MinidumpModuleCrashpadInfo structure.
383 //! These are referenced indirectly through MINIDUMP_LOCATION_DESCRIPTOR 392 using MinidumpModuleCrashpadInfoList = MinidumpLocationDescriptorList;
384 //! pointers to allow for future growth of the MinidumpModuleCrashpadInfo
385 //! structure.
386 MINIDUMP_LOCATION_DESCRIPTOR modules[0];
387 };
388 393
389 //! \brief Additional Crashpad-specific information carried within a minidump 394 //! \brief Additional Crashpad-specific information carried within a minidump
390 //! file. 395 //! file.
391 //! 396 //!
392 //! This structure is versioned. When changing this structure, leave the 397 //! This structure is versioned. When changing this structure, leave the
393 //! existing structure intact so that earlier parsers will be able to understand 398 //! existing structure intact so that earlier parsers will be able to understand
394 //! the fields they are aware of, and make additions at the end of the 399 //! the fields they are aware of, and make additions at the end of the
395 //! structure. Revise #kVersion and document each field’s validity based on 400 //! structure. Revise #kVersion and document each field’s validity based on
396 //! #version, so that newer parsers will be able to determine whether the added 401 //! #version, so that newer parsers will be able to determine whether the added
397 //! fields are valid or not. 402 //! fields are valid or not.
398 struct __attribute__((packed, aligned(4))) MinidumpCrashpadInfo { 403 struct __attribute__((packed, aligned(4))) MinidumpCrashpadInfo {
399 //! \brief The structure’s currently-defined version number. 404 //! \brief The structure’s currently-defined version number.
400 //! 405 //!
401 //! \sa version 406 //! \sa version
402 static const uint32_t kVersion = 1; 407 static const uint32_t kVersion = 1;
403 408
404 //! \brief The structure’s version number. 409 //! \brief The structure’s version number.
405 //! 410 //!
406 //! Readers can use this field to determine which other fields in the 411 //! Readers can use this field to determine which other fields in the
407 //! structure are valid. Upon encountering a value greater than #kVersion, a 412 //! structure are valid. Upon encountering a value greater than #kVersion, a
408 //! reader should assume that the structure’s layout is compatible with the 413 //! reader should assume that the structure’s layout is compatible with the
409 //! structure defined as having value #kVersion. 414 //! structure defined as having value #kVersion.
410 //! 415 //!
411 //! Writers may produce values less than #kVersion in this field if there is 416 //! Writers may produce values less than #kVersion in this field if there is
412 //! no need for any fields present in later versions. 417 //! no need for any fields present in later versions.
413 uint32_t version; 418 uint32_t version;
414 419
415 //! \brief A pointer to a MinidumpModuleCrashpadInfoList structure. 420 //! \brief A pointer to a #MinidumpModuleCrashpadInfoList structure.
416 //! 421 //!
417 //! This field is present when #version is at least `1`. 422 //! This field is present when #version is at least `1`.
418 MINIDUMP_LOCATION_DESCRIPTOR module_list; 423 MINIDUMP_LOCATION_DESCRIPTOR module_list;
419 }; 424 };
420 425
421 } // namespace crashpad 426 } // namespace crashpad
422 427
423 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ 428 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_
OLDNEW
« no previous file with comments | « minidump/minidump_crashpad_info_writer_test.cc ('k') | minidump/minidump_location_descriptor_list_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698