Hi again everyone,
I have a curious issue, and I wondered if any thread plan experts could help me understand what I’ve done wrong.
I’ve pored over log output with the following enabled, have some observations below.
log enable lldb process
log enable lldb step
log enable lldb thread
log enable gdb-remote process
log enable gdb-remote step
log enable gdb-remote thread
log enable gdb-remote packets
I can try to redact some info from the logs to make them shareable, if no one has guesses based on the descriptions below. Suggestions for other logs I should turn on would be great, too.
Summary
- I’m manually loading modules/debuginfo on the host with
target module add - If I add the module before hitting a breakpoint, everything is fine.
- If I add the module after hitting a breakpoint, I can’t continue past the breakpoint.
- NOTE: It can be any ELF given to the command. For instance, I just load another app or library’s debug info (so impossible to have a module on the target), the issue still repros.
- It’s a remote target, with a from-scratch lldb-server which largely mimics Linux behavior to utilize the remote-linux platform already in the client (client is stock, unchanged).
- The inferior has two threads, and 4 modules loaded on the target, though, only 2 (one main, and another with lower-level functionality) are involved in the repro. One thread is the main thread where most stuff happens, and it largely executes code from the main module, but, it does also execute code in the second module. The second thread only executes thread in the second module.
- In a pure Linux environment, with stock client and stock lldb-server, I can’t recreate the issue, so, I suspect something is amiss in my server.
Additional Observations
- In both repro and no-repro scenarios, both threads are attach-halting in the same module and at the same address.
- In the repro case (
target module addinvoked after breakpoint hit), when attempting tocontinuepast the breakpoint, both threads are given a plan that includes stopping the other thread, which may be okay? I suppose the intent is to step each thread over the breakpoint, and then continue? The state for the plan for the issteppingand the other thread issuspended, and then next the client has thread plans: main thread issuspended+stop others = 0, second thread isstepping+stop others = 1, which again may be okay, twovCont;spackets are sent to do the step, but then novCont;cis ever sent to actually continue the process, however, the client believes the process is running.