diff --git a/include/libunwind-coredump.h b/include/libunwind-coredump.h index 38385498..a44536f1 100644 --- a/include/libunwind-coredump.h +++ b/include/libunwind-coredump.h @@ -40,6 +40,8 @@ struct UCD_info; extern struct UCD_info *_UCD_create(const char *filename); extern void _UCD_destroy(struct UCD_info *); +extern pid_t _UCD_get_pid(struct UCD_info *); +extern int _UCD_get_cursig(struct UCD_info *); extern int _UCD_add_backing_file_at_segment(struct UCD_info *, int phdr_no, const char *filename); extern int _UCD_add_backing_file_at_vaddr(struct UCD_info *, unsigned long vaddr, diff --git a/src/coredump/_UCD_create.c b/src/coredump/_UCD_create.c index 00117f36..ec0dfb54 100644 --- a/src/coredump/_UCD_create.c +++ b/src/coredump/_UCD_create.c @@ -276,6 +276,16 @@ _UCD_create(const char *filename) return NULL; } +pid_t _UCD_get_pid(struct UCD_info *ui) +{ + return ui->prstatus->pr_pid; +} + +int _UCD_get_cursig(struct UCD_info *ui) +{ + return ui->prstatus->pr_cursig; +} + int _UCD_add_backing_file_at_segment(struct UCD_info *ui, int phdr_no, const char *filename) { if ((unsigned)phdr_no >= ui->phdrs_count)