[Lldb-commits] [PATCH] D13859: [LLDB][LLGS Test] Check length of register, only when its available

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 20 03:55:43 PDT 2015

labath added a comment.

I think this should go in a little bit deeper, i.e., inside the NativeRegisterContextLinux_mips, or whatever is the right class for you. I think this is better for several reasons:

- if the register is physically not present, the register context should not report it (through GetUserRegisterCount, GetRegisterInfoAtIndex, etc.) - someone else may be iterating through the registers in the context and doing stuff - he will get errors when encountering your registers
- this can cause us to silently lose some registers if we fail to read them for any reason (due to an unrelated bug somewhere)



More information about the lldb-commits mailing list