0

私は英語が苦手で、申し訳ありません。さて、GDB で samba をいつデバッグするかについて質問があります。

    # gdb /usr/local/samba/sbin/smbd
    GNU gdb Red Hat Linux (5.2.1-4)
    Copyright 2002 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"...
    (gdb) r
    Starting program: /usr/local/samba/sbin/smbd 
    Program exited normally.
    (gdb) info program

デバッグ中のプログラムは実行されていません。では、GDB で samba をデバッグするにはどうすればよいですか?

ps: Samba のバージョン 3.0.5 ソースコードから samba をインストールします。

4

2 に答える 2

1

を使用sudo ./smbd -iして smbd を起動し、何が問題なのかを確認できます。私の場合: smbd は /usr/local/samba/etc/smb.conf で smb.conf を見つけようとしますが、そこにないので終了します。/etc/samba/smb.conf を望ましいパスにコピーすると、すべて問題ありません。

これがあなたを助けることを願っています。

于 2016-09-01T09:25:37.207 に答える