[Lldb-commits] [PATCH] D74398: [lldb-server] jThreadsInfo returns stack memory

Jaroslav Sevcik via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Mar 21 04:15:15 PDT 2020


jarin added a comment.

Regarding the packet savings - there are still things that worry me.

First of all, when lldb CLI stops on a breakpoint, it will first unwind top of the stack of each thread as part of ThreadList::ShouldStop. This sends lots of "x" packets to lldb-server and only then issues jThreadInfo, which then replies with the stack memory uselessly (with my patch). I am yet to investigate why the CLI does that.

My patch saves messages when we start stepping after the breakpoint - in my example with a hundred threads, when we stop on a breakpoint, take a step and then do "thread list", there are no additional 'x' packets sent to lldb-server for the "thread list" command; without my patch there is a packet per-thread. In our VS extension, this seems to help quite a bit, but I am not so sure about the CLI.

It also feels like jThreadsInfo might not the best place to send the stacks - I am wondering whether jstopinfo in the vCont/c packet response would be a better place (even though the encoding of that is quite terrible). What do you think?



================
Comment at: lldb/packages/Python/lldbsuite/test/tools/lldb-server/threads-info/main.cpp:1
+#include <cstdint>
+
----------------
labath wrote:
> I don't believe this include is needed.
Good catch, copypasta :-/


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74398/new/

https://reviews.llvm.org/D74398





More information about the lldb-commits mailing list