aboutsummaryrefslogtreecommitdiff
path: root/src/processor/synth_minidump.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix pointer style to match the style guideMike Frysinger2020-07-151-27/+27
| | | | | | | | | | We do this in a lot of places, but we're inconsistent. Normalize the code to the Google C++ style guide. Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932 Reviewed-by: Sterling Augustine <saugustine@google.com> Reviewed-by: Mark Mentovai <mark@chromium.org>
* processor: Bound number of exception parameters readJoshua Peraza2020-04-271-1/+1
| | | | | | | Bug: 1074532 Change-Id: I769074d7cbe0a47c8c8b716275d815e4b7f6dd63 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2168816 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Added classes to support reading unloaded module lists in minidumps.Joshua Peraza2016-12-161-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementations of Module/UnloadedModule and ModuleList/UnloadedModuleList are very similar. They have been made separate classes because they operate on different structs, complicating factoring code into a base class and have sufficiently different implementation that templates would not be suitable. When unloaded modules have partially overlapping ranges, the module shrink down feature is used to move the start of the higher range to the end of the lower range. If two unloaded modules overlap identically, the second module will not be added to the range map and the failure ignored. Places where MinidumpUnloadedModule differs from MinidumpModule: code_identifier: the android/linux case is deleted since cv_records never exist. debug_file/debug_identifier/version: always return empty strings. Read: an expected size is provided as opposed to MD_MODULE_SIZE. A seek is used if there are extra, unused bytes. Places where MinidumpUnloadedModuleList differs from MinidumpModuleList: Read: entry and header size is provided in the header in addition to count. This changes the checks and handling of padding. Failures from StoreRange are ignored. GetMainModule: always returns NULL. BUG= Change-Id: I52e93d3ccc38483f50a6418fede8b506ec879aaa Reviewed-on: https://chromium-review.googlesource.com/421566 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* Remove comparison of this with nullptrOrgad Shaneh2016-12-061-6/+9
| | | | | | | | GCC6 optimizes it out, leading to crash. Change-Id: I8425d456c1364929d135ce3860121b8098bab1f7 Reviewed-on: https://chromium-review.googlesource.com/413120 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Adding support for mips.gordana.cmiljanovic@imgtec.com2013-09-111-0/+36
| | | | | | | | | | | | | Support for mips cpu is added to all breakapad targets including unittests. BUG=none TEST=unittests Review URL: https://breakpad.appspot.com/614002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1212 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Improve ARM CPU info reporting.digit@chromium.org2013-04-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves several things for Linux/ARM: - Better detection of the number of CPUs on the target device. The content of /proc/cpuinfo only matches the number of "online" CPUs, which varies over time with recent Android devices. - Reconstruct the CPUID and ELF hwcaps values from /proc/cpuinfo, this is useful to better identify target devices in minidumps. - Make minidump_dump display the new information in useful ways. - Write a small helper class to parse /proc/cpuinfo and also use it for x86/64. - Write a small helper class to parse sysfds cpu lists. - Add a my_memchr() implementation. - Add unit tests. Tested on a Nexus S (1 CPU), Galaxy Nexus (2 CPUs) and a Nexus 4 (4 CPUs). Review URL: https://breakpad.appspot.com/540003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1160 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use stdint types everywhereted.mielczarek@gmail.com2013-03-061-14/+14
| | | | | | R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
* The Google-breakpad processor rejects (ignores) context records that lack ↵ivan.penkov@gmail.com2012-12-081-1/+4
| | | | | | | | | | | | CPU type information in their context_flags fields. Such context records can be valid (e.g. contexts captured by ::RtlCaptureContext). http://code.google.com/p/google-breakpad/issues/detail?id=493 http://breakpad.appspot.com/500002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1088 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adjust MD_CONTEXT_CPU_MASK to reflect reality, fix some code so it can ↵ted.mielczarek2011-08-301-1/+41
| | | | | | | | | handle dumps using the old value for MD_CONTEXT_ARM The value of MD_CONTEXT_CPU_MASK in use assumes that only the lower 6 bits are used for flags, and the upper 26 bits are for the CPU type. However, as of Windows 7 SP1, the 7th bit is being used as a flag (per http://msdn.microsoft.com/en-us/library/hh134238%28v=vs.85%29.aspx and the Windows SDK headers). Adjusting MD_CONTEXT_CPU_MASK works, but unfortunately that masks off the existing value of MD_CONTEXT_ARM. This patch also changes the value of MD_CONTEXT_ARM and adjusts the minidump context reading machinery to gracefully handle minidumps with the old value. R=mark at http://breakpad.appspot.com/302001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@831 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix unit tests that have not built since @610ted.mielczarek2010-07-231-7/+7
| | | | | | | A=kmixter R=ted http://breakpad.appspot.com/132001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@629 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Processor: Add new unit tests for google_breakpad::Minidumpjimblandy2010-03-161-0/+309
This also adds two new test utility class groups, TestAssembler and SynthMinidump. These are overkill for what I'm doing with them here (and may simply be overkill, period), but they make it easy to write unit tests for code that works on binary files or raw memory contents in a cross-platform way. I'm planning to use them for the DWARF CFI unwinding tests and the DWARF CFI parser tests. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@547 4c0a9323-5329-0410-9bdc-e9ce6186880e