[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DDD POR FAVORRRRRRRRRRRRRRRRRRRRRRR



gustavo dixit:

> Exactamente Cesar, haz dado en el clavo, el problema tiene q' ver
> con stl.
> Aqui les mando unas lineas :
...
> tarten de debagear esto y veran q' el `step' o `next' siempre entran
> hazta llegar a todas las lineas q' tengan q' ver con `STL'.
> La cosa asi se hace muy engorrosa asiq' cualquier idea sera muy
> bien recivida.

Hm.  Malas noticias (o buenas, dependiendo de cómo lo veas): sigo sin
poder reproducir tu problema.  Sigue transcripción de mi experimento.
Modifiqué tu fuente para hacer cinco add()s, en vez de sólo uno.

------------------------------------------------------------------------
crincon@madero:/tmp$ gdb gustavo
GNU gdb 5.3-debian
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-linux"...
(gdb) b main
Breakpoint 1 at 0x8048599: file gustavo.cc, line 11.
(gdb) run
Starting program: /tmp/gustavo 

Breakpoint 1, main () at gustavo.cc:11
11        A a;
(gdb) n
12        A* aP= new A;
(gdb) n
13        a.add( 1 );
(gdb) n
14        a.add( 2 );
(gdb) n
15        a.add( 3 );
(gdb) n
16        a.add( 4 );
(gdb) n
17        a.add( 5 );
(gdb) n
18        return  1;
(gdb) n
19      }
(gdb) n
0x40108a51 in __libc_start_main () from /lib/libc.so.6
(gdb) n
Single stepping until exit from function __libc_start_main, 
which has no line number information.

Program exited with code 01.
(gdb) q
crincon@madero:/tmp$
------------------------------------------------------------------------

Por el contrario, un 'step' se mete en la STL:

------------------------------------------------------------------------
13        a.add( 1 );
(gdb) s
A::add(int) (this=0xbffffa50, i=1) at gustavo.cc:5
5         void add( int i){ lst.push_front(i); }
(gdb) s
std::list<int, std::allocator<int> >::push_front(int const&) (this=0xbffffa50, 
    __x=@0xbffffa24) at stl_list.h:703
703         push_front(const value_type& __x) { this->insert(begin(), __x); }
(gdb) s

... etc.
------------------------------------------------------------------------

Estoy usando g++ 3.3.1, y gdb 5.3 (ambos de sarge).  De momento no
tengo a la mano un gcc 2.95 para probar, pero si esa es la versión que
estás usando, intenta con gcc 3.

 -CR



Reply to: