-
Notifications
You must be signed in to change notification settings - Fork 7
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
gdb.Value syntax issue #1
Comments
Install gdb and verify that it supports Python scripting (invoke gdb --version and check for --with-python=... lines). |
sorry , not this repository... it works |
好。用起来有什么问题,再留言 |
没有--with-python |
|
还有2个问题
gdb) p *ast
$2 = [New Thread 32123.1442]
[Switching to Thread 32123.32357]
warning: RTTI symbol not found for class 'std::__1::__shared_ptr_pointer<DB::Context*, std::__1::shared_ptr<DB::Context>::__shared_ptr_default_delete<DB::Context, DB::Context>, std::__1::allocator<DB::Context> >'
warning: RTTI symbol not found for class 'std::__1::__shared_ptr_pointer<DB::Context*, std::__1::shared_ptr<DB::Context>::__shared_ptr_default_delete<DB::Context, DB::Context>, std::__1::allocator<DB::Context> >'
Thread 2 "TCPHandler" hit Breakpoint 16, DB::executeQueryImpl (begin=0x7fff080137b0 "SELECT message FROM system.warnings", end=0x7fff080137d3 "", context=warning: RTTI symbol not found for class 'std::__1::__shared_ptr_pointer<DB::Context*, std::__1::shared_ptr<DB::Context>::__shared_ptr_default_delete<DB::Context, DB::Context>, std::__1::allocator<DB::Context> >'
warning: RTTI symbol not found for class 'std::__1::__shared_ptr_pointer<DB::Context*, std::__1::shared_ptr<DB::Context>::__shared_ptr_default_delete<DB::Context, DB::Context>, std::__1::allocator<DB::Context> >'
std::shared_ptr<DB::Context> count 3, weak 4 containing = {...}, internal=false, stage=DB::QueryProcessingStage::Complete, has_query_tail=false, istr=0x0) at ../src/Interpreters/executeQuery.cpp:414
414 const auto * last_select = select_with_union_query->list_of_selects->children.back()->as<ASTSelectQuery>();
Traceback (most recent call last):
File "/home/hulj/workspace/ClickHouse-pretty-printer/clickhouse/IAST.py", line 15, in to_string
sql_string=gdb.parse_and_eval(eval_string);
gdb.error: The program stopped in another thread while making a function call from GDB.
Evaluation of the expression containing the function
(DB::serializeAST(DB::IAST const&, bool)) will be abandoned.
When the function is done executing, GDB will silently stop.
[Switching to thread 2 (Thread 32123.32357)]
#0 DB::executeQueryImpl (begin=0x7fff080137b0 "SELECT message FROM system.warnings", end=0x7fff080137d3 "", context=warning: RTTI symbol not found for class 'std::__1::__shared_ptr_pointer<DB::Context*, std::__1::shared_ptr<DB::Context>::__shared_ptr_default_delete<DB::Context, DB::Context>, std::__1::allocator<DB::Context> >'
warning: RTTI symbol not found for class 'std::__1::__shared_ptr_pointer<DB::Context*, std::__1::shared_ptr<DB::Context>::__shared_ptr_default_delete<DB::Context, DB::Context>, std::__1::allocator<DB::Context> >'
std::shared_ptr<DB::Context> count 3, weak 4 containing = {...}, internal=false, stage=DB::QueryProcessingStage::Complete, has_query_tail=false, istr=0x0) at ../src/Interpreters/executeQuery.cpp:414
414 const auto * last_select = select_with_union_query->list_of_selects->children.back()->as<ASTSelectQuery>();
warning: RTTI symbol not found for class 'std::__1::__shared_ptr_pointer<DB::Context*, std::__1::shared_ptr<DB::Context>::__shared_ptr_default_delete<DB::Context, DB::Context>, std::__1::allocator<DB::Context> >'
warning: RTTI symbol not found for class 'std::__1::__shared_ptr_pointer<DB::Context*, std::__1::shared_ptr<DB::Context>::__shared_ptr_default_delete<DB::Context, DB::Context>, std::__1::allocator<DB::Context> >'
|
p ast能成功吗?ast是什么类型? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,我在使用您这个printer脚本时,有个问题
问题如图
.gdbinit 配置, 我把printer.py clone到本地了
补充
ClickHouse/ClickHouse#18861 这个issue里提到的这几种printer都尝试过了。都不太行
llvm 版本的printer , 不知道为什么没注册上
info pretty-print
没有显示注册成功的可用类型,比如std::basic_string等libcxx-pretty-printers 也有OOM的问题
您这个版本的因为语法错误,我还没成功
我这里的环境是clion(win10) + wsl2(clickhouse), 期望在使用remote-gdb-server的时候,可以在debug界面看到每个变量的具体的值, 现在还是这种
The text was updated successfully, but these errors were encountered: