[Lldb-commits] [PATCH] D58228: [lldb] [lldb-server] Catch and report errors from main loop
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 14 03:42:27 PST 2019
mgorny created this revision.
mgorny added reviewers: labath, krytarowski.
mgorny added a project: LLDB.
Herald added a subscriber: abidh.
Catch the possible error from lldb-gdbserver's main loop, and report
it verbosely. Currently, if the loop fails the server exits normally,
rendering the problem indistinguishable from regular termination.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D58228
Files:
lldb/tools/lldb-server/lldb-gdbserver.cpp
Index: lldb/tools/lldb-server/lldb-gdbserver.cpp
===================================================================
--- lldb/tools/lldb-server/lldb-gdbserver.cpp
+++ lldb/tools/lldb-server/lldb-gdbserver.cpp
@@ -533,7 +533,12 @@
return 1;
}
- mainloop.Run();
+ Status ret = mainloop.Run();
+ if (ret.Fail()) {
+ fprintf(stderr, "lldb-server terminating due to error: %s\n",
+ ret.AsCString());
+ return 1;
+ }
fprintf(stderr, "lldb-server exiting...\n");
return 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58228.186812.patch
Type: text/x-patch
Size: 505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190214/ad5c6b82/attachment.bin>
More information about the lldb-commits
mailing list