-
-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backtrace feature similar to strace #686
Comments
There has been some discussion about "custom commands" for htop, which would allow you to do exactly this via some configuration. Cf. e.g. #638. IIRC there was some more discussion in other issues, but I can't find it right now. Basic idea was reserving just one key and then to present the suer with a menu of possible actions that could be configured via a configuration file. NB: Also you may find |
Not sure about this, i really like that strace is quick and immediately available on S key, because i do it often. I also like the fact that i don't need to preconfigure that, because i work on many remote machines and configuring each of them would be hell. I beleive this is important feature to have on all machines, so even admin without much knowledge of debuggers can quickly see why process hangs.
Thanks for the tip. It only adds another line which shows that there is nothing to show under each call. What am i supposed to see there? Update: tried on different binary and now i see call parameters in detail. |
Problem is we'd be running out of keys quite fast otherwise, as there's quite a few other features of that kind people asked for.
If debug symbols and stack frames are available this dumps the full set of arguments handed to each function. |
Perhaps it would make sense to dedicate |
The idea was more like having one key which brings up a menu to select the desired tool. Could still use some key assignment in that menu based on shortcuts. |
Linking PR #1270 with this one. (Backtrace support draft for Linux. Requires |
Hello,
currently i found it very useful to hit
S
key in the htop, to open strace window of selected thread. I absolutely love it and use it everyday. I've figured it currently executes following command:strace -T -tt -s 512 -p 1497796
Would it also be possible to map
B
key to execute following command and show it's output?cd /proc/1497796/cwd; gdb -batch -ex "bt" /proc/1497796/exe 1497796
I prints backtrace like this:
Good thing about this is that i can see where the individual threads are getting stuck without having to use gdb manualy to attach to individual thread.
Please note that i use
cd /proc/1497796/cwd;
before callinggdb
itself. The reason is that when usingLD_PRELOAD
with relative path, gdb can only find it when its run in same directory as the traced process.Perhaps in addition to
B
key for backtrace, there can be evenD
key to launch full blown GDB attached to that process and switched to thread.The text was updated successfully, but these errors were encountered: