public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: varobj/2073: subscript operator on typedef'ed reference fails
@ 2006-01-24 23:43 jimb
  0 siblings, 0 replies; 5+ messages in thread
From: jimb @ 2006-01-24 23:43 UTC (permalink / raw)
  To: bgmackay, gdb-prs, jimb, schaudhu

Synopsis: subscript operator on typedef'ed reference fails

State-Changed-From-To: feedback->closed
State-Changed-By: jimb
State-Changed-When: Tue Jan 24 23:43:31 2006
State-Changed-Why:
    Fix committed to trunk.

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2073


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

* Re: varobj/2073: subscript operator on typedef'ed reference fails
@ 2006-01-24 15:48 Chaudhuri, Soumya
  0 siblings, 0 replies; 5+ messages in thread
From: Chaudhuri, Soumya @ 2006-01-24 15:48 UTC (permalink / raw)
  To: jimb; +Cc: gdb-prs

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

From: "Chaudhuri, Soumya" <soumya.chaudhuri@blackrock.com>
To: <gdb-gnats@sources.redhat.com>
Cc:  
Subject: Re: varobj/2073: subscript operator on typedef'ed reference fails
Date: Tue, 24 Jan 2006 10:44:10 -0500

 The patch fixes the issue.  Thanks!
 
 
 THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE PRIVILEGED, CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM DISCLOSURE. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printou t thereof.


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

* Re: varobj/2073: subscript operator on typedef'ed reference fails
@ 2006-01-24  0:43 jimb
  0 siblings, 0 replies; 5+ messages in thread
From: jimb @ 2006-01-24  0:43 UTC (permalink / raw)
  To: bgmackay, gdb-prs, jimb, schaudhu

Synopsis: subscript operator on typedef'ed reference fails

State-Changed-From-To: open->feedback
State-Changed-By: jimb
State-Changed-When: Tue Jan 24 00:43:24 2006
State-Changed-Why:
    Could you try the attached patch?

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2073


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

* Re: varobj/2073: subscript operator on typedef'ed reference fails
@ 2006-01-24  0:30 jimb
  0 siblings, 0 replies; 5+ messages in thread
From: jimb @ 2006-01-24  0:30 UTC (permalink / raw)
  To: bgmackay, gdb-prs, jimb, nobody, schaudhu

Synopsis: subscript operator on typedef'ed reference fails

Responsible-Changed-From-To: unassigned->jimb
Responsible-Changed-By: jimb
Responsible-Changed-When: Tue Jan 24 00:30:39 2006
Responsible-Changed-Why:
    I think I know what this is.  I sure hope so, or else I'll have to get into the C++ code.

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2073


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

* varobj/2073: subscript operator on typedef'ed reference fails
@ 2006-01-23 23:58 schaudhu
  0 siblings, 0 replies; 5+ messages in thread
From: schaudhu @ 2006-01-23 23:58 UTC (permalink / raw)
  To: gdb-gnats; +Cc: bgmackay


>Number:         2073
>Category:       varobj
>Synopsis:       subscript operator on typedef'ed reference fails
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 23 23:58:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     schaudhu@blackrock.com
>Release:        unknown-1.0
>Organization:
>Environment:
SunOS 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Fire-V210, gcc-3.4.4/4.0.0, gdb-6.4
>Description:
Attempting to display the results of a subscript operator call on a reference that has been typedef'ed displays the error "cannot subscript something of type CLASSNAME".  This is 100% reproducible in the environments specified.  Using either -gdb and -gstabs+ flags makes no difference.
>How-To-Repeat:
The following code demonstrates the error:

#include <iostream>

class Foo
{
private:

    int value;

public:

    Foo( const int val ) { value = val; }
    int operator[]( const int i ) const { return value; }
};

typedef Foo Bar;

int main()
{
    Foo foo1( 123 );
    std::cout << foo1[ 0 ] << std::endl;

    // In the debugger, type print foo1[ 0 ]: NO PROBLEM

    Foo &foo2 = foo1;
    std::cout << foo2[ 0 ] << std::endl;

    // In the debugger, type print foo2[ 0 ]: NO PROBLEM

    Bar &bar1 = foo1;
    std::cout << bar1[ 0 ] << std::endl;

    // In the debugger, type print bar1[ 0 ]: ERROR!
    // cannot subscript something of type `Foo'

    Bar bar2( 321 );
    std::cout << bar2[ 0 ] << std::endl;

    // In the debugger, type print bar2[ 0 ]: NO PROBLEM

    return 0;
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2006-01-24 23:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-24 23:43 varobj/2073: subscript operator on typedef'ed reference fails jimb
  -- strict thread matches above, loose matches on Subject: below --
2006-01-24 15:48 Chaudhuri, Soumya
2006-01-24  0:43 jimb
2006-01-24  0:30 jimb
2006-01-23 23:58 schaudhu

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).