[Lldb-commits] [lldb] [lldb-vscode] Show value addresses in a short format (PR #66534)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 15 12:50:47 PDT 2023


clayborg wrote:

I have verified that if I change DumpDataExtractor() you can easily do this:
```
    case eFormatHex:
    case eFormatHexUppercase: {
      bool wantsuppercase = (item_format == eFormatHexUppercase);
      switch (item_byte_size) {
      case 1:
      case 2:
      case 4:
      case 8:
        if (/*check if leading zeroes is enabled*/) {
          s->Printf(wantsuppercase ? "0x%*.*" PRIX64 : "0x%*.*" PRIx64,
                    (int)(2 * item_byte_size), (int)(2 * item_byte_size),
                    DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size,
                                         item_bit_offset));
        } else {
          s->Printf(wantsuppercase ? "0x%" PRIX64 : "0x%" PRIx64,
                    DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size,
                                         item_bit_offset));
        }
        break;
````


https://github.com/llvm/llvm-project/pull/66534


More information about the lldb-commits mailing list