[lldb-dev] target modules lookup
Michael Sartain
mikesart at gmail.com
Wed Jul 10 10:56:09 PDT 2013
Is this supposed to work?
(lldb) target modules lookup -Av -s argc
It does nothing. Looking up the address of argc and using it also does
nothing.
(lldb) p &argc
(int *) $3 = 0x00007fff506c9458
(lldb) target modules lookup -Av -a 0x00007fff506c9458
It does work with the function "main":
(lldb) target modules lookup -Av -F main
1 match found in /home/mikesart/data/src/blah/build/blah:
Address: blah[0x0000000000409970] (blah..text + 368)
Summary: blah`main at blah.cpp:160
Module: file = "/home/mikesart/data/src/blah/build/blah", arch =
"x86_64"
CompileUnit: id = {0x00000000}, file =
"/home/mikesart/data/src/blah/blah.cpp", language = "ISO C++:1998"
Function: id = {0x000003c9}, name = "main", range =
[0x0000000000409970-0x000000000040a275)
FuncType: id = {0x000003c9}, decl = blah.cpp:159, clang_type = "int
(int, char **)"
Blocks: id = {0x000003c9}, range = [0x00409970-0x0040a275)
LineEntry: [0x0000000000409970-0x0000000000409991):
/home/mikesart/data/src/blah/blah.cpp:160
Symbol: id = {0x00000076}, range =
[0x0000000000409970-0x000000000040a275), name="main"
Variable: id = {0x000003e6}, name = "argc", type= "int", location =
DW_OP_fbreg(-8), decl = blah.cpp:159
Variable: id = {0x000003f4}, name = "argv", type= "char **",
location = DW_OP_fbreg(-16), decl = blah.cpp:159
Variable: id = {0x00000402}, name = "msg", type= "Person", location
= DW_OP_fbreg(-248), decl = blah.cpp:297
As does using the address for "main".
(lldb) p main
(int (*)(int, char **)) $4 = 0x0000000000409970 (blah`main at blah.cpp:160)
(lldb) target modules lookup -Av -a 0x0000000000409970
Address: blah[0x0000000000409970] (blah..text + 368)
Summary: blah`main at blah.cpp:160
Module: file = "/home/mikesart/data/src/blah/build/blah", arch =
"x86_64"
CompileUnit: id = {0x00000000}, file =
"/home/mikesart/data/src/blah/blah.cpp", language = "ISO C++:1998"
Function: id = {0x000003c9}, name = "main", range =
[0x0000000000409970-0x000000000040a275)
FuncType: id = {0x000003c9}, decl = blah.cpp:159, clang_type = "int
(int, char **)"
Blocks: id = {0x000003c9}, range = [0x00409970-0x0040a275)
LineEntry: [0x0000000000409970-0x0000000000409991):
/home/mikesart/data/src/blah/blah.cpp:160
Symbol: id = {0x00000076}, range =
[0x0000000000409970-0x000000000040a275), name="main"
Variable: id = {0x000003e6}, name = "argc", type= "int", location =
DW_OP_fbreg(-8), decl = blah.cpp:159
Variable: id = {0x000003f4}, name = "argv", type= "char **", location
= DW_OP_fbreg(-16), decl = blah.cpp:159
Variable: id = {0x00000402}, name = "msg", type= "Person", location =
DW_OP_fbreg(-248), decl = blah.cpp:297
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130710/144d86d9/attachment.html>
More information about the lldb-dev
mailing list