[Lldb-commits] [lldb] r319596 - Fix warnings in JSON.cpp, NFC

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 4 11:44:15 PST 2017


Yeah, just a quick note about ds2, this is the current status of supported
platforms:
* Linux (x86/x86_64/arm/aarch64), used for debugging processes on "classic"
linux (Ubuntu, centOS, etc), Android, as well as Tizen.
* Windows (x86/x86_64/arm), used to debug processes on Windows Desktop,
Windows Phone, and even on Xbox. Aarch64 support on Windows hasn't been
needed so far so we didn't do it, but it would be trivial to add.
* There is also some support for macOS debugging but some features are
still missing there. I'm planning on working on that in the next couple of
months, at least for x86 and x86_64 targets.

We also run the lldb test suite by substituting the default debug server
with ds2 and we pass the vast majority of tests there. (A lot of tests are
broken or flaky regardless of which debug server is used unfortunately.)

If people in the lldb community are interested in unifying LLDB's debug
servers and have a single small, self-contained binary, we can discuss what
would be required to go in that direction.

Jim pointed out some embedded Apple targets that require debugserver
currently. Aren't all these targets based on Darwin? I imagine if we have
Darwin-x86_64 fully supported in ds2, adding specific architectures there
would a reasonable amount of work.

On Fri, Dec 1, 2017 at 4:13 PM Zachary Turner <zturner at google.com> wrote:

> There was also some discussion from some Facebook people about using their
> own in-house ds2.  It sounds like a large effort, but IIUC it's compatible
> with debugserver, and supports more platforms than lldb-server.
>
> +stephane and saleem since they know more about it.
>
> Actually, +greg too since I guess he now works at Facebook.
>
>
> On Fri, Dec 1, 2017 at 4:06 PM Jim Ingham <jingham at apple.com> wrote:
>
>> If somebody finds themselves ambitious to work on debugserver, they
>> should divert that energy to porting lldb-server to macOS IMHO.
>>
>> Jim
>>
>>
>> > On Dec 1, 2017, at 4:04 PM, Jim Ingham <jingham at apple.com> wrote:
>> >
>> > Yes, we don't use llvm code in debugserver.  It doesn't actually use
>> any lldb classes either, it's its own standalone thing.
>> >
>> > Jim
>> >
>> >
>> >> On Dec 1, 2017, at 4:01 PM, Zachary Turner via lldb-commits <
>> lldb-commits at lists.llvm.org> wrote:
>> >>
>> >> I don't recall, is there a hard restriction on debugserver not being
>> allowed to use llvm code?  Because YAML is a superset of JSON
>> >>
>> >> On Fri, Dec 1, 2017 at 3:36 PM Davide Italiano via lldb-commits <
>> lldb-commits at lists.llvm.org> wrote:
>> >> Also, FWIW, this is blatantly not the correct way of using assertions.
>> >> It should either be assert(false && "patatino") or the more canonical
>> >> llvm_unreachable("patatino").
>> >> Relying on the implicit conversion from string to bool seems risky
>> >> (and not really useful).
>> >>
>> >> On Fri, Dec 1, 2017 at 3:29 PM, Vedant Kumar via lldb-commits
>> >> <lldb-commits at lists.llvm.org> wrote:
>> >>> Author: vedantk
>> >>> Date: Fri Dec  1 15:29:04 2017
>> >>> New Revision: 319596
>> >>>
>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=319596&view=rev
>> >>> Log:
>> >>> Fix warnings in JSON.cpp, NFC
>> >>>
>> >>> These asserts are no-ops, and are supplanted by -Wcovered-switch.
>> >>>
>> >>> Modified:
>> >>>    lldb/trunk/tools/debugserver/source/JSON.cpp
>> >>>
>> >>> Modified: lldb/trunk/tools/debugserver/source/JSON.cpp
>> >>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/JSON.cpp?rev=319596&r1=319595&r2=319596&view=diff
>> >>>
>> ==============================================================================
>> >>> --- lldb/trunk/tools/debugserver/source/JSON.cpp (original)
>> >>> +++ lldb/trunk/tools/debugserver/source/JSON.cpp Fri Dec  1 15:29:04
>> 2017
>> >>> @@ -58,7 +58,6 @@ uint64_t JSONNumber::GetAsUnsigned() con
>> >>>   case DataType::Double:
>> >>>     return (uint64_t)m_data.m_double;
>> >>>   }
>> >>> -  assert("Unhandled data type");
>> >>> }
>> >>>
>> >>> int64_t JSONNumber::GetAsSigned() const {
>> >>> @@ -70,7 +69,6 @@ int64_t JSONNumber::GetAsSigned() const
>> >>>   case DataType::Double:
>> >>>     return (int64_t)m_data.m_double;
>> >>>   }
>> >>> -  assert("Unhandled data type");
>> >>> }
>> >>>
>> >>> double JSONNumber::GetAsDouble() const {
>> >>> @@ -82,7 +80,6 @@ double JSONNumber::GetAsDouble() const {
>> >>>   case DataType::Double:
>> >>>     return m_data.m_double;
>> >>>   }
>> >>> -  assert("Unhandled data type");
>> >>> }
>> >>>
>> >>> void JSONNumber::Write(std::ostream &s) {
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> lldb-commits mailing list
>> >>> lldb-commits at lists.llvm.org
>> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>> >> _______________________________________________
>> >> lldb-commits mailing list
>> >> lldb-commits at lists.llvm.org
>> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>> >> _______________________________________________
>> >> lldb-commits mailing list
>> >> lldb-commits at lists.llvm.org
>> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>> >
>>
>> --
-- 
Stephane Sezer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171204/21dc2e32/attachment-0001.html>


More information about the lldb-commits mailing list