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]

Re: [PATCH] Fix for PR exp/1821


On Mon, Dec 06, 2004 at 09:33:48AM +0530, Ramana Radhakrishnan wrote:
> Hi Daniel,
> 
> >
> > Yes, this is OK, with a couple of formatting corrections (see below).
> > Do you think you could add a testcase for this problem?
> 
> 
> Corrected the formatting errors and added a testcase for this.
> gdb.base/gdb1821.c / gdb1821.exp .
> 
> Ok to commit ?

Sorry about the slow review.  There are still a number of problems.

--- /dev/null	2003-09-15 19:10:47.000000000 +0530
+++ testsuite/gdb.base/gdb1821.exp	2004-12-06 09:07:46.925182104 +0530
@@ -0,0 +1,49 @@
+# Copyright 2003 Free Software Foundation, Inc.

Copyright year is wrong.

+if $tracelevel then {
+        strace $tracelevel
+        }
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0

These can be deleted.

+set testfile "gdb1821"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}

Please don't use gdb_suppress_entire_file.  Just use "return -1" here.

+if ![runto main] then {

Use runto_main, not runto main.

--- /dev/null	2003-09-15 19:10:47.000000000 +0530
+++ testsuite/gdb.base/gdb1821.c	2004-12-06 09:08:45.644255448 +0530
@@ -0,0 +1,25 @@
+/* Test printing of structure member names in gdb. PR exp/1821
+
+   Copyright 2004, Free Software Foundation, Inc.

Copyright year needs to be 2005 now.  My fault...

--- cp-valprint.c.~1.27.~	2004-12-06 02:26:31.000000000 +0530
+++ cp-valprint.c	2004-12-06 08:39:29.487231896 +0530
@@ -35,6 +35,7 @@
 #include "target.h"
 #include "cp-abi.h"
 #include "valprint.h"
+#include "language.h"
 
 int vtblprint;			/* Controls printing of vtbl's */
 int objectprint;		/* Controls looking up an object's derived type

You added an include, so you need to update Makefile.in.

The patch itself still looks fine, so if you could just revise the
dependencies and testcase and repost, I'll try to be prompt.  Do you
have write access?

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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