Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: bfd/irix-core.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bfd/i386os9k.c ('k') | bfd/libbfd.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* BFD back-end for Irix core files. 1 /* BFD back-end for Irix core files.
2 Copyright 1993, 1994, 1996, 1999, 2001, 2002, 2004, 2005, 2006, 2007, 2 Copyright 1993, 1994, 1996, 1999, 2001, 2002, 2004, 2005, 2006, 2007,
3 2010, 2011 Free Software Foundation, Inc. 3 2010, 2011, 2012 Free Software Foundation, Inc.
4 Written by Stu Grossman, Cygnus Support. 4 Written by Stu Grossman, Cygnus Support.
5 Converted to back-end form by Ian Lance Taylor, Cygnus Support 5 Converted to back-end form by Ian Lance Taylor, 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #ifdef CORE_MAGIC64 55 #ifdef CORE_MAGIC64
56 static int 56 static int
57 do_sections64 (bfd *abfd, struct coreout *coreout) 57 do_sections64 (bfd *abfd, struct coreout *coreout)
58 { 58 {
59 struct vmap64 vmap; 59 struct vmap64 vmap;
60 char *secname; 60 char *secname;
61 int i, val; 61 int i, val;
62 62
63 for (i = 0; i < coreout->c_nvmap; i++) 63 for (i = 0; i < coreout->c_nvmap; i++)
64 { 64 {
65 val = bfd_bread ((PTR) &vmap, (bfd_size_type) sizeof vmap, abfd); 65 val = bfd_bread (&vmap, (bfd_size_type) sizeof vmap, abfd);
66 if (val != sizeof vmap) 66 if (val != sizeof vmap)
67 break; 67 break;
68 68
69 switch (vmap.v_type) 69 switch (vmap.v_type)
70 { 70 {
71 case VDATA: 71 case VDATA:
72 secname = ".data"; 72 secname = ".data";
73 break; 73 break;
74 case VSTACK: 74 case VSTACK:
75 secname = ".stack"; 75 secname = ".stack";
(...skipping 27 matching lines...) Expand all
103 103
104 static int 104 static int
105 do_sections (bfd *abfd, struct coreout *coreout) 105 do_sections (bfd *abfd, struct coreout *coreout)
106 { 106 {
107 struct vmap vmap; 107 struct vmap vmap;
108 char *secname; 108 char *secname;
109 int i, val; 109 int i, val;
110 110
111 for (i = 0; i < coreout->c_nvmap; i++) 111 for (i = 0; i < coreout->c_nvmap; i++)
112 { 112 {
113 val = bfd_bread ((PTR) &vmap, (bfd_size_type) sizeof vmap, abfd); 113 val = bfd_bread (&vmap, (bfd_size_type) sizeof vmap, abfd);
114 if (val != sizeof vmap) 114 if (val != sizeof vmap)
115 break; 115 break;
116 116
117 switch (vmap.v_type) 117 switch (vmap.v_type)
118 { 118 {
119 case VDATA: 119 case VDATA:
120 secname = ".data"; 120 secname = ".data";
121 break; 121 break;
122 case VSTACK: 122 case VSTACK:
123 secname = ".stack"; 123 secname = ".stack";
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 static const bfd_target * 170 static const bfd_target *
171 irix_core_core_file_p (bfd *abfd) 171 irix_core_core_file_p (bfd *abfd)
172 { 172 {
173 int val; 173 int val;
174 struct coreout coreout; 174 struct coreout coreout;
175 struct idesc *idg, *idf, *ids; 175 struct idesc *idg, *idf, *ids;
176 bfd_size_type amt; 176 bfd_size_type amt;
177 177
178 val = bfd_bread ((PTR) &coreout, (bfd_size_type) sizeof coreout, abfd); 178 val = bfd_bread (&coreout, (bfd_size_type) sizeof coreout, abfd);
179 if (val != sizeof coreout) 179 if (val != sizeof coreout)
180 { 180 {
181 if (bfd_get_error () != bfd_error_system_call) 181 if (bfd_get_error () != bfd_error_system_call)
182 bfd_set_error (bfd_error_wrong_format); 182 bfd_set_error (bfd_error_wrong_format);
183 return 0; 183 return 0;
184 } 184 }
185 185
186 if (coreout.c_version != CORE_VERSION1) 186 if (coreout.c_version != CORE_VERSION1)
187 return 0; 187 return 0;
188 188
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 BFD_JUMP_TABLE_CORE (irix_core), 321 BFD_JUMP_TABLE_CORE (irix_core),
322 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), 322 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
323 BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols), 323 BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
324 BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), 324 BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
325 BFD_JUMP_TABLE_WRITE (_bfd_generic), 325 BFD_JUMP_TABLE_WRITE (_bfd_generic),
326 BFD_JUMP_TABLE_LINK (_bfd_nolink), 326 BFD_JUMP_TABLE_LINK (_bfd_nolink),
327 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), 327 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
328 328
329 NULL, 329 NULL,
330 330
331 (PTR) 0» » » /* backend_data */ 331 NULL» » » /* backend_data */
332 }; 332 };
333 333
334 #endif /* IRIX_CORE */ 334 #endif /* IRIX_CORE */
OLDNEW
« no previous file with comments | « bfd/i386os9k.c ('k') | bfd/libbfd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698