diff options
author | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 20:35:11 +0000 |
---|---|---|
committer | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 20:35:11 +0000 |
commit | cfdc20f9ee59bb228068e3db99e6b7c9268e03aa (patch) | |
tree | ffa628468269710c44650cf857a8154b71a3ddba /ppapi | |
parent | f3bc2ecfac17215ee723fd439ccd4a703ac68b7a (diff) | |
download | chromium_src-cfdc20f9ee59bb228068e3db99e6b7c9268e03aa.zip chromium_src-cfdc20f9ee59bb228068e3db99e6b7c9268e03aa.tar.gz chromium_src-cfdc20f9ee59bb228068e3db99e6b7c9268e03aa.tar.bz2 |
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
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/json_manifest.h | 6 | ||||
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/pnacl_options.cc | 12 |
2 files changed, 10 insertions, 8 deletions
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<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)); 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; } |