# Collect core dumps 

Source: [https://docs.qualcomm.com/doc/80-88500-3/topic/108_Collect_core_dumps_.html](https://docs.qualcomm.com/doc/80-88500-3/topic/108_Collect_core_dumps_.html)

Coredump collection is enabled by default on debug builds only. Upon any user space application crash, dump files are saved at /data/coredump path by default.

To enable core dump collection on perf builds, add COREDUMP\_qti-distro-user = "1" in DISTRO configuration and set SYSTEMD\_COREDUMP\_PATH to point to an appropriate coredump path.

Example

    COREDUMP_qti-distro-user = "1"Copy to clipboard

    SYSTEMD_COREDUMP_PATH ?= "${userfsdatadir}/coredump"Copy to clipboard

This command creates the /etc/sysctl.d/sysctl-coredump.conf file on target with the following content.

    kernel.core_pattern = @COREDUMP_PATH@/core.%e.%pCopy to clipboard

    fs.suid_dumpable = 2Copy to clipboard

To change dumping patterns, do the following.

1. Remount as system as RW modify
2. Save file.
3. Reboot device.

From next boot, core dumps are generated with updated patterns.

**Parent Topic:** [Debug mechanisms](https://docs.qualcomm.com/doc/80-88500-3/topic/77_Debugging_procedures.html)

Last Published: Sep 26, 2023

[Previous Topic
Collect clock dumps using the ADB shell](https://docs.qualcomm.com/bundle/publicresource/80-88500-3/topics/107_Collect_clock_dumps_using_the_adb_shell.md) [Next Topic
Collect RAM dumps](https://docs.qualcomm.com/bundle/publicresource/80-88500-3/topics/109__Collect_RAM_dumps_.md)