This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] adding gdb.pascal subdir: updated version


On Sat, Sep 08, 2007 at 12:38:47AM +0200, Pierre Muller wrote:
> +proc test_string_literal_types_accepted {} {
> +    global gdb_prompt
> +
> +    # Test various character values.
> +
> +    gdb_test "pt 'a simple string'" "type = string"
> +}

Pierre, is this the correct Pascal syntax for a string or not?

We have:

    case '\'':
      /* We either have a character constant ('0' or '\177' for example)
         or we have a quoted symbol reference ('foo(int,int)' in object pascal
         for example). */

and there is a separate case for double-quoted strings.

Resolving that question will take care of one failure for both fpc and
gpc.  The other two GPC failures should be handled like in the patch
I've attached.  The failure at "start" is a GDB bug, so we label that
a KFAIL ("known failure").  The shouldn't be committed with gdb/NNNN
still in it.  It should either have a bug number in our bug database,
or else just wait until the patch to fix it is checked in.

The other test is definitely a bug in GPC.  I read through the DWARF
dump and there is no reference to line 10, so GDB will never display
it.  So that's an XFAIL, an expected failure due to our environment.
It needs to get a little more complicated if the GPC bug is fixed
some day, using gdb_test_multiple.

-- 
Daniel Jacobowitz
CodeSourcery

diff -u gdb.pascal/hello.exp gdb.pascal/hello.exp
--- gdb.pascal/hello.exp	7 Sep 2007 21:46:31 -0000
+++ gdb.pascal/hello.exp	6 Oct 2007 15:39:32 -0000
@@ -50,6 +50,9 @@
 # This test fails for gpc
 # because debug information for 'main'
 # is in some <implicit code>
+if { $pascal_compiler_is_gpc } {
+    setup_kfail *-*-* gdb/NNNN
+}
 gdb_test "" \
          ".* at .*hello.pas.*" \
          "start"
@@ -64,6 +67,9 @@
 # This test also fails for gpc because the program
 # stops after the string has been written
 # while it should stop before writing it 
+if { $pascal_compiler_is_gpc } {
+    setup_xfail *-*-*
+}
 gdb_test "cont" \
 	 "Breakpoint .*:${bp_location2}.*" \
 	 "Going to second breakpoint"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]