Closed phcerdan closed 6 years ago
Is this the expected behavior?
No, that would be a bug! Does this happen every single time? Here is an description of what goes on when a breakpoint is hit:
First, the control comes here, and eventually calls this which executes this to update all buffers. And this is the innermost call where the actual updates happen (where it decides to invoke Neovim RPC to update the buffers only if the new content
differs from the old).
After a play test, I've found that it only happens when I remove the "default" start breakpoint AND there is some command line argument read involved.
I can reproduce it with your test file: ab.c. If I remove the starting break point in L14, and put it, in L18.
I don't get a prompt asking me to enter a number, but I can enter it anyway, and the programs ends properly, however it doesn't hit the L18 breakpoint.
If I change the call to scanf
in L15 for a=20;
, I can remove the default starting breakpoint, put it in L18 and it works good.
Does this happen to you too? Maybe it is unrelated with your plugin, and related with a bug of lldb in arch...
A bit busy now... I'll try it out in a few days.
As you mentioned, if I remove the breakpoint at line 14 (keeping scanf), then "Enter a number: " is not printed (whatever I do, it does not get printed at this point). But if I input some number (anyway), then the execution continues and hits the first breakpoint, and all that is to be printed gets printed.
But, I don't think this is a problem with the auto-refresh mechanism, though. I believe this is because lldb failed to immediately notify the plugin of receiving stuff in stdout in that particular situation.
cc #59
The editor, backtrace and locals windows do not update automatically after a breakpoint stop. I have to interact with lldb to trigger the update, for example,
:LL print something
. (even ifsomething
does not exist)Is this the expected behavior? Or is there any option to tweak it? Thanks!