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

Unified Diff: src/simulator-arm.cc

Issue 1941: Fixed arm disassembler build problems. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
« no previous file with comments | « src/platform-macos.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/simulator-arm.cc
===================================================================
--- src/simulator-arm.cc (revision 286)
+++ src/simulator-arm.cc (working copy)
@@ -204,10 +204,11 @@
while (!done) {
if (last_pc != sim_->get_pc()) {
disasm::Disassembler dasm;
- char buffer[256]; // use a reasonably large buffer
- dasm.InstructionDecode(buffer, sizeof(buffer),
+ // use a reasonably large buffer
+ v8::internal::EmbeddedVector<char, 256> buffer;
+ dasm.InstructionDecode(buffer,
reinterpret_cast<byte*>(sim_->get_pc()));
- PrintF(" 0x%x %s\n", sim_->get_pc(), buffer);
+ PrintF(" 0x%x %s\n", sim_->get_pc(), buffer.start());
last_pc = sim_->get_pc();
}
char* line = ReadLine("sim> ");
@@ -258,7 +259,8 @@
}
} else if (strcmp(cmd, "disasm") == 0) {
disasm::Disassembler dasm;
- char buffer[256]; // use a reasonably large buffer
+ // use a reasonably large buffer
+ v8::internal::EmbeddedVector<char, 256> buffer;
byte* cur = NULL;
byte* end = NULL;
@@ -283,8 +285,8 @@
}
while (cur < end) {
- dasm.InstructionDecode(buffer, sizeof(buffer), cur);
- PrintF(" 0x%x %s\n", cur, buffer);
+ dasm.InstructionDecode(buffer, cur);
+ PrintF(" 0x%x %s\n", cur, buffer.start());
cur += Instr::kInstrSize;
}
} else if (strcmp(cmd, "gdb") == 0) {
@@ -1341,11 +1343,11 @@
}
if (FLAG_trace_sim) {
disasm::Disassembler dasm;
- char buffer[256]; // use a reasonably large buffer
+ // use a reasonably large buffer
+ v8::internal::EmbeddedVector<char, 256> buffer;
dasm.InstructionDecode(buffer,
- sizeof(buffer),
reinterpret_cast<byte*>(instr));
- PrintF(" 0x%x %s\n", instr, buffer);
+ PrintF(" 0x%x %s\n", instr, buffer.start());
}
if (ConditionallyExecute(instr)) {
switch (instr->TypeField()) {
« no previous file with comments | « src/platform-macos.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698