Handle multi-byte bracket sequences in Ada lexer
As noted in an earlier patch, the Ada lexer does not handle multi-byte bracket sequences. This patch adds support for these for character literals. gdb does not generally seem to handle the Ada wide string types, so for the time being these continue to be excluded -- but an explicit error is added to make this more clear.
This commit is contained in:
parent
a7041de85a
commit
c9f66f0005
6 changed files with 52 additions and 21 deletions
|
@ -277,7 +277,11 @@ ada_emit_char (int c, struct type *type, struct ui_file *stream,
|
|||
fprintf_filtered (stream, "%c", c);
|
||||
}
|
||||
else
|
||||
fprintf_filtered (stream, "[\"%0*x\"]", type_len * 2, c);
|
||||
{
|
||||
/* Follow GNAT's lead here and only use 6 digits for
|
||||
wide_wide_character. */
|
||||
fprintf_filtered (stream, "[\"%0*x\"]", std::min (6, type_len * 2), c);
|
||||
}
|
||||
}
|
||||
|
||||
/* Character #I of STRING, given that TYPE_LEN is the size in bytes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue