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

Unified Diff: ppapi/native_client/src/trusted/plugin/pnacl_options.cc

Issue 181153002: Have PNaCl use debug pexe URL instead of stripped pexe w/ kEnableNaClDebug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: split the test Created 6 years, 10 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: ppapi/native_client/src/trusted/plugin/pnacl_options.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_options.cc b/ppapi/native_client/src/trusted/plugin/pnacl_options.cc
index 6985883175ee04c1c34fabe418f56b056d46a2f0..b02e1f04565f54cbbdecdf7d27d12f2f1418337f 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_options.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_options.cc
@@ -11,7 +11,11 @@
namespace plugin {
-PnaclOptions::PnaclOptions() : translate_(false), opt_level_(2) { }
+PnaclOptions::PnaclOptions()
+ : translate_(false),
+ is_debug_(false),
+ opt_level_(2) {
+}
PnaclOptions::~PnaclOptions() {
}
@@ -31,6 +35,10 @@ std::vector<char> PnaclOptions::GetOptCommandline() const {
nacl::stringstream ss;
ss << "-O" << opt_level_;
+ // Debug info is only available in LLVM format pexes,
+ // not in PNaCl format pexes.
+ if (is_debug_)
+ ss << "\x00-bitcode-format=llvm";
str = ss.str();
std::copy(str.begin(), str.end(), std::back_inserter(result));
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/pnacl_options.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698