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

v8 source list always fails w/ error: USAGE: v8 source list #138

Closed
No9 opened this issue Sep 30, 2017 · 4 comments
Closed

v8 source list always fails w/ error: USAGE: v8 source list #138

No9 opened this issue Sep 30, 2017 · 4 comments
Labels

Comments

@No9
Copy link
Member

No9 commented Sep 30, 2017

I upgraded llnode install 1.6.2 on both Ubuntu 16.04 and FreeBSD 12 and ran through the tutorial here
https://developer.ibm.com/node/2016/08/15/exploring-node-js-core-dumps-using-the-llnode-plugin-for-lldb/

When a frame is selected (e.g. frame select 6) and the source viewed with v8 source list the response is always
error: USAGE: v8 source list

@cjihrig This seems to have been introduced in 1.6.0
1d43035#diff-81649c6431efceafdaca2ec7afb55f38R187

When the *cmd == nullptr part of the conditional is removed the source is printed as expected.

I can PR the removal but would appreciate a second pair of eyes to confirm it won't impact the original seg faults fix.

Thanks

@cjihrig
Copy link
Contributor

cjihrig commented Oct 1, 2017

That seems fine, just verify that jssource still works for you too.

FWIW, the command seems broken on my machine, even with that change. I'll try to take a deeper look when I have a chance.

@jamischarles
Copy link

jamischarles commented Nov 17, 2017

I ran into this issue too. My workaround was the following given this frame:

frame #6: 0x00002e5b6a392f12 missingParamFunc(this=0x00002e41b0f20031:<Object: Object>, 0x00003ca8de102241:<undefined>) at (no script):8:26 fn=0x00002e41b0f1ffb1
  1. (lldb) select frame 6
  2. (lldb) v8 source list 0x00002e41b0f1ffb1
    which yields
  8 function missingParamFunc(param1) {
  9 	console.log('test', param1.bar)
  10 }

Sometimes it errors out with this error: 'source list' takes no arguments, only flags., but it seems to work with the above method when I run it immediately after selecting a frame.

@robertkowalski
Copy link

robertkowalski commented Jul 12, 2018

same issue here, so far i haven't been able to print any source, even with the workarounds mentioned

@misterdjules
Copy link

@robertkowalski The issue you're running into seems like it might be a different problem. Would you mind opening a separate issue that provide as much detail as possible, such as the node version you're using, and detailed repro steps?

mmarchini added a commit to mmarchini/llnode that referenced this issue Jan 18, 2019
`v8 source list` was expecting an undocumented flag -l, which is the
first line the command will output from source code. This commit makes
that flag optional, documents the flag, improves the help message for
this command and adds tests for it.

Fixes: nodejs#138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants