[Bug 49018] New: Incorrect help text for memory write -f and -s options

Bug ID 49018
Summary Incorrect help text for memory write -f and -s options
Product lldb
Version 11.0
Hardware PC
OS Linux
Status NEW
Severity enhancement
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter david.spickett@linaro.org
CC jdevlieghere@apple.com, llvm-bugs@lists.llvm.org

"memory write" shares "OptionGroupFormat" with a bunch of other commands but
the options always have the same help text.

(lldb) help memory read
<...>
       -f <format> ( --format <format> )
            Specify a format to be used for display.
<...>
       -s <byte-size> ( --size <byte-size> )
            The size in bytes to use when displaying with the selected format

(lldb) help memory write
<...>
       -f <format> ( --format <format> )
            Specify a format to be used for display.

       -i <filename> ( --infile <filename> )
            Write memory using the contents of a file.

       -o <offset> ( --offset <offset> )
            Start writing bytes from an offset within the input file.

       -s <byte-size> ( --size <byte-size> )
            The size in bytes to use when displaying with the selected format

Meaning that the description for memory write -f and -s is incorrect. Reading
the code I think -s is used for the input file size and -f is used to decide
how to interpret the input values.

(lldb) memory write buf 0xcgh -f hex
error: '0xcgh' is not a valid hex string value.

I haven't looked at the other uses in detail but they look like display
commands so memory write is the odd one out. ("register write" doesn't use it)

Venkata Ramanaiah Nalamothu changed bug 49018