-
Notifications
You must be signed in to change notification settings - Fork 4
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
stacktrace doesn't honor --excessivestacktrace
#11
Comments
I don't think it's relevant for this library. We're just using the paths we get from libbacktrace which gets them from the debugging info which comes from Nim-generated See: nim-libbacktrace/libbacktrace_wrapper.c Line 219 in f0bbe7e
Then go back to the test case where you see relative paths and look at the Nim-generated C files. If they match, it's not our problem. |
i'm happy to look into fixing this in nim repo but let's please keep this bug open in the meantime, for end users this is an implementation detail: it should work |
Sure. |
@stefantalpalaru after investigating this here's my observations:
nim c -d:nimStackTraceOverride --import:libbacktrace --debugger:native --listfullpaths:on --excessivestacktrace:on -o:/tmp/z02 -f --skipparentcfg --skipusercfg /pathto/main.nim if we are compiling under: the latter case is a bug; at least there should be a way to customize this; in many cases this is surprising behavior and complicates things (eg some script may change dir before compiling, and the generated relative paths would not be meaningful anymore) note that these all show the correct absolute paths:
so the problem lies either in this library or its dependencies; it looks like somewhere it tries to take relative paths wrt PWD. notean ugly workaround could be to make cgen insert a space in the line directives, eg:
but it may break other things. |
super hacky and fragile workaround: use nim c -d:case1 -d:nimStackTraceOverride --import:libbacktrace --debugger:native --listfullpaths:on --excessivestacktrace:on -o:/tmp/z02 -f --skipparentcfg --skipusercfg --hint:cc --listcmd --passc:-ffile-prefix-map=$(pwd)=$(pwd)// $timn_D/tests/nim/all/t12148.nim |
maybe the problem is upstream, see ianlancetaylor/libbacktrace#72 i just filed; looks like DW_AT_comp_dir is incorrectly used |
as shown in #9, see note 4
I'm expecting full paths to be shown, just as in nim's stacktrace:on, when specifying
--excessivestacktrace
; in particular this is useful if some files our out of cwd, but not just that: in some cases programms can change the cwd and the generate a stacktrace, so absolute paths make this clear.Happy to provide more details here in case this isn't clear enough.
The text was updated successfully, but these errors were encountered: