Closed dmitry-zakablukov closed 4 years ago
You haven't included the information about which backtrace provider feature flag you are using. You link to the backtrace crate; does that mean that's what you are using?
- Can the
ip
address be added to the backtrace output
Can it be? Maybe. Depending on the backtrace provider you are using, it might not be under the control of this crate however. What benefit do you see it providing in this case?
- How to get a module base address?
I do not know. Perhaps that is an appropriate question for the backtrace crate maintainers.
You haven't included the information about which backtrace provider feature flag you are using. You link to the backtrace crate; does that mean that's what you are using?
Sorry, I didn't know that any backtrace provider can be used. I simply used snafu crate with the feature backtraces
. I suppose the snafu crate uses this crate: https://docs.rs/backtrace/0.3.50/backtrace/index.html
Can it be? Maybe. Depending on the backtrace provider you are using, it might not be under the control of this crate however. What benefit do you see it providing in this case?
Frame addresses and base address are sufficient to decode backtrace using a PDB file. If ip addresses are equal to the frame addresses, then a half of my problem can be solved.
I simply used snafu crate with the feature
backtraces
Thank you, that's what I was looking for.
In that case, I think you can fork the crate, modify this line:
Test it locally to see that it helps you, then submit a PR.
@shepmaster , I have opened a PR #256 to implement a custom backtrace formatting I need.
Good day!
Let's consider the following code:
This code prints a valid backtrace when a PDB file is not renamed/deleted from the file system:
But if the PDB file was deleted, or renamed, or
.cargo/config
is as follows:then the example will output the following:
Missing PDB file is a common use case in a production environment. So my question are:
ip
address be added to the backtrace output? Seeip()
documentation here: https://docs.rs/backtrace/0.3.50/backtrace/struct.BacktraceFrame.html#method.ip