/[gcl]/gcl/binutils/bfd/corefile.c
ViewVC logotype

Diff of /gcl/binutils/bfd/corefile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by camm, Fri Aug 9 05:35:01 2002 UTC revision 1.2 by camm, Fri Sep 9 23:32:08 2005 UTC
# Line 1  Line 1 
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    
# Line 36  FUNCTION Line 36  FUNCTION
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
# Line 45  DESCRIPTION Line 45  DESCRIPTION
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    
# Line 60  FUNCTION Line 60  FUNCTION
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
# Line 68  DESCRIPTION Line 68  DESCRIPTION
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    
# Line 83  FUNCTION Line 83  FUNCTION
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  }  }

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26