[Issue 18068] No file names and line numbers in stack trace

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 31 10:01:53 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18068

--- Comment #6 from Mike Franklin <slavo5150 at yahoo.com> ---
I've narrowed down the problem to this `if` statement:
https://github.com/dlang/druntime/blob/bff4d4bd3c4a320f4743a2ac5c5c0bd7df5d593c/src/rt/backtrace/dwarf.d#L201

That is `loc.address` and `address` are never equal.  `loc.address` is
populated from here
(https://github.com/dlang/druntime/blob/4992bfa44c6bdfbafed078533869095b2b09ca78/src/core/runtime.d#L757)
and eventually passed to `traceHandlerOpApplyImpl` here
(https://github.com/dlang/druntime/blob/4992bfa44c6bdfbafed078533869095b2b09ca78/src/core/runtime.d#L807)

I printed out the two addresses in the encasing `foreach` loop, and this is as
sample of what I see.

`loc.address` `address`
0x4627b123 0x380cc
0x4627b9cb 0x380cc
0x4627b85b 0x380cc
0x4627b93a 0x380cc
0x4627b85b 0x380cc
0x4627b7c6 0x380cc
0x4627b531 0x380cc
0x8b4e3f49 0x380cc
0x4627b123 0x380d8
0x4627b9cb 0x380d8
0x4627b85b 0x380d8
0x4627b93a 0x380d8
0x4627b85b 0x380d8
0x4627b7c6 0x380d8
0x4627b531 0x380d8
0x8b4e3f49 0x380d8
0x4627b123 0x3814e
0x4627b9cb 0x3814e
0x4627b85b 0x3814e
0x4627b93a 0x3814e
0x4627b85b 0x3814e
0x4627b7c6 0x3814e
0x4627b531 0x3814e
0x8b4e3f49 0x3814e
0x4627b123 0x38170
0x4627b9cb 0x38170
0x4627b85b 0x38170

The values for `address` are consistent with what I see from readelf:

$ readelf --debug-dump=decodedline main
Decoded dump of debug contents of section .debug_line:

CU: main.d:
File name                            Line number    Starting address

./main.d:[++]
main.d                                         3             0x30cbc
main.d                                         5             0x30cc8
main.d                                         9             0x30cd8
main.d                                        13             0x30d4e

main.d                                        15             0x30d6d

At this point, I might have to give up on this.  I hope the information above
will help someone.

--


More information about the Digitalmars-d-bugs mailing list