public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libgcj/5669: gij not debuggable by gdb
@ 2002-02-12 21:06 Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2002-02-12 21:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Tom Tromey <tromey@redhat.com>
To: toddastock@yahoo.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libgcj/5669: gij not debuggable by gdb
Date: 12 Feb 2002 22:21:08 -0700

 >>>>> "Todd" == Todd Stock <toddastock@yahoo.com> writes:
 
 Todd> 	The code is not debuggable when running with gdb from redhat:
 Todd> 'GNU gdb Red Hat Linux (5.1-0.71)'.
 
 I think this part of the verifier is ok.  It is valid C++ code.
 
 The debugging problem must be either a bug in the C++ compiler
 (perhaps it is generating invalid debugging information) or gdb
 (perhaps it is misreading the debugging information).  It is possible
 that you simply need to use a newer gdb; I'm not sure.
 
 In any case I'm going to close this PR at some point.
 
 Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: libgcj/5669: gij not debuggable by gdb
@ 2002-02-13  9:20 tromey
  0 siblings, 0 replies; 4+ messages in thread
From: tromey @ 2002-02-13  9:20 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, java-prs, nobody, toddastock, tromey

Synopsis: gij not debuggable by gdb

Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Wed Feb 13 09:20:07 2002
Responsible-Changed-Why:
    I'm handling this.
State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Wed Feb 13 09:20:07 2002
State-Changed-Why:
    I believe this is not a bug; see comments from yesterday.
    Thanks for the report.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5669


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: libgcj/5669: gij not debuggable by gdb
@ 2002-02-12 10:56 Todd Stock
  0 siblings, 0 replies; 4+ messages in thread
From: Todd Stock @ 2002-02-12 10:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Todd Stock <toddastock@yahoo.com>
To: toddastock@yahoo.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libgcj/5669: gij not debuggable by gdb
Date: Tue, 12 Feb 2002 10:54:25 -0800

 Unidiffs for bugs 5669/5670/5671.
 
 Index: verify.cc
 ===================================================================
 RCS file: /cvsroot/gcc/gcc/libjava/verify.cc,v
 retrieving revision 1.35
 diff -u -r1.35 verify.cc
 --- verify.cc	7 Feb 2002 02:27:10 -0000	1.35
 +++ verify.cc	12 Feb 2002 18:50:09 -0000
 @@ -259,6 +259,19 @@
  	    if (source == NULL)
  	      return false;
  	  }
 +	else if (source->isInterface ())
 +	  {
 +	    for (int i = 0; i < target->interface_count; ++i)
 +	      {
 +		// We use a recursive call because we also need to
 +		// check superinterfaces.
 +		if (is_assignable_from_slow (target->interfaces[i], source))
 +		    return true;
 +	      }
 +	    target = target->getSuperclass ();
 +	    if (target == NULL)
 +	      return false;
 +	  }
  	else if (target == &java::lang::Object::class$)
  	  return true;
  	else if (source->isInterface ()
 @@ -676,7 +689,7 @@
  		    }
  
  		  // This loop will end when we hit Object.
 -		  while (true)
 +		  while (true && k!=NULL)
  		    {
  		      if (is_assignable_from_slow (k, oldk))
  			break;
 @@ -684,6 +697,12 @@
  		      changed = true;
  		    }
  
 +		  if( k == NULL )
 +		    {
 +		      *this = old_type;
 +		      changed = true;
 +		    }
 +		  else
  		  if (changed)
  		    {
  		      while (arraycount > 0)
 @@ -1943,9 +1962,11 @@
      return type (k);
    }
  
 -  void compute_argument_types (_Jv_Utf8Const *signature,
 -			       type *types)
 +  type *compute_argument_types (_Jv_Utf8Const *signature,
 +			       int arg_count)
    {
 +    if( arg_count == 0 ) return NULL;
 +    type *types=new type[arg_count];
      char *p = signature->data;
      // Skip `('.
      ++p;
 @@ -1953,6 +1974,7 @@
      int i = 0;
      while (*p != ')')
        types[i++] = get_one_type (p);
 +    return types;
    }
  
    type compute_return_type (_Jv_Utf8Const *signature)
 @@ -1994,8 +2016,7 @@
  
      // We have to handle wide arguments specially here.
      int arg_count = _Jv_count_arguments (current_method->self->signature);
 -    type arg_types[arg_count];
 -    compute_argument_types (current_method->self->signature, arg_types);
 +    type *arg_types = compute_argument_types( current_method->self->signature, arg_count );
      for (int i = 0; i < arg_count; ++i)
        {
  	set_variable (var, arg_types[i]);
 @@ -2004,6 +2025,8 @@
  	  ++var;
        }
  
 +    delete []arg_types;
 +
      return is_init;
    }
  
 @@ -2747,8 +2770,7 @@
  
  	      // Pop arguments and check types.
  	      int arg_count = _Jv_count_arguments (method_signature);
 -	      type arg_types[arg_count];
 -	      compute_argument_types (method_signature, arg_types);
 +              type *arg_types = compute_argument_types( method_signature, arg_count );
  	      for (int i = arg_count - 1; i >= 0; --i)
  		{
  		  // This is only used for verifying the byte for
 @@ -2756,6 +2778,7 @@
  		  nargs -= arg_types[i].depth ();
  		  pop_type (arg_types[i]);
  		}
 +              delete []arg_types;
  
  	      if (opcode == op_invokeinterface
  		  && nargs != 1)
 
 
 
 gcc-gnats@gcc.gnu.org wrote:
 
 >Thank you very much for your problem report.
 >It has the internal identification `libgcj/5669'.
 >The individual assigned to look at your
 >report is: unassigned. 
 >
 >>Category:       libgcj
 >>Responsible:    unassigned
 >>Synopsis:       gij not debuggable by gdb
 >>Arrival-Date:   Tue Feb 12 09:56:01 PST 2002
 >>
 >
 
 
 
 
 _________________________________________________________
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* libgcj/5669: gij not debuggable by gdb
@ 2002-02-12  9:56 toddastock
  0 siblings, 0 replies; 4+ messages in thread
From: toddastock @ 2002-02-12  9:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5669
>Category:       libgcj
>Synopsis:       gij not debuggable by gdb
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 12 09:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.1 20020211 (experimental)
>Organization:
>Environment:
System: Linux escher 2.4.9-21 #1 Thu Jan 17 14:16:30 EST 2002 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --enable-threads=posix --prefix=/home/tstock/local --disable-shared --enable-languages=c++,java
>Description:
	The code is not debuggable when running with gdb from redhat: 'GNU gdb Red Hat Linux (5.1-0.71)'.
>How-To-Repeat:
	Start up a gdb session and step into compute_argument_types then step out.  The memory location for type is scribbled on.  Technically I thought and according to my C++ books that passing type as an argument to the function call required the function to use the C++ syntax of the unary '&'.  I forget the term for this..
That is to say:
int main( ) {
  int x;
  test( x );
}
int test( &x ) {
  x = 1;
}
However using the unary '&' doesn't work on an array of struct type.
>Fix:
It is not very elegent, but does work.
Index: libjava/verify.cc
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/verify.cc,v
retrieving revision 1.35
diff -r1.35 verify.cc
1946,1947c1946,1947
<   void compute_argument_types (_Jv_Utf8Const *signature,
< 			       type *types)
---
>   type *compute_argument_types (_Jv_Utf8Const *signature,
> 			       int arg_count)
1948a1949,1950
>     if( arg_count == 0 ) return NULL;
>     type *types=new type[arg_count];
1955a1958
>     return types;
1997,1998c2000
<     type arg_types[arg_count];
<     compute_argument_types (current_method->self->signature, arg_types);
---
>     type *arg_types = compute_argument_types( current_method->self->signature, arg_count );
2006a2009,2010
>     delete []arg_types;
> 
2750,2751c2754
< 	      type arg_types[arg_count];
< 	      compute_argument_types (method_signature, arg_types);
---
>               type *arg_types = compute_argument_types( method_signature, arg_count );
2758a2762
>               delete []arg_types;
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-02-13 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-12 21:06 libgcj/5669: gij not debuggable by gdb Tom Tromey
  -- strict thread matches above, loose matches on Subject: below --
2002-02-13  9:20 tromey
2002-02-12 10:56 Todd Stock
2002-02-12  9:56 toddastock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).