[lldb/Core] Fix finite progress event reporting
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Tue, 5 Jul 2022 23:25:23 +0000 (16:25 -0700)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Tue, 5 Jul 2022 23:25:40 +0000 (16:25 -0700)
commitea8b811bf800680e7d7bde1e8d6ff43f8ecf17cf
tree78a721eb54183bac4c493430c21e8845a59cfe1a
parent088bb8a328e030dfdc74fe464b564e0eb9b3411c
[lldb/Core] Fix finite progress event reporting

This patch should fix event handling for finite progress reports.

Previously, the event handler would get stuck when receiving a finite
progress report, and stop displaying upcoming reports.
This was due to the fact that we were checking if the progress event was
completed by calling `GetCompleted` but returns the completion amount
instead of saying whether it's completed.

That caused the current event id to remain the same, preventing all the
following progress reports to be shown to the user.

This patch also adds some logging to facilitate debugging progress events.

rdar://91788326

Differential Revision: https://reviews.llvm.org/D128768

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
lldb/source/Core/Debugger.cpp