Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* operator* for iterators
@ 2001-12-06 12:33 Craig Maloney
  2001-12-06 12:37 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Craig Maloney @ 2001-12-06 12:33 UTC (permalink / raw)
  To: gdb

I have intermittent problems trying to do the following:

If I have a list or vector iterator (say, li and vi)
and I try to dereference them, I get the following:

"structure has no component named operator*"

If I do:
(gdb) ptype vi
or
(gdb) ptype li

I see:
operator*

listed among the fields of both vi and li.  I can detect
no pattern as to when "*vi" works and when it doesn't.

Of course, I can explicitly do a:
"*(vi->_M_current)"

But this gets pretty ugly with a couple layers of nesting.

Is this a known problem?  I couldn't find anything on
this list.  (I'll give specifics as to my system
if there is any interest).

Thanks -- Cheers all,
Craig


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

* Re: operator* for iterators
  2001-12-06 12:33 operator* for iterators Craig Maloney
@ 2001-12-06 12:37 ` Daniel Jacobowitz
  2001-12-07 15:48   ` Craig Maloney
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2001-12-06 12:37 UTC (permalink / raw)
  To: Craig Maloney; +Cc: gdb

On Thu, Dec 06, 2001 at 12:41:23PM -0800, Craig Maloney wrote:
> I have intermittent problems trying to do the following:
> 
> If I have a list or vector iterator (say, li and vi)
> and I try to dereference them, I get the following:
> 
> "structure has no component named operator*"

What C++ compiler version, and what GDB version, and what platform, and
what debug format?

I don't know the state of calling overloaded operators right now, but I
wouldn't be surprised if it was badly off.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: operator* for iterators
  2001-12-06 12:37 ` Daniel Jacobowitz
@ 2001-12-07 15:48   ` Craig Maloney
  2001-12-07 15:56     ` Daniel Berlin
  0 siblings, 1 reply; 5+ messages in thread
From: Craig Maloney @ 2001-12-07 15:48 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

For what it's worth, the problem goes away when I use DWARF2.
--Craig

Daniel Jacobowitz wrote:
> 
> On Thu, Dec 06, 2001 at 12:41:23PM -0800, Craig Maloney wrote:
> > I have intermittent problems trying to do the following:
> >
> > If I have a list or vector iterator (say, li and vi)
> > and I try to dereference them, I get the following:
> >
> > "structure has no component named operator*"
> 
> What C++ compiler version, and what GDB version, and what platform, and
> what debug format?
> 
> I don't know the state of calling overloaded operators right now, but I
> wouldn't be surprised if it was badly off.
> 
> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer


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

* Re: operator* for iterators
  2001-12-07 15:48   ` Craig Maloney
@ 2001-12-07 15:56     ` Daniel Berlin
  2001-12-07 16:49       ` Craig Maloney
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Berlin @ 2001-12-07 15:56 UTC (permalink / raw)
  To: Craig Maloney; +Cc: Daniel Jacobowitz, gdb

Did you use the operator in the program?
If not, it won't work for STABS.

On Fri, 7 Dec 2001, Craig Maloney wrote:

> For what it's worth, the problem goes away when I use DWARF2.
> --Craig
>
> Daniel Jacobowitz wrote:
> >
> > On Thu, Dec 06, 2001 at 12:41:23PM -0800, Craig Maloney wrote:
> > > I have intermittent problems trying to do the following:
> > >
> > > If I have a list or vector iterator (say, li and vi)
> > > and I try to dereference them, I get the following:
> > >
> > > "structure has no component named operator*"
> >
> > What C++ compiler version, and what GDB version, and what platform, and
> > what debug format?
> >
> > I don't know the state of calling overloaded operators right now, but I
> > wouldn't be surprised if it was badly off.
> >
> > --
> > Daniel Jacobowitz                           Carnegie Mellon University
> > MontaVista Software                         Debian GNU/Linux Developer
>


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

* Re: operator* for iterators
  2001-12-07 15:56     ` Daniel Berlin
@ 2001-12-07 16:49       ` Craig Maloney
  0 siblings, 0 replies; 5+ messages in thread
From: Craig Maloney @ 2001-12-07 16:49 UTC (permalink / raw)
  To: Daniel Berlin; +Cc: Daniel Jacobowitz, gdb

Daniel Berlin wrote:
> 
> Did you use the operator in the program?
> If not, it won't work for STABS.

Yes.  I use it extensively.

> 
> On Fri, 7 Dec 2001, Craig Maloney wrote:
> 
> > For what it's worth, the problem goes away when I use DWARF2.
> > --Craig
> >
> > Daniel Jacobowitz wrote:
> > >
> > > On Thu, Dec 06, 2001 at 12:41:23PM -0800, Craig Maloney wrote:
> > > > I have intermittent problems trying to do the following:
> > > >
> > > > If I have a list or vector iterator (say, li and vi)
> > > > and I try to dereference them, I get the following:
> > > >
> > > > "structure has no component named operator*"
> > >
> > > What C++ compiler version, and what GDB version, and what platform, and
> > > what debug format?
> > >
> > > I don't know the state of calling overloaded operators right now, but I
> > > wouldn't be surprised if it was badly off.
> > >
> > > --
> > > Daniel Jacobowitz                           Carnegie Mellon University
> > > MontaVista Software                         Debian GNU/Linux Developer
> >


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

end of thread, other threads:[~2001-12-08  0:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-06 12:33 operator* for iterators Craig Maloney
2001-12-06 12:37 ` Daniel Jacobowitz
2001-12-07 15:48   ` Craig Maloney
2001-12-07 15:56     ` Daniel Berlin
2001-12-07 16:49       ` Craig Maloney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox