aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2023-04-20 10:07:21 +0000
committerDavid Spickett <david.spickett@linaro.org>2023-04-21 11:47:05 +0000
commitc9083bea168699b4078b27ce88fd35562751f46f (patch)
tree67c2c0912ad877f1eccd055f48c69b47caab73f7 /llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
parent7c0021923503a9a5fe1ba1f0b778b5b83c42aa43 (diff)
downloadllvm-c9083bea168699b4078b27ce88fd35562751f46f.zip
llvm-c9083bea168699b4078b27ce88fd35562751f46f.tar.gz
llvm-c9083bea168699b4078b27ce88fd35562751f46f.tar.bz2
[LLDB] Don't print register fields when asked for a specific format
Previously if a register had fields we would always print them after the value if the register was asked for by name. ``` (lldb) register read MDCR_EL3 MDCR_EL3 = 0x00000000 = { ETBAD = 0 <...> RLTE = 0 } ``` This can be quite annoying if there are a whole lot of fields but you want to see the register in a specific format. ``` (lldb) register read MDCR_EL3 -f i MDCR_EL3 = 0x00000000 unknown udf #0x0 = { ETBAD = 0 <...lots of fields...> ``` Since it pushes the interesting bit far up the terminal. To solve this, don't print fields if the user passes --format. If they're doing that then I think it's reasonable to assume they know what they want and only want to see that output. This also gives users a way to silence fields, but not change the format. By doing `register read foo -f x`. In case they are not useful or perhaps they are trying to work around a crash. I have customised the help text for --format for register read to explain this: ``` -f <format> ( --format <format> ) Specify a format to be used for display. If this is set, register fields will not be dispayed. ``` Reviewed By: jasonmolenda Differential Revision: https://reviews.llvm.org/D148790
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
0 files changed, 0 insertions, 0 deletions