This repository was archived by the owner on Mar 20, 2023. It is now read-only.
debug symbols not properly resolved in libcorenrnmech.dylib #870
Open
Description
Describe the issue
While trying to debug a coreneuron (debug) build on macos I noticed that for symbols inside libcorenrnmech.dylib
I could not see associated source code, neither could I set breakpoints to source lines. It seems that ld
producing the dylib
file partially strips the object files and relies on them still being available for the debugger to find source code information.
To Reproduce
- Build NEURON and CoreNEURON:
- Run the debugger and try to set a breakpoint on a source line.
Expected behavior
The source annotation for the symbols should be at least in the debug build available
System (please complete the following information)
- OS: macos
- Compiler: LLVM 13
- Version: master branch
A possible workaround
--- a/extra/nrnivmodl_core_makefile.in
+++ b/extra/nrnivmodl_core_makefile.in
@@ -227,7 +227,7 @@ coremech_lib_shared: $(ALL_OBJS) $(ENGINEMECH_OBJ) build_always
$(LDFLAGS) ${SONAME_OPTION} \
-Wl,-rpath,$(CORENRN_LIB_DIR) -L$(CORENRN_LIB_DIR)
# cleanup
- rm $(MOD_OBJS_DIR)/libcoreneuron-core/*.o
+ #rm $(MOD_OBJS_DIR)/libcoreneuron-core/*.o
# build static library of mechanisms
coremech_lib_static: $(ALL_OBJS) $(ENGINEMECH_OBJ) build_always