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

Side by Side Diff: test/cctest/test-debug.cc

Issue 2109093003: [wasm] Enable wasm frame inspection for debugging (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « src/wasm/wasm-module.cc ('k') | test/mjsunit/wasm/frame-inspection.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 7566 matching lines...) Expand 10 before | Expand all | Expand 10 after
7577 int break_id = CcTest::i_isolate()->debug()->break_id(); 7577 int break_id = CcTest::i_isolate()->debug()->break_id();
7578 char script[128]; 7578 char script[128];
7579 i::Vector<char> script_vector(script, sizeof(script)); 7579 i::Vector<char> script_vector(script, sizeof(script));
7580 SNPrintF(script_vector, "%%GetFrameCount(%d)", break_id); 7580 SNPrintF(script_vector, "%%GetFrameCount(%d)", break_id);
7581 v8::Local<v8::Value> result = CompileRun(script); 7581 v8::Local<v8::Value> result = CompileRun(script);
7582 7582
7583 int frame_count = result->Int32Value(context).FromJust(); 7583 int frame_count = result->Int32Value(context).FromJust();
7584 CHECK_EQ(expected_frame_count, frame_count); 7584 CHECK_EQ(expected_frame_count, frame_count);
7585 7585
7586 for (int i = 0; i < frame_count; i++) { 7586 for (int i = 0; i < frame_count; i++) {
7587 // The 5. element in the returned array of GetFrameDetails contains the 7587 // The 6. element in the returned array of GetFrameDetails contains the
7588 // source position of that frame. 7588 // source position of that frame.
7589 SNPrintF(script_vector, "%%GetFrameDetails(%d, %d)[5]", break_id, i); 7589 SNPrintF(script_vector, "%%GetFrameDetails(%d, %d)[6]", break_id, i);
7590 v8::Local<v8::Value> result = CompileRun(script); 7590 v8::Local<v8::Value> result = CompileRun(script);
7591 CHECK_EQ(expected_line_number[i], 7591 CHECK_EQ(expected_line_number[i],
7592 i::Script::GetLineNumber(source_script, 7592 i::Script::GetLineNumber(source_script,
7593 result->Int32Value(context).FromJust())); 7593 result->Int32Value(context).FromJust()));
7594 } 7594 }
7595 v8::Debug::SetDebugEventListener(CcTest::isolate(), nullptr); 7595 v8::Debug::SetDebugEventListener(CcTest::isolate(), nullptr);
7596 CcTest::isolate()->TerminateExecution(); 7596 CcTest::isolate()->TerminateExecution();
7597 } 7597 }
7598 7598
7599 7599
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
8209 "function foo() {\n" 8209 "function foo() {\n"
8210 " try { throw new Error(); } catch (e) {}\n" 8210 " try { throw new Error(); } catch (e) {}\n"
8211 "}\n" 8211 "}\n"
8212 "debugger;\n" 8212 "debugger;\n"
8213 "foo();\n" 8213 "foo();\n"
8214 "foo();\n"); 8214 "foo();\n");
8215 8215
8216 v8::Debug::SetDebugEventListener(env->GetIsolate(), nullptr); 8216 v8::Debug::SetDebugEventListener(env->GetIsolate(), nullptr);
8217 CHECK_EQ(break_point_hit_count, 4); 8217 CHECK_EQ(break_point_hit_count, 4);
8218 } 8218 }
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/mjsunit/wasm/frame-inspection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698