/[gcl]/gcl/binutils/bfd/cisco-core.c
ViewVC logotype

Diff of /gcl/binutils/bfd/cisco-core.c

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

revision 1.1.1.1 by camm, Fri Aug 9 05:34:48 2002 UTC revision 1.2 by camm, Fri Sep 9 23:32:07 2005 UTC
# Line 1  Line 1 
1  /* BFD back-end for CISCO crash dumps.  /* BFD back-end for CISCO crash dumps.
2     Copyright 1994, 1997, 1999, 2000, 2001, 2002     Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004
3     Free Software Foundation, Inc.     Free Software Foundation, Inc.
4    
5  This file is part of BFD, the Binary File Descriptor library.  This file is part of BFD, the Binary File Descriptor library.
# Line 75  static const bfd_target *cisco_core_file Line 75  static const bfd_target *cisco_core_file
75  static const bfd_target *cisco_core_file_p PARAMS ((bfd *));  static const bfd_target *cisco_core_file_p PARAMS ((bfd *));
76  char *cisco_core_file_failing_command PARAMS ((bfd *));  char *cisco_core_file_failing_command PARAMS ((bfd *));
77  int cisco_core_file_failing_signal PARAMS ((bfd *));  int cisco_core_file_failing_signal PARAMS ((bfd *));
78  boolean cisco_core_file_matches_executable_p PARAMS ((bfd *, bfd *));  bfd_boolean cisco_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
79    
80  /* Examine the file for a crash info struct at the offset given by  /* Examine the file for a crash info struct at the offset given by
81     CRASH_INFO_LOC.  */     CRASH_INFO_LOC.  */
# Line 246  cisco_core_file_validate (abfd, crash_in Line 246  cisco_core_file_validate (abfd, crash_in
246      goto error_return;      goto error_return;
247    asect->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;    asect->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
248    /* The size of memory is the size of the core file itself.  */    /* The size of memory is the size of the core file itself.  */
249    asect->_raw_size = statbuf.st_size;    asect->size = statbuf.st_size;
250    asect->vma = rambase;    asect->vma = rambase;
251    asect->filepos = 0;    asect->filepos = 0;
252    
# Line 259  cisco_core_file_validate (abfd, crash_in Line 259  cisco_core_file_validate (abfd, crash_in
259    asect->flags = SEC_HAS_CONTENTS;    asect->flags = SEC_HAS_CONTENTS;
260    asect->vma = 0;    asect->vma = 0;
261    asect->filepos = crashinfo_offset;    asect->filepos = crashinfo_offset;
262    asect->_raw_size = sizeof (crashinfo);    asect->size = sizeof (crashinfo);
263    
264    /* Create a ".reg" section to allow access to the saved    /* Create a ".reg" section to allow access to the saved
265       registers.  */       registers.  */
# Line 274  cisco_core_file_validate (abfd, crash_in Line 274  cisco_core_file_validate (abfd, crash_in
274       choose a register section size that is either the remaining part       choose a register section size that is either the remaining part
275       of the file, or 1024, whichever is smaller.  */       of the file, or 1024, whichever is smaller.  */
276    nread = statbuf.st_size - asect->filepos;    nread = statbuf.st_size - asect->filepos;
277    asect->_raw_size = (nread < 1024) ? nread : 1024;    asect->size = (nread < 1024) ? nread : 1024;
278    
279    return abfd->xvec;    return abfd->xvec;
280    
# Line 318  cisco_core_file_failing_signal (abfd) Line 318  cisco_core_file_failing_signal (abfd)
318    return abfd->tdata.cisco_core_data->sig;    return abfd->tdata.cisco_core_data->sig;
319  }  }
320    
321  boolean  bfd_boolean
322  cisco_core_file_matches_executable_p (core_bfd, exec_bfd)  cisco_core_file_matches_executable_p (core_bfd, exec_bfd)
323       bfd *core_bfd ATTRIBUTE_UNUSED;       bfd *core_bfd ATTRIBUTE_UNUSED;
324       bfd *exec_bfd ATTRIBUTE_UNUSED;       bfd *exec_bfd ATTRIBUTE_UNUSED;
325  {  {
326    return true;    return TRUE;
327  }  }
328    
329  extern const bfd_target cisco_core_little_vec;  extern const bfd_target cisco_core_little_vec;

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