1343 Commits

Author SHA1 Message Date
Raphael Kubo da Costa
26ef5c910f aarch64: Use xzr instead of x31 in the ASM code
Officially, register X31 does not exist. The code is zeroing out a location
and thus actually needs XZR.

LLVM seems to automatically translate X31 into XZR when compiling the code,
but GCC (tested 7.3.0) refuses to accept the instruction:

    ../../third_party/crashpad/crashpad/util/misc/capture_context_linux.S: Assembler messages:
    ../../third_party/crashpad/crashpad/util/misc/capture_context_linux.S:291: Error: operand 1 must be an integer register -- `str x31,[x0,#0xb0]'

Bug: chromium:819294
Change-Id: I85be3923ac56fca6e3ec59d7e22b2223cfc8fa63
Reviewed-on: https://chromium-review.googlesource.com/1078818
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
2018-05-30 16:46:16 +00:00
Scott Graham
5c49c59847 fuchsia: Implement TLS support in HTTPTransportSocket
With use_boringssl_for_http_transport_socket set, this also works on
Linux, however the bots fail during run lacking libcrypto.so.1.1. So,
not enabled on Linux until that's figured out.

(Includes https://github.com/yhirose/cpp-httplib/pull/70, until it lands
and I'll do a full roll of cpp-httplib then.)

Bug: crashpad:30, crashpad:196
Change-Id: I987f6a87f8e47160c15e53fe1ce28611339069ff
Reviewed-on: https://chromium-review.googlesource.com/1075726
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-29 23:19:09 +00:00
Scott Graham
5191992ae5 win: Fix SimulateCrash.ChildDumpWithoutCrashing under ASAN, disable others
SimulateCrash.ChildDumpWithoutCrashing needed a larger threshold due to
ASAN instrumentation.

These tests expect children to crash, but ASAN captures the exception
before letting Crashpad handle it:

CrashpadClient.HandlerLaunchFailureCrash
CrashpadClient.HandlerLaunchFailureDumpAndCrash
CrashpadHandler.ExtensibilityCalloutsWork
ExceptionSnapshotWinTest.ChildCrash

(which is an upstreaming of https://chromium-review.googlesource.com/1067151).

Additionally, because Chrome doesn't build all, I noticed a missing
dependency on a test binary which is added here.


Bug: chromium:845011
Change-Id: I5c3ae5673512be29edad21e7d20dd57b8b5ce2bf
Reviewed-on: https://chromium-review.googlesource.com/1075715
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-29 17:04:18 +00:00
Adam Barth
3033802ed4 Remove unused port wait/queue argument
Change-Id: Ifcfe6c2d18045ce3a2e443ee84d4dd84bb3db373
Reviewed-on: https://chromium-review.googlesource.com/1073567
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-25 16:00:13 +00:00
Joshua Peraza
c86c9f0f73 Don't merge stack mappings with different names
This is particularly a problem when the neighboring mapping is a
special mapping not readable from another process. For example:

7fff96aeb000-7fff96b0c000 rw-p 00000000 00:00 0  [stack]
7fff96b0c000-7fff96b0e000 r--p 00000000 00:00 0  [vvar]

[vvar] is a special mapping which makes some kernel data available
for virtual system calls. Attempting to read this region via the
/proc/<pid>/maps file returns an IO error which causes Crashpad to
abort capturing any of the thread's stack.

Neighboring mappings with empty names are eligible to be merged since
they result from changing permissions on existing named mappings.

Change-Id: I587bd2ec6f9759d284f1f9b1d93f2a44ddf61e92
Reviewed-on: https://chromium-review.googlesource.com/1072803
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-05-25 14:30:33 +00:00
Roland McGrath
9839ef5605 Clean up Fuchsia package()
The libraries key is deprecated.  The new loadable_modules key is the right
thing to use.  The dependencies should not specify the toolchain.

Change-Id: I2f218adce96b7161a5a0097f84c7ed6b0c87e3bd
Reviewed-on: https://chromium-review.googlesource.com/1071067
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-24 03:01:21 +00:00
Scott Graham
f5564e6292 Roll gtest (and mini_chromium)
gtest started depending on zircon and launchpad directly for death
tests, so tweak the build files.

Logs for upstreams below:

mini_chromium$ git log --oneline --no-merges --no-decorate 40cb6722bbc6bd6fb5fccecd80362313440a0537..53a3ff4cf81adb25fdf764e8547a8515fc8f70c2
53a3ff4 fuchsia: Add fdio to system includes
23b3647 fuchsia: Update sysroot.gni for sysroot location moving in SDK

gtest$ git log --oneline --no-merges --no-decorate d175c8bf823e709d570772b038757fadf63bc632..145d05750b15324899473340c8dd5af50d125d33
49ecebd Downgrade to C++98.
ec2c911 Downgrade to C++98 code.
f91bf75 Remove unused variable in Fuchsia.
54e331b Add support for versioned standard libraries.
fc66ae4 Update generated code.
b8fa4d2 Add unit test for CanonicalizeForStdLibVersioning.
18abd8f Use NULL instead of nullptr, for pre-C++11 builds.
ec5ad0f Fix the bug where ad_hoc_test_result() functions of UnitTest and TestCase objects would return failures registered at TestCase and UnitTest scopes, respectively.
960149f Remove magic number
242f0f6 Style fix
8497540 Fix comments
13af91f Fix more stuff and get tests to pass
96c3c42 Get all the things to work.
a9653c4 Fix gmock not building when -fno-rtti
b6cb5c3 Fix stuff
d4b5281 Add Fuchsia support for death test.
95ec42d Add no-exception and no-rtti to build matrix
b539167 merging,
bb7a018 reverting, test
7b4ee66 reverting just to test
62a7c14 testing
2d3024f Fix friend declaration to use GTEST_API_ decl spec.
b2f97ab Revert useless use of GTEST_API_ on WithoutMatchers decl.
1c79ad7 Add GTEST_API_ tag to WithoutMatchers class. Hopefully that fixes the problem on MSVC?
d5725da Mark new GetWithoutMatchers method as part of the exported API, to address MSVC linker errors.
f6551f2 Don't use generalized initializer list; is C++11 extension.
f437f8c Clone of unsubmitted cr/176529515. Introduce parameterless expectations.
f312435 more typos
a0fd742 msvc
b00e281 more typos
881ee30 typo
10e8ec2 move only types docs
4d554c3 typo
b4cbf53 typo
78d7381 http://cl/193386206
c56ba73 merge, explicit, ( should be it)
4707c0f 193353312
80d6e26 cl/193060888
5dccf6b http://cl/193060888
dff32af http://cl/193060888
3f88bb1 test-meerging
ec425d7 typo
e4ab316 more msvc
1944bc0 typo
e9eff48 msvc warnings
bd2a1ae merging gmock generated matchers
9fba103 merging, testing, this should be it
1c6e68c merging
26c10dc merging
d84eb86 more pizza
f45728a more OSX pizzas
b74a1af osx pizzas
f9bd618 merging gmock actions test
0bfa823 merging, gmock actions test
2dc576e merging
f7330f9 more fixing osx libstd++ bugs
6538049 fixing
dc4f563 merging, fix OSX issue
092ca91 merging
a79851f merging
fa658e0 merging
c67f51b msvc
9b5940e revert this one
b2d81b4 merge, ... gmock-matchers test
e77deb2 small cleanup
1324e2d Remove multiple inheritance from "unintesting call" mock classes.
373481c ...merging
8654c1c merging
ab84d14 Upstream cl/192179348
c13ab60 merging
5cd213e ..and this should be it
6a7573a more
039d9b5 pizza work, cont
f15fd96 osx pizzas, cont
b15be9a fixing osx pizza
6f9db26 merging
9bc82ce merging
25d8176 merging
e1071eb RE-Doing the merge, this time with gcc on mac in the PR so I can catch errors before merging the PR
8fbb419 Include gcc on mac into PR matrix
ca54b67 Revert "gmock actions 2"
64d24b8 ... and this
c1d4c34 this should be it
f587100 yet more
05b5a53 formatting
2de24fb tuning
055f321 tuning
57d6e82 more
44da2b9 cont
e93a0ec msvc
c4684b4 more msvc
431bfdc msvc 14
8bc7c63 testing msvc again
c4e3d77 More msvc 14
6525044 And also silence for MSVS14
35a709a preproc syntax ( I can never remember it)
61e8a0b syntax
03be5df cont.
e0b3c26 continued
51f8ad4 Sync gmock-generated-nice-strict.h.pump with gmock-generated-nice-strict.h.
dbd206e more mcvs fixing
701e1e5 linkage, fixing MSVC
2d4d4ef fixing MSVC
5fe8de5 more warnings
cb13dc7 more warnings
d9f3611 more MSVC warnings
c75b76e warnings
04e3188 cont - 2
32ac949 cont
1831ac9 more warnings
eb3e4aa deal with MSVC warn, cont 1
50c0bcd Cont. deal with MCVS warnings
b5c87fb Deal with MCVS warnings
88fc7d7 merging gmock-actions 2
fe402c2 Merging gMock, 2
7e5f90d formatting
9286361 And more MCVS warnings
e0f4cf0 fixing MCVS warn
7045138 Have to wait for this one
66eaf9f Have to wait for this one
af93d59 Merging matchers test
0cd6a4f Merging matchers test
d81b6a0 bad cut/paste
a608d4a More on MSVC warning C4503, decorated name length exceeded
6f4e939 More on MSVC warning C4503, decorated name length exceeded
5b3d277 Address MSVC warning C4503, decorated name length exceeded, name was truncated
aa14cc4 Fixing build break on MSVC
e55089e merging gmock matchers 1
a0c27bd fix build break on locale windows
1776ed8 Tweaking https://github.com/google/googletest/pull/1523 to exclude nacl
d52aaee Upstreaming, cl 191344765
a2dd136 merging port, cont. 191443078
aa349ac merging, cont - 2
2cedd5b merging gtest-port.h , 191439094
04d1e56 merging, just comments format
5beb452 testing, merge
df5a48d Testing, gtest-port.h merge
87a4cdd merging gtest-port.h, again - 1
7888184 Include OSX builds back into PR builds
b2373c6 Revert "merging gtest-port 1 of N"
54bb165 Revert "merging gtest-port, 2"
d04bf07 typo
8e0364a merging gtest-port, 2
11855d8 provide alternative for DebugBreak()
aea6fc3 merging gtest-port 1 of N
a75a5c9 merges 1
3df7cbe merges, gtest
6aae206 merging gmock-matchers.h 3
2318705 merging gmock-matchers.h 2
8ea10d3 Upstreaming FloatingEq2Matcher,
b907c26 Merging gmock-matchers.h -2
466a49a gmock-matchers merging -2
b7c5683 merging, gmock -1
4e89c76 reverting gtest_list_tests_unittest.py
eaaa422 Update appveyor.yml
da71e8c more merges
0f65679 more merges
691e38e More merges
a3c2e10 cl 189032107, again
080fcbe cl 189032107
a178cc7 merge, again, IsRecursiveContainer
262aaf2 erging, cont
2814b4b merging, merging
a719320 fixing, was removing too much
af463c4 More merges, removing old dead code
7b70413 Allow macros inside of parametrized test names.
cf9d634 merges-port(1)
e891900 Merging, XML tests
89d6f70 merges-8
995a9df merges-7
086825d merges-6
8385928 merges-3
dbf63e3 merges-2
0d5e01a Merges-1
7a2050d Use a full message in the JSON output for failures
3431b69 Add options to parallelize builds.
6baf17e Support JSON output format in addition to XML
2eb31c1 Add documentation for VariantWith.
2bd1750 gmock merging -2
190e2cd Add matcher for std::variant.
84ec2e0 Switch default death test style back to "fast".
20074be Use DEBUG_POSTFIX instead of CMAKE_DEBUG_POSTFIX
4dbb437 merging unittests - 5
567b40e Try to handle unsigned wchar_t (arm) a bit better
004f6a0 merging unitests - check 4
29e9ca8 merging unitests, check
3299a23 merging unittests - 2
b7e0294 merging unitests
11e1dd2 Removed trailing comma in enum
0656830 TEST() arguments are invalid in an example
df65632 merges
8a61587 Fix unused function warning on Mac OS.
a3e322b cleanup, merges
09581b3 cleanup/merges
0697241 merging, cleaning up
ab186a8 merges
30d276d cxxx11
3b1fe3e clang warnings
d7c966c clang warnings
2a23ca0 https://travis-ci.org/google/googletest/jobs/340995238
a66d209 clang warning 'https://travis-ci.org/google/googletest/jobs/340987201'
e76f4ee clang warning https://travis-ci.org/google/googletest/jobs/340978022
9e07281 merges
225e674 moving JoinAsTuple to internal
b3a1759 Fix std::iscntrl use in gtest-printers.cc
d84f58a Merging, coniniue
575c081 merging
49fc378 merges
ec7faa9 merges
c851050 Fixed typos
092d088 Add ability to throw from ASSERT
a3c73ed Include MSVC14 on PRs as well
e6ec8bc Merges and also adding new bazel build mode
e55fded Code merges
2a46830 Ability to optionally depend on Abseil plus upstream of 183716547
6c0c389 Adding tests to googlemock bazel
fbb48a7 Code merges
efd49c2 Update Documentation.md
b8ac390 Fix test build issue with GCC7.2.
3498a1a Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.
f915530 Pass -EHs-c- to disable exceptions with MSVC.
b3a2048 Update README.md
7cced89 Remove Visual Studio 10,11,12 from build matrix
b9651c0 placating gcc and its overzeauls size comparison warnings
e29805a upstream cl 182543808
06c3cce revert, lets get this compiled
80defce Many code merge/upstream changes
6723b6c Merging, upstream http://cl/182836545
bbb17ad more code merge
f1c87ad merges, cl/155419551 and other
9bc8666 more merging
a0435a5 merging
8d707df code merge
b1623e9 Adding python tests to Bazel build file.
8e86221 Use fully qualified  in examples
354fc8d Document ScopedTrace utility
ba99a04 Check whether _MSC_VER is defined when detecting presence of cxxabi.h under libc++.
9c82e77 Expose ScopedTrace utility in public interface
08b323f Reverting some changes, need to make the merge compile
9195571 Reverting some changes, need to make the merge compile
6d04de7 Reverting some changes, need to make the merge compile
b9e2978 Reverting some changes, need to make the merge compile
304be8f Test files for corresponding changes
6befe42 Test files for corresponding changes
f45c22c Test files for corresponding changes
5f4ce9d Test files for corresponding changes
d629744 More code merges
da1f7fe Code merging
33d73d4 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne
569d713 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne
93b7798 continue upstream/merge, etc
ed8d02c Update .travis.yml
73d1251 Update .travis.yml
cfd29e0 Update .travis.yml
29f94e0 Update .travis.yml
2982dc1 Trying to fix travis
6914ae2 Upstream cl 103120214
1d757db More merge, cleanup
481fe94 More merge, cleanup
6a26e47 Code merge, upstreaming accumulated changes, cleanup
62dbaa2 revert
d630a8b code merges, cleanup
f33902b revert googletest/test/gtest-param-test_test.cc
6eccdb7 Update .travis.yml
d237297 code merge, cleanups
2ad5661 Upstream of cl 129104714
5eecadf Revert one file
9fce984 wip, cleanups/merge
258fd6e cleanup, merge
cbd15d4 [Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvc
91ba05c Small cleanups, merge
67d6e46 Use correct name for build event types.
67476c1 Revert one file for now
adfdc65 Fixed test for pull request.
d3acb4b Fixed output and test for 'enabled_on_pr'
19b5774 code cleanup in preparation for merges, cl 180857299
9cee677 Optimize build matrix (#1)
1c09831 upstreaming cl 124976692
1acf8c7 Also define GTEST_ATTRIBUTE_PRINTF_ in clang-cl.
b3d9be5 Pass the -Wmissing-declarations warning.
e7734fb OSS Sync, cl 163329677
90244a6 Fix testing::Combine on MSVC 2017.
bcd3552 Avoid warning C4619 in MSVC 2017.
ec2b0c3 Build both googletest and googlemock.
75b85d5 Create a autotools-based build for Travis.
7990f56 Re-enable MSVC++ C4389 warning in CmdHelperEq()
e17907d Update internal_utils.cmake
a7fceb4 Update gtest-param-test.h.pump
8a48f0e Update gtest-param-test.h.pump
23a014a Refactor docs about contributions to CONTRIBUTING.md.
74a5306 remove extra line
3ea0631 remove implicit casts
c82cd5e Also add documentation around becoming a contributor.
1184117 Wrong LICENSE file, sorry.  Corrected. [skip ci]
bc3320b Implement bazel-based builds in Travis.
e22d344 Add Apache-2.0 LICENSE file.
cf3adad Add licenses() directive for googlemock/tests.
57bb0bb Remove C4996 warning in VS2017
3464f76 Improved description of VS std::tuple support
8d9d6bb Improved description of VS std::tuple support
4aa05bd Only switch to g++-4.9 on Linux.
aea8580 Run autoconf from top-level directory.
0663ce9 Fix double free when building Gtest/GMock in shared libraries and linking a test executable with both.
f46bd00 make includes system
a7269e2 replaced back accidently removed static_cast with consistent ImplicitCast_
82447f2 Fixes issue #826 by treating MinGW as "non-Windows" when determining colored output
1ae4096 fix for VS2017 deprecation of ::tr1::tuple change static_cast to ImplicitCast_ for consitency fixes for building with path names containing spaces
aa0b545 remove GTEST_HAS_PARAM_TESTS
4d26df7 Speed up printing of characters which need hex escaping
99d0ef3 Also can build when included in source.
9538687 Remove trailing whitespaces in BUILD.bazel
c113a71 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne
ca6a70c Pass MSVC's C4826 warning.


Bug: crashpad:196
Change-Id: I60be5750667d1901e0ad47c3558de1338b083536
Reviewed-on: https://chromium-review.googlesource.com/1069562
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-22 21:01:08 +00:00
Scott Graham
1f3052c1cc Add support for attachments to generic crash report database
This is the beginning of support for attachments at the process level
being stored alongside a report. Attachments will be uploaded by key as
part of the multipart http upload. There's no interface at the client
level yet to pass these through.

As this is intended for Fuchsia, this is not yet implemented for the
Mac/Windows database implementations.

Bug: crashpad:196
Change-Id: Ieaf580675164b631d313193f97375710979ba2a9
Reviewed-on: https://chromium-review.googlesource.com/1060419
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-05-18 23:01:16 +00:00
Tom Anderson
75b672be06 Fix arm build with glibc 2.27
This is a followup to [1] which fixed the x86 build for glibc 2.27.  But there
was a similar block of code that was only present on arm, which was causing the
arm build to fail.  This CL makes the equivalent change to [1].

[1] 3a20d34ac3

BUG=chromium:843240
R=mark@chromium.org

Change-Id: I4b2786ddcdd0d9920aca25b3ad00c5ba716ca30a
Reviewed-on: https://chromium-review.googlesource.com/1060155
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2018-05-15 18:48:24 +00:00
Joshua Peraza
d78bd067c7 linux: Initialize a crashing thread's stack from its exception context
Bug: crashpad:30
Change-Id: I6b9927d391006f02a3515dbebe954cffaad00598
Reviewed-on: https://chromium-review.googlesource.com/1060031
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2018-05-15 18:10:54 +00:00
Scott Graham
dea8fa51d0 fuchsia: Changes to allow analyzer-style exception handling
The integration into the Fuchsia tree is still being negotiated, but
I've added crashsvc on that side
https://fuchsia.googlesource.com/zircon/+/HEAD/system/core/crashsvc/crashsvc.cpp,
which handles exceptions and spawns something to actually deal with the
crashed process. This means that there's no resident thing, so it seems
simplest to use handler/crash_report_exception_handler directly, rather
than add another wrapper binary. At some point it may make sense to roll
this functionality back into Crashpad upstream, we'll see how it
evolves.

Additionally, the "normal" crashpad_handler model may still be necessary
if Chrome wants to use a copy locally (rather than the system handler).

To accomplish this:
- Split crashpad_handler and crashpad_database_util packages so
  crashpad_database_util can still be included into the system image for
  debugging.
- Add handle-based version of HandleException() to
  CrashReportExceptionHandler (and also remove the "type" argument because
  I've come around to realizing there's no point to it, finally. :)

Bug: crashpad:196
Change-Id: I38872183ee3691c0938c5b761e6b73c80019f355
Reviewed-on: https://chromium-review.googlesource.com/1057833
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-14 21:54:34 +00:00
Scott Graham
9115494e8a fuchsia: Increase timeout for WorkerThread.DoWork test
Because of Fuchsia's scheduler the seemingly reasonable time check fails
occasionally.

Bug: crashpad:196, crashpad:231
Change-Id: Ic212a50e73e283ce3d279dd8c28adecbc432e39c
Reviewed-on: https://chromium-review.googlesource.com/1055805
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-11 19:12:54 +00:00
Joshua Peraza
ef6d91b166 Update cpp-httplib to 37130cd
Also exclude http_transport_test_server from Android where it doesn't
build.

Change-Id: I51cc3f50e4fb9db982d91b2924b8ea87d86926d4
Reviewed-on: https://chromium-review.googlesource.com/1054160
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-05-11 15:32:35 +00:00
Scott Graham
cc1573cd52 fuchsia: Fix compile error after 19e6087bb
Bug: crashpad:196
Change-Id: I82cf1c5384ebfc2fb7882e69145b211c4b24f7c5
Reviewed-on: https://chromium-review.googlesource.com/1054576
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-11 00:39:17 +00:00
Scott Graham
95a052dc0d fuchsia: When in Fuchsia, move helper binaries to subdir
In my ongoing quest to break the Fuchsia tree in as many ways as
possible...

All binaries found in /system/test are automatically run. So when
http_transport_test_server and
crashpad_test_test_multiprocess_exec_test_child are unexpectedly run
they just hang, breaking the overall test run. To avoid this, package
them into a subdirectory which is the preferred solution.

Bug: crashpad:196
Change-Id: If79c2c8c5493214fddbb2fa6de6f69ee0c78d9bd
Reviewed-on: https://chromium-review.googlesource.com/1054782
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-11 00:26:57 +00:00
Joshua Peraza
19e6087bb2 Don't restrict ImageAnnotationReader to a module's address range
Annotations data structures may be dynamically allocated so could
appear outside a modules's address range. Let ImageAnnotationReader
use a ProcessMemoryRange for the process, rather than the module.

Also add a test for linux.

Bug: crashpad:30
Change-Id: Ibbf1d2fcb2e44b1b70c8a02e86c6f2fbd784535f
Reviewed-on: https://chromium-review.googlesource.com/1054705
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2018-05-11 00:22:06 +00:00
Scott Graham
e2b934cc40 fuchsia: Don't depend explicitly on the x64 toolchain
Not surprisingly, x64-shared did not work in the arm64 build. 9_9

I've asked the Fuchsia toolchain team if this is the correct way to use
the toolchain definition as it seems a bit awkward, but for now it seems
like the only way to depend on the .so files in packages.

Bug: crashpad:196
Change-Id: I998bf4feffd9499276bfc29229e5aadc1ae976f2
Reviewed-on: https://chromium-review.googlesource.com/1054487
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-10 21:34:22 +00:00
Scott Graham
f55a8d4ff3 fuchsia: Work around lack of packaging in Fuchsia tree build
Packaged test running seems to be a ways off, but with a bit of path
fiddling in test_paths.cc we can actually use the paths where the tests
are copied, so do that instead to get all the tests re-enabled. The
setup in BUILD.gn should be mostly-useful once packaging is working as
all helper/data files will need to specified there anyway.

Also, attempted fix to flaky behaviour in
ProcessReaderFuchsia.ChildThreads exposed because the tests are now
being run. zx_object_wait_many() waits on *any* of the objects, not
*all* of them. Derp!

And finally, for the same test, work around some unintuitive behaviour
in zx_task_suspend(), in particular that the thread will not be
suspended for the purpose of reading registers right away, but instead
only "sometime later", which appears in pratice to be after the next
context switch. Have ScopedTaskSuspend block for a while to try to
ensure the registers become readble, and if they don't, at least fail
noisily at that point.

Bug: crashpad:196
Change-Id: I01fb3590ede96301c941c2a88eba47fdbfe74ea7
Reviewed-on: https://chromium-review.googlesource.com/1053797
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-10 19:28:10 +00:00
Scott Graham
f115659a67 fuchsia: Include crashpad_database_util in package
Also, add both crashpad_handler and crashpad_database_util to "binaries"
which causes them to be included in the final system image.

Bug: crashpad:196
Change-Id: Iaf1bf7bbc0a5370695372fd01d7c3da35906dfc3
Reviewed-on: https://chromium-review.googlesource.com/1050576
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-08 20:10:00 +00:00
Scott Graham
31703a585f fuchsia: When in Fuchsia tree, disable tests requiring external files
The package deployment/running is in flux at the moment. In order to get
all the other tests on to the main Fuchsia waterfall, disable the ~25
tests that require external files (for launching child processes,
loading modules, or data files) because those operations all fail on
Fuchsia-without-packages right now. Upstream this is PKG-46. Once test
packaging and running has been resolved, this can be reverted.

These tests are still run when building Crashpad standalone on Fuchsia
as the standalone build simply copies all the relevant data files to the
device in /tmp.

Bug: crashpad:196
Change-Id: I1677c394a2b9d709c59363ebeea8aff193d4c21d
Reviewed-on: https://chromium-review.googlesource.com/1045547
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-05-05 00:27:22 +00:00
Scott Graham
02adab2e80 fuchsia: InitializeException, and write dump in exception handler
Implements InitializeException() in ProcessSnapshot, and pulls it all
together writing the dump in crash handler. Sample output at crash
00163eff624e653e on the staging server.

Also adds a child-retrieve helper to koid_utilities.

Bug: crashpad:196
Change-Id: I4bee7655e81e3243ac0ae896ff0caea7ce4acdad
Reviewed-on: https://chromium-review.googlesource.com/1044771
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-05-05 00:21:22 +00:00
Scott Graham
c82309f0e5 fuchsia: Implement StartHandler() and ExceptionHandlerServer
StartHandler() binds to the default job's exception port, and launches
the handler process (normally this is crashpad_handler), passing it the
task handle and a handle to the exception port as startup parameters.
This follows the protocol used by crashlogger.

Additionally, implement ExceptionHandlerServer in crashpad_handler,
which contains the exception processing loop. It currently dispatches to
an empty CrashReportExceptionHandler where a report will be written
eventually.

Bug: crashpad:196
Change-Id: Ie27ff6f67adfbcc7d03551ae7e84a885da43df5a
Reviewed-on: https://chromium-review.googlesource.com/1043282
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-05-05 00:02:12 +00:00
Scott Graham
e78789b9e0 fuchsia: Add implementation of ExceptionSnapshot
Bug: crashpad:196
Change-Id: I5aea3484c185096898bafe847c83474a91f5d8c7
Reviewed-on: https://chromium-review.googlesource.com/1038128
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-05-03 20:35:33 +00:00
Scott Graham
847d06db29 fuchsia: Add header with shared exception port key
When binding to an exception port on Fuchsia, a key is supplied and
passed back to coordinate between the registerer and the handler.

An arbitrary value is used by both devmgr:
https://fuchsia.googlesource.com/zircon/+/HEAD/system/core/devmgr/devmgr.c#203

and by crashlogger:
https://fuchsia.googlesource.com/zircon/+/HEAD/system/core/crashlogger/crashlogger.cpp#149 .

In order to be able to have crashpad_handler be a drop-in for
crashlogger (at least for now), Crashpad will use this same key in
subsequent patches for this purpose. Pull this value out in a header so
it can be shared by different bits that will need to refer to it.

Bug: crashpad:196
Change-Id: I00e0178156a792bd80fc83b1b7d85b5ce6742e9a
Reviewed-on: https://chromium-review.googlesource.com/1038123
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-02 00:06:27 +00:00
Scott Graham
a279673974 fuchsia: Implement execvp() equivalent for run_with_crashpad
There's no implementation of execvp() on Fuchsia, so attempt to emulate
it in `run_with_crashpad` by using launchpad. Failures are mapped to
exit codes similar to what the execvp() path would return for missing
binary, and other non-subprocess errors.

Bug: crashpad:196
Change-Id: I042cbcf82bfd4560442a9d7f301e97bbfea54042
Reviewed-on: https://chromium-review.googlesource.com/1038055
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-05-01 20:45:17 +00:00
Scott Graham
240e28df2b Make run_with_crashpad buildable on Fuchsia too
Exception handling in Zircon is very similar to Mach
(https://fuchsia.googlesource.com/zircon/+/HEAD/docs/exceptions.md), so
run_with_crashpad will be useful for testing.

Bug: crashpad:196
Change-Id: Ib6956be284e92671c2e338a5056c18deb948daff
Reviewed-on: https://chromium-review.googlesource.com/1036191
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-05-01 19:25:27 +00:00
Scott Graham
d766e659bb Roll mini_chromium to 40cb6722
mini_chromium$ git log --oneline 6e0fdb2e..40cb6722
40cb672 fuchsia: Update mini_chromium/Crashpad build for SDK reorg
ce9be13 Set |posix| to false for the Fuchsia build.
ff7ad85 win: Use target_out_dir instead of source_out_dir for pdbname

Bug: crashpad:196
Change-Id: I8d23b0dece8222a2dc883f6c4e4d43aaf7f5fc89
Reviewed-on: https://chromium-review.googlesource.com/1036189
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-30 21:26:41 +00:00
Scott Graham
bce68d7975 fuchsia: Miscellaneous fixes to get symbol resolution working
- Endian-swaps the 3 integer fields of the build id when returning it
  for use as the module id (see bug 229).
- Removes the "app:" prefix on the main binary, as this prevents the
  crash server from matching the binary name (and it isn't particularly
  useful anyway)
- Map "<vDSO>" to "libzircon.so" as that's what it actually is, so that
  symbols for it can be found.

Bug: crashpad:196, crashpad:229
Change-Id: Ie4abc732b7696345b96c34dbb1a7d2cc2cfcf77f
Reviewed-on: https://chromium-review.googlesource.com/1035461
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-30 21:02:08 +00:00
Scott Graham
a107b8b95d fuchsia: Identify and include stack mapping in dump
Bug: crashpad:196
Change-Id: I4d71502028ba1d961e53c0450c3ae88c6285f04e
Reviewed-on: https://chromium-review.googlesource.com/1033358
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-04-30 20:00:58 +00:00
Scott Graham
5636102fb4 Implement unlengthed response read in HTTPTransport
Of course, as soon as I tried it against the real endpoint on Fuchsia,
the server just spits out raw crash id as a string without specifying
Content-Length.

Bug: crashpad:196, crashpad:30
Change-Id: I22af87589a8801cdfece0a7b862e70e0e7097f1f
Reviewed-on: https://chromium-review.googlesource.com/1024953
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-04-28 00:08:11 +00:00
Scott Graham
63d331e57a fuchsia: Fix child process reader test to do what it should be doing
This "child" test was actually reading itself (whoops!). Instead, pass
the address of the string to be read back from the child and read that.

Bug: crashpad:196
Change-Id: I27aa4cd06c69cd492cb3387a5a773a56e9cb02a3
Reviewed-on: https://chromium-review.googlesource.com/1033712
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-27 22:18:19 +00:00
Takuto Ikuta
d4533dc92b Add override for overridden function
Bug: 428099
Change-Id: If8818d02fd6315ad46d512357db2b70d011a52b0
Reviewed-on: https://chromium-review.googlesource.com/1031992
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-27 05:48:31 +00:00
Scott Graham
60ae9eeadb Implementation of HTTPTransport via raw socket
Partial implementation: Currently only handles http (i.e. no TLS), only
POST, and only certain response types (only when Content-Length is
specified, and not chunked). Used for Linux and Fuchsia lacking anything
better (that's shippable). Removes libcurl HTTPTransport, since it isn't
available in the Chromium sysroot anyway.

This is an intermediate step until BoringSSL is available in the Fuchsia
SDK. Once that's available, it should be "relatively straightfoward" to
make http_transport_socket.cc secure its socket using BoringSSL or
OpenSSL depending on the platform.

Bug: crashpad:196, crashpad:227, crashpad:30
Change-Id: If33a0d3f11b9000cbc3f52f96cd024ef274a922f
Reviewed-on: https://chromium-review.googlesource.com/1022717
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-04-27 04:04:30 +00:00
Scott Graham
2ddfb4cd3c fuchsia: CaptureContext for arm64
Copied from the _linux implementation, which looks close to what
ucontext on Fuchsia is (though it will probably need to change).

In arm64 debug, CaptureContext.CaptureContext requires slightly longer
slop distance.

Bug: crashpad:196
Change-Id: I2a6f90095e06fe8b468fbfd8add66a73c8a1d92f
Reviewed-on: https://chromium-review.googlesource.com/1031091
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-26 22:03:39 +00:00
Scott Graham
78689cc810 fuchsia: Depend on fdio_config when in-tree
Fixes .so link errors from
https://logs.chromium.org/v/?s=fuchsia%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8948324805139372352%2F%2B%2Fsteps%2Fbuild%2F0%2Fsteps%2Fbuild_fuchsia%2F0%2Fsteps%2Fninja%2F0%2Fstdout

[7302/11459] SOLINK x64-shared/crashpad_snapshot_test_module_small.so

FAILED: x64-shared/crashpad_snapshot_test_module_small.so x64-shared/lib.unstripped/crashpad_snapshot_test_module_small.so
/b/s/w/ir/kitchen-workdir/cipd/goma/gomacc ../../buildtools/linux-x64/clang/bin/clang++ -shared -Wl,--threads --sysroot=/b/s/w/ir/kitchen-workdir/out/debug-x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot --target=x86_64-fuchsia -march=x86-64 -mcx16 -g -Og -Wl,--icf=all -Wl,--no-undefined -o "x64-shared/lib.unstripped/crashpad_snapshot_test_module_small.so" -Wl,-soname="crashpad_snapshot_test_module_small.so" @"x64-shared/crashpad_snapshot_test_module_small.so.rsp" && ../../buildtools/linux-x64/clang/bin/llvm-objcopy --strip-all "x64-shared/lib.unstripped/crashpad_snapshot_test_module_small.so" "x64-shared/crashpad_snapshot_test_module_small.so"
/b/s/w/ir/kitchen-workdir/out/debug-x64/../../buildtools/linux-x64/clang/bin/ld.lld: error: undefined symbol: dirfd
>>> referenced by directory_reader_posix.cc:72 (../../third_party/crashpad/util/file/directory_reader_posix.cc:72)
>>>               libutil.directory_reader_posix.o:(crashpad::DirectoryReader::DirectoryFD()) in archive x64-shared/obj/third_party/crashpad/util/libutil.a
/b/s/w/ir/kitchen-workdir/out/debug-x64/../../buildtools/linux-x64/clang/bin/ld.lld: error: undefined symbol: fdio_ioctl
>>> referenced by sysinfo.h:32 (../../out/debug-x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot/include/zircon/device/sysinfo.h:32)
>>>               libutil.koid_utilities.o:(ioctl_sysinfo_get_root_job(int, unsigned int*)) in archive x64-shared/obj/third_party/crashpad/util/libutil.a
clang-7.0: error: ld.lld command failed with exit code 1 (use -v to see invocation)

Bug: crashpad:196
Change-Id: I50b50a8ba668d75d40e86d863976c386bb382f65
Reviewed-on: https://chromium-review.googlesource.com/1028840
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-25 21:28:29 +00:00
Joshua Peraza
d051e00cd8 android: name crashpad_handler like a loadable module
There is not any normal way to package native executables in an
Android APK (that I've found). It is normal to package native code as
loadable modules, but Android's APK installer will ignore files not
named like shared objects.

Bug: crashpad:30
Change-Id: I45ea3e4b6dbfaf92d3d174e96aafe377928b9294
Reviewed-on: https://chromium-review.googlesource.com/1026157
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2018-04-24 22:51:58 +00:00
Scott Graham
7274c9823f fuchsia: Various build fixes for building in Fuchsia tree
- Use "deprecated_system_image" (merging from downstream)
- Add package for crashpad_handler
- Depend on launchpad target instead of a lib when in tree, as launchpad
  is no longer in the sysroot.
- Don't try to remove the -Wexit_time_destructors unless building
  standalone, when it's added by mini_chromiums BUILDCONFIG.gn

Bug: crashpad:196
Change-Id: I08e0faaa989346b078a41896eb4ace69e7b1bcdc
Reviewed-on: https://chromium-review.googlesource.com/1026514
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-24 22:34:20 +00:00
Scott Graham
0e144fb9ae Add missing http_transport_test_server to gyp build
Follow up to https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1013293.

Bug: crashpad:196, crashpad:227, crashpad:30
Change-Id: I87f18dce6a49f537cff5c9f3af2fe78b8d87c2ef
Reviewed-on: https://chromium-review.googlesource.com/1022738
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-23 16:54:32 +00:00
Scott Graham
439ba730c5 Implementation in C++ of HTTPTransport test server
- Pulls in cpp-httplib for test-only usage in third_party/.
- Replaces http_transport_test_server.py with .cc server.
- Remove unnecessary Go toolchain pull. This was planned to be used for
  the test server, but the toolchain integration was too messy when
  covering all target platforms/configs.

Bug: crashpad:196, crashpad:227, crashpad:30
Change-Id: I5990781473dcadfcc036fbe711c02928638ff851
Reviewed-on: https://chromium-review.googlesource.com/1013293
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-20 20:56:49 +00:00
Leonard Mosescu
a7c30f0501 Fix a few small issues found by GCC
Building Crashpad with GCC flagged a few potential issues. The issues
don't seem particularly severe, but they are easy enough to fix.

Note that even with these changes, Crashpad will not cleanly build with
GCC (additional patches would be needed to third_party/mini_chromium).

Bug: crashpad:
Change-Id: I9289d6c918da9a111aa3c2a078ad0dc1ba84749f
Reviewed-on: https://chromium-review.googlesource.com/1014280
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Leonard Mosescu <mosescu@chromium.org>
2018-04-16 19:27:53 +00:00
Scott Graham
799dcef4c9 fuchsia: Fix compilation after hasty review changes
I'm a dope. I really need to get the trybots enabled again,
but unfortunately I haven't made any useful progress on
https://bugs.chromium.org/p/crashpad/issues/detail?id=219.

Bug: crashpad:196
Change-Id: Iba2a2460d36c17d8261f82deb6cabaab5995111b
Reviewed-on: https://chromium-review.googlesource.com/1012464
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-13 19:10:50 +00:00
Scott Graham
ca2d7e776a Pull go toolchain for all host types
To be used to build replacement http test server.

Bug: crashpad:227, crashpad:196, crashpad:30
Change-Id: I8bdd33a629d98af8b149bd83a11edb5965ad6e76
Reviewed-on: https://chromium-review.googlesource.com/1011653
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-13 18:04:20 +00:00
Scott Graham
eca0ea8427 Add limited version of URL cracking
This is a very basic form of URL cracking to break a
HTTPTransport::SetURL() argument up into component parts. This is split
out of the (upcoming)
https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1008407
for Linux and Fuchsia.

Bug: crashpad:196
Change-Id: Iba075d9c8720c14550ce53e23d684362da84740c
Reviewed-on: https://chromium-review.googlesource.com/1010972
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-13 17:14:24 +00:00
Scott Graham
c2583364a3 fuchsia: Capture general purpose registers in thread snapshot
Conversion to CPUContext is currently only implemented for x64.

Bug: crashpad:196
Change-Id: I3fb8541f70a6f8d6f12c02e6b17c78e07e195056
Reviewed-on: https://chromium-review.googlesource.com/1007967
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-04-13 17:00:40 +00:00
Scott Graham
f5d5a41317 fuchsia: Add implementation of ScopedTaskSuspend
This implementation has some limitations as documented in the header,
however, threads must be suspended in order to use the register capture
debug API so this is somewhat useful for now in the context of
generate_dump.

Also, refactor some child-object retrieval helpers used in a few places.

Bug: crashpad:196
Change-Id: I1fdae5fc3d4b43841e535724eac10c1e58af04c5
Reviewed-on: https://chromium-review.googlesource.com/1007966
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-04-13 16:46:40 +00:00
Joshua Peraza
c80bf96001 Don't record reports as complete if there is no upload thread
This allows clients to use the database to handle uploads themselves,
e.g. on Android, where Crashpad does not yet provide an uploader.

The handler does not launch an upload thread when no url is supplied.
Previously, the handler would move these reports to
completed and record the upload as skipped with kUploadsDisabled.
With this change, these reports would remain pending until pruned,
with no metrics recorded for them in regard to their upload.

Bug: crashpad:30
Change-Id: I4167ab1531634b10e91d03229018ae6aab4103aa
Reviewed-on: https://chromium-review.googlesource.com/1010970
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-04-13 16:20:01 +00:00
Joshua Peraza
dd4ba4c8a1 linux, x86/x64: set fpregs to nullptr in CaptureContext()
uc_mcontext.fpregs is a pointer to the floating point context, but
CaptureContext() doesn't yet capture floating point context.

This error manages to slip by unit tests when run all together, but
fails when CrashpadClient.SimulateCrash is run by itself.

Bug: crashpad:30
Change-Id: I7adc30648642912d66a7ba8cf9973c9bc0fbd8bc
Reviewed-on: https://chromium-review.googlesource.com/1011504
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-04-12 23:54:25 +00:00
Joshua Peraza
091308be6a gyp: build client_argv_handling
client_argv_handling.{cc,h} were added to BUILD.gn, but omitted from
the corresponding gyp files.

Change-Id: I52ebf61234cfa22c3f08e2edd824c298e4879e6a
Reviewed-on: https://chromium-review.googlesource.com/1010921
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-04-12 19:44:21 +00:00
Scott Graham
856339b2d2 fuchsia: Avoid uname() in system snapshot
uname() seems to hang, sometimes, perhaps when then network is in a bad
state. Additionally, this way allows getting a minimal amount of version
information via zx_system_get_version().

Bug: crashpad:196
Change-Id: I2c040ee38ae017a6e8e060de10039bae6d159058
Reviewed-on: https://chromium-review.googlesource.com/1007979
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-04-11 20:48:20 +00:00
Scott Graham
d9bf38f39c fuchsia: More fixes to get a basic minidump written
With this `generate_dump <somepid>` generates a valid and somewhat
plausible (but still quite incomplete) minidump.

As an example, on a running Fuchsia system, `ps` reported the pid of
"netstack" as 6062, followed by `generate_dump 6062`, copy minidump.6062
to host, and run Breakpad's minidump_dump on the generated dump file,
resulting in:
https://gist.github.com/sgraham/24e4ba1af968219d7c154bb0fba43925

This looks roughly correct in that it has a bunch of threads (without
much data) and a reasonable looking module list.

Bug: crashpad:196
Change-Id: I3f68cc015f74374624a5ce497d46ac90df17a22c
Reviewed-on: https://chromium-review.googlesource.com/1005978
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-04-11 04:49:36 +00:00