From cfdc20f9ee59bb228068e3db99e6b7c9268e03aa Mon Sep 17 00:00:00 2001 From: "jvoung@google.com" Date: Tue, 18 Mar 2014 20:35:11 +0000 Subject: Fix PNaCl debug commandline flags, and use the pexe with debug info in test. Now that the PNaCl translator which supports reading llvm-formatted bitcode files is DEPS'ed in, we can change the debug test to actually use a pexe with debug info. In the process, fix the way the commandline flags were set up (avoid <<'ing a string that starts with a null byte). Also try to turn on the test for 64-bit windows instead, since there should only be a problem with 32-bit windows. BUG= http://code.google.com/p/nativeclient/issues/detail?id=3765 R=bradnelson@chromium.org, bradnelson@google.com Review URL: https://codereview.chromium.org/203103002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257729 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/native_client/src/trusted/plugin/json_manifest.h | 6 +++--- ppapi/native_client/src/trusted/plugin/pnacl_options.cc | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'ppapi') diff --git a/ppapi/native_client/src/trusted/plugin/json_manifest.h b/ppapi/native_client/src/trusted/plugin/json_manifest.h index 7361245..e56d446 100644 --- a/ppapi/native_client/src/trusted/plugin/json_manifest.h +++ b/ppapi/native_client/src/trusted/plugin/json_manifest.h @@ -38,8 +38,8 @@ class JsonManifest : public Manifest { manifest_base_url_(manifest_base_url), sandbox_isa_(sandbox_isa), nonsfi_enabled_(nonsfi_enabled), - dictionary_(Json::nullValue), - pnacl_debug_(pnacl_debug) { } + pnacl_debug_(pnacl_debug), + dictionary_(Json::nullValue) { } virtual ~JsonManifest() { } // Initialize the manifest object for use by later lookups. The return @@ -98,9 +98,9 @@ class JsonManifest : public Manifest { nacl::string manifest_base_url_; nacl::string sandbox_isa_; bool nonsfi_enabled_; + bool pnacl_debug_; Json::Value dictionary_; - bool pnacl_debug_; // Search for a pnacl-debug entry. }; } // namespace plugin diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_options.cc b/ppapi/native_client/src/trusted/plugin/pnacl_options.cc index b02e1f0..46d7c24 100644 --- a/ppapi/native_client/src/trusted/plugin/pnacl_options.cc +++ b/ppapi/native_client/src/trusted/plugin/pnacl_options.cc @@ -35,14 +35,16 @@ std::vector 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)); result.push_back('\x00'); + // Debug info is only available in LLVM format pexes, + // not in PNaCl format pexes. + if (is_debug_) { + str = "-bitcode-format=llvm"; + std::copy(str.begin(), str.end(), std::back_inserter(result)); + result.push_back('\x00'); + } return result; } -- cgit v1.1