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

Side by Side Diff: gdb/ada-lang.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 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 | « gdb/ada-lang.h ('k') | gdb/ada-lex.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
None
OLDNEW
1 /* Ada language support routines for GDB, the GNU debugger. 1 /* Ada language support routines for GDB, the GNU debugger.
2 2
3 Copyright (C) 1992-1994, 1997-2000, 2003-2005, 2007-2012 Free 3 Copyright (C) 1992-2013 Free Software Foundation, Inc.
4 Software Foundation, Inc.
5 4
6 This file is part of GDB. 5 This file is part of GDB.
7 6
8 This program is free software; you can redistribute it and/or modify 7 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 8 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 9 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version. 10 (at your option) any later version.
12 11
13 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details. 15 GNU General Public License for more details.
17 16
18 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 19
21 20
22 #include "defs.h" 21 #include "defs.h"
23 #include <stdio.h> 22 #include <stdio.h>
24 #include "gdb_string.h" 23 #include <string.h>
25 #include <ctype.h> 24 #include <ctype.h>
26 #include <stdarg.h> 25 #include <stdarg.h>
27 #include "demangle.h" 26 #include "demangle.h"
28 #include "gdb_regex.h" 27 #include "gdb_regex.h"
29 #include "frame.h" 28 #include "frame.h"
30 #include "symtab.h" 29 #include "symtab.h"
31 #include "gdbtypes.h" 30 #include "gdbtypes.h"
32 #include "gdbcmd.h" 31 #include "gdbcmd.h"
33 #include "expression.h" 32 #include "expression.h"
34 #include "parser-defs.h" 33 #include "parser-defs.h"
35 #include "language.h" 34 #include "language.h"
35 #include "varobj.h"
36 #include "c-lang.h" 36 #include "c-lang.h"
37 #include "inferior.h" 37 #include "inferior.h"
38 #include "symfile.h" 38 #include "symfile.h"
39 #include "objfiles.h" 39 #include "objfiles.h"
40 #include "breakpoint.h" 40 #include "breakpoint.h"
41 #include "gdbcore.h" 41 #include "gdbcore.h"
42 #include "hashtab.h" 42 #include "hashtab.h"
43 #include "gdb_obstack.h" 43 #include "gdb_obstack.h"
44 #include "ada-lang.h" 44 #include "ada-lang.h"
45 #include "completer.h" 45 #include "completer.h"
46 #include "gdb_stat.h" 46 #include <sys/stat.h>
47 #ifdef UI_OUT 47 #ifdef UI_OUT
48 #include "ui-out.h" 48 #include "ui-out.h"
49 #endif 49 #endif
50 #include "block.h" 50 #include "block.h"
51 #include "infcall.h" 51 #include "infcall.h"
52 #include "dictionary.h" 52 #include "dictionary.h"
53 #include "exceptions.h" 53 #include "exceptions.h"
54 #include "annotate.h" 54 #include "annotate.h"
55 #include "valprint.h" 55 #include "valprint.h"
56 #include "source.h" 56 #include "source.h"
57 #include "observer.h" 57 #include "observer.h"
58 #include "vec.h" 58 #include "vec.h"
59 #include "stack.h" 59 #include "stack.h"
60 #include "gdb_vecs.h" 60 #include "gdb_vecs.h"
61 #include "typeprint.h"
61 62
62 #include "psymtab.h" 63 #include "psymtab.h"
63 #include "value.h" 64 #include "value.h"
64 #include "mi/mi-common.h" 65 #include "mi/mi-common.h"
65 #include "arch-utils.h" 66 #include "arch-utils.h"
66 #include "exceptions.h" 67 #include "exceptions.h"
67 #include "cli/cli-utils.h" 68 #include "cli/cli-utils.h"
68 69
69 /* Define whether or not the C operator '/' truncates towards zero for 70 /* Define whether or not the C operator '/' truncates towards zero for
70 differently signed operands (truncation direction is undefined in C). 71 differently signed operands (truncation direction is undefined in C).
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 struct block *); 121 struct block *);
121 122
122 static int num_defns_collected (struct obstack *); 123 static int num_defns_collected (struct obstack *);
123 124
124 static struct ada_symbol_info *defns_collected (struct obstack *, int); 125 static struct ada_symbol_info *defns_collected (struct obstack *, int);
125 126
126 static struct value *resolve_subexp (struct expression **, int *, int, 127 static struct value *resolve_subexp (struct expression **, int *, int,
127 struct type *); 128 struct type *);
128 129
129 static void replace_operator_with_call (struct expression **, int, int, int, 130 static void replace_operator_with_call (struct expression **, int, int, int,
130 struct symbol *, struct block *); 131 struct symbol *, const struct block *);
131 132
132 static int possible_user_operator_p (enum exp_opcode, struct value **); 133 static int possible_user_operator_p (enum exp_opcode, struct value **);
133 134
134 static char *ada_op_name (enum exp_opcode); 135 static char *ada_op_name (enum exp_opcode);
135 136
136 static const char *ada_decoded_op_name (enum exp_opcode); 137 static const char *ada_decoded_op_name (enum exp_opcode);
137 138
138 static int numeric_type_p (struct type *); 139 static int numeric_type_p (struct type *);
139 140
140 static int integer_type_p (struct type *); 141 static int integer_type_p (struct type *);
141 142
142 static int scalar_type_p (struct type *); 143 static int scalar_type_p (struct type *);
143 144
144 static int discrete_type_p (struct type *); 145 static int discrete_type_p (struct type *);
145 146
146 static enum ada_renaming_category parse_old_style_renaming (struct type *, 147 static enum ada_renaming_category parse_old_style_renaming (struct type *,
147 const char **, 148 const char **,
148 int *, 149 int *,
149 const char **); 150 const char **);
150 151
151 static struct symbol *find_old_style_renaming_symbol (const char *, 152 static struct symbol *find_old_style_renaming_symbol (const char *,
152 » » » » » » struct block *); 153 » » » » » » const struct block *);
153 154
154 static struct type *ada_lookup_struct_elt_type (struct type *, char *, 155 static struct type *ada_lookup_struct_elt_type (struct type *, char *,
155 int, int, int *); 156 int, int, int *);
156 157
157 static struct value *evaluate_subexp_type (struct expression *, int *); 158 static struct value *evaluate_subexp_type (struct expression *, int *);
158 159
159 static struct type *ada_find_parallel_type_with_name (struct type *, 160 static struct type *ada_find_parallel_type_with_name (struct type *,
160 const char *); 161 const char *);
161 162
162 static int is_dynamic_field (struct type *, int); 163 static int is_dynamic_field (struct type *, int);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 572
572 if (value_lazy (val) 573 if (value_lazy (val)
573 || TYPE_LENGTH (type) > TYPE_LENGTH (value_type (val))) 574 || TYPE_LENGTH (type) > TYPE_LENGTH (value_type (val)))
574 result = allocate_value_lazy (type); 575 result = allocate_value_lazy (type);
575 else 576 else
576 { 577 {
577 result = allocate_value (type); 578 result = allocate_value (type);
578 memcpy (value_contents_raw (result), value_contents (val), 579 memcpy (value_contents_raw (result), value_contents (val),
579 TYPE_LENGTH (type)); 580 TYPE_LENGTH (type));
580 } 581 }

error: old chunk mismatch

OLDNEW
« no previous file with comments | « gdb/ada-lang.h ('k') | gdb/ada-lex.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698