summaryrefslogtreecommitdiffstats
path: root/src/include/abrt_crash_data.h
blob: 3243de8ce9d36034980d436ba51b0c09dffe806e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
    Copyright (C) 2009  Abrt team.
    Copyright (C) 2009  RedHat inc.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef ABRT_CRASH_DUMP_H_
#define ABRT_CRASH_DUMP_H_

#include "crash_data.h"
#include "abrt_types.h"

// Text bigger than this usually is attached, not added inline
#define CD_TEXT_ATT_SIZE (2*1024)

// Keep in sync with CCDump.py:

// Filenames in dump directory:
// filled by a hook:
#define FILENAME_ANALYZER     "analyzer"
#define FILENAME_EXECUTABLE   "executable"
#define FILENAME_BINARY       "binary"
#define FILENAME_CMDLINE      "cmdline"
#define FILENAME_REASON       "reason"
#define FILENAME_COREDUMP     "coredump"
#define FILENAME_BACKTRACE    "backtrace"
#define FILENAME_MEMORYMAP    "memorymap"
#define FILENAME_DUPHASH      "global_uuid" /* name is compat, to be renamed to "duphash" */
// Name of the function where the application crashed.
// Optional.
#define FILENAME_CRASH_FUNCTION "crash_function"
// filled by CDebugDump::Create() (which also fills FILENAME_UID):
#define FILENAME_ARCHITECTURE "architecture"
#define FILENAME_KERNEL       "kernel"
#define FILENAME_TIME         "time"
// From /etc/syste-release or /etc/redhat-release
#define FILENAME_OS_RELEASE   "os_release"
// Filled by <what?>
#define FILENAME_PACKAGE      "package"
#define FILENAME_COMPONENT    "component"
#define FILENAME_COMMENT      "comment"
#define FILENAME_REPRODUCE    "reproduce"
#define FILENAME_RATING       "rating"
#define FILENAME_HOSTNAME     "hostname"
// Optional. Set to "1" by abrt-handle-upload for every unpacked crashdump
#define FILENAME_REMOTE       "remote"
#define FILENAME_TAINTED      "kernel_tainted"
// TODO: TicketUploader also has open-coded "TICKET", "CUSTOMER" files

#define FILENAME_UID       "uid"
#define FILENAME_UUID      "uuid"
#define FILENAME_INFORMALL "inform_all_users"
#define FILENAME_COUNT     "count"
#define FILENAME_MESSAGE   "message"
// Not stored as files, added "on the fly":
#define CD_DUMPDIR         "DumpDir"
// "Which events are possible (make sense) on this crash dump?"
// (a string with "\n" terminated event names)
#define CD_EVENTS          "Events"


#ifdef __cplusplus
extern "C" {
#endif

#define is_editable_file abrt_is_editable_file
bool is_editable_file(const char *file_name);

#define log_crash_data abrt_log_crash_data
void log_crash_data(crash_data_t *crash_data, const char *pfx);

#ifdef __cplusplus
}
#endif

#endif