automotive-dlt
dlt_cdh.h File Reference
#include <unistd.h>
#include <stdint.h>
#include <elf.h>
#include <sys/procfs.h>
#include <sys/user.h>
#include "dlt_cdh_streamer.h"
Include dependency graph for dlt_cdh.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cdh_registers_t
 
struct  proc_info_t
 

Macros

#define CORE_DIRECTORY   "/var/core"
 
#define CORE_TMP_DIRECTORY   "/var/core_tmp"
 
#define CORE_LOCK_DIRECTORY   "/tmp/.core_locks"
 
#define CORE_MAX_FILENAME_LENGTH   255
 
#define MAX_PROC_NAME_LENGTH   32
 
#define CRASH_ID_LEN   8
 
#define CRASHID_FILE   "/tmp/.crashid"
 
#define CORE_FILE_PATTERN   "%s/core.%d.%s.%d.gz"
 
#define CONTEXT_FILE_PATTERN   "%s/context.%d.%s.%d.txt"
 
#define ELF_Ehdr   Elf32_Ehdr
 
#define ELF_Phdr   Elf32_Phdr
 
#define ELF_Shdr   Elf32_Shdr
 
#define ELF_Nhdr   Elf32_Nhdr
 

Functions

cdh_status_t get_exec_name (unsigned int p_pid_str, char *p_exec_name, int p_exec_name_maxsize)
 
cdh_status_t write_proc_context (const proc_info_t *)
 
cdh_status_t treat_coredump (proc_info_t *p_proc)
 
cdh_status_t treat_crash_data (proc_info_t *p_proc)
 
cdh_status_t move_to_core_directory (proc_info_t *p_proc)
 
cdh_status_t check_core_directory ()
 

Detailed Description

Author
Magneti Marelli http://www.magnetimarelli.com
Lutz Helwing lutz_.nosp@m.helw.nosp@m.ing@m.nosp@m.ento.nosp@m.r.com

Definition in file dlt_cdh.h.

Macro Definition Documentation

#define CONTEXT_FILE_PATTERN   "%s/context.%d.%s.%d.txt"

Definition at line 48 of file dlt_cdh.h.

Referenced by core_locks(), move_to_core_directory(), and write_proc_context().

#define CORE_DIRECTORY   "/var/core"

Definition at line 39 of file dlt_cdh.h.

Referenced by check_core_directory(), and move_to_core_directory().

#define CORE_FILE_PATTERN   "%s/core.%d.%s.%d.gz"

Definition at line 47 of file dlt_cdh.h.

Referenced by core_locks(), init_coredump(), and move_to_core_directory().

#define CORE_LOCK_DIRECTORY   "/tmp/.core_locks"

Definition at line 41 of file dlt_cdh.h.

Referenced by check_core_directory(), clean_core_tmp_dir(), and core_locks().

#define CORE_MAX_FILENAME_LENGTH   255
#define CORE_TMP_DIRECTORY   "/var/core_tmp"
#define CRASH_ID_LEN   8

Definition at line 44 of file dlt_cdh.h.

#define CRASHID_FILE   "/tmp/.crashid"

Definition at line 45 of file dlt_cdh.h.

Referenced by write_crashid_to_filesystem().

#define ELF_Ehdr   Elf32_Ehdr

Definition at line 50 of file dlt_cdh.h.

#define ELF_Nhdr   Elf32_Nhdr

Definition at line 53 of file dlt_cdh.h.

Referenced by get_crashed_registers().

#define ELF_Phdr   Elf32_Phdr

Definition at line 51 of file dlt_cdh.h.

Referenced by read_elf_headers().

#define ELF_Shdr   Elf32_Shdr

Definition at line 52 of file dlt_cdh.h.

#define MAX_PROC_NAME_LENGTH   32

Definition at line 43 of file dlt_cdh.h.

Referenced by get_crashed_registers().

Function Documentation

cdh_status_t check_core_directory ( )
cdh_status_t get_exec_name ( unsigned int  p_pid_str,
char *  p_exec_name,
int  p_exec_name_maxsize 
)

Definition at line 52 of file dlt_cdh_context.c.

References CDH_NOK, CDH_OK, CORE_MAX_FILENAME_LENGTH, g_buffer, and NULL.

Referenced by main().

cdh_status_t treat_coredump ( proc_info_t p_proc)
cdh_status_t treat_crash_data ( proc_info_t p_proc)

Definition at line 191 of file dlt_cdh_crashid.c.

References CDH_NOK, CDH_OK, create_crashid(), get_crashed_registers(), and write_crashid_to_filesystem().

Referenced by main().