-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no debugging symbols found on mac #2573
Comments
What is the output of |
Previously, it reported as following: Then I tried both "bazel build -c dbg source:all" and "bazel build --strip=never --copt="-g" source:all", but it didn't work either. |
as #2537 bazel do generate dSYM file but it ls empty, #2537 (comment) hava a init sollution and |
Just to be sure it is #2537, the correct command to build target with debugging symbols is |
build -c dbg source:all ...bunch of warnings... 74 warnings generated. bazel build --strip=never --copt="-g" source:all ...bouch of warning... 21 warnings generated. |
Let me close this one as it is a duplicate of #2537, let's continue the discussion there |
Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Description of the problem / feature request / question:
#ggdb main
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin15.3.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from main...(no debugging symbols found)...done.
If possible, provide a minimal example to reproduce the problem:
###BUILD
cc_binary(
name = "main",
srcs = glob([".cpp", ".h", "*.hpp"]),
copts = [
"-c",
"-w",
"-fPIC",
],
visibility = ["//visibility:public"],
)
bazel build --copt="-g" source:all
I also tried to add -g to copts in BUILD. But it didn't work either.
Environment info
Operating System:
OS X EI Capitan
version 10.11.6
Bazel version (output of
bazel info release
):[bazel release 0.4.4]
If
bazel info release
returns "development version" or "(@Non-Git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD
):Have you found anything relevant by searching the web? (e.g. GitHub issues, email threads in the bazel-discuss@googlegroups.com archive)
#2537
Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
The text was updated successfully, but these errors were encountered: