$ /home/yasuda/src/gdb-6.7.1/gdb/gdb ./hello.exe
GNU gdb 6.7.1
Copyright (C) 2007 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 "i686-pc-cygwin"...
(gdb) set substitute-path /home/yasuda/src/ /home/yasuda/src/other/
(gdb) b main
Breakpoint 1 at 0x401075: file hello.c, line 6.
(gdb) r
Starting program: /home/yasuda/src/hello.exeBreakpoint 1, main (argc=1, argv=0x1281c00) at hello.c:6
6 {
(gdb) list
1 #include <stdio.h>
2
3
4
5 int main(int argc, char* argv[])
6 {
7
8 printf( "hello,world!\n" );
9
10 return 0;
(gdb)
(gdb) set substitute-path /home/yasuda/src/ /home/yasuda/src/other/
これは、以下のような場合の指定です。
- /home/yasuda/src/ コンパイルしたときのソースのパス
- /home/yasuda/src/other/ gdb使用時のソースのパス
うまくいきました。
ちなみにコレ、gdb6.6以降で使えるようですので。

WindowsでUNIX環境を実現! 今すぐ使える Cygwin
- 作者: 海上忍
- 出版社/メーカー: 技術評論社
- 発売日: 2004/06/04
- メディア: 単行本
- クリック: 15回
- この商品を含むブログ (3件) を見る
コメント