From 6482aea7b28aa52e40e7cce75fbd1f1158d248e8 Mon Sep 17 00:00:00 2001 From: Howard Hellyer Date: Fri, 30 Jun 2017 15:41:47 +0100 Subject: [PATCH 1/2] Allow npm install to work in git clone. --- scripts/configure.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/configure.js b/scripts/configure.js index c63f7793..f79edb64 100644 --- a/scripts/configure.js +++ b/scripts/configure.js @@ -70,6 +70,7 @@ console.log(`Installing llnode for ${lldbExe}, lldb version ${lldbVersion}`); // should stop using the mirror. if (lldbHeadersBranch != undefined) { console.log('Cloning lldb from ' + lldbHeadersBranch); + child_process.execSync(`rm -rf ${lldbIncludeDir}`); child_process.execFileSync('git', ['clone', '--depth=1', '-b', lldbHeadersBranch, 'https://github.com/llvm-mirror/lldb.git', lldbIncludeDir], @@ -79,6 +80,11 @@ if (lldbHeadersBranch != undefined) { // Link to the headers file so we can run gyp_llnode directly and don't need to // setup parameters to pass it. console.log(`Linking lldb to include directory ${lldbIncludeDir}`); +try { + fs.unlinkSync('lldb'); +} catch (error) { + // File does not exist, no need to handle. +} fs.symlinkSync(lldbIncludeDir, 'lldb'); // npm explore has a different root folder when using -g @@ -96,6 +102,7 @@ if (process.env.npm_config_global) { var gypDir = child_process.execFileSync('npm', ['-g', 'explore', 'npm', 'npm', 'explore', gypSubDir, 'pwd'], {cwd: buildDir}).toString().trim(); +child_process.execSync('rm -rf tools'); fs.mkdirSync('tools'); console.log(`Linking tools/gyp to ${gypDir}/gyp`); fs.symlinkSync(`${gypDir}/gyp`, 'tools/gyp'); From 480b4644fef25c327254339d46d9bde1d9d43910 Mon Sep 17 00:00:00 2001 From: Howard Hellyer Date: Fri, 30 Jun 2017 15:57:47 +0100 Subject: [PATCH 2/2] Use PRIx64 to avoid compiler warnings on Linux. --- src/llnode.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/llnode.cc b/src/llnode.cc index b6eea45e..d24fdc4c 100644 --- a/src/llnode.cc +++ b/src/llnode.cc @@ -3,6 +3,8 @@ #include #include +#include + #include #include "src/llnode.h" @@ -121,7 +123,7 @@ bool BacktraceCmd::DoExecute(SBDebugger d, char** cmd, v8::JSFrame v8_frame(&llv8, static_cast(frame.GetFP())); std::string res = v8_frame.Inspect(true, err); if (err.Success()) { - result.Printf(" %c frame #%u: 0x%016llx %s\n", star, i, pc, + result.Printf(" %c frame #%u: 0x%016" PRIx64 " %s\n", star, i, pc, res.c_str()); continue; } @@ -134,7 +136,7 @@ bool BacktraceCmd::DoExecute(SBDebugger d, char** cmd, lldb::SBMemoryRegionInfo info; if (target.GetProcess().GetMemoryRegionInfo(pc, info).Success() && info.IsExecutable() && info.IsWritable()) { - result.Printf(" %c frame #%u: 0x%016llx \n", star, i, pc); + result.Printf(" %c frame #%u: 0x%016" PRIx64 " \n", star, i, pc); continue; } }