Debug plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(v20190523)
(v20190525)
Line 4: Line 4:


== Plugin Info ==
== Plugin Info ==
* '''Version:''' 20190523 Alpha
* '''Version:''' 20190525 Alpha
* '''Type:''' Runtime plug-in
* '''Type:''' Runtime plug-in
* '''Character encoding:''' Ansi & Unicode
* '''Character encoding:''' Ansi & Unicode
Line 59: Line 59:
* '''.formats <Number>''' - Display a number in various formats.
* '''.formats <Number>''' - Display a number in various formats.
* '''.dvalloc <Bytes>''' - Allocate bytes in the installer address space.
* '''.dvalloc <Bytes>''' - Allocate bytes in the installer address space.
* '''d<b|d|p> <Address> [Count=1]''' - Display byte/dword/pointer at the specified address.  
* '''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.
Some of the commands supports the following pseudo-registers: $hWndNSIS, $PEB and $PID.
Line 71: Line 71:


== History ==
== History ==
20190525 - Anders
* LM can display extra module information when given a module address.
* d commands supports da and du.
* Displays additional HWND properties.
20190523 - Anders
20190523 - Anders
* Added FillRegisters export.  
* Added FillRegisters export.  

Revision as of 19:02, 25 May 2019


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 - 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 commands supports da and du.
  • 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.