Project

General

Profile

Actions

Feature #13925

open

core files should include DWARF

Added by Joshua M. Clulow 4 months ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Category:
kernel
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Expert
Tags:
Gerrit CR:

Description

At present, when a user process dumps core the kernel copies the symbol table and any CTF information from the object files of the executing process into the core file. In this way, debuggers like MDB have access to the correct debugging information for a core file, without needed to retain and correlate with the executable or libraries, or any ancillary debug information files.

If an executable, or any dependent library, includes DWARF or any other debugging information, we should copy it to the core file as we do with the symbols and CTF.

For example, these sections are included in a Rust program built with debug information:

$ elfdump -c target/debug/sample-server |grep '\.debug'
Section Header[19]:  sh_name: .debug_gdb_scripts
Section Header[7800]:  sh_name: .debug_abbrev
Section Header[7801]:  sh_name: .debug_info
Section Header[7802]:  sh_name: .debug_aranges
Section Header[7803]:  sh_name: .debug_str
Section Header[7804]:  sh_name: .debug_pubnames
Section Header[7805]:  sh_name: .debug_pubtypes
Section Header[7807]:  sh_name: .debug_line
Section Header[7808]:  sh_name: .debug_ranges
Section Header[7809]:  sh_name: .debug_loc
Section Header[7810]:  sh_name: .debug_frame
Actions #1

Updated by Robert Mustacchi 3 months ago

  • Subject changed from core files should include DWARF from the executable to core files should include DWARF
Actions #2

Updated by Electric Monk about 1 month ago

  • Gerrit CR set to 1662
Actions

Also available in: Atom PDF