With relative paths in the debug symbols, lldb cannot find the source
files, so set up a source map to direct "../.." to V8 root. This is
similar to what Chromium does in src/tools/lldb/lldbinit.py.
Bug: v8:11879
Change-Id: Ic6126aacafa7e3462c69da538a9528041c92ef00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2998517
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75521}
Currently, running jco gives us an error message like so:
(lldb) jco $pc
Failed to evaluate command _v8_internal_Print_Code((void*)($pc)) :
error: <user expression 0>:1:1: '_v8_internal_Print_Code' has unknown
return type; cast the call to its declared return type
_v8_internal_Print_Code((void*)($pc))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The fix is to cast the call to (void). I've only used and found this
issue with jco, but I think the other commands have the same issue, so
fixing those together here.
FYI I am using lldb version 11.
Bug: v8:11879
Change-Id: Id9d8e8091fd011585e6fea863de5b4d7c9d47c5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2994764
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75487}
Reasons:
* We disabled it more than a year ago for all configs
* Not easy to re-enable
* Not compatible with pointer compression as-is
* Not compatible with concurrent TP/TF as-is
* No concrete plans to re-enable it
Also remove Map's layout_descriptor since it was only used for double
field unboxing.
Bug: v8:11422
Change-Id: I9260906eac199213b3210712e9903f1ecf1d7979
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2676637
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72671}
Currently, it can be little difficult to understand why a command in
lldb-commands.py stops working. For example, at the moment running the
jlh command results in an empty line:
$ lldb --one-line "command script import ../../tools/lldb_commands.py" \
v8_hello_world
(lldb) br s -f hello-world.cc -l 49
(lldb) jlh script
(lldb)
With this commit this would instead display the following error message:
(lldb) jlh script
Failed to evaluate command
_v8_internal_Print_Object(*(v8::internal::Object**)(*(void*)(script))) :
error: cannot cast from type 'v8::Local<v8::Script>' to pointer type
'void *'
The output is really only two lines but I've wrapped the lines here so
they don't exceed the 72 column width. I'll follow up with a commit to
fix the issue reported.
Change-Id: I634a412b616dad7cadd74dce36418d27c1997777
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083477
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68093}
There are now less that 400 days until the end of life
of Python 2(aka _legacy_ Python) https://pythonclock.org/ .
The code compatibility check for python2 and python3
used the following tools: futurize, flake8
You can see the reports here: https://travis-ci.com/bmsdave/v8/builds
This CL was uploaded by git cl split.
Bug: v8:8594
Change-Id: I661c52a70527e8ddde841fee6d4dcba282b4a938
Reviewed-on: https://chromium-review.googlesource.com/c/1470123
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59675}
This is a reland of 5b744bfbd4.
Node is fixed by this pull request:
https://github.com/v8/node/pull/75
Original change's description:
> Fix and extend lldbinit
>
> 1) Define all commands in one file.
> 2) Add logic to make 'jco' print current pc by default.
> 3) Add a comment to explain how to load the lldb_commands.py file.
> 4) Minor refactorings.
>
> R=ahaas@chromium.org
> No-Try: true
>
> Bug: v8:7754
> Change-Id: I553f2ce4cefedad05466c692a8665a570372b76a
> Reviewed-on: https://chromium-review.googlesource.com/1127892
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54329}
Bug: v8:7754
Change-Id: I8645ae07176fe6983a581dd175ed6f2b2b15d4ea
Reviewed-on: https://chromium-review.googlesource.com/1135026
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54424}
This reverts commit 5b744bfbd4.
Reason for revert: Breaks node.js install:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20node.js%20integration/1546
Original change's description:
> Fix and extend lldbinit
>
> 1) Define all commands in one file.
> 2) Add logic to make 'jco' print current pc by default.
> 3) Add a comment to explain how to load the lldb_commands.py file.
> 4) Minor refactorings.
>
> R=ahaas@chromium.org
> No-Try: true
>
> Bug: v8:7754
> Change-Id: I553f2ce4cefedad05466c692a8665a570372b76a
> Reviewed-on: https://chromium-review.googlesource.com/1127892
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54329}
TBR=ahaas@chromium.org,clemensh@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: v8:7754
Change-Id: Iecaaf53ce6536395f83a78046f0375ec77003356
Reviewed-on: https://chromium-review.googlesource.com/1132878
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54375}
1) Define all commands in one file.
2) Add logic to make 'jco' print current pc by default.
3) Add a comment to explain how to load the lldb_commands.py file.
4) Minor refactorings.
R=ahaas@chromium.org
No-Try: true
Bug: v8:7754
Change-Id: I553f2ce4cefedad05466c692a8665a570372b76a
Reviewed-on: https://chromium-review.googlesource.com/1127892
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54329}
The goal of this commit is to add the equivalent to gdbinit but
for lldb. I've tried to replicate the commands as close as possible
but I'm unsure about the jss command and hoping to get some feedback
on it in addition to the bta command which I'm not sure how/when this
could be used. This is probably just inexperience on my part.
The lldbinit file can be placed into a directory prefixed with dot
(.lldbinit) and the python script is currently expected to be in the
same directory. The path to the script can be changed manually if needed
as well.
NOTRY=true
Review-Url: https://codereview.chromium.org/2758373002
Cr-Commit-Position: refs/heads/master@{#44136}