| OLD | NEW |
| 1 /* BFD back end for traditional Unix core files (U-area and raw sections) | 1 /* BFD back end for traditional Unix core files (U-area and raw sections) |
| 2 Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, | 2 Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, |
| 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2011 | 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2011, 2012 |
| 4 Free Software Foundation, Inc. | 4 Free Software Foundation, Inc. |
| 5 Written by John Gilmore of Cygnus Support. | 5 Written by John Gilmore of Cygnus Support. |
| 6 | 6 |
| 7 This file is part of BFD, the Binary File Descriptor library. | 7 This file is part of BFD, the Binary File Descriptor library. |
| 8 | 8 |
| 9 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
| 10 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
| 11 the Free Software Foundation; either version 3 of the License, or | 11 the Free Software Foundation; either version 3 of the License, or |
| 12 (at your option) any later version. | 12 (at your option) any later version. |
| 13 | 13 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 struct trad_core_struct | 55 struct trad_core_struct |
| 56 { | 56 { |
| 57 asection *data_section; | 57 asection *data_section; |
| 58 asection *stack_section; | 58 asection *stack_section; |
| 59 asection *reg_section; | 59 asection *reg_section; |
| 60 struct user u; | 60 struct user u; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 #define core_upage(bfd) (&((bfd)->tdata.trad_core_data->u)) | 63 #define core_upage(bfd) (&((bfd)->tdata.trad_core_data->u)) |
| 64 #define core_datasec(bfd) ((bfd)->tdata.trad_core_data->data_section) | 64 #define core_datasec(bfd) ((bfd)->tdata.trad_core_data->data_section) |
| 65 #define core_stacksec(bfd) ((bfd)->tdata.trad_core_data->stack_section) | 65 #define core_stacksec(bfd) ((bfd)->tdata.trad_core_data->stack_section) |
| 66 #define core_regsec(bfd) ((bfd)->tdata.trad_core_data->reg_section) | 66 #define core_regsec(bfd) ((bfd)->tdata.trad_core_data->reg_section) |
| 67 | 67 |
| 68 /* forward declarations */ | 68 /* forward declarations */ |
| 69 | 69 |
| 70 const bfd_target *trad_unix_core_file_p PARAMS ((bfd *abfd)); | |
| 71 char * trad_unix_core_file_failing_command PARAMS ((bfd *abfd)); | |
| 72 int trad_unix_core_file_failing_signal PARAMS ((bfd *abfd)); | |
| 73 #define trad_unix_core_file_matches_executable_p generic_core_file_matches_execu
table_p | 70 #define trad_unix_core_file_matches_executable_p generic_core_file_matches_execu
table_p |
| 74 #define trad_unix_core_file_pid _bfd_nocore_core_file_pid | 71 #define trad_unix_core_file_pid _bfd_nocore_core_file_pid |
| 75 static void swap_abort PARAMS ((void)); | 72 |
| 76 | 73 |
| 77 /* Handle 4.2-style (and perhaps also sysV-style) core dump file. */ | 74 /* Handle 4.2-style (and perhaps also sysV-style) core dump file. */ |
| 78 | 75 |
| 79 const bfd_target * | 76 static const bfd_target * |
| 80 trad_unix_core_file_p (abfd) | 77 trad_unix_core_file_p (bfd *abfd) |
| 81 bfd *abfd; | |
| 82 | |
| 83 { | 78 { |
| 84 int val; | 79 int val; |
| 85 struct user u; | 80 struct user u; |
| 86 struct trad_core_struct *rawptr; | 81 struct trad_core_struct *rawptr; |
| 87 bfd_size_type amt; | 82 bfd_size_type amt; |
| 88 flagword flags; | 83 flagword flags; |
| 89 | 84 |
| 90 #ifdef TRAD_CORE_USER_OFFSET | 85 #ifdef TRAD_CORE_USER_OFFSET |
| 91 /* If defined, this macro is the file position of the user struct. */ | 86 /* If defined, this macro is the file position of the user struct. */ |
| 92 if (bfd_seek (abfd, (file_ptr) TRAD_CORE_USER_OFFSET, SEEK_SET) != 0) | 87 if (bfd_seek (abfd, (file_ptr) TRAD_CORE_USER_OFFSET, SEEK_SET) != 0) |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 224 |
| 230 return abfd->xvec; | 225 return abfd->xvec; |
| 231 | 226 |
| 232 fail: | 227 fail: |
| 233 bfd_release (abfd, abfd->tdata.any); | 228 bfd_release (abfd, abfd->tdata.any); |
| 234 abfd->tdata.any = NULL; | 229 abfd->tdata.any = NULL; |
| 235 bfd_section_list_clear (abfd); | 230 bfd_section_list_clear (abfd); |
| 236 return NULL; | 231 return NULL; |
| 237 } | 232 } |
| 238 | 233 |
| 239 char * | 234 static char * |
| 240 trad_unix_core_file_failing_command (abfd) | 235 trad_unix_core_file_failing_command (bfd *abfd) |
| 241 bfd *abfd; | |
| 242 { | 236 { |
| 243 #ifndef NO_CORE_COMMAND | 237 #ifndef NO_CORE_COMMAND |
| 244 char *com = abfd->tdata.trad_core_data->u.u_comm; | 238 char *com = abfd->tdata.trad_core_data->u.u_comm; |
| 245 if (*com) | 239 if (*com) |
| 246 return com; | 240 return com; |
| 247 else | 241 else |
| 248 #endif | 242 #endif |
| 249 return 0; | 243 return 0; |
| 250 } | 244 } |
| 251 | 245 |
| 252 int | 246 static int |
| 253 trad_unix_core_file_failing_signal (ignore_abfd) | 247 trad_unix_core_file_failing_signal (bfd *ignore_abfd ATTRIBUTE_UNUSED) |
| 254 bfd *ignore_abfd ATTRIBUTE_UNUSED; | |
| 255 { | 248 { |
| 256 #ifdef TRAD_UNIX_CORE_FILE_FAILING_SIGNAL | 249 #ifdef TRAD_UNIX_CORE_FILE_FAILING_SIGNAL |
| 257 return TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(ignore_abfd); | 250 return TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(ignore_abfd); |
| 258 #else | 251 #else |
| 259 return -1; /* FIXME, where is it? */ | 252 return -1; /* FIXME, where is it? */ |
| 260 #endif | 253 #endif |
| 261 } | 254 } |
error: old chunk mismatch |
None
| OLD | NEW |