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

Side by Side Diff: bfd/lynx-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/linker.c ('k') | bfd/m68klinux.c » ('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 Lynx core files 1 /* BFD back end for Lynx core files
2 Copyright 1993, 1994, 1995, 2001, 2002, 2004, 2005, 2006, 2007 2 Copyright 1993, 1994, 1995, 2001, 2002, 2004, 2005, 2006, 2007
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 Written by Stu Grossman of Cygnus Support. 4 Written by Stu Grossman of Cygnus Support.
5 5
6 This file is part of BFD, the Binary File Descriptor library. 6 This file is part of BFD, the Binary File Descriptor library.
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or 10 the Free Software Foundation; either version 3 of the License, or
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #define core_hdr(bfd) ((bfd)->tdata.lynx_core_data) 51 #define core_hdr(bfd) ((bfd)->tdata.lynx_core_data)
52 #define core_signal(bfd) (core_hdr(bfd)->sig) 52 #define core_signal(bfd) (core_hdr(bfd)->sig)
53 #define core_command(bfd) (core_hdr(bfd)->cmd) 53 #define core_command(bfd) (core_hdr(bfd)->cmd)
54 54
55 #define lynx_core_file_matches_executable_p generic_core_file_matches_executable _p 55 #define lynx_core_file_matches_executable_p generic_core_file_matches_executable _p
56 #define lynx_core_file_pid _bfd_nocore_core_file_pid 56 #define lynx_core_file_pid _bfd_nocore_core_file_pid
57 57
58 /* Handle Lynx core dump file. */ 58 /* Handle Lynx core dump file. */
59 59
60 static asection * 60 static asection *
61 make_bfd_asection (abfd, name, flags, size, vma, filepos) 61 make_bfd_asection (bfd *abfd,
62 bfd *abfd; 62 » » const char *name,
63 const char *name; 63 » » flagword flags,
64 flagword flags; 64 » » bfd_size_type size,
65 bfd_size_type size; 65 » » bfd_vma vma,
66 bfd_vma vma; 66 » » file_ptr filepos)
67 file_ptr filepos;
68 { 67 {
69 asection *asect; 68 asection *asect;
70 char *newname; 69 char *newname;
71 70
72 newname = bfd_alloc (abfd, (bfd_size_type) strlen (name) + 1); 71 newname = bfd_alloc (abfd, (bfd_size_type) strlen (name) + 1);
73 if (!newname) 72 if (!newname)
74 return NULL; 73 return NULL;
75 74
76 strcpy (newname, name); 75 strcpy (newname, name);
77 76
78 asect = bfd_make_section_with_flags (abfd, newname, flags); 77 asect = bfd_make_section_with_flags (abfd, newname, flags);
79 if (!asect) 78 if (!asect)
80 return NULL; 79 return NULL;
81 80
82 asect->size = size; 81 asect->size = size;
83 asect->vma = vma; 82 asect->vma = vma;
84 asect->filepos = filepos; 83 asect->filepos = filepos;
85 asect->alignment_power = 2; 84 asect->alignment_power = 2;
86 85
87 return asect; 86 return asect;
88 } 87 }
89 88
90 const bfd_target * 89 const bfd_target *
91 lynx_core_file_p (abfd) 90 lynx_core_file_p (bfd *abfd)
92 bfd *abfd;
93 { 91 {
94 int secnum; 92 int secnum;
95 struct pssentry pss; 93 struct pssentry pss;
96 bfd_size_type tcontext_size; 94 bfd_size_type tcontext_size;
97 core_st_t *threadp; 95 core_st_t *threadp;
98 int pagesize; 96 int pagesize;
99 asection *newsect; 97 asection *newsect;
100 bfd_size_type amt; 98 bfd_size_type amt;
101 99
102 pagesize = getpagesize (); /* Serious cross-target issue here... This 100 pagesize = getpagesize (); /* Serious cross-target issue here... This
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 return abfd->xvec; 206 return abfd->xvec;
209 207
210 fail: 208 fail:
211 bfd_release (abfd, core_hdr (abfd)); 209 bfd_release (abfd, core_hdr (abfd));
212 core_hdr (abfd) = NULL; 210 core_hdr (abfd) = NULL;
213 bfd_section_list_clear (abfd); 211 bfd_section_list_clear (abfd);
214 return NULL; 212 return NULL;
215 } 213 }
216 214
217 char * 215 char *
218 lynx_core_file_failing_command (abfd) 216 lynx_core_file_failing_command (bfd *abfd)
219 bfd *abfd;
220 { 217 {
221 return core_command (abfd); 218 return core_command (abfd);
222 } 219 }
223 220
224 int 221 int
225 lynx_core_file_failing_signal (abfd) 222 lynx_core_file_failing_signal (bfd *abfd)
226 bfd *abfd;
227 { 223 {
228 return core_signal (abfd); 224 return core_signal (abfd);
229 } 225 }
230 226
231 #endif /* LYNX_CORE */ 227 #endif /* LYNX_CORE */
OLDNEW
« no previous file with comments | « bfd/linker.c ('k') | bfd/m68klinux.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698