Rev 5217 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5217 | Rev 6324 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* stabs.c -- Parse COFF debugging information |
1 | /* stabs.c -- Parse COFF debugging information |
2 | Copyright 1996, 1999, 2000, 2002, 2003, 2005, 2007 |
- | |
3 | Free Software Foundation, Inc. |
2 | Copyright (C) 1996-2015 Free Software Foundation, Inc. |
4 | Written by Ian Lance Taylor |
3 | Written by Ian Lance Taylor |
Line 5... | Line 4... | ||
5 | 4 | ||
Line 6... | Line 5... | ||
6 | This file is part of GNU Binutils. |
5 | This file is part of GNU Binutils. |
Line 82... | Line 81... | ||
82 | struct coff_slots *slots; |
81 | struct coff_slots *slots; |
83 | /* Basic types. */ |
82 | /* Basic types. */ |
84 | debug_type basic[T_MAX + 1]; |
83 | debug_type basic[T_MAX + 1]; |
85 | }; |
84 | }; |
Line 86... | Line 85... | ||
86 | 85 | ||
87 | static debug_type *coff_get_slot (struct coff_types *, int); |
86 | static debug_type *coff_get_slot (struct coff_types *, long); |
88 | static debug_type parse_coff_type |
87 | static debug_type parse_coff_type |
89 | (bfd *, struct coff_symbols *, struct coff_types *, long, int, |
88 | (bfd *, struct coff_symbols *, struct coff_types *, long, int, |
90 | union internal_auxent *, bfd_boolean, void *); |
89 | union internal_auxent *, bfd_boolean, void *); |
91 | static debug_type parse_coff_base_type |
90 | static debug_type parse_coff_base_type |
Line 103... | Line 102... | ||
103 | static bfd_boolean external_coff_symbol_p (int sym_class); |
102 | static bfd_boolean external_coff_symbol_p (int sym_class); |
104 | 103 | ||
105 | /* Return the slot for a type. */ |
104 | /* Return the slot for a type. */ |
Line 106... | Line 105... | ||
106 | 105 | ||
107 | static debug_type * |
106 | static debug_type * |
108 | coff_get_slot (struct coff_types *types, int indx) |
107 | coff_get_slot (struct coff_types *types, long indx) |
109 | { |
108 | { |
Line 110... | Line 109... | ||
110 | struct coff_slots **pps; |
109 | struct coff_slots **pps; |
Line -... | Line 110... | ||
- | 110 | ||
- | 111 | pps = &types->slots; |
|
- | 112 | ||
- | 113 | /* PR 17512: file: 078-18333-0.001:0.1. |
|
- | 114 | FIXME: The value of 1000 is a guess. Maybe a better heuristic is needed. */ |
|
111 | 115 | if (indx / COFF_SLOTS > 1000) |
|
112 | pps = &types->slots; |
116 | fatal (_("Excessively large slot index: %lx"), indx); |
113 | 117 | ||
114 | while (indx >= COFF_SLOTS) |
118 | while (indx >= COFF_SLOTS) |
115 | { |
119 | { |