Ignore:
Timestamp:
2023-11-03T18:47:41Z (15 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1397ab
Parents:
dcd8214
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-11-03 18:46:22)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-11-03 18:47:41)
Message:

Print symbol names and line numbers in stacktraces for init tasks

Only useful in select few situations, but useful nonetheless.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/debug/sections.h

    rdcd8214 r40eab9f  
    3333#include <stddef.h>
    3434
    35 extern const void *debug_aranges;
    36 extern size_t debug_aranges_size;
     35typedef struct {
     36        const void *debug_aranges;
     37        size_t debug_aranges_size;
    3738
    38 extern const void *debug_info;
    39 extern size_t debug_info_size;
     39        const void *debug_info;
     40        size_t debug_info_size;
    4041
    41 extern const void *debug_abbrev;
    42 extern size_t debug_abbrev_size;
     42        const void *debug_abbrev;
     43        size_t debug_abbrev_size;
    4344
    44 extern const void *debug_line;
    45 extern size_t debug_line_size;
     45        const void *debug_line;
     46        size_t debug_line_size;
    4647
    47 extern const char *debug_str;
    48 extern size_t debug_str_size;
     48        const char *debug_str;
     49        size_t debug_str_size;
    4950
    50 extern const char *debug_line_str;
    51 extern size_t debug_line_str_size;
     51        const char *debug_line_str;
     52        size_t debug_line_str_size;
    5253
    53 extern const void *debug_rnglists;
    54 extern size_t debug_rnglists_size;
     54        const void *debug_rnglists;
     55        size_t debug_rnglists_size;
    5556
    56 extern const void *eh_frame_hdr;
    57 extern size_t eh_frame_hdr_size;
     57        const void *eh_frame_hdr;
     58        size_t eh_frame_hdr_size;
    5859
    59 extern const void *eh_frame;
    60 extern size_t eh_frame_size;
     60        const void *eh_frame;
     61        size_t eh_frame_size;
    6162
    62 extern const elf_symbol_t *symtab;
    63 extern size_t symtab_size;
     63        const elf_symbol_t *symtab;
     64        size_t symtab_size;
    6465
    65 extern const char *strtab;
    66 extern size_t strtab_size;
     66        const char *strtab;
     67        size_t strtab_size;
     68} debug_sections_t;
     69
     70extern debug_sections_t kernel_sections;
     71
     72debug_sections_t get_debug_sections(const void *elf, size_t elf_size);
    6773
    6874#endif /* DEBUG_SECTIONS_H_ */
Note: See TracChangeset for help on using the changeset viewer.