[Lldb-commits] [PATCH] D30287: Introduce support for Debug Registers in RegisterContextNetBSD_x86_64

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 23 11:50:45 PST 2017


clayborg added inline comments.


================
Comment at: source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp:51-56
+  uint64_t dr[16]; /* debug registers */
+                   /* Index 0-3: debug address registers */
+                   /* Index 4-5: reserved */
+                   /* Index 6: debug status */
+                   /* Index 7: debug control */
+                   /* Index 8-15: reserved */
----------------
Would it be nicer to have a union in here? Something like:

```
struct DebugRegs
{
  uint64_t debug_addr1;
  uint64_t debug_addr2;
  uint64_t debug_addr3;
  uint64_t reserved1;
  uint64_t reserved2;
  uint64_t debug_status;
  uint64_t debug_control;
};
struct DBG {
  union {
    uint64_t dr[16];
    DebugRegs regs;
  };
};
```


Repository:
  rL LLVM

https://reviews.llvm.org/D30287





More information about the lldb-commits mailing list