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

Unified Diff: snapshot/win/crashpad_snapshot_test_crashing_child.cc

Issue 1349313003: win: support x64 reading x86 (wow64) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698