Summary: | Wide-character support for Fortran is missing | ||
---|---|---|---|
Product: | gdb | Reporter: | Tobias Burnus <burnus> |
Component: | fortran | Assignee: | Tom Tromey <tromey> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gdb-prs, jan, tromey |
Priority: | P2 | ||
Version: | unknown | ||
Target Milestone: | 7.4 | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2011-06-28 18:05:36 |
Description
Tobias Burnus
2009-04-06 20:18:50 UTC
Testing a patch. CVSROOT: /cvs/src Module name: src Changes by: tromey@sourceware.org 2011-06-29 15:32:40 Modified files: gdb : ChangeLog c-lang.c dwarf2read.c f-lang.c f-typeprint.c f-valprint.c valprint.c valprint.h gdb/testsuite : ChangeLog Added files: gdb/testsuite/gdb.fortran: charset.exp charset.f90 Log message: gdb PR fortran/10036: * valprint.h (generic_emit_char, generic_printstr): Declare. * valprint.c (wchar_printable, append_string_as_wide) (print_wchar): Move from c-lang.c. (generic_emit_char): New function; mostly taken from c_emit_char. (generic_printstr): New function; mostly taken from c_printstr. * f-valprint.c (f_val_print) <TYPE_CODE_ARRAY>: Handle strings represented as arrays. <TYPE_CODE_CHAR>: Treat as TYPE_CODE_INT; recognize as character type. * f-typeprint.c (f_type_print_base) <TYPE_CODE_CHAR>: Treat identically to TYPE_CODE_INT. * f-lang.c (f_get_encoding): New function. (f_emit_char): Use generic_emit_char. (f_printchar): Replace comment. (f_printstr): Use generic_printstr. * dwarf2read.c (read_base_type) <DW_ATE_unsigned>: Handle Fortran "character" types specially. <DW_ATE_signed_char, DW_ATE_unsigned_char>: Make TYPE_CODE_CHAR for Fortran. * c-lang.c (wchar_printable, append_string_as_wide, print_wchar): Move to valprint.c (c_emit_char): Call generic_emit_char. (c_printstr): Call generic_printstr. gdb/testsuite * gdb.fortran/charset.exp: New file. * gdb.fortran/charset.f90: New file. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13123&r2=1.13124 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/c-lang.c.diff?cvsroot=src&r1=1.93&r2=1.94 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&r1=1.542&r2=1.543 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/f-lang.c.diff?cvsroot=src&r1=1.65&r2=1.66 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/f-typeprint.c.diff?cvsroot=src&r1=1.35&r2=1.36 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/f-valprint.c.diff?cvsroot=src&r1=1.66&r2=1.67 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valprint.c.diff?cvsroot=src&r1=1.111&r2=1.112 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valprint.h.diff?cvsroot=src&r1=1.36&r2=1.37 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2757&r2=1.2758 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.fortran/charset.exp.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.fortran/charset.f90.diff?cvsroot=src&r1=NONE&r2=1.1 Fix checked in. |