Changeset 2fbb42f in mainline for kernel/meson.build


Ignore:
Timestamp:
2023-10-26T19:20:09Z (21 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, topic/msim-upgrade, topic/simplify-dev-export
Children:
001957b6
Parents:
da13982
Message:

Add printing of file names and line numbers in stacktraces

Uses DWARF ¾/5 .debug_line section (originally intended
to only support DWARF 5, but GCC emits lower versioned sections
regardless of command line arguments on some platforms for some
reason, so generic support it is).

Also adds a whole lot of definitions for various DWARF constants
I expect to be useful in the future.

The quickest way to test this probably is to run test fault1
in kernel console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/meson.build

    rda13982 r2fbb42f  
    9595kernel_c_args = arch_kernel_c_args + kernel_defs + [
    9696        '-ffreestanding',
     97        '-fdebug-prefix-map=../../kernel/=',
     98        '-fdebug-prefix-map=../../../kernel/=',
    9799
    98100        cc.get_supported_arguments([
     
    112114]
    113115
     116if not CONFIG_LINE_DEBUG
     117        # Keep the debug info needed to get file names for kernel stack traces.
     118        kernel_c_args += [ '-gdwarf-5', '-g1', '-gno-statement-frontiers' ]
     119endif
     120
    114121if CONFIG_LTO
    115122        kernel_c_args += [ '-flto' ]
Note: See TracChangeset for help on using the changeset viewer.