Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow npm install to work in git clone. #110

Merged
merged 2 commits into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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
Expand All @@ -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');
Expand Down
6 changes: 4 additions & 2 deletions src/llnode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <stdlib.h>
#include <string.h>

#include <cinttypes>

#include <lldb/API/SBExpressionOptions.h>

#include "src/llnode.h"
Expand Down Expand Up @@ -121,7 +123,7 @@ bool BacktraceCmd::DoExecute(SBDebugger d, char** cmd,
v8::JSFrame v8_frame(&llv8, static_cast<int64_t>(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;
}
Expand All @@ -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 <builtin>\n", star, i, pc);
result.Printf(" %c frame #%u: 0x%016" PRIx64 " <builtin>\n", star, i, pc);
continue;
}
}
Expand Down