aboutsummaryrefslogtreecommitdiff
path: root/bfd/corefile.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/corefile.c')
-rw-r--r--bfd/corefile.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/bfd/corefile.c b/bfd/corefile.c
index 7802a3a..605be8d 100644
--- a/bfd/corefile.c
+++ b/bfd/corefile.c
@@ -84,6 +84,31 @@ bfd_core_file_failing_signal (bfd *abfd)
/*
FUNCTION
+ bfd_core_file_pid
+
+SYNOPSIS
+ int bfd_core_file_pid (bfd *abfd);
+
+DESCRIPTION
+
+ Returns the PID of the process the core dump the BFD
+ @var{abfd} is attached to was generated from.
+*/
+
+int
+bfd_core_file_pid (bfd *abfd)
+{
+ if (abfd->format != bfd_core)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return 0;
+ }
+ return BFD_SEND (abfd, _core_file_pid, (abfd));
+}
+
+
+/*
+FUNCTION
core_file_matches_executable_p
SYNOPSIS