rust-lang / backtrace-rs

Backtraces in Rust
https://docs.rs/backtrace
Other
530 stars 245 forks source link

Make frame address meaningful without debuginfo #434

Open quininer opened 3 years ago

quininer commented 3 years ago

The current address obtained through Frame::ip is meaningless in production environment without debuginfo. The lack of a base address prevents us from resolve symbol afterwards.

We have two solutions to this problem.

  1. Expose backtrace::symbolize::native_libraries, which will allow users to record all loaded libs, and users can get bais from them. but this may reveal too many details.
  2. Add a backtrace::resolve2 or make backtrace::resolve return the correct svma and library name even without debuginfo.