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

Side by Side Diff: minidump/minidump_extensions.h

Issue 675803002: Add MinidumpCrashpadModule, its list form, their writers, and their tests (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 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
« no previous file with comments | « minidump/minidump_crashpad_module_writer_test.cc ('k') | minidump/minidump_extensions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 //! \brief A list of key-value pairs. 310 //! \brief A list of key-value pairs.
311 struct __attribute__((packed, aligned(4))) MinidumpSimpleStringDictionary { 311 struct __attribute__((packed, aligned(4))) MinidumpSimpleStringDictionary {
312 //! \brief The number of key-value pairs present. 312 //! \brief The number of key-value pairs present.
313 uint32_t count; 313 uint32_t count;
314 314
315 //! \brief A list of MinidumpSimpleStringDictionaryEntry entries. 315 //! \brief A list of MinidumpSimpleStringDictionaryEntry entries.
316 MinidumpSimpleStringDictionaryEntry entries[0]; 316 MinidumpSimpleStringDictionaryEntry entries[0];
317 }; 317 };
318 318
319 //! \brief Additional Crashpad-specific information carried within a minidump 319 //! \brief Additional Crashpad-specific information about a module carried
320 //! file. 320 //! within a minidump file.
321 struct __attribute__((packed, aligned(4))) MinidumpCrashpadInfo { 321 //!
322 //! \brief The size of the entire structure, in bytes. 322 //! This structure augments the information provided by MINIDUMP_MODULE. The
323 //! minidump file must contain a module list stream
324 //! (::kMinidumpStreamTypeModuleList) in order for this structure to appear.
325 //!
326 //! This structure is versioned. When changing this structure, leave the
327 //! 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
329 //! 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
331 //! fields are valid or not.
332 //!
333 //! \sa MinidumpCrashpadModuleList
334 struct __attribute__((packed, aligned(4))) MinidumpCrashpadModule {
Robert Sesek 2014/10/23 19:25:25 I think "CrashpadModule" is a bit of a misnomer. M
Mark Mentovai 2014/10/23 19:47:53 Robert Sesek wrote:
335 //! \brief The structure’s currently-defined version number.
323 //! 336 //!
324 //! \sa version 337 //! \sa version
325 uint32_t size; 338 static const uint32_t kVersion = 1;
326 339
327 //! \brief The structure’s version number. This can be used to determine which 340 //! \brief The structure’s version number.
328 //! other fields in the structure are valid.
329 //! 341 //!
330 //! \sa size 342 //! Readers can use this field to determine which other fields in the
343 //! structure are valid. Upon encountering a value greater than #kVersion, a
344 //! reader should assume that the structure’s layout is compatible with the
345 //! structure defined as having value #kVersion.
346 //!
347 //! Writers may produce values less than #kVersion in this field if there is
348 //! no need for any fields present in later versions.
331 uint32_t version; 349 uint32_t version;
332 350
351 //! \brief A link to a MINIDUMP_MODULE structure in the module list stream.
352 //!
353 //! This field is an index into MINIDUMP_MODULE_LIST::Modules. This field’s
354 //! value must be in the range of MINIDUMP_MODULE_LIST::NumberOfEntries.
355 //!
356 //! This field is present when #version is at least `1`.
357 uint32_t minidump_module_list_index;
358
333 //! \brief A MinidumpSimpleStringDictionary pointing to strings interpreted as 359 //! \brief A MinidumpSimpleStringDictionary pointing to strings interpreted as
334 //! key-value pairs. The process that crashed controlled the data that 360 //! key-value pairs. The module controls the data that appears here.
335 //! appears here.
336 //!
337 //! If MINIDUMP_LOCATION_DESCRIPTOR::DataSize is `0`, no key-value pairs are
338 //! present, and MINIDUMP_LOCATION_DESCRIPTOR::Rva should not be consulted.
339 //! 361 //!
340 //! This field is present when #version is at least `1`. 362 //! This field is present when #version is at least `1`.
341 MINIDUMP_LOCATION_DESCRIPTOR simple_annotations; 363 MINIDUMP_LOCATION_DESCRIPTOR simple_annotations;
342 }; 364 };
343 365
366 //! \brief Additional Crashpad-specific information about modules carried within
367 //! a minidump file.
368 //!
369 //! This structure augments the information provided by
370 //! MINIDUMP_MODULE_LIST. The minidump file must contain a module list stream
371 //! (::kMinidumpStreamTypeModuleList) in order for this structure to appear.
372 struct __attribute__((packed, aligned(4))) MinidumpCrashpadModuleList {
373 //! \brief The number of modules present in the #modules array.
Robert Sesek 2014/10/23 19:25:25 #crahspad_modules, although I think that's a bit o
Mark Mentovai 2014/10/23 19:47:53 Robert Sesek wrote:
374 //!
375 //! This may be less than the value of MINIDUMP_MODULE_LIST::NumberOfModules
376 //! because not every MINIDUMP_MODULE structure carried within the minidump
377 //! file will necessarily have Crashpad-specific information provided by a
378 //! MinidumpCrashpadModule structure.
379 uint32_t count;
380
381 //! \brief Pointers to MinidumpCrashpadModule structures.
382 //!
383 //! These are referenced indirectly through MINIDUMP_LOCATION_DESCRIPTOR
384 //! pointers to allow for future growth of the MinidumpCrashpadModule
385 //! structure.
386 MINIDUMP_LOCATION_DESCRIPTOR crashpad_modules[0];
387 };
388
389 //! \brief Additional Crashpad-specific information carried within a minidump
390 //! file.
391 //!
392 //! This structure is versioned. When changing this structure, leave the
393 //! 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
395 //! 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
397 //! fields are valid or not.
398 struct __attribute__((packed, aligned(4))) MinidumpCrashpadInfo {
399 //! \brief The structure’s currently-defined version number.
400 //!
401 //! \sa version
402 static const uint32_t kVersion = 1;
403
404 //! \brief The structure’s version number.
405 //!
406 //! Readers can use this field to determine which other fields in the
407 //! structure are valid. Upon encountering a value greater than #kVersion, a
408 //! reader should assume that the structure’s layout is compatible with the
409 //! structure defined as having value #kVersion.
410 //!
411 //! Writers may produce values less than #kVersion in this field if there is
412 //! no need for any fields present in later versions.
413 uint32_t version;
414
415 //! \brief A pointer to a MinidumpCrashpadModuleList structure.
416 //!
417 //! This field is present when #version is at least `1`.
418 MINIDUMP_LOCATION_DESCRIPTOR crashpad_module_list;
419 };
420
344 } // namespace crashpad 421 } // namespace crashpad
345 422
346 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ 423 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_
OLDNEW
« no previous file with comments | « minidump/minidump_crashpad_module_writer_test.cc ('k') | minidump/minidump_extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698