Skip to content

Commit

Permalink
dlt_cdh: Make sure on 64 bit we read an ELF64 structure. (#567)
Browse files Browse the repository at this point in the history
Make sure on 64 bit we read an ELF64 structure.
Otherwise we get a read error, and the context file is missing some good
to know information
  • Loading branch information
LocutusOfBorg authored Nov 14, 2023
1 parent f74e548 commit 6b2e57b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core_dump_handler/dlt_cdh.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,17 @@
#define CORE_FILE_PATTERN "%s/core.%d.%s.%d.gz"
#define CONTEXT_FILE_PATTERN "%s/context.%d.%s.%d.txt"

#if ((__SIZEOF_POINTER) == 4)
#define ELF_Ehdr Elf32_Ehdr
#define ELF_Phdr Elf32_Phdr
#define ELF_Shdr Elf32_Shdr
#define ELF_Nhdr Elf32_Nhdr
#else
#define ELF_Ehdr Elf64_Ehdr
#define ELF_Phdr Elf64_Phdr
#define ELF_Shdr Elf64_Shdr
#define ELF_Nhdr Elf64_Nhdr
#endif

typedef struct
{
Expand Down

0 comments on commit 6b2e57b

Please sign in to comment.