Reputation: 11
A problem occurs when I use VSCode to debug clickhouse compiled from source code:
Could not resolve any locations for breakpoint at ~/ClickHouse/programs/local/LocalServer.cpp:480, but found a valid location at build/programs/local/LocalServer.cpp:480 but found a valid location at build/programs/local/LocalServer.cpp:480
That is, my breakpoints in the source code are invalid, I don't know why it says that the valid location is in the build folder, but after I set the sourceMap parameter I can breakpoints!
But there is a new problem: when I break a point in the source code, when I trigger the breakpoint, it will jump to the assembly file corresponding to the source code, for example, when I break a point in int LocalServer::main(const std::vector<std::string> & /*args*/)
, it will jump to the assembly file after triggering it, and I can only see
13BD4E0E: E8 AD D4 D1 FF callq 0x138f22c0 ; DB::UseSSL::UseSSL at UseSSL.cpp:12
13BD4E13: E9 00 00 00 00 jmp 0x13bd4e18 ; <+56> at LocalServer.cpp
13BD4E18: 48 8B BD F8 FC FF FF movq -0x308(%rbp), %rdi
13BD4E1F: 48 81 C7 E0 01 00 00 addq $0x1e0, %rdi ; imm = 0x1E0
13BD4E26: E8 B5 BE 00 00 callq 0x13be0ce0 ; std::__1::optional<DB::ThreadStatus>::emplace[abi:v15007]<void> at optional:896
13BD4E2B: E9 00 00 00 00 jmp 0x13bd4e30 ; <+80> at LocalServer.cpp
here are two pictures source file assembly file
I would like to know how I can debug this properly in the source code and not in the assembly file
Upvotes: 1
Views: 119