This is the mail archive of the gdb-patches@sources.redhat.com 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]

[PATCH] mi-var-cmd.exp, mi0-var-cmd.exp: accommodate gcc v3


Here is a small patch about v3 function signatures in gdb.mi/mi-var-cmd.exp
and gdb.mi/mi0-var-cmd.exp.  Here's what gdb.log looks like right now:

  # gcc 3.0.4, -gstabs+
  -var-create func * func^M
  ^done,name="func",numchild="0",type="void (*)()"^M
  (gdb) ^M
  PASS: gdb.mi/mi-var-cmd.exp: create local variable func

  # gcc 3.0.4, -gdwarf-2
  -var-create func * func^M
  ^done,name="func",numchild="0",type="void (*)(void)"^M
  (gdb) ^M
  FAIL: gdb.mi/mi-var-cmd.exp: create local variable func

I just make the tests accept both forms.

I tested this with my usual testbed:

  target:   native
  host:     i686-pc-linux-gnu%rh-7.2
  gdb:      HEAD%20020302
  gcc:      2.95.3, vendor, 3.0.4, gcc-3_1-branch%20020302, HEAD%20020302
  glibc:    vendor
  goption:  -gdwarf-2, -gstabs+

I'm keen to fix this because it shows up as a regression versus gdb 5.1.1.
I believe this is an obvious fix, and I'm going to go ahead and apply it to
mainline.  In a few days I will also apply it to the 5.2 branch.

Michael C

===

2002-03-04  Michael Chastain  <mec@shout.net>

	* gdb.mi/mi-var-cmd.exp: In test "create local variable func",
	accommodate gcc v3 function signature.
	* gdb.mi/mi0-var-cmd-exp: Ditto.

% cd /berman/fsf/_today_/source/gdb/HEAD/gdb/testsuite/gdb.mi
% cvs -q diff -c
Index: mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.8
diff -c -r1.8 mi-var-cmd.exp
*** mi-var-cmd.exp	2001/11/11 20:11:03	1.8
--- mi-var-cmd.exp	2002/03/05 18:39:18
***************
*** 1,4 ****
! #   Copyright (C) 1999 2000 Cygnus Solutions
  #
  # This Program Is Free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
--- 1,4 ----
! #   Copyright (C) 1999, 2000, 2002 Cygnus Solutions
  #
  # This Program Is Free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
***************
*** 136,142 ****
  	"create local variable lpsimple"
  
  mi_gdb_test "-var-create func * func" \
! 	"\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"" \
  	"create local variable func"
  
  # Test: c_variable-1.5
--- 136,142 ----
  	"create local variable lpsimple"
  
  mi_gdb_test "-var-create func * func" \
! 	"\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"" \
  	"create local variable func"
  
  # Test: c_variable-1.5
Index: mi0-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi0-var-cmd.exp,v
retrieving revision 1.6
diff -c -r1.6 mi0-var-cmd.exp
*** mi0-var-cmd.exp	2001/11/11 20:11:03	1.6
--- mi0-var-cmd.exp	2002/03/05 18:39:19
***************
*** 1,4 ****
! #   Copyright (C) 1999 2000 Cygnus Solutions
  #
  # This Program Is Free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
--- 1,4 ----
! #   Copyright (C) 1999, 2000, 2002 Cygnus Solutions
  #
  # This Program Is Free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
***************
*** 136,142 ****
  	"create local variable lpsimple"
  
  mi_gdb_test "-var-create func * func" \
! 	"\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"" \
  	"create local variable func"
  
  # Test: c_variable-1.5
--- 136,142 ----
  	"create local variable lpsimple"
  
  mi_gdb_test "-var-create func * func" \
! 	"\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"" \
  	"create local variable func"
  
  # Test: c_variable-1.5


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