Comments (14)
Thank you for reporting this!
Does this patch fix the compilation error?
diff --git a/src/llscan.cc b/src/llscan.cc
index 2f9fb5a..5418d80 100644
--- a/src/llscan.cc
+++ b/src/llscan.cc
@@ -1,9 +1,9 @@
#include <errno.h>
-#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
+#include <cinttypes>
#include <fstream>
#include <vector>
diff --git a/src/llv8.cc b/src/llv8.cc
index 5f878be..b6f60a2 100644
--- a/src/llv8.cc
+++ b/src/llv8.cc
@@ -1,5 +1,6 @@
#include <assert.h>
-#include <inttypes.h>
+
+#include <cinttypes>
#include "llv8-inl.h"
#include "llv8.h"
Regarding lldb
, what lldb source did you use when building llnode
?
from llnode.
I has rebuild llnode with this patch, it works great!
Im using lldb 3.4.2 when building llnode ./gyp_llnode -Dlldb_dir=/usr/lib64/llvm/
.
Is this version was too old?
$ ls /usr/lib64/llvm/
BugpointPasses.so liblldb.so libLLVM-3.4.2.so libLLVM-3.4.so libLTO.so LLVMgold.so
$ rpm -qa | grep lldb
lldb-devel-3.4.2-7.el7.x86_64
lldb-3.4.2-7.el7.x86_64
from llnode.
It may be that something in headers doesn't match the lldb binary. I'll try to setup a CentOS environment this week to see if I can reproduce this.
from llnode.
Sorry, I had no time week. @hhellyer or @yjhjstz , does it sound interesting to any of you?
from llnode.
@indutny - Sorry I was out on vacation last week.
@axot - lldb-3.4 does seem a little old but from the comments above this looks resolved so if it's working now that's fine. Are there any outstanding issues?
from llnode.
@hhellyer yes, it's fine to compile now, but seems not working
(lldb) v8
The following subcommands are supported:
The following subcommands are supported:
from llnode.
Do any of the commands work? For example does running:
(lldb) v8 bt
produce any useful output?
I've seen corrupted help text before. I think it's usually because the lldb headers don't quite match the version of lldb you are using but I think it can also be C++ linking issues if your plugin and lldb were built with different C++ compilers.
from llnode.
re the scrambled console output see https://github.com/indutny/llnode/issues/10
from llnode.
$ lldb -c core.25117
Core file '/tmp/core.25117' (x86_64) was loaded.
(lldb) v8 bt
* SBThread: tid = 0x0000(lldb) v8
The following subcommands are supported:
bt -- Show a backtrace with node.js JavaScript functions and their args. An optional
argument is accepted; if that argument is a number, it specifies the number of
frames to display. Otherwise all frames will be dumped.
Syntax: v8 bt [number]
findjsinstances -- List all objects which share the specified map.
Accepts the same options as `v8
inspect`
findjsobjects -- List all object types and instance counts grouped by map and sorted by instance
count.
Requires `LLNODE_RANGESFILE` environment variable to be set to a file
containing memory ranges for the core file being debugged.
There are scripts for
generating this file on Linux and Mac in the scripts directory of the llnode
repository.
inspect -- Print detailed description and contents of the JavaScript value.
Possible flags
(all optional):
* -F, --full-string - print whole string without adding
ellipsis
* -m, --print-map - print object's map address
* --string-length
num - print maximum of `num` characters in string
Syntax: v8 inspect [flags]
expr
nodeinfo -- Print information about Node.js
print -- Print short description of the JavaScript value.
Syntax: v8 print expr
source -- Source code information
For more help on any particular subcommand, type 'help <command> <subcommand>'.
(lldb) v8 bt
* SBThread: tid = 0x0000(lldb) v8
The following subcommands are supported:
The following subcommands are supported:
The following subcommands are supported:
The following sub
ommands are supported:
The follow�(lldb) v8 findjsinstances
Segmentation fault
Did this work properly?
from llnode.
It ends with a segfault so I don't think it worked properly. :-)
Ubuntu has multiple lldb packages available (named lldb-3.5, lldb-3.6, lldb-3.7, lldb-3.8) and
I'm using lldb-3.8 - is there a similar setup on CentOS that will let you download one of those? (You should probably rebuild the plugin after changing versions of lldb.)
from llnode.
@axot yeah, unfortunately this looks like a mismatch between source files and the lldb
binary.
May I ask you if you used -Dlldb_lib=...
when compiling llnode? This leads to crashes on some systems, and it may help to build without this define.
from llnode.
@indutny I tried compile llnode without lldb_lib
, it seems not fixed.
$ ./gyp_llnode
['/llnode/llnode.gyp', '-I', '/llnode/common.gypi', '--depth=.', '-f', 'make', '-Goutput_dir=/llnode/out', '--generator-output', '/llnode/out', '-Dgcc_version=48', '-Dclang=0', '-Dhost_arch=x64', '-Dtarget_arch=x64']
$ make -C out/ -j4
make: Entering directory `/llnode/out'
CXX(target) /llnode/out/Release/obj.target/llnode/src/llnode.o
CXX(target) /llnode/out/Release/obj.target/llnode/src/llv8.o
CXX(target) /llnode/out/Release/obj.target/llnode/src/llv8-constants.o
CXX(target) /llnode/out/Release/obj.target/llnode/src/llscan.o
SOLINK(target) /llnode/out/Release/obj.target/llnode.so
COPY /llnode/out/Release/lib.target/llnode.so
make: Leaving directory `/llnode/out'
$ sudo make install-linux
mkdir -p /usr/lib/lldb
cp -rf ./out/Release/lib.target/llnode.so /usr/lib/lldb/
$ lldb -c core.1209
Core file '/tmp/core.1209' (x86_64) was loaded.
(lldb) v8
The following subcommands are supported:
The following subcommands are supported:
(lldb)
from llnode.
@axot I just reproduced it on a CentOS box. Unfortunately, I don't have any other advice at the moment, but to try building lldb from source and using that source to build llnode.
The symptoms seems to be binary vs headers compatibility-based, and I don't know how to resolve them at this point.
Sorry!
from llnode.
That's okay, I will try to build lldb from source later. Thank you.
from llnode.
Related Issues (20)
- Rename primary branch to main HOT 4
- llnode failed to install HOT 12
- Not showing details of JS frames on node v16.14.0 HOT 6
- ptrace: No such process. HOT 2
- Document User Journey HOT 11
- core dump collaboration call HOT 27
- Supported Features Matrix HOT 1
- Reinstate 19 Nightly Build HOT 1
- Apply env variables to test timeouts consistently
- 'v8 findjsobjects' command is failing with below the stack trace - need help HOT 4
- discussion: Re-establish automation to detect breaking changes HOT 2
- refactor: use `debug_helper`
- tests: Fix flaky JSArrayBuffer test HOT 3
- bug(print-source): libc++abi: terminating with uncaught exception
- no coverage for "v8 nodeinfo" HOT 4
- [question] emtpy result when read core file HOT 2
- cannot load core file HOT 1
- Consistent crashes with `v8 findrefs -s` HOT 1
- Unable to load LLDB with LLNODE plugin HOT 2
- [Question] examining coredumps on Mac x86 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llnode.