diff options
author | Pierre Muller <muller@ics.u-strasbg.fr> | 2015-04-21 22:10:08 +0200 |
---|---|---|
committer | Pierre Muller <muller@ics.u-strasbg.fr> | 2015-04-21 22:10:08 +0200 |
commit | 8aae434443df61440ff5228f5c8fe3e5d4a38798 (patch) | |
tree | 881bcf8df211db467af1d81f22a81d2dab0ff9ae /gdb/testsuite/lib/pascal.exp | |
parent | 819843c7029916120aa2929f80e0d7276177a7fb (diff) | |
download | gdb-8aae434443df61440ff5228f5c8fe3e5d4a38798.zip gdb-8aae434443df61440ff5228f5c8fe3e5d4a38798.tar.gz gdb-8aae434443df61440ff5228f5c8fe3e5d4a38798.tar.bz2 |
Fix pascal behavior for class fields with testcase
Problem reported as PR pascal/17815
Part 1/3: Remember the case pattern that allowed finding a field of this.
File gdb/p-exp.y modified
This is the fix in the pascal parser (p-exp.y),
to avoid the error that GDB does find normal variables
case insensitively, but not fields of this,
inside a class or object method.
Part 2/3: Add "class" option for pascal compiler
File gdb/testsuite/lib/pascal.exp
This part of the patch series is unchanged.
It adds class option to pascal compiler
which adds the required command line option to
accept pascal class types.
Part 3/3:
New file: gdb/testsuite/gdb.pascal/case-insensitive-symbols.exp
New file: gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas
Here is an updated version of this test, using Pedro's suggestions.
Test to check that PR 17815 is fixed.
Diffstat (limited to 'gdb/testsuite/lib/pascal.exp')
-rw-r--r-- | gdb/testsuite/lib/pascal.exp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp index da724f3..b6eb90c 100644 --- a/gdb/testsuite/lib/pascal.exp +++ b/gdb/testsuite/lib/pascal.exp @@ -93,6 +93,13 @@ proc gpc_compile {source destfile type options} { append add_flags " -g" } } + if { $i == "class" } { + if [board_info $dest exists pascal_class_flags] { + append add_flags " [board_info $dest pascal_class_flags]" + } else { + append add_flags " --extended-syntax" + } + } } set result [remote_exec host $gpc_compiler "-o $destfile --automake $add_flags $source"] @@ -124,6 +131,13 @@ proc fpc_compile {source destfile type options} { append add_flags " -g" } } + if { $i == "class" } { + if [board_info $dest exists pascal_class_flags] { + append add_flags " [board_info $dest pascal_class_flags]" + } else { + append add_flags " -Mobjfpc" + } + } } set result [remote_exec host $fpc_compiler "-o$destfile $add_flags $source"] |