OLD | NEW |
1 /* C language support routines for GDB, the GNU debugger. | 1 /* C language support routines for GDB, the GNU debugger. |
2 | 2 |
3 Copyright (C) 1992-1996, 1998-2000, 2002-2005, 2007-2012 Free | 3 Copyright (C) 1992-1996, 1998-2000, 2002-2005, 2007-2012 Free |
4 Software Foundation, Inc. | 4 Software Foundation, Inc. |
5 | 5 |
6 This file is part of GDB. | 6 This file is part of GDB. |
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 { | 80 { |
81 enum c_string_type result; | 81 enum c_string_type result; |
82 | 82 |
83 /* We loop because ELTTYPE may be a typedef, and we want to | 83 /* We loop because ELTTYPE may be a typedef, and we want to |
84 successively peel each typedef until we reach a type we | 84 successively peel each typedef until we reach a type we |
85 understand. We don't use CHECK_TYPEDEF because that will strip | 85 understand. We don't use CHECK_TYPEDEF because that will strip |
86 all typedefs at once -- but in C, wchar_t is itself a typedef, so | 86 all typedefs at once -- but in C, wchar_t is itself a typedef, so |
87 that would do the wrong thing. */ | 87 that would do the wrong thing. */ |
88 while (elttype) | 88 while (elttype) |
89 { | 89 { |
90 char *name = TYPE_NAME (elttype); | 90 const char *name = TYPE_NAME (elttype); |
91 | 91 |
92 if (TYPE_CODE (elttype) == TYPE_CODE_CHAR || !name) | 92 if (TYPE_CODE (elttype) == TYPE_CODE_CHAR || !name) |
93 { | 93 { |
94 result = C_CHAR; | 94 result = C_CHAR; |
95 goto done; | 95 goto done; |
96 } | 96 } |
97 | 97 |
98 if (!strcmp (name, "wchar_t")) | 98 if (!strcmp (name, "wchar_t")) |
99 { | 99 { |
100 result = C_WIDE_CHAR; | 100 result = C_WIDE_CHAR; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 { | 195 { |
196 enum c_string_type str_type; | 196 enum c_string_type str_type; |
197 const char *type_encoding; | 197 const char *type_encoding; |
198 const char *encoding; | 198 const char *encoding; |
199 | 199 |
200 enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); | 200 enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); |
201 unsigned int i; | 201 unsigned int i; |
202 unsigned int things_printed = 0; | 202 unsigned int things_printed = 0; |
203 int in_quotes = 0; | 203 int in_quotes = 0; |
204 int need_comma = 0; | 204 int need_comma = 0; |
205 int width = TYPE_LENGTH (type); | |
206 struct obstack wchar_buf, output; | 205 struct obstack wchar_buf, output; |
207 struct cleanup *cleanup; | 206 struct cleanup *cleanup; |
208 struct wchar_iterator *iter; | 207 struct wchar_iterator *iter; |
209 int finished = 0; | 208 int finished = 0; |
210 int need_escape = 0; | 209 int need_escape = 0; |
211 | 210 |
212 str_type = (classify_type (type, get_type_arch (type), &type_encoding) | 211 str_type = (classify_type (type, get_type_arch (type), &type_encoding) |
213 & ~C_CHAR); | 212 & ~C_CHAR); |
214 switch (str_type) | 213 switch (str_type) |
215 { | 214 { |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 range_check_off, | 836 range_check_off, |
838 type_check_off, | 837 type_check_off, |
839 case_sensitive_on, | 838 case_sensitive_on, |
840 array_row_major, | 839 array_row_major, |
841 macro_expansion_c, | 840 macro_expansion_c, |
842 &exp_descriptor_c, | 841 &exp_descriptor_c, |
843 c_parse, | 842 c_parse, |
844 c_error, | 843 c_error, |
845 null_post_parser, | 844 null_post_parser, |
846 c_printchar, /* Print a character constant */ | 845 c_printchar, /* Print a character constant */ |
error: old chunk mismatch |
None
OLD | NEW |