Knowledge Base
Searching in : Article
ID: AR09C00283
Applies to: NX Software
Added on: 2005-09-29
Last Update: 2007-09-24

How to debug the NXWin binary and provide a backtrace

In order to debug the NXWin binary, for example to trace an abrupt termination of a X11 session, please, follow the procedure reported below:

- Download the NXWin debug version according to the instructions
provided by the NoMachine Support Team.

- Download Cygwin from http://www.cygwin.com/ and install it.

- Open the folder "C:\Program Files\NX Client for Windows\bin".

- Create a copy of backup of the NXWin.exe renaming the existent one
  (e.g. NXWin.exe.ORI)

- Copy the debug version of NXWin.exe in:

   "C:\Program Files\NX Client for Windows\bin".

- Start the NX Client and launch a session.

- Open a Cygwin shell and type "ps -ef | grep NXWin" and retrieve the pid
   of the NXWin.exe process.

- From the Cygwin shell, start gdb.

- Type "attach xxxx" where "xxxx" is the pid of the NXWin process.

- Gdb gives message "Reading symbols from /usr/NX/bin/NXWin.exe ...",
  and shows the prompt.

- Type "c" and press Enter. Gdb gives message "Continuing".

- Then run your application within the X11 session as usual.

- When the session crashes, verify that gdb shows the prompt.

- Print a backtrace by typing "bt full" after the prompt.

- Provide the gdb oputput to the NoMachine Support.