当前位置: 技术问答>linux和unix
新用linux的GDB, 版本是出现6.3.3.0,出现奇怪问题, 可能是环境设置的问题, 大人帮忙
来源: 互联网 发布时间:2015-11-28
本文导语: /home/yangrq$ gdb GNU gdb Red Hat Linux (6.3.0.0-1.122rh) 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 con...
/home/yangrq$ gdb
GNU gdb Red Hat Linux (6.3.0.0-1.122rh)
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-redhat-linux-gnu".
调试的时候总是出现下面这种情况,代码跳来跳去, 烦死了
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
49 chunkOff = idx->offset1;
(gdb)
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
49 chunkOff = idx->offset1;
(gdb)
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
52 postNum += ckHeader.postNum;
(gdb)
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
52 postNum += ckHeader.postNum;
(gdb)
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
55 printf("chunkOff=%u, fileNum=%u n", chunkOff, fileNum);
(gdb)
GNU gdb Red Hat Linux (6.3.0.0-1.122rh)
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-redhat-linux-gnu".
调试的时候总是出现下面这种情况,代码跳来跳去, 烦死了
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
49 chunkOff = idx->offset1;
(gdb)
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
49 chunkOff = idx->offset1;
(gdb)
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
52 postNum += ckHeader.postNum;
(gdb)
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
52 postNum += ckHeader.postNum;
(gdb)
51 ckHeader = readChunkHeader(chunkOff, fileNum);
(gdb)
55 printf("chunkOff=%u, fileNum=%u n", chunkOff, fileNum);
(gdb)
|
疑似是代码优化问题。
调试代码记住要用-g -O0编译。
调试代码记住要用-g -O0编译。