MacOS C debug symbols

35 views
Skip to first unread message

Igor Demura

unread,
Jan 27, 2021, 1:57:25 AM1/27/21
to please-build
Hi developers!
I try to build a very simple C project on MacOS, but unfortunately when I try to debug it with lldb, it doesn't contain source code, I only see assembler. If I try to use dsymutil iwht the output, I get:

warning: (x86_64) /Users/igor/owl_llvm/plz-out/tmp/src/adt_test._build/./src/_adt_test#lib.a(adt_tests.o) unable to open object file: No such file or directory

What can I do to fix this? It's compiled in debug mode, with -g. All tmp files are truly gone.

c_library(
    name = "adt",
    srcs = glob(["adt/*.c"]),
    hdrs = glob(["adt/*.h"]),
    deps = [":types"],
)

c_test(
    name = "adt_test",
    srcs = glob(["adt/tests/*.c"]),
    hdrs = glob(["adt/tests/*.h"]),
    deps = [
        ":adt",
        ":testing",
    ],
)

c_library(
    name = "testing",
    srcs = glob(["testing/*.c"]),
    hdrs = glob(["testing/*.h"]),
    deps = [":types"],
)

c_library(
    name = "types",
    srcs = glob(["types/*.c"]),
    hdrs = glob(["types/*.h"]),
)

Reply all
Reply to author
Forward
0 new messages