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

Unified Diff: runtime/vm/disassembler_ia32.cc

Issue 10869063: Add attributions so printf like functions can have their arguments checked. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 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 | « runtime/vm/disassembler.h ('k') | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler_ia32.cc
diff --git a/runtime/vm/disassembler_ia32.cc b/runtime/vm/disassembler_ia32.cc
index eca1e0ca5cb676a469cc734fa32f99f7fbd52bab..1ee0ebc4910e09b775f44b140164e0d1a8a5b58c 100644
--- a/runtime/vm/disassembler_ia32.cc
+++ b/runtime/vm/disassembler_ia32.cc
@@ -337,7 +337,7 @@ class X86Decoder : public ValueObject {
void X86Decoder::PrintInt(int value) {
char int_buffer[16];
- OS::SNPrint(int_buffer, sizeof(int_buffer), "0x%x", value);
+ OS::SNPrint(int_buffer, sizeof(int_buffer), "%#x", value);
Print(int_buffer);
}
@@ -345,7 +345,7 @@ void X86Decoder::PrintInt(int value) {
// Append the int value (printed in hex) to the output buffer.
void X86Decoder::PrintHex(int value) {
char hex_buffer[16];
- OS::SNPrint(hex_buffer, sizeof(hex_buffer), "0x%x", value);
+ OS::SNPrint(hex_buffer, sizeof(hex_buffer), "%#x", value);
Print(hex_buffer);
}
@@ -418,7 +418,7 @@ static const char* ObjectToCStringNoGC(const Object& obj) {
void X86Decoder::PrintAddress(uword addr) {
NoGCScope no_gc;
char addr_buffer[32];
- OS::SNPrint(addr_buffer, sizeof(addr_buffer), "%p", addr);
+ OS::SNPrint(addr_buffer, sizeof(addr_buffer), "%#"Px"", addr);
Print(addr_buffer);
// Try to print as heap object or stub name
if (!Isolate::Current()->heap()->CodeContains(addr) &&
@@ -1580,7 +1580,7 @@ int X86Decoder::InstructionDecode(uword pc) {
break;
default:
- OS::Print("Unknown case 0x%x\n", *data);
+ OS::Print("Unknown case %#x\n", *data);
UNIMPLEMENTED();
}
}
« no previous file with comments | « runtime/vm/disassembler.h ('k') | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698