tools/testing/selftests/coredump/stackdump

Source file repositories/reference/linux-study-clean/tools/testing/selftests/coredump/stackdump

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/coredump/stackdump
Extension
[no extension]
Size
243 bytes
Lines
15
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0

CRASH_PROGRAM_ID=$1
STACKDUMP_FILE=$2

TMP=$(mktemp)

for t in /proc/$CRASH_PROGRAM_ID/task/*; do
	tid=$(basename $t)
	cat /proc/$tid/stat | awk '{print $29}' >> $TMP
done

mv $TMP $STACKDUMP_FILE

Annotation

Implementation Notes