This is the mail archive of the gdb-prs@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: java/1413: gdb loses java type information


The following reply was made to PR java/1413; it has been noted by GNATS.

From: Andrew Cagney <ac131313@redhat.com>
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: java/1413: gdb loses java type information
Date: Thu, 09 Oct 2003 10:50:42 -0400

 Two issues:
 
 1. Must GDB pass the "cut paste" test?
 For the function.
   public static Object doit(Object x)
    {
      Object y = x;
      return y;
    }
 if either of the expressions:
 	y[1]
 	((String[])y)[1]
 were legal java (I suspect they aren't :-), then GDB must let the user 
 cut/paste them from their program into GDB and have GDB correctly 
 evaluate them.
 
 I don't think that's the problem here.
 
 2. Must GDB obey language rules?
 For the function:
   public static Object doit(Object x)
    {
      Object y = x;
      return y;
    }
 must GDB follow language rules when evaluating expressions.
 
 This, I think, is Tom's concern and the answer is no, GDB does not need 
 to obey language rules.
 
 The user should expect a debugger, such as GDB, to provide ways of 
 getting under the hood (bonnet in some countries) and examine/manipulate 
 the underlying data.  To that end, if GDB can determine an objects 
 underlying type, I see no reason for not allowing the operations that 
 apply to that type.
 
 Andrew
 


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