You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm interested in improving the debugging process for asynchronous applications. Also i'm a developer of the OS debugger for rust named bugstalker (bs). Recently bs have some new (and working, but currently in develop branch) functions for async debugging. See this issue with implementation notes, and this or this for example of working.
Is your feature request related to a problem? Please describe.
The problem is that to get information about workers, tasks, etc., the debugger relies on the details of tokio internal implementation (the names of structure fields, the names of global variables, some types, etc.). It is clear that these details can change from version to version of tokio. Therefore, the implementation in the debugger is currently locked to tokio version 1.41. If you are interested, I see two ways to solve this problem: the least invasive but complicating the implementation on the debugger side, and the more inconvenient for tokio, but more robust from the debugger's point of view.
Describe the solution you'd like
1. Add tokio version into ELF .note section
I think this a simple way for tokio, but it assumes that the debugger complements the implementation with each new version of tokio runtime (if internal structures is changed). But I think this may be a good point of start.
This information may be added only for debug builds. POC of implementation may be found here.
2. Add some specific, debugging information in tokio
This is a harder way. Tokio can add some global data with information needed for debugger. This data can be managed by tokio in debug mode and annotated with #[cfg(feature = "debug")]. What debugger needs is described in this issue. Also this debug data should have a stable types (from debugger point of view).
Discussion about this future started here #6939.
Hi! I'm interested in improving the debugging process for asynchronous applications. Also i'm a developer of the OS debugger for rust named bugstalker (bs). Recently bs have some new (and working, but currently in develop branch) functions for async debugging. See this issue with implementation notes, and this or this for example of working.
Is your feature request related to a problem? Please describe.
The problem is that to get information about workers, tasks, etc., the debugger relies on the details of tokio internal implementation (the names of structure fields, the names of global variables, some types, etc.). It is clear that these details can change from version to version of tokio. Therefore, the implementation in the debugger is currently locked to tokio version 1.41. If you are interested, I see two ways to solve this problem: the least invasive but complicating the implementation on the debugger side, and the more inconvenient for tokio, but more robust from the debugger's point of view.
Describe the solution you'd like
1. Add tokio version into ELF .note section
I think this a simple way for tokio, but it assumes that the debugger complements the implementation with each new version of tokio runtime (if internal structures is changed). But I think this may be a good point of start.
This information may be added only for debug builds. POC of implementation may be found here.
2. Add some specific, debugging information in tokio
This is a harder way. Tokio can add some global data with information needed for debugger. This data can be managed by tokio in debug mode and annotated with
#[cfg(feature = "debug")]
. What debugger needs is described in this issue. Also this debug data should have a stable types (from debugger point of view).For example
And tokio should manage this list in debug builds.
Additional context
I think that such a solution will be very useful for any debugger that will support asynchronous rust, not only bs.
The text was updated successfully, but these errors were encountered: