1 /* Core file generic interface routines for BFD.
2 Copyright (C) 1990-1991 Free Software Foundation, Inc.
3 Written by Cygnus Support.
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
26 Buff output this facinating topic
36 bfd_core_file_failing_command
39 Returns a read-only string explaining what program was running
40 when it failed and produced the core file being read
43 CONST char *bfd_core_file_failing_command(bfd *);
47 DEFUN(bfd_core_file_failing_command
,(abfd
),
50 if (abfd
->format
!= bfd_core
) {
51 bfd_error
= invalid_operation
;
54 return BFD_SEND (abfd
, _core_file_failing_command
, (abfd
));
59 bfd_core_file_failing_signal
62 Returns the signal number which caused the core dump which
63 generated the file the BFD is attached to.
66 int bfd_core_file_failing_signal(bfd *);
70 bfd_core_file_failing_signal (abfd
)
73 if (abfd
->format
!= bfd_core
) {
74 bfd_error
= invalid_operation
;
77 return BFD_SEND (abfd
, _core_file_failing_signal
, (abfd
));
83 core_file_matches_executable_p
86 Returns <<true>> if the core file attached to @var{core_bfd}
87 was generated by a run of the executable file attached to
88 @var{exec_bfd}, or else <<false>>.
91 boolean core_file_matches_executable_p
92 (bfd *core_bfd, bfd *exec_bfd);
96 core_file_matches_executable_p (core_bfd
, exec_bfd
)
97 bfd
*core_bfd
, *exec_bfd
;
99 if ((core_bfd
->format
!= bfd_core
) || (exec_bfd
->format
!= bfd_object
)) {
100 bfd_error
= wrong_format
;
104 return BFD_SEND (core_bfd
, _core_file_matches_executable_p
,
105 (core_bfd
, exec_bfd
));