Commit c8350144 authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[tools] Fix lldb_commands jco by casting call

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/+/2994764Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75487}
parent 0585ada4
......@@ -21,7 +21,8 @@ def current_frame(debugger):
return current_thread(debugger).GetSelectedFrame()
def no_arg_cmd(debugger, cmd):
evaluate_result = current_frame(debugger).EvaluateExpression(cmd)
cast_to_void_expr = '(void) {}'.format(cmd)
evaluate_result = current_frame(debugger).EvaluateExpression(cast_to_void_expr)
# When a void function is called the return value type is 0x1001 which
# is specified in http://tiny.cc/bigskz. This does not indicate
# an error so we check for that value below.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment