aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Refactor rangelist handling to prepare for dwarf5 .debug_rngslist"HEADmasterSterling Augustine2020-10-026-59/+48
| | | | | | | | | | | | This reverts commit 2b936b06c12657b684f6c7276d6ae5a24cb48ab5. After getting deep into the dwarf5 range reader, I realized that this should be done a somewhat different way. So reverting in favor or a better design, coming in a few minutes. Change-Id: Ie0b2846e70b3df1e637831e96ea69fe093f4e712 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2446011 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Refactor rangelist handling to prepare for dwarf5 .debug_rngslistSterling Augustine2020-09-286-48/+59
| | | | | | | | | | | | | | | | | | | | | | Dwarf5 introduces a new .debug_rngslist section, to take the place of the Dwarf4 .debug_ranges. However, the dwarf version is CU-based, and not file-based, so there can be both sections, and which section the CU needs isn't known until the dwarf parser encounters either DW_AT_ranges (dwarf 4 and lower) or DW_AT_rnglists_base (dwarf 5). This change refactors the code around range lists and range list readers to defer the decision of what section to parse until the relevant attribute is found. It moves the range list section reader from the range-list handler itself (which doesn't know which section it will use) to the CU context, and then lets the handler know when it encounters DW_AT_ranges. I will add a reader for the new dwarf5 section, along with the code to interpret the new section, and its forms and such in a subsequent patch. Change-Id: Ie92e4c9daa3f0acb98d7ef74f6b9c2065db849b1 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2433684 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Change JSON serialization error check.Nelson Billing2020-09-091-6/+11
| | | | | | | | | | | - Mac OS symupload used to check for errors in JSON serialization by inspecting the "error" out parameter of the serialization function. Now it checks the returned data for "nil". - Similar change for the HTTP request that's made in the same function. Change-Id: I86f50ef44e60ee119c302e0614b115a8d35e9b5b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2390753 Reviewed-by: Mark Mentovai <mark@chromium.org>
* file_id_unittest: avoid system()Mike Frysinger2020-09-081-7/+16
| | | | | | | | | | | | We have API's for copying files & changing file modes, so there's no sense in using system() to run programs to do that. For the strip call, do the minimal spawn+wait dance. This avoids weird quoting string issues at least. Change-Id: Ibda117f243e886c0c7fcf8076fb8602b8d3ba42d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2396558 Reviewed-by: Mark Mentovai <mark@chromium.org>
* CopyFile: add a C++ APIMike Frysinger2020-09-073-1/+8
| | | | | | | | Having to swizzle to C strings all the time is a bit annoying. Change-Id: I0b80877706e32e873e567685f6b471745da70311 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2396557 Reviewed-by: Mark Mentovai <mark@chromium.org>
* linux: Fix leak when the offset of memory_mapped_file is greater than 0Sim Sun2020-09-051-2/+3
| | | | | | | | | | Breakpad should only map the file content after the offset instead of the whole file. Mapping the whole file while only unmap 'file_len - offset' would leak 'offset' bytes of mapping in virtual memory. Change-Id: I10be4f929d969703a6a02c1f709d2a4ca86a6e9e Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2393468 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Add a .clang-format file to give us local control over Chromium style.Sim Sun2020-08-311-0/+9
| | | | | | | | | | Based on the. `clang-format` from chromium project https://chromium.googlesource.com/chromium/src/+/HEAD/.clang-format Change-Id: I9df4f5c917521b02b0cdc911f15c12102758f7e1 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2384071 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Add native symbol uploads to Mac OS symupload tool.Nelson Billing2020-08-173-30/+127
| | | | | | | | | - sym-upload-v2 protocol only. - Supports elf, dwp, debug_only, macho, dsym, pe, and pdb (with the classic mode being called 'breakpad'). Change-Id: I68c0065aec3a7ffe29b364dd9e2e1dbdb58e3e5d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2357528 Reviewed-by: Mark Mentovai <mark@chromium.org>
* linux: Fix segfault when there is no section header in ELF fileSim Sun2020-08-151-0/+6
| | | | | | | | | | | | | Some vendor library doesn't contain the section header. It causes segmentation fault in `FindElfClassSection`. > e_shoff: > This member holds the section header table's file offset in bytes. > If the file has no section header table this member holds zero. Change-Id: Id98d6ff3bd16af4541deb5a55a8fad2fa74eda23 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2354427 Reviewed-by: Mark Mentovai <mark@chromium.org>
* processor: subtract 1 from return pointers while scanningJoshua Peraza2020-08-141-2/+6
| | | | | | | | | | | | | | Each stackwalker subtracts the size of an instruction from a frame's instruction pointer to determine which instruction it was executing. This should also be done for pointers examined while scanning for likely return addresses to ensure that those pointers don't point past the end of functions. Bug: b/118634446 Change-Id: I043e3f1e51a2c0a3d99ed14bf18ea64dc98add44 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2356649 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Escape more characters in Mac OS sym-upload-v2 debug_file strings.Nelson Billing2020-08-121-8/+29
| | | | | | | | - Attempt to escape all characters which must be escaped in a URL or JSON string, for debug_file, since almost all of these are legal filename characters. Change-Id: Ic7a9c1aef00093d164683be7db84f4f282f45f7a Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2339706 Reviewed-by: Mark Mentovai <mark@chromium.org>
* [Mac]Exit with unique status in symupload when file already exists.Nelson Billing2020-08-061-11/+33
| | | | | | | | | - This change should also be made for other platforms. - This allows users to tell the difference between upload succeeding, failing, and being skipped because the file already exists on server. Change-Id: I0b404da7aac29e0a16346bbd816ad1c815985bce Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2341373 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix sym-upload-v2 whitespace in filenames.Nelson Billing2020-08-051-1/+6
| | | | | | | | | - Checking symbol status would fail for files whose names contained spaces, because the file name was being put in the URL unescaped. - Now the filename is escaped before being put in URL when checking symbol status. Change-Id: I3b989d877e0fd9aef57ec13bdbbb6c3dacb6a9e2 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2339782 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Fix v1 symupload protocol in Mac client.Nelson Billing2020-07-311-1/+1
| | | | | | | | - A printf's arguments got broken in refactor for v2 protocol (my fault). Change-Id: I8018e25f55b18fd47038d28a4ff0ac3be3d2caae Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2333387 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix Mac symupload non-XCode builds.Nelson Billing2020-07-2917-406/+428
| | | | | | Change-Id: Ic4924032faba83fc14f62feaac9a97bbfd0971ed Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2324311 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Check for tombstone as very first entry in the line table.Sterling Augustine2020-07-271-0/+5
| | | | | | | | | | | | This is a folow up to https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2317730 and handles the additional case where there are no entries in the line table at all. Change-Id: I100c5d0891e7dc7088d58da11240d7df3a6c48d9 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2321300 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Properly handle new tombstone values that now appear as a result of the llvm ↵Sterling Augustine2020-07-242-1/+6
| | | | | | | | | change described at https://reviews.llvm.org/D81784. Change-Id: I79dc5a72b651aa057104cd42b4773391df68125b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2317730 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Nelson Billing <nbilling@google.com>
* Port new symbol API to symupload on Mac.Nelson Billing2020-07-2415-154/+1229
| | | | | | | | - See documentation in Linux implementation commit: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1422400. Change-Id: If3ff256e63f2db3ac9c0be78cfc17754d532cb88 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1497653 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* There are source files with APSL-2.0 as well.Sterling Augustine2020-07-171-0/+23
| | | | | | Change-Id: I3640ee9374732e9e308c6264c702c9af942e85b3 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2303999 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* Add 3-clause BSD license text as well.Sterling Augustine2020-07-161-0/+33
| | | | | | Change-Id: I080a02c48b85bfe3ed32a3a2c9f17ad4061b2bde Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2304010 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* Include libunwind license in LICENSE file.Sterling Augustine2020-07-161-0/+26
| | | | | | Change-Id: I53fa64deaf67746720c7baa7e22b3d7121076166 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2304009 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* fix NDEBUG breakage with new dwarf5 codeMike Frysinger2020-07-161-0/+4
| | | | | | | | | | | These fields are only used when NDEBUG is not defined. We get build failures with the current code like: src/common/dwarf/dwarf2reader.h:181:12: error: private field 'string_buffer_length_' is not used [-Werror,-Wunused-private-field] uint64_t string_buffer_length_; Change-Id: I01d6e29d31d50e29ed3736e7197e70455724ae48 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2299022 Reviewed-by: Sterling Augustine <saugustine@google.com>
* fix pointer style to match the style guideMike Frysinger2020-07-15289-3776/+3771
| | | | | | | | | | 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>
* Add support for dwarf5 line tables.Sterling Augustine2020-07-1410-65/+510
| | | | | | Change-Id: I2c0cd0e7163502e52fbf0745b611befb2e219071 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2276193 Reviewed-by: Sterling Augustine <saugustine@google.com>
* Move GetSectionByName out of CompilationUnit.Sterling Augustine2020-06-264-26/+30
| | | | | | | | | | For the upcoming Dwarf5 LineInfo changes, we will need to get several additional sections by name, but without a the Compilation Unit. This change prepares for that. Change-Id: I566855abb339a856110a2f7d243d3848fe2b3c18 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2268861 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Read dwarf5 compilation unit headers.Sterling Augustine2020-06-255-20/+119
| | | | | | | Change-Id: Ia85b2fb7b3cb821ad353a0003223d8b8465e792d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2265259 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Add and handle various dwarf5 addrx forms.Sterling Augustine2020-06-246-10/+66
| | | | | | | | | | | | | Given the almost nonexistent direct dwarfreader tests, I think the best way to test these dwarf5 additions will be to add a full dwarf5 compilation unit similar to the ones used incidentally in the other tests. But I can't do that until enough dwarf5 is correctly implemented. Change-Id: I3418bda7212ae85c4b67232a2ab8fea9b9ca5d42 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2258838 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Add and handle new dwarf5 string-related forms.Sterling Augustine2020-06-223-31/+119
| | | | | | | | | | | | | | | | Adding the new forms by type and processing should avoid the problems with 0c0e24f709288a129d665ec27d6f089189318385, where new forms weren't handled in switch statements, breaking the build. Testing this should follow the testing for DW_FORM_GNU_str_index, very closely, but there doesn't appear to be any tests for that, or even DW_FORM_strp. Change-Id: I609d56b1dc879971bfef1070f063f8457fec6017 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2233839 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Make symupload exit with an error code when command-line parsing fails.Michael Moss2020-06-051-2/+6
| | | | | | | | | | | | | | | This should address the issue where some Chrome builds were failing to upload symbols due to a bad command-line flag, but there was no indication of a problem, and no build failure, because symupload was exiting with a success code. BUG=1091387 R=nbilling@google.com, wuwang@google.com Change-Id: I0d7f1a6d689ca5fd37be3abad4c5ebc97f108e50 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2231574 Reviewed-by: Nelson Billing <nbilling@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Avoid calling demangler for non-C++ symbols on LinuxMikhail Borisov2020-05-261-6/+16
| | | | | | | | | | Bogus demangler warnings should be suppressed on both Mac and Linux platforms, so there is no reason to keep this filter behind __APPLE__ gate. Bug: chromium:1062556 Change-Id: Idf28db0b527c3cd6dd91510fcf7d9040aaa64694 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2210684 Reviewed-by: Mark Mentovai <mark@chromium.org>
* mac: Don’t try to demangle non-C++ symbols with the C++ demanglerYngve N. Pettersen2020-05-051-0/+12
| | | | | | | | | | | On Mac a C++ symbol has 1-4 underscore characters followed by a 'Z'. Symbols that do not have this format (such as plain C symbols) causes a lot of warnings to be printed. Bug: chromium:1062556 Change-Id: I55977f756c7e20cc5e7b1cb8e38316d7bf1f748c Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2179482 Reviewed-by: Mark Mentovai <mark@chromium.org>
* processor: Bound number of exception parameters readJoshua Peraza2020-04-273-4/+7
| | | | | | | Bug: 1074532 Change-Id: I769074d7cbe0a47c8c8b716275d815e4b7f6dd63 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2168816 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Use stdint.h numeric types in testsJoshua Peraza2020-04-163-29/+32
| | | | | | Change-Id: Iaa79c5c7c70ca953256cd39cc9f6f4f139c696af Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2153567 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use portable format macrosJoshua Peraza2020-04-162-35/+37
| | | | | | | Bug: 1071277 Change-Id: Ic65704a20c55fea83b5633650ee2c769ac227a56 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2153333 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use stdint.h numeric typesJoshua Peraza2020-04-0927-629/+624
| | | | | | Change-Id: Ib815b0757539145c005d828080b92cbfa971a21b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2141226 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Remove true/false defines in convert_UTF.ccMichael Forney2020-03-191-7/+0
| | | | | | | | | | | | These are left over from when this file was written in C. In C++, true and false are keywords, so this is no longer necessary. In fact, redefining a keyword is not actually permitted in ISO C++ (https://eel.is/c++draft/macro.names#2), and is rejected by MSVC. Change-Id: I2f4a6eae7f8dd4d91b8ee6588c7ae5e8f20bd0d0 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2105831 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use ULONG_MAX instead of __WORDSIZE to determine native ELF architectureMichael Forney2020-03-173-20/+11
| | | | | | | | | | | | | | __WORDSIZE is an internal libc definition. Instead, we can use ULONG_MAX from limits.h, whose value corresponds to the machine's native word size. This allows us to remove the fallback definition of __WORDSIZE in the Android compatibility headers. Bug: google-breakpad:631 Change-Id: I7b9e6f3b2121f78ccad9e32bf26acac518aefd8f Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2107100 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Roll src/src/third_party/lss/ f70e2f164..fd00dbbd0 (2 commits)Michael Forney2020-03-172-2/+2
| | | | | | | | | | | | | | | | https://chromium.googlesource.com/linux-syscall-support/+log/f70e2f1641e2..fd00dbbd0c06 $ git log f70e2f164..fd00dbbd0 --date=short --no-merges --format='%ad %ae %s' 2020-03-10 mforney Avoid conflict with getdents64 defined by libc 2019-01-26 vapier futex: change to 6 args Created with: roll-dep src/src/third_party/lss Bug: google-breakpad:631 Change-Id: Icc248237dcc7bdc3f7b74cd8556efcaf3b4b1c31 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2106526 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use breakpad_getcontext on all Linux platforms missing getcontextMichael Forney2020-03-1614-87/+124
| | | | | | | | | | | | | | | | | | | | getcontext is also not available on musl libc, so generalize breakpad_getcontext so it can be used as a fallback for non-Android platforms as well. On x86_64 and i386, ucontext_t uses an Android-specific offset for storage of FP registers, since its sigset_t differs in size. So, make the definition of MCONTEXT_FPREGS_MEM and UCONTEXT_FPREGS_MEM_OFFSET conditional on whether we are building for Android. On glibc and musl, signal.h and asm/sigcontext.h can't be included together, so in breakpad_context_unittest.cc, only compare the libc and kernel _fpstate when on Android. Bug: google-breakpad:631 Change-Id: If81d73c4101bae946e9a3655b8d1c40a34ab6c38 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2102135 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* convert_UTF: try to update xcode filesMike Frysinger2020-03-141-4/+4
| | | | | | | Bug: google-breakpad:725 Change-Id: I8c5f9a828e1bb6a2a5603fbfaa127f6dfe64a4b4 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1803770 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix some bugs in CheckMicrodumpContentsMichael Forney2020-03-131-2/+2
| | | | | | | | | | | | | | The crash address from the microdump was never checked against anything. Instead, the test was checking the value of a constant. On 32-bit systems, an intptr_t cannot represent kCrashAddress (0xDEADDEAD), causing a failure when the crash address is parsed from the microdump. Instead, use uintptr_t, which matches the type of kCrashAddress. Change-Id: Ib5612743803609f7801dcfb98deaa8779e362025 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2100816 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Remove sys/signal.h compatibility headerMichael Forney2020-03-112-36/+0
| | | | | | | | Since a03ad96dbd, sys/signal.h is no longer required. Change-Id: I64e6235e1bffb3728d6050389bad6e7a99389741 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2097666 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Add google_crashdump_uploader_test to .gitignoreMichael Forney2020-03-111-0/+1
| | | | | | Change-Id: I5c5e5c85ec49a76e5f4c7c6a0f662398e6cdc6ee Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2097681 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Remove redundant LINUX_HOST conditionalMichael Forney2020-03-112-39/+30
| | | | | | | | | We are already in a LINUX_HOST conditional block, so there is no need to check for it again. Change-Id: Ifbe283ffa47373c98d2653f1014445d1a435c715 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2093144 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use public fpregset_t type to define fpstate_tMichael Forney2020-03-103-4/+6
| | | | | | | | | | | | | | | The _libc_fpstate struct tag is an implementation detail of glibc, and musl uses a different struct tag, _fpstate. Unfortunately, the public type fpregset_t is a pointer type, so is not suitable for allocating storage, or referring to constant storage. Instead, we can use std::remove_pointer<fpregset_t>::type to refer to the pointed-to type, regardless of the struct tag. Bug: google-breakpad:631 Change-Id: Iaf47f15b2d834dd8de839431f65a481e9b0c7f9e Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2096171 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use ULONG_MAX instead of __WORDSIZE to determine ELF classMichael Forney2020-03-101-4/+5
| | | | | | | | | | | __WORDSIZE is an internal libc definition. Instead, we can use ULONG_MAX from limits.h, whose value corresponds to the machine's native word size. Bug: google-breakpad:631 Change-Id: If69caf578286d678585d1510c01562b969b5061f Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2097352 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use standard header locations for poll.h and signal.hMichael Forney2020-03-104-4/+3
| | | | | | | | | | | | | | | | sys/poll.h and sys/signal.h just redirect to the standardized location for these headers, poll.h and signal.h. On musl libc, including the incorrect header path results in a warning, and since breakpad is built with -Werror, this is an error. In exception_handler.cc, signal.h is already included earlier, so we can drop the sys/signal.h include. Bug: google-breakpad:631 Change-Id: If36d326453e3267d38a5b92ed1301f828e46befe Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2097344 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use sched_yield instead of pthread_yieldMichael Forney2020-03-102-6/+2
| | | | | | | | | | | | | | | | | | | | | pthread_yield is not a standard POSIX function, and is not available in musl libc. The man page says to "Use the standardized sched_yield(2) instead"[0]. On glibc, pthread_yield is exactly equivalent to sched_yield[1]. On bionic, pthread_yield is also not available, so on Android, the tests define a wrapper that just calls sched_yield. This wrapper is no longer necessary if we just use sched_yield in the first place. [0] http://man7.org/linux/man-pages/man3/pthread_yield.3.html [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_yield.c Bug: google-breakpad:631 Change-Id: Ie4c6be8c17cdc2f5396a7fe972fa51a97573b049 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2097340 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Revert "Add new dwarf 5 enums, plus some dwarf4 enums."Mike Frysinger2020-03-101-221/+0
| | | | | | | | | | | | This reverts commit 0c0e24f709288a129d665ec27d6f089189318385. Reason for revert: This is causing breakage on CrOS due to unhandled enums and dwarf5 support is in limbo, so pull this back out for now. Bug: google-breakpad:812 Change-Id: I22dd5d87efb8bc83596d51d15a6808c41afb3fd2 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2095872 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Revert "Add dwarf5 compilation-unit header handling."Mike Frysinger2020-03-105-105/+18
| | | | | | | | | | | | This reverts commit dbd454dbe47e584571388fc3533193416bdce67f. Reason for revert: The parent CL is causing breakage on CrOS due to unhandled enums. Before we can revert that, we need to revert this. Bug: google-breakpad:812 Change-Id: I7c2446f3cd8ed9f6411e90dbdd2434bc463b2f6c Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2095798 Reviewed-by: Mark Mentovai <mark@chromium.org>