| Index: snapshot/win/crashpad_snapshot_test_crashing_child.cc
|
| diff --git a/snapshot/mac/mach_o_image_annotations_reader_test_no_op.cc b/snapshot/win/crashpad_snapshot_test_crashing_child.cc
|
| similarity index 52%
|
| copy from snapshot/mac/mach_o_image_annotations_reader_test_no_op.cc
|
| copy to snapshot/win/crashpad_snapshot_test_crashing_child.cc
|
| index b8953207b4a0d6034622dd753dcb8d97e22a58d6..2654ae2a488e173a8e7d7439f5c21f96743f5c74 100644
|
| --- a/snapshot/mac/mach_o_image_annotations_reader_test_no_op.cc
|
| +++ b/snapshot/win/crashpad_snapshot_test_crashing_child.cc
|
| @@ -12,8 +12,31 @@
|
| // See the License for the specific language governing permissions and
|
| // limitations under the License.
|
|
|
| +#include <stdint.h>
|
| #include <stdlib.h>
|
| +#include <windows.h>
|
| +
|
| +#include "base/logging.h"
|
| +#include "client/crashpad_client.h"
|
| +#include "util/file/file_io.h"
|
| +
|
| +__declspec(noinline) uint64_t CurrentAddress() {
|
| + return reinterpret_cast<uint64_t>(_ReturnAddress());
|
| +}
|
|
|
| int main(int argc, char* argv[]) {
|
| - return EXIT_SUCCESS;
|
| + CHECK_EQ(argc, 2);
|
| +
|
| + crashpad::CrashpadClient client;
|
| + CHECK(client.SetHandler(argv[1]));
|
| + CHECK(client.UseHandler());
|
| +
|
| + HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
|
| + CHECK_NE(out, INVALID_HANDLE_VALUE);
|
| + uint64_t break_address = CurrentAddress();
|
| + crashpad::CheckedWriteFile(out, &break_address, sizeof(break_address));
|
| +
|
| + __debugbreak();
|
| +
|
| + return 0;
|
| }
|
|
|