[Lldb-commits] [PATCH] D108018: [lldb] [gdb-remote] Support QEnvironment fallback to hex-encoded

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 7 11:30:03 PDT 2021


labath added inline comments.


================
Comment at: lldb/test/API/tools/lldb-server/main.cpp:332
+      const char *value = getenv(arg.c_str());
+      printf("%s\n", value ? value : "__unset__");
     } else {
----------------
mgorny wrote:
> labath wrote:
> > Printing a quoted this in the case of a null pointer is exactly the opposite of what one would normally expect. It's not a big deal, since we control the inputs, but it may still be better to print `<unset>` or something like that instead...
> i.e. `s/__unset__/<unset>/`? I have strong Python background, and double underscores are common for special stuff in Python world.
Actually, never mind. I saw more quotes than there were. This is fine too...


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

https://reviews.llvm.org/D108018



More information about the lldb-commits mailing list