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

Unified Diff: runtime/vm/flags.cc

Issue 780173002: Improve debugger in MIPS simulator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 | « no previous file | runtime/vm/simulator_mips.h » ('j') | runtime/vm/simulator_mips.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flags.cc
===================================================================
--- runtime/vm/flags.cc (revision 42124)
+++ runtime/vm/flags.cc (working copy)
@@ -208,9 +208,16 @@
}
case Flag::kInteger: {
char* endptr = NULL;
- int val = strtol(argument, &endptr, 10);
- if (endptr != argument) {
+ const intptr_t len = strlen(argument);
+ int base = 10;
+ if ((len > 2) && (argument[0] == '0') && (argument[1] == 'x')) {
+ base = 16;
+ }
+ int val = strtol(argument, &endptr, base);
+ if (endptr == argument + len) {
*flag->int_ptr_ = val;
+ } else {
+ return false;
}
break;
}
« no previous file with comments | « no previous file | runtime/vm/simulator_mips.h » ('j') | runtime/vm/simulator_mips.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698