我尝试从源代码中找到特定行号的地址内存。 我用过:
objdump --dwarf=decodedline <file_name>
但我得到了输出:
checkAddress: file format elf64-x86-64
Contents of the .debug_line section:
checkAddress.c:
File name Line number Starting address View Stmt
checkAddress.c 8 0x12a9 x
checkAddress.c 8 0x12d1 x
checkAddress.c 9 0x12e0 x
checkAddress.c 10 0x12e9 x
checkAddress.c 11 0x1311 x
checkAddress.c 16 0x131b x
checkAddress.c 16 0x1326 x
checkAddress.c 18 0x134c x
checkAddress.c 19 0x136c x
我只想要地址,例如第 9 行将只输出 0x12e0。 怎么做? 感谢您的帮助!