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

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

Issue 1377133006: Mostly-boilerplate to add MemoryMapSnapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@memory-info-to-misc
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/mac/process_snapshot_mac.h » ('j') | snapshot/memory_map_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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 //! 130 //!
131 //! \note This field is interpreted as a byte count, not a count of UTF-16 131 //! \note This field is interpreted as a byte count, not a count of UTF-16
132 //! code units or Unicode code points. 132 //! code units or Unicode code points.
133 uint32_t Length; 133 uint32_t Length;
134 134
135 //! \brief The string, encoded in UTF-16, and terminated with a UTF-16 `NUL` 135 //! \brief The string, encoded in UTF-16, and terminated with a UTF-16 `NUL`
136 //! code unit (two `NUL` bytes). 136 //! code unit (two `NUL` bytes).
137 base::char16 Buffer[0]; 137 base::char16 Buffer[0];
138 }; 138 };
139 139
140 //! \brief Describes a region of memory.
141 struct __attribute__((packed, aligned(4))) MINIDUMP_MEMORY_INFO {
Mark Mentovai 2015/10/06 20:44:49 Everything in here is ordered the same as in dbghe
scottmg 2015/10/07 21:45:09 Done.
142 //! \brief The base address of the region of pages.
143 uint64_t BaseAddress;
144
145 //! \brief The base address of a range of pages in this region. The page is
146 //! contained within this memory region.
147 uint64_t AllocationBase;
148
149 //! \brief The memory protection when the region was initially allocated. This
150 //! member can be one of the memory protection options (such as
151 //! `PAGE_EXECUTE`, `PAGE_NOACCESS`, etc.), along with `PAGE_GUARD` or
152 //! `PAGE_NOCACHE`, as needed.
153 uint32_t AllocationProtect;
154
155 //! \brief To align the next field.
156 uint32_t __alignment1;
157
158 //! \brief The size of the region beginning at the base address in which all
159 //! pages have identical attributes, in bytes.
160 uint64_t RegionSize;
161
162 //! \brief The state of the pages in the region. This can be one of
163 //! `MEM_COMMIT`, `MEM_FREE`, or `MEM_RESERVE`.
164 uint32_t State;
165
166 //! \brief The access protection of the pages in the region. This member is
167 //! one of the values listed for the AllocationProtect member.
Mark Mentovai 2015/10/06 20:44:49 #AllocationProtect for proper linking in the gener
scottmg 2015/10/07 21:45:09 Done.
168 uint32_t Protect;
169
170 //! \brief The type of pages in the region. This can be one of `MEM_IMAGE`,
171 //! `MEM_MAPPED`, or `MEM_PRIVATE`.
172 uint32_t Type;
173
174 //! \brief To align the next MINIDUMP_MEMORY_INFO in an array.
175 uint32_t __alignment2;
176 };
177
140 //! \brief Minidump stream type values for MINIDUMP_DIRECTORY::StreamType. Each 178 //! \brief Minidump stream type values for MINIDUMP_DIRECTORY::StreamType. Each
141 //! stream structure has a corresponding stream type value to identify it. 179 //! stream structure has a corresponding stream type value to identify it.
142 //! 180 //!
143 //! \sa crashpad::MinidumpStreamType 181 //! \sa crashpad::MinidumpStreamType
144 enum MINIDUMP_STREAM_TYPE { 182 enum MINIDUMP_STREAM_TYPE {
145 //! \brief The stream type for MINIDUMP_THREAD_LIST. 183 //! \brief The stream type for MINIDUMP_THREAD_LIST.
146 ThreadListStream = 3, 184 ThreadListStream = 3,
147 185
148 //! \brief The stream type for MINIDUMP_MODULE_LIST. 186 //! \brief The stream type for MINIDUMP_MODULE_LIST.
149 ModuleListStream = 4, 187 ModuleListStream = 4,
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 //! module that produced a minidump file. 865 //! module that produced a minidump file.
828 //! 866 //!
829 //! This string is UTF-16-encoded and terminated by a UTF-16 `NUL` code unit. 867 //! This string is UTF-16-encoded and terminated by a UTF-16 `NUL` code unit.
830 //! 868 //!
831 //! On Windows 8.1 (NT 6.3), this may be “dbghelp.i386,6.3.9600.16520” or 869 //! On Windows 8.1 (NT 6.3), this may be “dbghelp.i386,6.3.9600.16520” or
832 //! “dbghelp.amd64,6.3.9600.16520” depending on CPU architecture. 870 //! “dbghelp.amd64,6.3.9600.16520” depending on CPU architecture.
833 base::char16 DbgBldStr[40]; 871 base::char16 DbgBldStr[40];
834 }; 872 };
835 873
836 //! \brief The latest known version of the MINIDUMP_MISC_INFO structure. 874 //! \brief The latest known version of the MINIDUMP_MISC_INFO structure.
837 typedef MINIDUMP_MISC_INFO_4 MINIDUMP_MISC_INFO_N; 875 typedef MINIDUMP_MISC_INFO_4 MINIDUMP_MISC_INFO_N;
Mark Mentovai 2015/10/06 20:44:49 Hey, whaddya know, Windows 10 adds MINIDUMP_MISC_I
scottmg 2015/10/07 21:45:09 Ah, I hadn't. It'd be nice if they documented some
838 876
839 //! \brief Minidump file type values for MINIDUMP_HEADER::Flags. These bits 877 //! \brief Minidump file type values for MINIDUMP_HEADER::Flags. These bits
840 //! describe the types of data carried within a minidump file. 878 //! describe the types of data carried within a minidump file.
841 enum MINIDUMP_TYPE { 879 enum MINIDUMP_TYPE {
842 //! \brief A minidump file without any additional data. 880 //! \brief A minidump file without any additional data.
843 //! 881 //!
844 //! This type of minidump file contains: 882 //! This type of minidump file contains:
845 //! - A MINIDUMP_SYSTEM_INFO stream. 883 //! - A MINIDUMP_SYSTEM_INFO stream.
846 //! - A MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO_2, MINIDUMP_MISC_INFO_3, or 884 //! - A MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO_2, MINIDUMP_MISC_INFO_3, or
847 //! MINIDUMP_MISC_INFO_4 stream, depending on which fields are present. 885 //! MINIDUMP_MISC_INFO_4 stream, depending on which fields are present.
848 //! - A MINIDUMP_THREAD_LIST stream. All threads are present, along with a 886 //! - A MINIDUMP_THREAD_LIST stream. All threads are present, along with a
849 //! snapshot of each thread’s stack memory sufficient to obtain backtraces. 887 //! snapshot of each thread’s stack memory sufficient to obtain backtraces.
850 //! - If the minidump file was generated as a result of an exception, a 888 //! - If the minidump file was generated as a result of an exception, a
851 //! MINIDUMP_EXCEPTION_STREAM describing the exception. 889 //! MINIDUMP_EXCEPTION_STREAM describing the exception.
852 //! - A MINIDUMP_MODULE_LIST stream. All loaded modules are present. 890 //! - A MINIDUMP_MODULE_LIST stream. All loaded modules are present.
853 //! - Typically, a MINIDUMP_MEMORY_LIST stream containing duplicate pointers 891 //! - Typically, a MINIDUMP_MEMORY_LIST stream containing duplicate pointers
854 //! to the stack memory regions also referenced by the MINIDUMP_THREAD_LIST 892 //! to the stack memory regions also referenced by the MINIDUMP_THREAD_LIST
855 //! stream. This type of minidump file also includes a 893 //! stream. This type of minidump file also includes a
856 //! MINIDUMP_MEMORY_DESCRIPTOR containing the 256 bytes centered around 894 //! MINIDUMP_MEMORY_DESCRIPTOR containing the 256 bytes centered around
857 //! the exception address or the instruction pointer. 895 //! the exception address or the instruction pointer.
858 MiniDumpNormal = 0x00000000, 896 MiniDumpNormal = 0x00000000,
859 }; 897 };
860 898
861 #endif // CRASHPAD_COMPAT_NON_WIN_DBGHELP_H_ 899 #endif // CRASHPAD_COMPAT_NON_WIN_DBGHELP_H_
OLDNEW
« no previous file with comments | « no previous file | snapshot/mac/process_snapshot_mac.h » ('j') | snapshot/memory_map_snapshot.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698