forked from Imagelibrary/binutils-gdb
D language support.
gdb/ChangeLog:
D language support.
* Makefile.in (SFILES): Add d-lang.c d-valprint.c.
(COMMON_OBS): Add d-lang.o d-valprint.o.
(HFILES_NO_SRCDIR): Add d-lang.h.
* NEWS: Mention D language support.
* c-lang.c (c_emit_char, exp_descriptor_c): Make public.
* c-lang.h (c_emit_char, exp_descriptor_c): Add declaration.
* d-lang.c: New file.
* d-lang.h: New file.
* d-valprint.c: New file.
* defs.h (enum language): Add language_d.
* dwarf2read.c (set_cu_language): Add DW_LANG_D.
* language.c (binop_result_type, integral_type, character_type)
(string_type, boolean_type, structured_type): Add language_d.
* symfile.c (init_filename_language_table): Add language_d.
* symtab.c: Include d-lang.h.
(symbol_init_language_specific, symbol_find_demangled_name)
(symbol_natural_name, lookup_symbol_in_language)
(symbol_demangled_name, symbol_matches_domain): Add language_d.
gdb/doc/ChangeLog:
* gdb.texinfo: (Summary) Add mention about D language support.
(Filenames): Add D suffixes.
(D): New node.
gdb/testsuite/ChangeLog:
* gdb.base/default.exp: Fix "set language" test.
This commit is contained in:
@@ -486,6 +486,7 @@ binop_result_type (struct value *v1, struct value *v2)
|
||||
{
|
||||
case language_c:
|
||||
case language_cplus:
|
||||
case language_d:
|
||||
case language_objc:
|
||||
if (TYPE_CODE (t1) == TYPE_CODE_FLT)
|
||||
return TYPE_CODE (t2) == TYPE_CODE_FLT && l2 > l1 ?
|
||||
@@ -597,6 +598,7 @@ integral_type (struct type *type)
|
||||
{
|
||||
case language_c:
|
||||
case language_cplus:
|
||||
case language_d:
|
||||
case language_objc:
|
||||
return (TYPE_CODE (type) != TYPE_CODE_INT) &&
|
||||
(TYPE_CODE (type) != TYPE_CODE_ENUM) ? 0 : 1;
|
||||
@@ -637,6 +639,7 @@ character_type (struct type *type)
|
||||
|
||||
case language_c:
|
||||
case language_cplus:
|
||||
case language_d:
|
||||
case language_objc:
|
||||
return (TYPE_CODE (type) == TYPE_CODE_INT) &&
|
||||
TYPE_LENGTH (type) == sizeof (char)
|
||||
@@ -659,6 +662,7 @@ string_type (struct type *type)
|
||||
|
||||
case language_c:
|
||||
case language_cplus:
|
||||
case language_d:
|
||||
case language_objc:
|
||||
/* C does not have distinct string type. */
|
||||
return (0);
|
||||
@@ -678,6 +682,7 @@ boolean_type (struct type *type)
|
||||
{
|
||||
case language_c:
|
||||
case language_cplus:
|
||||
case language_d:
|
||||
case language_objc:
|
||||
/* Might be more cleanly handled by having a
|
||||
TYPE_CODE_INT_NOT_BOOL for (the deleted) CHILL and such
|
||||
@@ -717,6 +722,7 @@ structured_type (struct type *type)
|
||||
{
|
||||
case language_c:
|
||||
case language_cplus:
|
||||
case language_d:
|
||||
case language_objc:
|
||||
return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
|
||||
(TYPE_CODE (type) == TYPE_CODE_UNION) ||
|
||||
|
||||
Reference in New Issue
Block a user