Fix line numbers in Linux stack walk (PR #22873)

23 views
Skip to first unread message

VZ

unread,
Oct 15, 2022, 12:24:23 PM10/15/22
to wx-...@googlegroups.com, Subscribed

The old code didn't work for the symbols not in the executable itself, which wasn't very useful when using shared wx libraries.

Use the correct offset for the shared libraries and run addr2line separately for each module to fix this.

A better solution would be to implement addr2line functionality ourselves, which shouldn't be that difficult if we can use libdw, but this will have to wait.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/22873

Commit Summary

  • 07e2ffa Put wxStdioPipe helper in an anonymous namespace
  • 7bceb2c Remove unnecessary lines from wxStackWalker::InitFrames()
  • 487ebe8 Fix possible problem with wrong stack frame line number
  • 9e70f41 Fix debug message in wxStackWalker::InitFrames()
  • 9d4d529 Extract code for parsing addr2line output in a function
  • 2be180d Fix using addr2line under Linux
  • e252088 Improve parsing of line numbers in addr2line output

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22873@github.com>

VZ

unread,
Oct 15, 2022, 1:10:49 PM10/15/22
to wx-...@googlegroups.com, Push

@vadz pushed 2 commits.

  • 5b0b631 Fix using addr2line under Linux
  • b1774e9 Improve parsing of line numbers in addr2line output


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22873/push/11339852534@github.com>

VZ

unread,
Oct 15, 2022, 7:06:50 PM10/15/22
to wx-...@googlegroups.com, Subscribed

This could be backported to 3.2 if anybody is motivated to replace the use of std::vector and std::unordered_map in this code with wxVector (easy) and wx hash map (a bit less so). I probably won't be doing this myself though.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22873/c1279848259@github.com>

VZ

unread,
Oct 15, 2022, 7:12:16 PM10/15/22
to wx-...@googlegroups.com, Subscribed

Merged #22873 into master.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22873/issue_event/7595612828@github.com>

Reply all
Reply to author
Forward
0 new messages