OLD | NEW |
1 /* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it | 1 /* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it |
2 for now. */ | 2 for now. */ |
3 /* Basic, host-specific, and target-specific definitions for GDB. | 3 /* Basic, host-specific, and target-specific definitions for GDB. |
4 Copyright (C) 1986, 1988-2005, 2007-2012 Free Software Foundation, | 4 Copyright (C) 1986, 1988-2005, 2007-2012 Free Software Foundation, |
5 Inc. | 5 Inc. |
6 | 6 |
7 This file is part of GDB. | 7 This file is part of GDB. |
8 | 8 |
9 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
10 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
11 the Free Software Foundation; either version 3 of the License, or | 11 the Free Software Foundation; either version 3 of the License, or |
12 (at your option) any later version. | 12 (at your option) any later version. |
13 | 13 |
14 This program is distributed in the hope that it will be useful, | 14 This program is distributed in the hope that it will be useful, |
15 but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 GNU General Public License for more details. | 17 GNU General Public License for more details. |
18 | 18 |
19 You should have received a copy of the GNU General Public License | 19 You should have received a copy of the GNU General Public License |
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
21 | 21 |
22 #ifndef DEFS_H | 22 #ifndef DEFS_H |
23 #define DEFS_H | 23 #define DEFS_H |
24 | 24 |
25 #ifdef GDBSERVER | 25 #ifdef GDBSERVER |
26 # error gdbserver should not include gdb/defs.h | 26 # error gdbserver should not include gdb/defs.h |
27 #endif | 27 #endif |
28 | 28 |
29 #include "config.h" /* Generated by configure. */ | 29 #include "config.h" /* Generated by configure. */ |
| 30 #include "build-gnulib/config.h" |
30 | 31 |
31 #include <sys/types.h> | 32 #include <sys/types.h> |
32 #include <stdio.h> | 33 #include <stdio.h> |
33 #include <errno.h> /* System call error return status. */ | 34 #include <errno.h> /* System call error return status. */ |
34 #include <limits.h> | 35 #include <limits.h> |
35 #include <stdint.h> | 36 #include <stdint.h> |
36 | 37 |
37 /* The libdecnumber library, on which GDB depends, includes a header file | 38 /* The libdecnumber library, on which GDB depends, includes a header file |
38 called gstdint.h instead of relying directly on stdint.h. GDB, on the | 39 called gstdint.h instead of relying directly on stdint.h. GDB, on the |
39 other hand, includes stdint.h directly, relying on the fact that gnulib | 40 other hand, includes stdint.h directly, relying on the fact that gnulib |
(...skipping 20 matching lines...) Expand all Loading... |
60 | 61 |
61 /* First include ansidecl.h so we can use the various macro definitions | 62 /* First include ansidecl.h so we can use the various macro definitions |
62 here and in all subsequent file inclusions. */ | 63 here and in all subsequent file inclusions. */ |
63 | 64 |
64 #include "ansidecl.h" | 65 #include "ansidecl.h" |
65 | 66 |
66 #include "gdb_locale.h" | 67 #include "gdb_locale.h" |
67 | 68 |
68 #include "gdb_wchar.h" | 69 #include "gdb_wchar.h" |
69 | 70 |
70 /* For ``enum target_signal''. */ | 71 /* For ``enum gdb_signal''. */ |
71 #include "gdb/signals.h" | 72 #include "gdb/signals.h" |
72 | 73 |
73 /* Just in case they're not defined in stdio.h. */ | 74 /* Just in case they're not defined in stdio.h. */ |
74 | 75 |
75 #ifndef SEEK_SET | 76 #ifndef SEEK_SET |
76 #define SEEK_SET 0 | 77 #define SEEK_SET 0 |
77 #endif | 78 #endif |
78 #ifndef SEEK_CUR | 79 #ifndef SEEK_CUR |
79 #define SEEK_CUR 1 | 80 #define SEEK_CUR 1 |
80 #endif | 81 #endif |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 be forward declared to satisfy opaque references before their | 191 be forward declared to satisfy opaque references before their |
191 actual definition, needs to be here. */ | 192 actual definition, needs to be here. */ |
192 | 193 |
193 enum language | 194 enum language |
194 { | 195 { |
195 language_unknown, /* Language not known */ | 196 language_unknown, /* Language not known */ |
196 language_auto, /* Placeholder for automatic setting */ | 197 language_auto, /* Placeholder for automatic setting */ |
197 language_c, /* C */ | 198 language_c, /* C */ |
198 language_cplus, /* C++ */ | 199 language_cplus, /* C++ */ |
199 language_d, /* D */ | 200 language_d, /* D */ |
| 201 language_go, /* Go */ |
200 language_objc, /* Objective-C */ | 202 language_objc, /* Objective-C */ |
201 language_java, /* Java */ | 203 language_java, /* Java */ |
202 language_fortran, /* Fortran */ | 204 language_fortran, /* Fortran */ |
203 language_m2, /* Modula-2 */ | 205 language_m2, /* Modula-2 */ |
204 language_asm, /* Assembly language */ | 206 language_asm, /* Assembly language */ |
205 language_pascal, /* Pascal */ | 207 language_pascal, /* Pascal */ |
206 language_ada, /* Ada */ | 208 language_ada, /* Ada */ |
207 language_opencl, /* OpenCL */ | 209 language_opencl, /* OpenCL */ |
208 language_minimal, /* All other languages, minimal support only */ | 210 language_minimal, /* All other languages, minimal support only */ |
209 nr_languages | 211 nr_languages |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 this if the ABI doesn't explicitly guarantees this. */ | 246 this if the ABI doesn't explicitly guarantees this. */ |
245 RETURN_VALUE_ABI_RETURNS_ADDRESS, | 247 RETURN_VALUE_ABI_RETURNS_ADDRESS, |
246 /* Like the "struct return convention" above, but where the ABI | 248 /* Like the "struct return convention" above, but where the ABI |
247 guarantees that the address at which the value being returned is | 249 guarantees that the address at which the value being returned is |
248 stored will be available in a well-defined location, such as a | 250 stored will be available in a well-defined location, such as a |
249 register or memory slot in the stack frame. Don't use this if | 251 register or memory slot in the stack frame. Don't use this if |
250 the ABI doesn't explicitly guarantees this. */ | 252 the ABI doesn't explicitly guarantees this. */ |
251 RETURN_VALUE_ABI_PRESERVES_ADDRESS, | 253 RETURN_VALUE_ABI_PRESERVES_ADDRESS, |
252 }; | 254 }; |
253 | 255 |
254 /* the cleanup list records things that have to be undone | |
255 if an error happens (descriptors to be closed, memory to be freed, etc.) | |
256 Each link in the chain records a function to call and an | |
257 argument to give it. | |
258 | |
259 Use make_cleanup to add an element to the cleanup chain. | |
260 Use do_cleanups to do all cleanup actions back to a given | |
261 point in the chain. Use discard_cleanups to remove cleanups | |
262 from the chain back to a given point, not doing them. | |
263 | |
264 If the argument is pointer to allocated memory, then you need | |
265 to additionally set the 'free_arg' member to a function that will | |
266 free that memory. This function will be called both when the cleanup | |
267 is executed and when it's discarded. */ | |
268 | |
269 struct cleanup | |
270 { | |
271 struct cleanup *next; | |
272 void (*function) (void *); | |
273 void (*free_arg) (void *); | |
274 void *arg; | |
275 }; | |
276 | |
277 /* vec.h-style vectors of strings want a typedef for char * or const char *. */ | 256 /* vec.h-style vectors of strings want a typedef for char * or const char *. */ |
278 | 257 |
279 typedef char * char_ptr; | 258 typedef char * char_ptr; |
280 typedef const char * const_char_ptr; | 259 typedef const char * const_char_ptr; |
281 | 260 |
282 /* Needed for various prototypes */ | 261 /* Needed for various prototypes */ |
283 | 262 |
284 struct symtab; | 263 struct symtab; |
285 struct breakpoint; | 264 struct breakpoint; |
286 struct frame_info; | 265 struct frame_info; |
(...skipping 19 matching lines...) Expand all Loading... |
306 extern int streq (const char *, const char *); | 285 extern int streq (const char *, const char *); |
307 | 286 |
308 extern int subset_compare (char *, char *); | 287 extern int subset_compare (char *, char *); |
309 | 288 |
310 extern char *safe_strerror (int); | 289 extern char *safe_strerror (int); |
311 | 290 |
312 extern void set_display_time (int); | 291 extern void set_display_time (int); |
313 | 292 |
314 extern void set_display_space (int); | 293 extern void set_display_space (int); |
315 | 294 |
316 #define»ALL_CLEANUPS» ((struct cleanup *)0) | 295 /* Cleanup utilities. */ |
317 | 296 |
318 extern void do_cleanups (struct cleanup *); | 297 #include "cleanups.h" |
319 extern void do_final_cleanups (struct cleanup *); | |
320 | |
321 extern void discard_cleanups (struct cleanup *); | |
322 extern void discard_final_cleanups (struct cleanup *); | |
323 extern void discard_my_cleanups (struct cleanup **, struct cleanup *); | |
324 | |
325 /* NOTE: cagney/2000-03-04: This typedef is strictly for the | |
326 make_cleanup function declarations below. Do not use this typedef | |
327 as a cast when passing functions into the make_cleanup() code. | |
328 Instead either use a bounce function or add a wrapper function. | |
329 Calling a f(char*) function with f(void*) is non-portable. */ | |
330 typedef void (make_cleanup_ftype) (void *); | |
331 | |
332 extern struct cleanup *make_cleanup (make_cleanup_ftype *, void *); | |
333 | |
334 extern struct cleanup *make_cleanup_dtor (make_cleanup_ftype *, void *, | |
335 » » » » » void (*dtor) (void *)); | |
336 | 298 |
337 extern struct cleanup *make_cleanup_freeargv (char **); | 299 extern struct cleanup *make_cleanup_freeargv (char **); |
338 | 300 |
339 struct dyn_string; | 301 struct dyn_string; |
340 extern struct cleanup *make_cleanup_dyn_string_delete (struct dyn_string *); | 302 extern struct cleanup *make_cleanup_dyn_string_delete (struct dyn_string *); |
341 | 303 |
342 struct ui_file; | 304 struct ui_file; |
343 extern struct cleanup *make_cleanup_ui_file_delete (struct ui_file *); | 305 extern struct cleanup *make_cleanup_ui_file_delete (struct ui_file *); |
344 | 306 |
345 struct ui_out; | 307 struct ui_out; |
(...skipping 21 matching lines...) Expand all Loading... |
367 | 329 |
368 extern struct cleanup * | 330 extern struct cleanup * |
369 make_cleanup_restore_ui_file (struct ui_file **variable); | 331 make_cleanup_restore_ui_file (struct ui_file **variable); |
370 | 332 |
371 extern struct cleanup *make_cleanup_value_free_to_mark (struct value *); | 333 extern struct cleanup *make_cleanup_value_free_to_mark (struct value *); |
372 extern struct cleanup *make_cleanup_value_free (struct value *); | 334 extern struct cleanup *make_cleanup_value_free (struct value *); |
373 | 335 |
374 struct so_list; | 336 struct so_list; |
375 extern struct cleanup *make_cleanup_free_so (struct so_list *so); | 337 extern struct cleanup *make_cleanup_free_so (struct so_list *so); |
376 | 338 |
377 extern struct cleanup *make_final_cleanup (make_cleanup_ftype *, void *); | |
378 | |
379 extern struct cleanup *make_my_cleanup (struct cleanup **, | |
380 make_cleanup_ftype *, void *); | |
381 | |
382 extern struct cleanup *make_cleanup_htab_delete (htab_t htab); | 339 extern struct cleanup *make_cleanup_htab_delete (htab_t htab); |
383 | 340 |
384 extern struct cleanup *make_my_cleanup2 (struct cleanup **, | |
385 make_cleanup_ftype *, void *, | |
386 void (*free_arg) (void *)); | |
387 | |
388 extern struct cleanup *save_cleanups (void); | |
389 extern struct cleanup *save_final_cleanups (void); | |
390 extern struct cleanup *save_my_cleanups (struct cleanup **); | |
391 | |
392 extern void restore_cleanups (struct cleanup *); | |
393 extern void restore_final_cleanups (struct cleanup *); | |
394 extern void restore_my_cleanups (struct cleanup **, struct cleanup *); | |
395 | |
396 extern void free_current_contents (void *); | 341 extern void free_current_contents (void *); |
397 | 342 |
398 extern void null_cleanup (void *); | |
399 | |
400 extern struct cleanup *make_command_stats_cleanup (int); | 343 extern struct cleanup *make_command_stats_cleanup (int); |
401 | 344 |
402 extern int myread (int, char *, int); | 345 extern int myread (int, char *, int); |
403 | 346 |
404 extern int query (const char *, ...) ATTRIBUTE_PRINTF (1, 2); | 347 extern int query (const char *, ...) ATTRIBUTE_PRINTF (1, 2); |
405 extern int nquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2); | 348 extern int nquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2); |
406 extern int yquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2); | 349 extern int yquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2); |
407 | 350 |
408 extern void init_page_info (void); | 351 extern void init_page_info (void); |
409 | 352 |
(...skipping 19 matching lines...) Expand all Loading... |
429 /* A wrapper for bfd_errmsg to produce a more helpful error message | 372 /* A wrapper for bfd_errmsg to produce a more helpful error message |
430 in the case of bfd_error_file_ambiguously recognized. | 373 in the case of bfd_error_file_ambiguously recognized. |
431 MATCHING, if non-NULL, is the corresponding argument to | 374 MATCHING, if non-NULL, is the corresponding argument to |
432 bfd_check_format_matches, and will be freed. */ | 375 bfd_check_format_matches, and will be freed. */ |
433 | 376 |
434 extern const char *gdb_bfd_errmsg (bfd_error_type error_tag, char **matching); | 377 extern const char *gdb_bfd_errmsg (bfd_error_type error_tag, char **matching); |
435 | 378 |
436 extern int parse_pid_to_attach (char *args); | 379 extern int parse_pid_to_attach (char *args); |
437 | 380 |
438 extern struct cleanup *make_bpstat_clear_actions_cleanup (void); | 381 extern struct cleanup *make_bpstat_clear_actions_cleanup (void); |
error: old chunk mismatch |
None
OLD | NEW |