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

Side by Side Diff: compat/non_win/dbghelp.h

Issue 1407643004: Some plumbing for the beginning of getting handles into snapshot/minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@handles-redux
Patch Set: . Created 5 years, 2 months 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 | « no previous file | snapshot/handle_snapshot.h » ('j') | snapshot/handle_snapshot.h » ('J')
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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 //! to the exception that triggered the snapshot to be taken. 614 //! to the exception that triggered the snapshot to be taken.
615 struct __attribute__((packed, aligned(4))) MINIDUMP_MEMORY_LIST { 615 struct __attribute__((packed, aligned(4))) MINIDUMP_MEMORY_LIST {
616 //! \brief The number of memory regions present in the #MemoryRanges array. 616 //! \brief The number of memory regions present in the #MemoryRanges array.
617 uint32_t NumberOfMemoryRanges; 617 uint32_t NumberOfMemoryRanges;
618 618
619 //! \brief Structures identifying each memory region present in the minidump 619 //! \brief Structures identifying each memory region present in the minidump
620 //! file. 620 //! file.
621 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges[0]; 621 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges[0];
622 }; 622 };
623 623
624 //! \brief Contains the state of an individual system handle at the time the
625 //! snapshot was taken.
626 //!
627 //! \sa MINIDUMP_HANDLE_DESCRIPTOR_2
628 struct __attribute__((packed, aligned(4))) MINIDUMP_HANDLE_DESCRIPTOR {
629 //! \brief The operating system handle value.
630 uint64_t Handle;
631
632 //! \brief An RVA to a MINIDUMP_STRING structure that specifies the object
633 //! type of the handle. This member can be zero.
634 RVA TypeNameRva;
635
636 //! \brief An RVA to a MINIDUMP_STRING structure that specifies the object
637 //! name of the handle. This member can be zero.
638 RVA ObjectNameRva;
639
640 //! \brief The meaning of this member depends on the handle type and the
641 //! operating system. On Windows, this corresponds to `OBJ_INHERIT`,
Mark Mentovai 2015/10/14 23:55:13 You got this documentation verbatim from Microsoft
scottmg 2015/10/16 20:51:01 Done.
642 //! `OBJ_CASE_INSENSITIVE`, etc.
643 uint32_t Attributes;
644
645 //! \brief The meaning of this member depends on the handle type and the
646 //! operating system. On Windows, this is the value of an `ACCESS_MASK`.
647 uint32_t GrantedAccess;
648
649 //! \brief The meaning of this member depends on the handle type and the
650 //! operating system. On Windows, this is the number of open handles to
651 //! the object that this handle refers to.
652 uint32_t HandleCount;
653
654 //! \brief The meaning of this member depends on the handle type and the
655 //! operating system. On Windows, this is the number kernel references
656 //! to the object that this handle refers to.
657 uint32_t PointerCount;
658 };
659
660 //! \brief Contains the state of an individual system handle at the time the
661 //! snapshot was taken.
662 //!
663 //! \sa MINIDUMP_HANDLE_DESCRIPTOR
664 struct __attribute__((packed, aligned(4))) MINIDUMP_HANDLE_DESCRIPTOR_2
665 : public MINIDUMP_HANDLE_DESCRIPTOR {
666 //! \brief An RVA to a MINIDUMP_HANDLE_OBJECT_INFORMATION structure that
667 //! specifies object-specific information. This member can be zero if
668 //! there is no extra information.
669 RVA ObjectInfoRva;
670
671 //! \brief Must be zero.
672 uint32_t Reserved0;
673 };
674
675 //! \brief Represents the header for a handle data stream.
676 struct __attribute((packed, aligned(4))) MINIDUMP_HANDLE_DATA_STREAM {
677 //! \brief The size of the header information for the stream, in bytes. This
678 //! value is `sizeof(MINIDUMP_HANDLE_DATA_STREAM)`.
679 uint32_t SizeOfHeader;
680
681 //! \brief The size of a descriptor in the stream, in bytes. This value is
682 //! `sizeof(MINIDUMP_HANDLE_DESCRIPTOR)` or
683 //! `sizeof(MINIDUMP_HANDLE_DESCRIPTOR_2)`.
684 uint32_t SizeOfDescriptor;
685
686 //! \brief The number of descriptors in the stream.
687 uint32_t NumberOfDescriptors;
688
689 //! \brief Must be zero.
690 uint32_t Reserved;
691 };
692
624 //! \anchor MINIDUMP_MISCx 693 //! \anchor MINIDUMP_MISCx
625 //! \name MINIDUMP_MISC* 694 //! \name MINIDUMP_MISC*
626 //! 695 //!
627 //! \brief Field validity flag values for MINIDUMP_MISC_INFO::Flags1. 696 //! \brief Field validity flag values for MINIDUMP_MISC_INFO::Flags1.
628 //! \{ 697 //! \{
629 698
630 //! \brief MINIDUMP_MISC_INFO::ProcessId is valid. 699 //! \brief MINIDUMP_MISC_INFO::ProcessId is valid.
631 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001 700 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001
632 701
633 //! \brief The time-related fields in MINIDUMP_MISC_INFO are valid. 702 //! \brief The time-related fields in MINIDUMP_MISC_INFO are valid.
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 //! - A MINIDUMP_MODULE_LIST stream. All loaded modules are present. 975 //! - A MINIDUMP_MODULE_LIST stream. All loaded modules are present.
907 //! - Typically, a MINIDUMP_MEMORY_LIST stream containing duplicate pointers 976 //! - Typically, a MINIDUMP_MEMORY_LIST stream containing duplicate pointers
908 //! to the stack memory regions also referenced by the MINIDUMP_THREAD_LIST 977 //! to the stack memory regions also referenced by the MINIDUMP_THREAD_LIST
909 //! stream. This type of minidump file also includes a 978 //! stream. This type of minidump file also includes a
910 //! MINIDUMP_MEMORY_DESCRIPTOR containing the 256 bytes centered around 979 //! MINIDUMP_MEMORY_DESCRIPTOR containing the 256 bytes centered around
911 //! the exception address or the instruction pointer. 980 //! the exception address or the instruction pointer.
912 MiniDumpNormal = 0x00000000, 981 MiniDumpNormal = 0x00000000,
913 }; 982 };
914 983
915 #endif // CRASHPAD_COMPAT_NON_WIN_DBGHELP_H_ 984 #endif // CRASHPAD_COMPAT_NON_WIN_DBGHELP_H_
OLDNEW
« no previous file with comments | « no previous file | snapshot/handle_snapshot.h » ('j') | snapshot/handle_snapshot.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698