LLDB
Category
Print memory map
for example, print memory of length 16x4 bytes:
Change frmae format
자동으로 출력되는 프레임 포맷:
기본값은 다음과 같다:
frame-format (format-string) = "frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{\`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\n"
수정하고 싶다면 다음과 같이 하면 된다.
settings set frame-format "frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{\`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.fullpath}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\n"
Disassembly - Intel syntax
Current working directory
Change Current working directory
Save breakpoints
As Jim Ingham said above, you currently cannot save breakpoints in lldb. However, there is a work around. You can load lldb commands from a command file as follows:
You can have this in your command file:
file <path_to_binary>
breakpoint set --file file0.cc --line 22
breakpoint set --file file1.cc --line 237
The above command file will load the binary and set the breakpoints when lldb starts.