Quote:
|
Originariamente inviato da VICIUS
Sei sicuro ? in gcc anche impostando -std=c99 non vengono inizializzate a 0.
ciao 
|
Sul mio sistema, compilando con:
gcc -Wall -g -o prova prova.c
e avviando il debugger con:
gdb --readnow prova
Quote:
GNU gdb 6.3
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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) set args file_di_esempio
(gdb) break main
Breakpoint 1 at 0x80484b0: file prova.c, line 9.
(gdb) run
Starting program: /home/mjordan/prova file_di_esempio
Breakpoint 1, main (argc=2, argv=0xbffff664) at prova.c:9
11 if (argc != 2) {
(gdb) p ch
$1 = 0 '\0'
(gdb) p fp
$2 = (FILE *) 0x0
(gdb) quit
The program is running. Exit anyway? (y or n) y
|