- From b4f4ffa83a41687bd60752926969474f5e78d23e Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Wed, 11 Oct 2023 15:13:28 +0200
- Subject: [PATCH 1/2] devel/msnfs41client.bash: Add WinDBG cdb support
- Add support for WinDBG's cdb to cygwin/devel/msnfs41client.bash, as
- we currently only support compiling the code for Visual Studio (19),
- and gdb does not support the Windows PDB debugging format (gdb dwarf
- to PDB would be possible via https://github.com/rainers/cv2pdb).
- Currently this means that the msnfs41client.bash subcommands
- "run_daemon" and "sys_run_daemon" require the installation of
- WinDBG, so that nfsd_debug.exe always runs under cdb control
- (instead of gdb).
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/devel/msnfs41client.bash | 27 +++++++++++++++++++++++++--
- 1 file changed, 25 insertions(+), 2 deletions(-)
- diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
- index 7e3f26a..ad77034 100644
- --- a/cygwin/devel/msnfs41client.bash
- +++ b/cygwin/devel/msnfs41client.bash
- @@ -99,7 +99,20 @@ function nfsclient_rundeamon
- set -o xtrace
- set -o nounset
- - gdb -ex=run --args nfsd_debug -d 0 --noldap --gid 1616 --uid 1616
- + #
- + # cdb cheat sheet:
- + #
- + # gdb: run cdb: g
- + # gdb: bt cdb: kp
- + # gdb: quit cdb: q
- + #
- +
- + if false ; then
- + gdb -ex=run --args nfsd_debug -d 0 --noldap --gid 1616 --uid 1616
- + else
- + export _NT_ALT_SYMBOL_PATH="$(cygpath -w "$PWD")"
- + cdb -c "g" "$(cygpath -w "$PWD/nfsd_debug.exe")" -d 2 --noldap --gid 1616 --uid 1616
- + fi
- return $?
- }
- @@ -108,7 +121,12 @@ function nfsclient_system_rundeamon
- set -o xtrace
- set -o nounset
- - su_system gdb -ex=run --args nfsd_debug -d 0 --noldap --gid 1616 --uid 1616
- + if false ; then
- + su_system gdb -ex=run --args nfsd_debug -d 0 --noldap --gid 1616 --uid 1616
- + else
- + export _NT_ALT_SYMBOL_PATH="$(cygpath -w "$PWD")"
- + su_system cdb -c "g" "$(cygpath -w "$PWD/nfsd_debug.exe")" -d 2 --noldap --gid 1616 --uid 1616
- + fi
- return $?
- }
- @@ -213,6 +231,9 @@ function main
- # "$PATH:/usr/bin:/bin" is used for PsExec where $PATH might be empty
- export PATH="$PWD:$PATH:/usr/bin:/bin"
- + # path to WinDBG cdb (fixme: 64bit x86-specific)
- + PATH+=':/cygdrive/c/Program Files (x86)/Windows Kits/10/Debuggers/x64/'
- +
- # my own path to pstools
- PATH+=':/home/roland_mainz/work/win_pstools/'
- @@ -222,6 +243,7 @@ function main
- return $?
- ;;
- 'run_deamon' | 'run_daemon')
- + require_cmd 'cdb.exe' || return 1
- require_cmd 'nfsd.exe' || return 1
- require_cmd 'nfsd_debug.exe' || return 1
- require_cmd 'nfs_mount.exe' || return 1
- @@ -229,6 +251,7 @@ function main
- return $?
- ;;
- 'sys_run_deamon' | 'sys_run_daemon')
- + require_cmd 'cdb.exe' || return 1
- require_cmd 'PsExec.exe' || return 1
- require_cmd 'nfsd.exe' || return 1
- require_cmd 'nfsd_debug.exe' || return 1
- --
- 2.39.0
devel/msnfs41client.bash: Add WinDBG cdb support
Posted by Anonymous on Wed 11th Oct 2023 17:54
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.