Skip to content

Cannot step in .so library source code loaded with dlopen, breakpoints do not work. #1375

Description

@BlackZork

OS: Arch Linux, updated 15.01.2026
VSCode version: code-oss 1.107.1 (from package)
CodeLLDB version: 1.12.1
Compiler: gcc version 15.2.1 20260103 (GCC)
cmake: 4.2.1

[zork@archdevel lldb_so_problem]$ uname -a
Linux archdevel 6.18.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 11 Jan 2026 17:10:53 +0000 x86_64 GNU/Linux

I cannot step in .so library source code loaded with dlopen, breakpoints do not work.

It works with gdb extensions (tested webfreak.debug, M$ C++ is not usable in OSS version).

I've attached minimal project that reproduces my issue. I am using CMake tools 1.21.36 to build and run it.

Adding a breakpoint in main.cpp works ok:

codelldb         0x0000556048fc6d88 Broadcaster("lldb.target")::BroadcastEvent (event_sp = 0x55604a0cba98 Event: broadcaster = 0x556049b443d0 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 3 type: breakpoint added}, unique=false) hijack = 0x0000000000000000
codelldb         Target::AddBreakpoint (internal = no) => break_id = 3: file = '/home/zork/sources/lldb_so_problem/modmqttd/main.cpp', line = 18, exact_match = 0

codelldb         GDBRemoteCommunicationClient::SendGDBStoppointTypePacket() add at addr = 0x555555557f38
codelldb         0x0000556048fc6d88 Broadcaster("lldb.target")::BroadcastEvent (event_sp = 0x556049c36f38 Event: broadcaster = 0x556049b443d0 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 3 type: locations resolved}, unique=false) hijack = 0x0000000000000000
codelldb         Added location (skipped prologue: no): 3.1:
  module = /home/zork/sources/lldb_so_problem/build/modmqttd/modmqttd
  compile unit = main.cpp
  function = std::shared_ptr<ConverterPlugin> dll_import<ConverterPlugin>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const*)
  mangled function = _Z10dll_importI15ConverterPluginESt10shared_ptrIT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKc
  location = /home/zork/sources/lldb_so_problem/modmqttd/main.cpp:18:26
  address = 0x0000555555557f38
  resolved = true
  hardware = false
  hit count = 0

Adding a breakpoint in bits.hpp:

codelldb         0x0000556048fc6d88 Broadcaster("lldb.target")::BroadcastEvent (event_sp = 0x556049d9d028 Event: broadcaster = 0x556049b443d0 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 4 type: breakpoint added}, unique=false) hijack = 0x0000000000000000
codelldb         Target::AddBreakpoint (internal = no) => break_id = 4: file = '/home/zork/sources/lldb_so_problem/stdconv/bits.hpp', line = 8, exact_match = 0

codelldb         0x0000556048fc6d88 Broadcaster("lldb.target")::BroadcastEvent (event_sp = 0x55604a13c6e8 Event: broadcaster = 0x556049b443d0 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 5 type: breakpoint added}, unique=false) hijack = 0x0000000000000000
codelldb         Target::AddBreakpoint (internal = no) => break_id = 5: file = 'bits.hpp', line = 8, exact_match = 0

codelldb         Target::RemoveBreakpointByID (break_id = 5, internal = no)

codelldb         Target::DisableBreakpointByID (break_id = 5, internal = no)

codelldb         0x0000556048fc6d88 Broadcaster("lldb.target")::BroadcastEvent (event_sp = 0x556049c36f38 Event: broadcaster = 0x556049b443d0 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 5 type: breakpoint disabled}, unique=false) hijack = 0x0000000000000000
codelldb         0x0000556048fc6d88 Broadcaster("lldb.target")::BroadcastEvent (event_sp = 0x55604a0cba98 Event: broadcaster = 0x556049b443d0 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {bkpt: 5 type: breakpoint removed}, unique=false) hijack = 0x0000000000000000

When I step into DataConverter::getArgs from main Codelldb shows me assembly. No idea why it cannot see source files, paths in stdconv.so are absolute:

[zork@archdevel stdconv]$ objdump -C -l -d ./stdconv.so |grep hpp
/home/zork/sources/lldb_so_problem/stdconv/plugin.hpp:13
/home/zork/sources/lldb_so_problem/libmodmqttconv/converter.hpp:5
/home/zork/sources/lldb_so_problem/libmodmqttconv/converter.hpp:6
/home/zork/sources/lldb_so_problem/libmodmqttconv/converter.hpp:7
[...]

I am out of ideas what could be wrong and I appreciate any help with this issue.

lldb_so_problem.tar.gz

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions