diff options
-rw-r--r-- | src/hooks/abrt-hook-ccpp.c | 17 | ||||
-rw-r--r-- | src/include/abrt_crash_data.h | 3 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c index dc95d6dc..8b6a6926 100644 --- a/src/hooks/abrt-hook-ccpp.c +++ b/src/hooks/abrt-hook-ccpp.c @@ -498,8 +498,23 @@ int main(int argc, char** argv) if (dd) { dd_create_basic_files(dd, uid); + + char path_maps_in[sizeof("/proc/%lu/maps") + sizeof(long)*3]; + sprintf(path_maps_in, "/proc/%lu/maps", (long)pid); + char *path_maps_out = concat_path_file(dd->dd_dir, FILENAME_MAPS); + copy_file(path_maps_in, path_maps_out, 0); + free(path_maps_out); + + char path_smaps_in[sizeof("/proc/%lu/smaps") + sizeof(long)*3]; + sprintf(path_smaps_in, "/proc/%lu/smaps", (long)pid); + char *path_smaps_out = concat_path_file(dd->dd_dir, FILENAME_SMAPS); + copy_file(path_smaps_in, path_smaps_out, 0); + free(path_smaps_out); + char *cmdline = get_cmdline(pid); /* never NULL */ - char *reason = xasprintf("Process %s was killed by signal %s (SIG%s)", executable, signal_str, signame ? signame : signal_str); + char *reason = xasprintf("Process %s was killed by signal %s (SIG%s)", + executable, signal_str, signame ? signame : signal_str); + dd_save_text(dd, FILENAME_ANALYZER, "CCpp"); dd_save_text(dd, FILENAME_EXECUTABLE, executable); dd_save_text(dd, FILENAME_CMDLINE, cmdline); diff --git a/src/include/abrt_crash_data.h b/src/include/abrt_crash_data.h index 3243de8c..b71b046f 100644 --- a/src/include/abrt_crash_data.h +++ b/src/include/abrt_crash_data.h @@ -36,7 +36,8 @@ #define FILENAME_REASON "reason" #define FILENAME_COREDUMP "coredump" #define FILENAME_BACKTRACE "backtrace" -#define FILENAME_MEMORYMAP "memorymap" +#define FILENAME_MAPS "maps" +#define FILENAME_SMAPS "smaps" #define FILENAME_DUPHASH "global_uuid" /* name is compat, to be renamed to "duphash" */ // Name of the function where the application crashed. // Optional. |