]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/tools/lldb-mi/MIExtensions.txt
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / tools / lldb-mi / MIExtensions.txt
1 # -file-exec-and-symbols now takes two new (optional) options:
2
3 Synopsis
4
5         -file-exec-and-symbols <file> [-p <platform>] [-r <remote-file>]
6
7 Specify the executable file to be debugged. This file is the one from which the symbol table is also read. 
8 When debugging remote targets specify a remote-file for execution and a file from which symbols are read. 
9 The optional platform is the name of the platform, e.g., "remote-ios" or "ios-simulator". The remote-file 
10 is the on-device path to the exe.
11
12 # -data-info-line
13
14 Synopsis
15
16         -data-info-line *<address>
17         -data-info-line <file>:<line>
18
19 Provides information about a source line. The input can be <address> like 0x12345678 or <file>:<line>
20 where file is a name of source file and line is the line number. As a result the command returns the following
21 fields:
22     start - address of the first instruction which refers to that source line
23     end - address of the last instruction which refers to that source line
24     file - the file name
25     line - the line number
26 The last two fields are useful in case you have specified a source line using its address.
27
28 Example:
29     -data-info-line *0x100000f80
30     ^done,start="0x0000000100000f80",end="0x0000000100000f94",file="/Users/IliaK/p/hello.cpp",line="15"
31
32     -data-info-line hello.cpp:15
33     ^done,start="0x0000000100000f80",end="0x0000000100000f94",file="/Users/IliaK/p/hello.cpp",line="15"
34
35 # -data-read-memory-bytes
36
37 Synopsis
38
39         -data-read-memory-bytes [--thread <thread-id>] [--frame <frame-index>] [-o <byte-offset>] <address> <count>
40
41 Where:
42
43         `address`
44                 An expression specifying the start of the memory range to read.
45         `count`
46                 Number of bytes to read.
47         `byte-offset`
48                 Relative offset in bytes from `address` where reading should start.
49         `thread-id`
50                 Integer identifier of the thread within which the expression should be evaluated,
51                 if this option is omitted the currently selected thread will be used.
52                 This option is not in the MI specification but is implemented by GDB.
53         `frame-index`
54                 Index of the frame within which the expression should be evaluated,
55                 if this option is omitted the currently selected frame will be used.
56                 This option is not in the MI specification but is implemented by GDB.
57
58 Reads a block of memory from the specified range.
59
60 Note that currently this command works in an all-or-nothing fashion where it either reads the entire
61 block of memory successfully and returns it as a single block, or it returns an error. This doesn't
62 quite match up with the MI specification that says that subsets of the specified range may be
63 returned as individual blocks if only some of the memory within the specified range is accessible.
64
65 The result record for this command may contain one or more tuples representing the blocks of memory
66 that were read, where each tuple has the following fields:
67
68         `begin`
69                 The start of the address range for this block (in hex notation).
70         `end`
71                 The end of the address range for this block (in hex notation).
72         `offset`
73                 Offset of this block from `address` (that was passed in as an argument).
74         `contents`
75                 The actual data in this block (in hex notation).
76
77 Example:
78
79         (gdb)
80         -data-read-memory-bytes &array 4
81         ^done,memory=[{begin="0x00007fffffffeccc",offset="0x0000000000000000",end="0x00007fffffffecd0",contents="01020304"}]
82         (gdb)
83
84 # =library-loaded notification
85
86 The =library-loaded notification has 4 extra fields:
87     symbols-loaded - indicates that there are symbols for the loaded library
88     symbols-path   - if symbols are exist then it contains a path for symbols of the loaded library
89     loaded_addr    - contains an address of the loaded library or "-" if address isn't resolved yet
90     size           - contains the size in bytes of the section loaded at 'loaded_addr'
91
92 For example:
93     =library-loaded,id="/Users/IliaK/p/hello",target-name="/Users/IliaK/p/hello",host-name="/Users/IliaK/p/hello",symbols-loaded="1",symbols-path="/Users/IliaK/p/hello.dSYM/Contents/Resources/DWARF/hello",loaded_addr="-",size="4096"
94     =library-loaded,id="/usr/lib/dyld",target-name="/usr/lib/dyld",host-name="/usr/lib/dyld",symbols-loaded="0",loaded_addr="0x00007fff5fc00000",size="4096"
95
96 # -target-attach
97
98 Synopsis
99
100 Additional syntax provided by lldb-mi:
101     -target-attach -n <executable-name> [--waitfor]
102
103 Attach to an executable. Using -n allows specifying an executable name to attach to. 
104 Using this with --watifor can do a deffered attach. The flags -n and --waitfor match the syntax of lldb proper's 'process attach' command.