Debug plug-in

From NSIS Wiki
Jump to navigationJump to search


Author: Anders (talk, contrib)


Plugin Info

  • Version: 20190525 Alpha
  • Type: Runtime plug-in
  • Character encoding: Ansi & Unicode
  • Minimum OS: Win95/NT4
  • Minimum NSIS Version: 2.45
  • License: Freeware
  • Download: Debug_plug-in.zip (44 KB)


Description

This plug-in allows you to inspect and modify the installer state.


Stack dialog

The stack dialog allows you to view and edit the stack. This is a modal dialog and works the same way as the DumpState_plug-in.

Debug plug-in Stack.png

Function .onInit
Push "Stack Test"
Debug::Stack
FunctionEnd

Watcher dialog

The watcher dialog shows a live view of the registers and installer state. This dialog lets you edit registers and state at any time but to avoid crashes you should only do this when the installer is idle.

Debug plug-in Watcher.png

Function .onInit
Debug::Watcher
FunctionEnd


Command dialog

The command dialog is a WinDbg inspired terminal where you can enter simple commands.

Debug plug-in Command.png

Commands:

  • LM [Address] - List loaded modules.
  • ~ - List threads.
  • HWND <HWND> - Display window information.
  • q - Attempts to cancel and quit the installer.
  • .cls - Clear the output window.
  • .echo - Write to the output window.
  • .formats <Number> - Display a number in various formats.
  • .dvalloc <Bytes> - Allocate bytes in the installer address space.
  • d<b|d|p|a|u> <Address> [Count=1] - Display byte/dword/pointer at the specified address.

Some of the commands supports the following pseudo-registers: $hWndNSIS, $PEB and $PID.

Function .onInit
Debug::Command
FunctionEnd


History

20190525 - Anders

  • LM can display extra module information when given a module address.
  • d command supports da and du types.
  • Displays additional HWND properties.

20190523 - Anders

  • Added FillRegisters export.
  • d commands supports an optional count parameter.
  • HWND displays DPI value on Win10.
  • Fixed TEB probing crash on NT5.x.

20190521 - Anders

  • Initial version.