[Lldb-commits] [PATCH] D91264: [lldb] [test] Add a minimal test for x86 dbreg reading

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 12 01:35:26 PST 2020

mgorny added a comment.

In D91264#2390699 <https://reviews.llvm.org/D91264#2390699>, @labath wrote:

> I have a feeling we discussed this already, but I don't remember what was the conclusion.
> Was exposing debug registers to the user a conscious choice? Other OSes don't actually do that. Neither does gdb, afaict...
> In think that allowing the user to see dr contents is a good idea -- allows him to check what the debugger has done. I'm not convinced about the writing aspect though -- seems like an easy way to confuse the debugger and make it crash...

I agree with this. Hence, I've covered only the reading part. I don't have a strong opinion whether we should ban writes.

Comment at: lldb/test/Shell/Register/x86-db-read.test:2
+# XFAIL: system-windows
+# REQUIRES: native && (target-x86 || target-x86_64) && can-set-dbregs
+# RUN: %clangxx_host -g %p/Inputs/x86-db-read.cpp -o %t
labath wrote:
> Who sets `can-set-dbregs` ?



More information about the lldb-commits mailing list