1 |
/* Core file generic interface routines for BFD. |
/* Core file generic interface routines for BFD. |
2 |
Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002 |
Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2003 |
3 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
4 |
Written by Cygnus Support. |
Written by Cygnus Support. |
5 |
|
|
36 |
bfd_core_file_failing_command |
bfd_core_file_failing_command |
37 |
|
|
38 |
SYNOPSIS |
SYNOPSIS |
39 |
const char *bfd_core_file_failing_command(bfd *abfd); |
const char *bfd_core_file_failing_command (bfd *abfd); |
40 |
|
|
41 |
DESCRIPTION |
DESCRIPTION |
42 |
Return a read-only string explaining which program was running |
Return a read-only string explaining which program was running |
45 |
*/ |
*/ |
46 |
|
|
47 |
const char * |
const char * |
48 |
bfd_core_file_failing_command (abfd) |
bfd_core_file_failing_command (bfd *abfd) |
|
bfd *abfd; |
|
49 |
{ |
{ |
50 |
if (abfd->format != bfd_core) { |
if (abfd->format != bfd_core) |
51 |
bfd_set_error (bfd_error_invalid_operation); |
{ |
52 |
return NULL; |
bfd_set_error (bfd_error_invalid_operation); |
53 |
} |
return NULL; |
54 |
|
} |
55 |
return BFD_SEND (abfd, _core_file_failing_command, (abfd)); |
return BFD_SEND (abfd, _core_file_failing_command, (abfd)); |
56 |
} |
} |
57 |
|
|
60 |
bfd_core_file_failing_signal |
bfd_core_file_failing_signal |
61 |
|
|
62 |
SYNOPSIS |
SYNOPSIS |
63 |
int bfd_core_file_failing_signal(bfd *abfd); |
int bfd_core_file_failing_signal (bfd *abfd); |
64 |
|
|
65 |
DESCRIPTION |
DESCRIPTION |
66 |
Returns the signal number which caused the core dump which |
Returns the signal number which caused the core dump which |
68 |
*/ |
*/ |
69 |
|
|
70 |
int |
int |
71 |
bfd_core_file_failing_signal (abfd) |
bfd_core_file_failing_signal (bfd *abfd) |
|
bfd *abfd; |
|
72 |
{ |
{ |
73 |
if (abfd->format != bfd_core) { |
if (abfd->format != bfd_core) |
74 |
bfd_set_error (bfd_error_invalid_operation); |
{ |
75 |
return 0; |
bfd_set_error (bfd_error_invalid_operation); |
76 |
} |
return 0; |
77 |
|
} |
78 |
return BFD_SEND (abfd, _core_file_failing_signal, (abfd)); |
return BFD_SEND (abfd, _core_file_failing_signal, (abfd)); |
79 |
} |
} |
80 |
|
|
83 |
core_file_matches_executable_p |
core_file_matches_executable_p |
84 |
|
|
85 |
SYNOPSIS |
SYNOPSIS |
86 |
boolean core_file_matches_executable_p |
bfd_boolean core_file_matches_executable_p |
87 |
(bfd *core_bfd, bfd *exec_bfd); |
(bfd *core_bfd, bfd *exec_bfd); |
88 |
|
|
89 |
DESCRIPTION |
DESCRIPTION |
90 |
Return <<true>> if the core file attached to @var{core_bfd} |
Return <<TRUE>> if the core file attached to @var{core_bfd} |
91 |
was generated by a run of the executable file attached to |
was generated by a run of the executable file attached to |
92 |
@var{exec_bfd}, <<false>> otherwise. |
@var{exec_bfd}, <<FALSE>> otherwise. |
93 |
*/ |
*/ |
94 |
boolean |
|
95 |
core_file_matches_executable_p (core_bfd, exec_bfd) |
bfd_boolean |
96 |
bfd *core_bfd, *exec_bfd; |
core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) |
97 |
{ |
{ |
98 |
if ((core_bfd->format != bfd_core) || (exec_bfd->format != bfd_object)) { |
if (core_bfd->format != bfd_core || exec_bfd->format != bfd_object) |
99 |
bfd_set_error (bfd_error_wrong_format); |
{ |
100 |
return false; |
bfd_set_error (bfd_error_wrong_format); |
101 |
} |
return FALSE; |
102 |
|
} |
103 |
|
|
104 |
return BFD_SEND (core_bfd, _core_file_matches_executable_p, |
return BFD_SEND (core_bfd, _core_file_matches_executable_p, |
105 |
(core_bfd, exec_bfd)); |
(core_bfd, exec_bfd)); |
106 |
} |
} |