게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
엔델님 퀴즈 관련 gdb 내용
게시물ID : computer_41862짧은주소 복사하기
작성자 : 구차니
추천 : 0
조회수 : 245회
댓글수 : 2개
등록시간 : 2012/03/28 19:00:38
$ gcc -g temp.c
$ gdb a.out
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/minimonk/src/temp/a.out...done.
(gdb) run
Starting program: /home/minimonk/src/temp/a.out

Program received signal SIGSEGV, Segmentation fault.
0x080483d8 in main () at temp.c:8
8               str1[1] = 'x';
(gdb) print &str1[0]
$5 = 0x80484b0 "abcdef"
(gdb) print &str2[0]
$6 = 0xbffff6ed "ABCDEF"
(gdb)


음.. 확실히 번지가 다르긴 하네요..
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호