DavidSpickett added a comment.

> After some undefined transition period :) we change lldb to assume the 
> correct gdb-compatible behavior.
>
> The biggest hurdle for changing the default are iOS/watchOS devices out in 
> the field - we cannot update the old debugservers that run on them, so we 
> often need lldb to communicate with debugservers that are 4-5 years old (I 
> forget the exact OS matrix for what Xcode supports for debugging, but it goes 
> back a ways).

Ok then I agree the qSupported idea makes the most sense.

> Just to confirm one quick detail (I couldn't remember for sure and had to 
> check) - if we strtoul will stop parsing when it finds a character outside 
> the range of the specified base. e.g. calling strtoul("0x100", nullptr, 10) 
> will yield 0; strtoul("10f", nullptr, 10) will yield 10.

Yeah, what I wrote in the doc wasn't correct either. lldb-server ends up using 
a base of 0:

  size_t count = packet.GetU64(SIZE_MAX);
  uint64_t GetU64(uint64_t fail_value, int base = 0);
  uint64_t StringExtractor::GetU64(uint64_t fail_value, int base) {
  <...>
  uint64_t result = ::strtoull(cstr, &end, base);

So it'll accept decimal, hex *with* 0x or octal. (lucky I've never seen anyone 
0 pad the numbers)

> I think we should revert David's doc change to lldb-platform-packets.txt 
> which says that either base10 or base16 can be used. David, what do you think.

I will revert it. I could correct it but that's opening the door to more 
options and will just make the qSupported idea more complicated. (I'll update 
the bug I raised too)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89227/new/

https://reviews.llvm.org/D89227

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to