gdb
Bir onceki dosyalar make komutu ile derlenir: Make asagidaki komutlari uretip calistiracak.
g++ -ggdb -Wall -c IntCell.cpp
g++ -ggdb -Wall -o intcell IntCell.o
Komut satirindan ./intcell deyince Bus Error veriyor.
E ne yapcaz.
Komut satirindan:
gdb intcell
de.
Sonra
run
asagidakini uretir.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00001dfa in IntCell::IntCell (this=0xbffff888, rhs=@0xbffff88c) at IntCell.h:25
25 *storedValue = *(rhs.storedValue);
(gdb) where
#0 0x00001dfa in IntCell::IntCell (this=0xbffff888, rhs=@0xbffff88c) at IntCell.h:25
#1 0x00001c9e in main () at IntCell.cpp:7
Daha sonra
where
list main
list 25
vs diyerek programi anla.
g++ -ggdb -Wall -c IntCell.cpp
g++ -ggdb -Wall -o intcell IntCell.o
Komut satirindan ./intcell deyince Bus Error veriyor.
E ne yapcaz.
Komut satirindan:
gdb intcell
de.
Sonra
run
asagidakini uretir.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00001dfa in IntCell::IntCell (this=0xbffff888, rhs=@0xbffff88c) at IntCell.h:25
25 *storedValue = *(rhs.storedValue);
(gdb) where
#0 0x00001dfa in IntCell::IntCell (this=0xbffff888, rhs=@0xbffff88c) at IntCell.h:25
#1 0x00001c9e in main () at IntCell.cpp:7
Daha sonra
where
list main
list 25
vs diyerek programi anla.
Etiketler: GDB
Toplam 0 Yorum:
Yorum Gönder
<< Ana Sayfa