[Lldb-commits] [lldb] [lldb] Address mask sbprocess apis and new mask invalid const (PR #83663)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 6 11:21:59 PST 2024


jasonmolenda wrote:

nb: this got a bot failure on the arm-linux-ubuntu bot,

```
            mask = process.GetAddressMask(lldb.eAddressMaskTypeAny)
            process.SetAddressMask(lldb.eAddressMaskTypeCode, mask | 0x3)
            self.assertEqual(
                0x000002950001F694,
                process.FixAddress(0x00265E950001F697, lldb.eAddressMaskTypeCode),
            )
    
    The API returned 0x000002950001f694 instead of the expected
    0x00265e950001f696.  The low bits differ because ABISysV_arm hardcodes
    the Code address mask to clear the 0th bit, it doesn't use the
    Process code mask.  I didn't debug why some of the high bytes were
    dropped.  
```

I'm skipping TestAddressMasks for arch=arm now, but I don't even know if we should be able to set a mask which preserves the high 32-bits of an addr_t on a 32-bit host; all masks have to mask off the high word of addr_t to be a valid addresss, at a minimum.  I don't have access to a 32-bit host that lldb runs on myself so my position is that I'll skip this API test entirely on 32-bit targets, I don't think the concepts make much sense there.

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


More information about the lldb-commits mailing list