[Lldb-commits] [PATCH] D108351: [lldb server] Tidy up LLDB server return codes and associated tests
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 19 12:19:52 PDT 2021
teemperor added inline comments.
================
Comment at: lldb/tools/lldb-server/lldb-platform.cpp:289
fprintf(stderr, "failed to create acceptor: %s", error.AsCString());
- exit(socket_error);
+ return -1;
}
----------------
clayborg wrote:
> Should we return error.GetError() if it is non zero? IIRC it will be the actual errno. And best to not return -1, just return 1.
>
> ```
> uint32_t SBError::GetError() const;
> ```
If we force the caller to convert errno to an exit code, then we could also just return the `Status error` itself (and then the caller can just return 0/1 depending on success or error)? That seems more clear than returning `errno` from a function with main signature (which makes it look like it would return an exit code).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108351/new/
https://reviews.llvm.org/D108351
More information about the lldb-commits
mailing list