Skip to content

Conversation

@tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Mar 15, 2020

Previously when backtrace_pcinfo succeeded, but failed to obtain a
filename or a function name, the line number would be ignored. Instead,
when successful combine all available information.

For example, when using clang -g1 or -gline-tables-only before:

   1: baz
   2: bar
   3: foo

and after:

   1: baz
             at src/callback.c:5
   2: bar
             at src/callback.c:9
   3: foo
             at src/callback.c:13

Note that the difference is probably not observable on gcc which includes the
relevant debug info on level 1, nor in rustc where the differences between
debug levels 1 and 2 are currently rather limited.

tmiasko added 2 commits March 15, 2020 14:50
Previously when `backtrace_pcinfo` succeeded, but failed to obtain a
filename or a function name, the line number would be ignored. Instead,
when successful combine all available information.

For example, when using clang `-g1` or `-gline-tables-only` before:

```
   1: baz
   2: bar
   3: foo
```

and after:

```
   1: baz
             at src/callback.c:5
   2: bar
             at src/callback.c:9
   3: foo
             at src/callback.c:13
```
@tmiasko tmiasko changed the title Support line-tables-only when using libunwind Support line-tables-only when using libbacktrace Mar 15, 2020
@alexcrichton alexcrichton merged commit 704b55c into rust-lang:master Mar 17, 2020
@alexcrichton
Copy link
Member

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants