bug v gdb?

Filip Krejci krejcif na gmail.com
Pondělí Únor 26 16:04:33 CET 2007


Horák Jan napsal(a):
 > Dobry den,
 > poslete jeste gdb zdrojak, kterym si zkousite onu promennou vypsat, ale
 > poslete to kompletni. Jinak se k tomu neda nic rict.
 >
 > S pozdravem,
 > 	Jan Horak.


Zde:

  >> $ gdb a.out 

GNU gdb 6.3-debian
Copyright 2004 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"...Using host libthread_db 
library "/lib/tls/libthread_db.so.1".

(gdb) b main
Breakpoint 1 at 0x8048394: file test.c, line 11.
(gdb) r
Starting program: /tmp/a.out

Breakpoint 1, main () at test.c:11
11        rec_t* rec = (rec_t*) calloc(sizeof(rec_t),1);
(gdb) display rec->id
1: rec->id = 14087541109396006948
(gdb) n
12        rec->id      = 10000;
1: rec->id = 580477714956288
(gdb) n
13        return 0;
1: rec->id = 580477714956288
(gdb) n
14      }
1: rec->id = 580477714956288
(gdb) n
0x4003b974 in __libc_start_main () from /lib/tls/libc.so.6


-- 
Filip Krejci <krejcif na gmail.com>

Why use Windows, since there is a door?


Další informace o konferenci Linux