[HN Gopher] Finding out where syscalls are called from: Stack tr...
___________________________________________________________________
Finding out where syscalls are called from: Stack traces with
strace
Author : aheck
Score : 40 points
Date : 2024-06-08 19:23 UTC (1 days ago)
(HTM) web link (abstractexpr.com)
(TXT) w3m dump (abstractexpr.com)
| aheck wrote:
| One of the great strengths of strace as a debugging tool is that
| it shows you what a program is doing regardless of whether it was
| compiled with debug info or not. The downside of this is that you
| only see the program's syscall. You can use this information to
| deduce what is happening in the program but you don't see from
| where in the program those syscalls originate...
| thundergolfer wrote:
| Why did you just quote the start of the article?
| mshockwave wrote:
| Today I definitely learned! I feel like we can just patch strace
| to read debug info (and use it in stack trace) when present.
| fjfaase wrote:
| strace is a rather powerfull tool if you want to find out what a
| certain executable is doing. Which files it is opening, reading
| and writing and also which other executables it is executing. I
| personally have not used the '--stack-trace' option yet.
|
| Earlier this year, I have used it to analyze what happens during
| the initial steps of live-bootstrap [1] and produce a web page
| with all the information [2]. For this, I wrote a C program to
| parse and process the output of strace.
|
| [1] https://github.com/fosslinux/live-bootstrap
|
| [2] https://fransfaase.github.io/Emulator/
___________________________________________________________________
(page generated 2024-06-09 23:00 UTC)