#Troubles using custom lldb with CodeLLDB

1 messages · Page 1 of 1 (latest)

golden mesa
#

Been trying for a while to get the custom lldb branch so I can debug using the zig self hosted backend.

I basically i've done:

git clone -b lldb-zig --depth 1 https://github.com/jacobly0/llvm-project.git
mkdir llvm-project/build
cd llvm-project/build
cmake llvm -G Ninja -B build -DLLVM_ENABLE_PROJECTS="clang;lldb" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=ON -DLLDB_ENABLE_LIBEDIT=ON -DLLDB_ENABLE_PYTHON=ON
cmake --build build --target lldb --target lldb-server

I then pointed the CodeLLDB to /home/.../src/llvm-project/build/lib/liblldb.so, but when debugging I get the following error:

codelldb: /home/.../src/llvm-project/lldb/source/Utility/DataExtractor.cpp:527: uint64_t lldb_private::DataExtractor::GetMaxU64(lldb::offset_t*, size_t) const: Assertion `byte_size > 0 && byte_size <= 8 && "GetMaxU64 invalid byte_size!"' failed.

This seems... odd. The built lldb in the terminal debugs my zig apps fine, as far as I can tell.

Anyone got any pointers based on that?

#

Ah, I have a slight pointer - I think this only happens when I still have .use_llvm = true. A possible bug worth reporting.

haughty iris
golden mesa
#

Yeah, though I guess my assumption would have been that it was only adding the needed compatibility. Probably an unrealistic assumption.

haughty iris
#

Yeah I think its more of a temporary solution to get debugging working until a better long term solution for debuggging is made.