OLD | NEW |
1 /* Pascal language support routines for GDB, the GNU debugger. | 1 /* Pascal language support routines for GDB, the GNU debugger. |
2 | 2 |
3 Copyright (C) 2000, 2002-2005, 2007-2012 Free Software Foundation, | 3 Copyright (C) 2000, 2002-2005, 2007-2012 Free Software Foundation, |
4 Inc. | 4 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 to get the length and the data of the string | 92 to get the length and the data of the string |
93 length_pos, length_size and string_pos are given in bytes. | 93 length_pos, length_size and string_pos are given in bytes. |
94 char_size gives the element size in bytes. | 94 char_size gives the element size in bytes. |
95 FIXME: if the position or the size of these fields | 95 FIXME: if the position or the size of these fields |
96 are not multiple of TARGET_CHAR_BIT then the results are wrong | 96 are not multiple of TARGET_CHAR_BIT then the results are wrong |
97 but this does not happen for Free Pascal nor for GPC. */ | 97 but this does not happen for Free Pascal nor for GPC. */ |
98 int | 98 int |
99 is_pascal_string_type (struct type *type,int *length_pos, | 99 is_pascal_string_type (struct type *type,int *length_pos, |
100 int *length_size, int *string_pos, | 100 int *length_size, int *string_pos, |
101 struct type **char_type, | 101 struct type **char_type, |
102 » » char **arrayname) | 102 » » const char **arrayname) |
103 { | 103 { |
104 if (type != NULL && TYPE_CODE (type) == TYPE_CODE_STRUCT) | 104 if (type != NULL && TYPE_CODE (type) == TYPE_CODE_STRUCT) |
105 { | 105 { |
106 /* Old Borland type pascal strings from Free Pascal Compiler. */ | 106 /* Old Borland type pascal strings from Free Pascal Compiler. */ |
107 /* Two fields: length and st. */ | 107 /* Two fields: length and st. */ |
108 if (TYPE_NFIELDS (type) == 2 | 108 if (TYPE_NFIELDS (type) == 2 |
109 && TYPE_FIELD_NAME (type, 0) | 109 && TYPE_FIELD_NAME (type, 0) |
110 && strcmp (TYPE_FIELD_NAME (type, 0), "length") == 0 | 110 && strcmp (TYPE_FIELD_NAME (type, 0), "length") == 0 |
111 && TYPE_FIELD_NAME (type, 1) | 111 && TYPE_FIELD_NAME (type, 1) |
112 && strcmp (TYPE_FIELD_NAME (type, 1), "st") == 0) | 112 && strcmp (TYPE_FIELD_NAME (type, 1), "st") == 0) |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 type_check_on, | 434 type_check_on, |
435 case_sensitive_on, | 435 case_sensitive_on, |
436 array_row_major, | 436 array_row_major, |
437 macro_expansion_no, | 437 macro_expansion_no, |
438 &exp_descriptor_standard, | 438 &exp_descriptor_standard, |
439 pascal_parse, | 439 pascal_parse, |
440 pascal_error, | 440 pascal_error, |
441 null_post_parser, | 441 null_post_parser, |
442 pascal_printchar, /* Print a character constant */ | 442 pascal_printchar, /* Print a character constant */ |
443 pascal_printstr, /* Function to print string constant */ | 443 pascal_printstr, /* Function to print string constant */ |
error: old chunk mismatch |
None
OLD | NEW |