I’ve been trying to get lldb working recently and I ran across the issue of breakpoints not being able to find files. So I did a small test, wrote an empty main function and compiled it with MinGW g++ -g -O0
.
Accesing it then in lldb using image lookup -vn main
to look at the function and I see this:
CompileUnit: id = {0x00000000}, file = "", language = "c++14"
Function: id = {0x00000077}, name = "main", range = [0x00000001400017d0-0x00000001400017e8)
FuncType: id = {0x00000077}, byte-size = 0, line = 3:5, compiler_type = "int (void)"
Blocks: id = {0x00000077}, range = [0x1400017d0-0x1400017e8)
LineEntry: [0x00000001400017d0-0x00000001400017d8): :4:1
Symbol: id = {0xffffffff}, range = [0x00000001400017d0-0x00000001400017f0), name="main"
It would seem like when g++ adds the symbols it doesn’t include the file name or path for some reason.
Not sure what is left to do if my g++ for some reason is broken. Here is the version for anyone interested:
g++ (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders) 13.0.1 20230122 (experimental)
Sam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.