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

Side by Side Diff: snapshot/mac/mach_o_image_annotations_reader_test.cc

Issue 1058523002: Add ConstThreadState to mach_extensions.h and use it everywhere (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: clang-unformat Created 5 years, 8 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 | « snapshot/mac/exception_snapshot_mac.cc ('k') | snapshot/mac/process_snapshot_mac.h » ('j') | no next file with comments »
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 19 matching lines...) Expand all
30 #include "client/simple_string_dictionary.h" 30 #include "client/simple_string_dictionary.h"
31 #include "gtest/gtest.h" 31 #include "gtest/gtest.h"
32 #include "snapshot/mac/process_reader.h" 32 #include "snapshot/mac/process_reader.h"
33 #include "test/errors.h" 33 #include "test/errors.h"
34 #include "test/mac/mach_errors.h" 34 #include "test/mac/mach_errors.h"
35 #include "test/mac/mach_multiprocess.h" 35 #include "test/mac/mach_multiprocess.h"
36 #include "util/file/file_io.h" 36 #include "util/file/file_io.h"
37 #include "util/mac/mac_util.h" 37 #include "util/mac/mac_util.h"
38 #include "util/mach/exc_server_variants.h" 38 #include "util/mach/exc_server_variants.h"
39 #include "util/mach/exception_ports.h" 39 #include "util/mach/exception_ports.h"
40 #include "util/mach/mach_extensions.h"
40 #include "util/mach/mach_message.h" 41 #include "util/mach/mach_message.h"
41 #include "util/mach/mach_message_server.h" 42 #include "util/mach/mach_message_server.h"
42 43
43 namespace crashpad { 44 namespace crashpad {
44 namespace test { 45 namespace test {
45 namespace { 46 namespace {
46 47
47 class TestMachOImageAnnotationsReader final 48 class TestMachOImageAnnotationsReader final
48 : public MachMultiprocess, 49 : public MachMultiprocess,
49 public UniversalMachExcServer::Interface { 50 public UniversalMachExcServer::Interface {
(...skipping 22 matching lines...) Expand all
72 73
73 // UniversalMachExcServer::Interface: 74 // UniversalMachExcServer::Interface:
74 kern_return_t CatchMachException(exception_behavior_t behavior, 75 kern_return_t CatchMachException(exception_behavior_t behavior,
75 exception_handler_t exception_port, 76 exception_handler_t exception_port,
76 thread_t thread, 77 thread_t thread,
77 task_t task, 78 task_t task,
78 exception_type_t exception, 79 exception_type_t exception,
79 const mach_exception_data_type_t* code, 80 const mach_exception_data_type_t* code,
80 mach_msg_type_number_t code_count, 81 mach_msg_type_number_t code_count,
81 thread_state_flavor_t* flavor, 82 thread_state_flavor_t* flavor,
82 const natural_t* old_state, 83 ConstThreadState old_state,
83 mach_msg_type_number_t old_state_count, 84 mach_msg_type_number_t old_state_count,
84 thread_state_t new_state, 85 thread_state_t new_state,
85 mach_msg_type_number_t* new_state_count, 86 mach_msg_type_number_t* new_state_count,
86 const mach_msg_trailer_t* trailer, 87 const mach_msg_trailer_t* trailer,
87 bool* destroy_complex_request) override { 88 bool* destroy_complex_request) override {
88 *destroy_complex_request = true; 89 *destroy_complex_request = true;
89 90
90 EXPECT_EQ(ChildTask(), task); 91 EXPECT_EQ(ChildTask(), task);
91 92
92 ProcessReader process_reader; 93 ProcessReader process_reader;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 335
335 TEST(MachOImageAnnotationsReader, CrashDyld) { 336 TEST(MachOImageAnnotationsReader, CrashDyld) {
336 TestMachOImageAnnotationsReader test_mach_o_image_annotations_reader( 337 TestMachOImageAnnotationsReader test_mach_o_image_annotations_reader(
337 TestMachOImageAnnotationsReader::kCrashDyld); 338 TestMachOImageAnnotationsReader::kCrashDyld);
338 test_mach_o_image_annotations_reader.Run(); 339 test_mach_o_image_annotations_reader.Run();
339 } 340 }
340 341
341 } // namespace 342 } // namespace
342 } // namespace test 343 } // namespace test
343 } // namespace crashpad 344 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/mac/exception_snapshot_mac.cc ('k') | snapshot/mac/process_snapshot_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698