This is the mail archive of the gdb@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]

The proper way to handle GDB PR


Hello maintainers,

I took up some fortran related PRs recently, but encountered some problem 
while handling them.  Anyone could help me out?  TIA.

1. My replies to gdb-prs@sources.redhat.com are all returned back by one 
of our internal mailer daemon.  It said that gdb-prs is an unknown user in 
sources.redhat.com domain.  But I can rereive mails from the same users. 

When handling PRs, could I reply to gdb-prs directly?  If not, how could 
the correspondence between the owner and the submitter be recorded by PR 
system?

2. I see from the web that there is a repository of gdb-prs archive.  But
there is only one message.  What is it supposed to do?  Will all the 
PR-related comments step into this archive? 

3. I see from the PR system that I can edit the PR, or add notes or send 
email to interested parties.  But IMHO all of them are not the most proper 
way to handle user bug report.  Why not consider using bugzilla (or others)
to replace it?  Just my two cents anyway.

Regards
- Wu Zhou



---------- Forwarded message ----------
Date: Mon, 27 Jun 2005 19:17:24 +1000
From: Mail Delivery Subsystem <MAILER-DAEMON@au.ibm.com>
To: woodzltc@cn.ibm.com
Subject: Returned mail: see transcript for details

The original message was received at Mon, 27 Jun 2005 19:17:11 +1000
from d23rh904.au.ibm.com [202.81.18.202]

   ----- The following addresses had permanent fatal errors -----
<gdb-prs@sources.redhat.com>
    (reason: 550 mail to gdb-prs@sources.redhat.com not accepted here)

   ----- Transcript of session follows -----
... while talking to sources.redhat.com.:
>>> DATA
<<< 550 mail to gdb-prs@sources.redhat.com not accepted here
550 5.1.1 <gdb-prs@sources.redhat.com>... User unknown
<<< 503 RCPT first

   ----- Original message follows -----

Return-Path: <woodzltc@cn.ibm.com>
Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202])
	by ausmtp02.au.ibm.com (8.12.10/8.12.10) with ESMTP id j5R9H9hV238694
	for <gdb-prs@sources.redhat.com>; Mon, 27 Jun 2005 19:17:11 +1000
Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.250.244])
	by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j5R9OXLk059160
	for <gdb-prs@sources.redhat.com>; Mon, 27 Jun 2005 19:24:34 +1000
Received: from d23av03.au.ibm.com (loopback [127.0.0.1])
	by d23av03.au.ibm.com (8.12.11/8.13.3) with ESMTP id j5R9LdJ9014402
	for <gdb-prs@sources.redhat.com>; Mon, 27 Jun 2005 19:21:39 +1000
Received: from wks190384wss.cn.ibm.com (wks190384wss.cn.ibm.com [9.181.134.93])
	by d23av03.au.ibm.com (8.12.11/8.12.11) with ESMTP id j5R9Labv014365;
	Mon, 27 Jun 2005 19:21:37 +1000
Date: Mon, 27 Jun 2005 16:57:28 +0800 (CST)
From: Wu Zhou <woodzltc@cn.ibm.com>
To: Fred Krogh <fkrogh@mathalacarte.com>
cc: gdb-prs@sources.redhat.com
Subject: Re: fortran/1880: display of part of an array
In-Reply-To: <20050627043800.2118.qmail@sourceware.org>
Message-ID: <Pine.LNX.4.63.0506271650330.30098@wks190384wss.cn.ibm.com>
References: <20050627043800.2118.qmail@sourceware.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi Fred,

There is no sub-array operator in Fortran 77 standard.  So current GDB 
don't support evaluating it.  However I ever tried to code a patch to 
evaluate part of one-dimension array.  This works ok for array in global
namespace and also for local arrays in subroutine, but doesn't work for 
these arrays which is passed as pointer to the subroutine. The reason 
is that current GDB has no way to know how large the target array is. 
Maybe things will change in future.  Would you please try this patch 
against the latest GDB cvs tree?  Thanks.

Index: f-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/f-exp.y,v
retrieving revision 1.16
diff -c -p -r1.16 f-exp.y
*** f-exp.y	12 Dec 2004 21:48:55 -0000	1.16
--- f-exp.y	27 Jun 2005 09:18:05 -0000
***************
*** 1,6 ****
  /* YACC parser for Fortran expressions, for GDB.
!    Copyright 1986, 1989, 1990, 1991, 1993, 1994, 1995, 1996, 2000, 2001
!    Free Software Foundation, Inc.
  
     Contributed by Motorola.  Adapted from the C parser by Farooq Butt
     (fmbutt@engage.sps.mot.com).
--- 1,6 ----
  /* YACC parser for Fortran expressions, for GDB.
!    Copyright 1986, 1989, 1990, 1991, 1993, 1994, 1995, 1996, 2000, 2001,
!    2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  
     Contributed by Motorola.  Adapted from the C parser by Farooq Butt
     (fmbutt@engage.sps.mot.com).
*************** static int parse_number (char *, int, in
*** 217,222 ****
--- 217,223 ----
  %left '@'
  %left '+' '-'
  %left '*' '/' '%'
+ %right STARSTAR
  %right UNARY 
  %right '('
  
*************** arglist	:	exp
*** 282,299 ****
  			{ arglist_len = 1; }
  	;
  
! arglist :      substring
!                         { arglist_len = 2;}
! 	;
!    
! arglist	:	arglist ',' exp   %prec ABOVE_COMMA
! 			{ arglist_len++; }
  	;
  
! substring:	exp ':' exp   %prec ABOVE_COMMA
! 			{ } 
  	;
  
  
  complexnum:     exp ',' exp 
                  	{ }                          
--- 283,304 ----
  			{ arglist_len = 1; }
  	;
  
! arglist	:	subrange
! 			{ arglist_len = 2; }
  	;
  
! subrange:	exp ':' exp   %prec ABOVE_COMMA
! 		/*	{ write_exp_elt_opcode (BINOP_RANGE); }*/
! 			{ }
  	;
  
+ /*subrange:	subrange ',' exp ':' exp   %prec ABOVE_COMMA
+ 			{ }
+ 	;
+ */
+ arglist	:	arglist ',' exp   %prec ABOVE_COMMA
+ 			{ arglist_len++; }
+ 	;
  
  complexnum:     exp ',' exp 
                  	{ }                          
*************** exp	:	exp '@' exp
*** 315,320 ****
--- 320,329 ----
  			{ write_exp_elt_opcode (BINOP_REPEAT); }
  	;
  
+ exp	:	exp STARSTAR exp
+ 			{ write_exp_elt_opcode (BINOP_EXP); }
+ 	;
+ 
  exp	:	exp '*' exp
  			{ write_exp_elt_opcode (BINOP_MUL); }
  	;
*************** yylex ()
*** 941,947 ****
  	}
      }
    
!   /* See if it is a special .foo. operator */
    
    for (i = 0; dot_ops[i].operator != NULL; i++)
      if (strncmp (tokstart, dot_ops[i].operator, strlen (dot_ops[i].operator)) == 0)
--- 950,956 ----
  	}
      }
    
!   /* See if it is a special .foo. operator.  */
    
    for (i = 0; dot_ops[i].operator != NULL; i++)
      if (strncmp (tokstart, dot_ops[i].operator, strlen (dot_ops[i].operator)) == 0)
*************** yylex ()
*** 951,956 ****
--- 960,974 ----
  	return dot_ops[i].token;
        }
    
+   /* See if it is an exponentiation operator.  */
+ 
+   if (strncmp (tokstart, "**", 2) == 0)
+     {
+       lexptr += 2;
+       yylval.opcode = BINOP_EXP;
+       return STARSTAR;
+     }
+ 
    switch (c = *tokstart)
      {
      case 0:
Index: eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.56
diff -c -p -r1.56 eval.c
*** eval.c	13 Jun 2005 07:23:15 -0000	1.56
--- eval.c	27 Jun 2005 09:18:06 -0000
*************** evaluate_subexp_standard (struct type *e
*** 1510,1515 ****
--- 1510,1516 ----
        else
  	return value_sub (arg1, arg2);
  
+     case BINOP_EXP:
      case BINOP_MUL:
      case BINOP_DIV:
      case BINOP_REM:
*************** evaluate_subexp_standard (struct type *e
*** 1641,1646 ****
--- 1642,1654 ----
  	tmp_type = check_typedef (value_type (arg1));
  	ndimensions = calc_f77_array_dims (type);
  
+ 	/* From 3.2.3 on (maybe early), g77 will treat string variable as an
+ 	   array.  So the type code of a substring wil be TYPE_CODE_ARRAY 
+ 	   instead.  This conditional statement is added to determine if it 
+ 	   is a substring or sub-array indeed.  */
+ 	if (nargs == 2 * ndimensions)
+ 	  goto op_f77_substr;
+ 
  	if (nargs != ndimensions)
  	  error (_("Wrong number of subscripts"));
  

On Mon, 27 Jun 2005, Fred Krogh wrote:

> The following reply was made to PR fortran/1880; it has been noted by GNATS.
> 
> From: Fred Krogh <fkrogh@mathalacarte.com>
> To: woodzltc@sources.redhat.com, gdb-prs@sources.redhat.com,
> 	nobody@sources.redhat.com, woodzltc@sources.redhat.com,
> 	gdb-gnats@sources.redhat.com
> Cc:  
> Subject: Re: fortran/1880: display of part of an array
> Date: Sun, 26 Jun 2005 21:27:21 -0700
> 
>  woodzltc@sources.redhat.com wrote:
>  
>  >Synopsis: display of part of an array
>  >
>  >Responsible-Changed-From-To: unassigned->woodzltc
>  >Responsible-Changed-By: woodzltc
>  >Responsible-Changed-When: Mon Jun 27 03:12:31 2005
>  >Responsible-Changed-Why:
>  >    I'd like to take up this if some more information could be provided.  Thanks.
>  >State-Changed-From-To: open->feedback
>  >State-Changed-By: woodzltc
>  >State-Changed-When: Mon Jun 27 03:12:31 2005
>  >State-Changed-Why:
>  >    I don't have much experiecne in ddd.  If you could give me the problem description in gdb, I am very willing to take some looks into this. 
>  >    
>  >    Another suggestion is: you can try using the latest GDB cvs to see whether your problem could be reproduced. 
>  >    
>  >    Cheers
>  >    - Wu Zhou
>  >
>  >http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1880
>  >
>  >  
>  >
>  Hi --
>      I'm certainly happy to see someone with an interest in this.  First 
>  of all ddd is working sort of.  If I move the mouse pointer too much in 
>  the source window it crashes and this is easy to make happen.   But if I 
>  don't move the mouse too much I can still get useful work done.
>  
>  The gdb problem is that I simply don't seem to have any way to print 
>  dummy arrays in Fortran.  Thus if an array X() is passed into a 
>  subroutine and I want to print locations X(3:7) there seems no way to do 
>  this without going up a level and doing
>  
>  p x(3)@5
>  
>  Things are even worse for printing an arbitrary region of a two 
>  dimensional array.
>  I'm frequently in a position where I want to display small parts of very 
>  large arrays.  If I could do this in gdb, I think there is a reasonable 
>  chance I could figure out how to accomplish the same thing in ddd.
>  
>  Let me know if you would like more input from me.
>  
>  Many thanks,
>      Fred
> 
> 



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