Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* casting in gdb
@ 2002-12-14 19:49 Jacques Le Normand
  2002-12-14 19:59 ` Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: Jacques Le Normand @ 2002-12-14 19:49 UTC (permalink / raw)
  To: gdb




 That explains alot, thanks
 Would you know how to tell g++ to keep all the methods, even when they're
 not used?
 Say I have a map<string,int> m, how would I get gdb to display m["foo"] ?
It
 gives me the silly "function expects something else" error, which I can
 understand since gdb won't cast from char* to string. I'm guessing I need
to
 define my own subroutines.
 --Jacques
> ----- Original Message -----
> From: "Daniel Jacobowitz" <drow@mvista.com>
> To: "Jacques Le Normand" <jacqueslen@sympatico.ca>
> Cc: "Daniel Berlin" <dberlin@dberlin.org>; <gdb@sources.redhat.com>
> Sent: Saturday, December 14, 2002 2:35 AM
> Subject: Re: casting in gdb
>
>
> > On Fri, Dec 13, 2002 at 02:43:17PM -0500, Jacques Le Normand wrote:
> > > here you go, thanks for lending a hand...
> > >
> > > [countchocula@chocoland countchocula]$ g++ -ggdb test.cpp -o test.o
> > > [countchocula@chocoland countchocula]$ gdb test.o
> > > GNU gdb Red Hat Linux (5.2.1-4)
> > > Copyright 2002 Free Software Foundation, Inc.
> > > GDB is free software, covered by the GNU General Public License, and
you
> are
> > > welcome to change it and/or distribute copies of it under certain
> > > conditions.
> > > Type "show copying" to see the conditions.
> > > There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> > > This GDB was configured as "i386-redhat-linux"...
> > > (gdb) b 10
> > > Breakpoint 1 at 0x80486f5: file test.cpp, line 10.
> > > (gdb) r
> > > Starting program: /home/countchocula/test.o
> > >
> > > Breakpoint 1, main () at test.cpp:10
> > > 10        a.push_back(2);
> > > (gdb) p a[0]
> > > One of the arguments you tried to pass to operator[] could not be
> converted
> > > to w
> > > hat the function wants.
> > > (gdb)
> >
> > This one's pretty simple once you figure it out.  The error message is
> > really bad; I'll hold on to this and try to improve it.
> >
> > Your program doesn't _use_ operator[].  So it doesn't get compiled into
> > the program, and GDB can't call it to figure out what to do.
> >
> > What happens if you add a call to the operator?
> >
> > [I noticed some other quirks; for instance, if your program only uses
> > the mutable version and GDB finds the const version first, it may get
> > confused...]
> >
> > --
> > Daniel Jacobowitz
> > MontaVista Software                         Debian GNU/Linux Developer
> >
>


^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <1042721692.8268.ezmlm@sources.redhat.com>]
* Re: casting in gdb
@ 2002-12-14 21:47 Michael Elizabeth Chastain
  2002-12-14 22:48 ` Jacques Le Normand
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Michael Elizabeth Chastain @ 2002-12-14 21:47 UTC (permalink / raw)
  To: drow, jacqueslen; +Cc: gdb

I'm playing with the idea that gdb should know more about the C++
standard library types, in the same spirit that gdb knows that a C "char
*" usually points to a string terminated with '\0'.  I would like gdb
to understood more about std::string, std::vector, std:map, and so on.

Daniel J, what do you think?

Michael C


^ permalink raw reply	[flat|nested] 10+ messages in thread
* dejagnu
@ 2002-11-20 12:22 bemis
  2002-11-20 20:37 ` dejagnu Andrew Cagney
  0 siblings, 1 reply; 10+ messages in thread
From: bemis @ 2002-11-20 12:22 UTC (permalink / raw)
  To: gdb, clp

where does gdb get dejagnu?
I have recently placed an xml patch in dejagnu, and I am not seeing it
when I do a toolchain build.
-matt bemis


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

end of thread, other threads:[~2003-01-16 18:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-14 19:49 casting in gdb Jacques Le Normand
2002-12-14 19:59 ` Daniel Jacobowitz
     [not found] <1042721692.8268.ezmlm@sources.redhat.com>
2003-01-16 18:53 ` Jim Ingham
  -- strict thread matches above, loose matches on Subject: below --
2002-12-14 21:47 Michael Elizabeth Chastain
2002-12-14 22:48 ` Jacques Le Normand
2002-12-15  8:05 ` Daniel Jacobowitz
2003-01-15 18:47 ` David Carlton
2002-11-20 12:22 dejagnu bemis
2002-11-20 20:37 ` dejagnu Andrew Cagney
2002-12-05 16:26   ` dejagnu Fernando Nasser
2002-12-05 16:58     ` dejagnu bemis
2002-12-05 17:08       ` dejagnu Fernando Nasser
2002-12-12 22:26         ` dejagnu Rob Savoye
2002-12-12 22:29           ` casting in gdb Jacques Le Normand
2002-12-13  7:33             ` *****SPAM***** " Daniel Berlin
2002-12-13  8:46               ` Daniel Jacobowitz
2002-12-13 11:43                 ` Jacques Le Normand
2002-12-13 23:34                   ` Daniel Jacobowitz
2002-12-14 11:55                     ` Daniel Berlin

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