How to change memory contents using LLDB?

What is the equivalent lldb command for the one shown below in GDB?

(gdb) set {char} 0x02ae4 = 0x12

Values ​​are arbitrary examples. With GDB, I was able to easily edit the byte code at a given hexadecimal address when viewing dumps in the terminal. Ever since I upgraded to mavericks, I tried to play a little with lldb, but I have a hard time in several areas. Perhaps he does not yet have this functionality.

+4
source share
1 answer

According to the lldb-basics manual, an alternative to LLDB memory write.

(lldb) help memory write :

memory write -i <filename> [-s <byte-size>] [-o <offset>] <address> <value> [<value> [...]]

   -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 writng 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.

, - (lldb) memory write 0x02ae4 0x12 .

+10

Source: https://habr.com/ru/post/1542691/


All Articles