Download the debug exe 64 bit program. Working with the Windows command line, Debug program and its use. Installing Debugging Tools for Windows via .msi file

Launch Debug.exe, a program for checking and debugging MS-DOS executable files. Command executed without parameters debug launches Debug.exe and displays a command prompt debug, represented by a hyphen (-).


1)
Launch Virtual PC 2007 with the Windows XP image. Switch the OS to command line mode.

Start -> Run -> Type cmd and press Enter.


2)
Get and capture help on debug command options

In the console: enter debug, then (?).

A short list of all commands:

A (assembly) — Translation of assembler commands into machine code. Default address - CS:0100h.

C (compare) — Comparison of the contents of two memory areas. Default is D.S.. The command specifies either the length of sections or the range of addresses.

D (dump) — Output the contents of the memory area in hexadecimal and ASCII formats. Default is D.S.. You can specify length or range.

E (enter) — Entering data or machine code instructions into memory. Default is D.S..

F (fill) — Filling the memory area with data from the list. Default is D.S.. You can use both length and range.

G(go) — Execution of a debugged machine language program until a specified breakpoint. Default is D.S.. In this case, you should make sure that IP contains a valid address.

H (hexadecimal) — Calculation of the sum and difference of two hexadecimal values.

I (input) — Reading and outputting one byte from the port.

L(load) — Loading a file or data from disk sectors into memory. . Default - CS:100h. The file can be specified using the command N or startup argument debug.exe.

M (move) — Copying the contents of memory cells; default is used D.S.

N (name) — Specifying the file name for commands L (LOAD) And W (WRITE).

O(output) — Sending a byte to the output port.

P(proceed) — Execution of instructions CALL, LOOP, INT (loop, interrupt, procedures) or repeatable string instruction with prefixes REPnn, moving on to the next instruction.

Q (quit) — Shutdown debug.exe. Without saving the tested file.

R (register) — Output the contents of the registers and the next instruction.

S (search) — Search in memory for characters from the list. Default is D.S.. You can specify both length and range.

T (trace) — Step-by-step execution of the program. Just like the team P, the default is pair CS:IP. But to perform interrupts it is better to use the command P.

U (unassembled) — Disassembling machine code. The default is pair CS:IP.

W(write) — Write a file from debug.exe to disk. It is necessary to specify the file name with the command N, if it was not loaded.


3)
We will receive and record dumps of characteristic areas of RAM and ROM

Let's type command R.

Registers C.S., D.S., ES, SS at this moment initialized address of the 256-byte program segment prefix, and the working area in memory will begin with addresses of this prefix + 100h.

Command set rules:

A) B debug.exe The case of letters does not differ.

B) Spaces in commands are used only to separate parameters.

C) The entered numbers must be in hexadecimal number system, and without final letter h.

D) The segment and offset are written using a colon, in the format segment:offset.


4)
View memory area.

Team D, allows you to view the contents of individual memory areas.
Let's check the size of memory available for work. To do this, we enter: d 40:13 and Enter.
The first two bytes that appear on the screen as a result contain the memory size in kilobytes and in hexadecimal notation, with the bytes in reverse order. We have this: 8002 0280 640 (K)

  • The address of the first byte shown on the left in the format segment:offset.
  • Hexadecimal representation of a paragraph (16 bytes), starting with the byte specified at the beginning of the line.
  • Characters of the same paragraph in ASCII format.


4)
Checking parallel and serial ports.


The first 16 bytes of the BIOS data area contain the addresses of the parallel and serial ports. The first eight bytes printed indicate the serial port addresses COM1-COM4. The next 8 bytes indicate the addresses of the parallel ports LPT1-LPT4. Port address 78 03 – written in reverse form.


5)
Checking the status of the keyboard register.


In the data area BIOS by the address 417h The first byte is located, which stores the state of the keyboard register.


6)
Checking the BIOS production date.


Copyright information for BIOS built into ROM BIOS by the address FE00:0. The copyright line can be easily found in ASCII-sequences, and serial number- as hexadecimal number. On the screen we see a seven-digit computer number and copyright date. Although, the copyright line may be long and may not fit into the allocated memory area. In this case, you should simply enter again D.

The date is also recorded in ROM BIOS starting from the address FFFF:5. After executing the appropriate command in ASCII-the sequence will contain this date, written in the format mm/dd/yy.


7)
Example of machine codes.


Let's look at the creation of a machine language program, its representation in memory, and the results of execution. Debugger command A (Assemble) translates DEBUG into the mode of receiving assembler commands and translating them into machine codes.

Now that the program has been entered into memory, let's try to control its execution. First, let's check the current state of the registers and flags; to do this, enter the command R.


IP— a register containing the address-offset of the next instruction to be executed relative to the code segment C.S. in x86 family processors.

Register IP Connected with C.S. as CS:IP, Where C.S. is the current code segment, and IP— the current offset relative to this segment.

Register IP is a 16-bit pointer register. In addition to this, registers of this type include SP (Stack Pointer- stack pointer) and B.P. (Base Pointer- basic index).

Record CXwas successful and equal to 8. Segments have been initialized D.S., ES, SS, C.S. the same address. Register IP contains 0100 , indicating that instructions are executed at an offset of 100h relative to CS (that's where we started).

Meaning

Description

No overflow

Direction up or right

Enable interrupts

Positive sign

Non-zero value

No additional carryover

Odd word

0 B16 - address of the code segment.
  • Machine code corresponding to this instruction ( B025).
  • The actual instruction written in assembler ( MOV A L,25 ).

  • 8)
    The debugger command U (Unassemble) displays the machine codes for assembly instructions.


    Let's do it. It is necessary to tell the debugger the addresses of the first and last commands that need to be viewed (we have 100 and 107). The instructions in the specified range will appear, in assembly language, in machine code, as well as the address of each instruction. Let's execute the program step by step using the command T.

    Using the command a second time T, we have followed the instructions MOV. The machine code of the instruction operand is – 00D8. The operation adds AL To B.L.. To exit we enter Q. And again we disassemble the created testpi.com.


    9)
    Copy the BIOS (C000:0 ... FFFF:F) to a file and save the file for later analysis.


    Changing or copying code BIOS may violate the manufacturer's copyright BIOS. BIOS may be copied or modified for personal use only and not for distribution. Typical Copy Procedure BIOS using the program DEBUG we will give below. This procedure will save the entire 64 KB segment from the address in a file F000:0000h By F0000:FFFFh.


    Conclusions:

    • debug.execan be used for observing and debugging programs in assembler and machine code.
    • debug.exeallows you to trace a program, set breakpoints, view memory areas, and enter programs directly into computer memory.
    • debug.exerepresents downloadable programs as programs .COM.
    • debug.exeonly accepts numbers in hexadecimal.
    • debug.exedoes not distinguish between letter case.

    Debugging Tools for Windows- Operating code debugging tools Windows systems. They are a set of freely distributed programs from Microsoft designed for debugging user mode and kernel mode code: applications, drivers, services, kernel modules. The toolkit includes console and GUI mode debuggers, utilities for working with symbols, files, processes, and utilities for remote debugging. The toolkit contains utilities that can be used to find the causes of failures in various system components. Debugging Tools for Windows from a certain point onwards are not available for download in the form of a stand-alone distribution and are part of the Windows SDK (Windows Software Development Kit). Kit tools The Windows SDK, in turn, is available as part of the MSDN subscription program or can be freely downloaded as a separate distribution from msdn.microsoft.com. According to the developers, the latest and most current version of Debugging Tools for Windows is contained in the Windows SDK.

    Debugging Tools for Windows is updated and released in public access quite often, and this process does not depend in any way on the release of operating systems. Therefore, check periodically for new versions.

    Let's now see what, in particular, the Debugging Tools for Microsoft Windows:

    • Debug local applications, services, drivers and kernel;
    • Debug over the network remote applications, services (services), drivers and kernel;
    • Debug running applications in real time;
    • Analyze memory dump files of applications, the kernel and the system as a whole;
    • Work with systems based on x86/x64/Itanium architectures;
    • Debug user mode and kernel mode programs;

    The following versions of Debugging Tools for Windows are available: 32-bit x86, Intel Itanium, 64-bit x64. We will need two of them: x86 or x64.

    There are several ways to install Debugging Tools for Windows; in this article we will consider only the main ones:

    • Installation via web installer.
    • Installing Debugging Tools for Windows from ISO Windows image SDK.
    • Installing Debugging Tools for Windows directly from the dbg_amd64.msi / dbg_x86.msi packages.

    It remains unclear at what point, why should I install debugging tools on my computer? Often you are faced with a situation where interference in the work environment is extremely undesirable! And even more so, installing a new product, that is, making changes to the registry/system files, may be completely unacceptable. Examples include mission-critical servers. Why don't developers consider the option of portable versions of applications that do not require installation?
    From version to version, the installation process of the Debugging Tools for Windows package undergoes some changes. Let's now move directly to the installation process and look at the ways in which you can install the toolkit.

    Installing Debugging Tools for Windows using the web installer

    Go to the Windows SDK Archive page and find a section called Windows 10 and below the item “Windows 10 SDK (10586) and device emulator with Windows 10 Mobile (Microsoft) (version 10586.11)”.

    Click on the item INSTALL SDK. After clicking, download and run the file sdksetup.exe, which initiates the online installation process of the Windows SDK. On initial stage The installer will check if the .NET Framework package is installed on the system latest version(V this moment this is 4.5). If the package is missing, installation will be offered and the station will reboot upon completion. Immediately after the reboot, at the user authorization stage, the installation process of the Windows SDK itself starts.

    Often, when selecting all components of a package without exception, errors may occur during the installation process. In this case, it is recommended to install components selectively, the minimum required set.

    After installation of Debugging Tools for Windows is complete, the location of the debugging files when this method Our installation will be as follows:

    • 64-bit versions: C:\Program Files (x86)\Windows Kits\x.x\Debuggers\x64
    • 32-bit versions: C:\Program Files (x86)\Windows Kits\x.x\Debuggers\x86

    * where x.x is a specific version of the development kit;
    We noticed that versions 8 and higher, the installation paths are noticeably different from the classic ones for everyone previous versions Debugging tools?

    A huge advantage of this method of installing Debigging Tools for Windows is the installation of versions of debugging tools for all architectures at once.

    Installing Debugging Tools for Windows from the Windows SDK ISO

    This method involves installing Debugging Tools for Windows using the full Windows SDK (Software Developers Kit) installation image. Until a certain time, download ISO image for the corresponding system it was possible on the Windows SDK Archive page. However, at the moment, you can get an ISO image of the SDK by running the web installer sdksetup.exe and selecting Download the Windows Software Development Kit in the installer start window:

    As we found out, the previous installation method using a web installer is quite capricious and often ends in error. On clean systems it installs without problems, but on sufficiently loaded systems numerous problems arise. If this is your case, then use this method.

    Accordingly, on the page you need to select the required distribution, for me (and I think for many) at the moment it is " Windows package SDK for Windows 7 and .NET Framework 4" and just below click on the link "Get an ISO image of a DVD".

    When working with the site msdn.microsoft.com, I recommend using a browser Internet Explorer, since there have been cases of competing products not working!

    Accordingly, it is necessary to choose solely according to necessity. Typically, the bitness of Debugging Tools for Windows matches the bitness of the system. My systems are mostly 64-bit, so in most cases I download the image for a 64-bit system GRMSDKX_EN_DVD.iso.
    Then, after downloading the image, we need to somehow work with the existing ISO image. The traditional method is, of course, to burn a CD, but this is a rather long and sometimes expensive method. I suggest you use free utilities on creating virtual disk devices in the system. Personally, I prefer to use DEAMON Tools Lite for this purpose. Someone may have other preferences, more direct or lightweight utilities, depending on taste and color, as they say .. After installing DAEMON Tools Lite, I simply double-click on the image file GRMSDKX_EN_DVD.iso and a new virtual one appears in the system CD:

    Only then double click I activate autoload and start the Windows SDK installation:

    When it’s time to select components to install from the list, we disable absolutely all options except those marked in the screenshot. This will help us avoid unnecessary mistakes now.


    Everything is exactly like that, in the screenshot there are two options marked: “Windows Performance Toolkit” and “Debugging Tools for Windows”. Choose both, because Windows Performance Toolkit will certainly come in handy in your work! Then, after clicking the "Next" button, the installation continues as usual. And at the end you will see the inscription “Installation Complete”.
    Upon completion of installation, the working directories of the Debugging Tools for Windows package will be as follows:

    • For x86 version:
    • For x64 version:

    At this point, the installation of Debugging Tools for Windows can be considered complete.

    Installing Debugging Tools for Windows via .msi file

    If problems arise when installing Debugging Tools for Windows using the two previous methods, we still have one more in stock, the most reliable and time-tested, which has come to the rescue, so to speak, more than once. Once upon a time, before integration into the Windows SDK, Debugging Tools for Windows were available as a separate installer.msi, which can still be found, but already in the bowels of the Windows SDK distribution. Since we already have in our hands Windows ISO image SDK, then we can not mount it into the system, but simply open it using the already well-known WinRAR archiver, or any other product that works with the contents of ISO disks.

    After opening the image, we need to go to the “Setup” directory located in the root and then select one of the directories:

    • To install the 64-bit version: \Setup\WinSDKDebuggingTools_amd64 and unpack the dbg_amd64.msi file from this directory.
    • To install the 32-bit version: \Setup\WinSDKDebuggingTools and unpack the dbg_x86.msi file from this directory.

    Upon completion of installation, the working directories of the Debugging Tools for Windows package will be as follows:

    • For x86 version: C:\Program Files (x86)\Debugging Tools for Windows (x86)
    • For x64 version: C:\Program Files\Debugging Tools for Windows (x64)

    At this point, the installation of Debugging Tools for Windows can be considered complete.

    additional information

    I don’t know what this is connected with, maybe due to my carelessness, but after installing Debugging Tools for Windows, the installer does not set the path to the directory with the debugger in the system path variable Path. This imposes certain restrictions to launch various debugging tasks directly from the console. Therefore, if there is no path, I independently write in the window Environment Variables path to debugging tools:

    • C:\Program Files (x86)\Windows Kits\10\Debuggers\x86
    • C:\Program Files (x86)\Windows Kits\10\Debuggers\x64

    * In your case, the paths may differ both due to the use of an OS of a different bit size, and due to the use of a different SDK version.

    The utilities of the Debugging Tools for Windows package can work as portable applications; you just need to copy the directory from the working system Microsoft Windows Performance Toolkit and use it as a portable version on a production server. But do not forget to take into account the system capacity!! Even if you have completed a complete installation of the package on a critical system, you can start working right after installation, no reboot is required.

    Composition of Debugging Tools for Windows

    And now, finally, here is the composition of Debugging Tools for Windows:

    File Purpose
    adplus.doc Documentation for the ADPlus utility.
    adplus.exe A console application that automates the work of the cdb debugger to create dumps and log files for one or more processes.
    agestore.exe A utility for removing obsolete files from storage used by a symbol server or source server.
    breakin.exe A utility that allows you to send a custom break combination to processes, similar to pressing CTRL+C.
    cdb.exe User mode console debugger.
    convertstore.exe A utility for converting symbols from 2-tier to 3-tier.
    dbengprx.exe Repeater (proxy server) for remote debugging.
    dbgrpc.exe A utility for displaying RPC call status information.
    dbgsrv.exe Server process used for remote debugging.
    dbh.exe A utility for displaying information about the contents of a symbol file.
    dumpchk.exe Dump checking utility. Utility for quick check dump file.
    dumpexam.exe A utility for analyzing a memory dump. The result is output to %SystemRoot%\MEMORY.TXT .
    gflags.exe Editor of global system flags. The utility manages registry keys and other settings.
    i386kd.exe Wrapper for kd. Was that what kd was once called for systems based on Windows NT/2000 for x86 machines? Probably left for compatibility reasons.
    ia64kd.exe Wrapper for kd. Was it once called kd for systems based on Windows NT/2000 for ia64 machines? Probably left for compatibility reasons.
    kd.exe Kernel mode console debugger.
    kdbgctrl.exe Kernel debugging management tool. A utility for managing and configuring kernel debugging connection.
    kdsrv.exe Connection server for KD. The utility is a small application that runs and waits for remote connections. kd runs on the client and connects to this server for remote debugging. Both the server and client must be from the same Debugging Tools assembly.
    kill.exe A utility for ending processes.
    list.exe A utility for displaying the contents of a file on the screen. This miniature utility was included with one purpose - viewing large text or log files. It takes up little memory space because it loads the text in parts.
    logger.exe A miniature debugger that can only work with one process. The utility injects logexts.dll into process space, which records all function calls and other actions of the program under study.
    logviewer.exe A utility for viewing logs recorded by the logger.exe debugger.
    ntsd.exe Microsoft NT Symbolic Debugger (NTSD). A debugger identical to cdb except that it creates a text window when launched. Like cdb, ntsd is capable of debugging both console applications and graphical applications.
    pdbcopy.exe A utility for removing private symbols from a symbol file, controlling public symbols included in the symbol file.
    remote.exe A utility for remote debugging and remote control of any console debugger KD, CDB and NTSD. Allows you to run all these console debuggers remotely.
    rtlist.exe Remote task viewer. The utility is used to display a list running processes via the DbgSrv server process.
    symchk.exe A utility for downloading symbols from the Microsoft symbol server and creating a local symbol cache.
    symstore.exe A utility for creating a network or local symbol storage (2-tier/3-tier). Symbol storage is a specialized directory on disk, which is built in accordance with a specific structure and contains symbols. A structure of subfolders with names identical to the names of the components is created in the root directory of symbols. In turn, each of these subfolders contains nested subfolders that have special names obtained by hashing binary files. The symstore utility scans component folders and adds new components to the symbol store, where any client can retrieve them. It is said that symstore is used to receive symbols from 0-tier storage and put them into 2-tier/3-tier storage.
    tlist.exe Task viewer. A utility for displaying a list of all running processes.
    umdh.exe User-mode dump heap utility. A utility for analyzing heaps of the selected process. Allows you to display various parameters for the heap.
    usbview.exe USB Viewer. Viewer utility USB devices connected to the computer.
    vmdemux.exe Demultiplexer virtual machine. Creates several named pipes for one COM connection. Channels are used to debug various virtual machine components
    windbg.exe User mode and kernel mode debugger with GUI.

    Android Debug Bridge (adb) is a console program that allows you to debug mobile devices on Android, as well as emulators.

    Description

    This utility greatly simplifies installation and debugging of applications, and also provides access to the Unix shell. The latter can be used to run the necessary commands on the device. Among other things, the program can be used to unlock a smartphone with debugging mode enabled. It is worth noting, however, that Android Debug Bridge supports work with any Android devices, provided that the necessary functionality has not been blocked by the manufacturer.

    The program includes three components:

    • Client. Runs on the developer's PC and sends commands. To call the client, you can use the appropriate command in the terminal.
    • Demon (adbd). Executes commands on the device. Works in background on every device.
    • Server. Controls the interaction between the client and the daemon. Runs in the background on the developer's computer.

    ADB Features:

    • View a list of connected and supported devices.
    • View logs.
    • Copy and transfer data and files between devices.
    • Installing and uninstalling applications.
    • Clearing and overwriting the data section.
    • And also much more.

    From our website you can download Android Debug Bridge completely free of charge, without registration or SMS.

    Screenshots

    A driver is essentially a link between the operating system, that is software and hardware, that is, physical devices such as video cards, printers, processors, etc. IN operating system Basic drivers for the most necessary devices can be installed - mouse, keyboard, but for everything else you will need fresh drivers.

    How to install the driver?

    1.The easiest way, if available installation file, then you just need to run it and follow the installer's instructions.
    2.If there is no installer available, and there are only files with the extensions *.inf, *.dll, *.vxt, *.sys, *.drv., then the algorithm of actions should be approximately as follows:

    a) First you need to select the icon ( My computer) and click on it right click mouse, select ( Properties).

    b) Now go to the tab ( Equipment) and presses the button ( device Manager).

    c) Now you need to select the device for which the driver will be installed/updated. On the line with the device, you need to right-click and select ( Properties), or you can simply double-click on it to go to the desired settings.


    d) Go to the tab ( Driver), select the button ( Update).

    e) In the dialog box that appears, select the item ( No, not this time) and go to ( Further).

    f) At this stage there are two options. You can try to install the drivers in automatic mode, then the OS itself will try to find drivers suitable for the device and install them, for this we select ( Automatic installation(recommended)) , if the attempt fails, then you need to move on to the second point ( Installation from a specified location) and select ( Further).


    g) This menu item implies a choice between searching for a driver on removable media and the option to specify the folder with the driver yourself. Therefore, if you have a disk with drivers, you need to insert the disk into the CD-rom and select the option ( Search on removable media (floppy disks, CDs...)) and go ( Further).

    If the driver is found and downloaded on the Internet yourself, then you need to manually specify the path to the folder in which the installation data for the driver is located as follows. Select the item ( Include the following search location:) and go to ( Review), now select the folder with the driver from the list and click on the button ( OK). Now we boldly move on ( Further), if everything is done correctly, the installation of the necessary driver will begin.

    DOS Debug is a debugging application that enhances the functionality of the original MS DEBUG command. Running on 32-bit computer architectures only, it plays the role of an assembler and dissassembler, providing programmers with a way to diagnose COM and other executable files.

    The package includes a binary intended for debugging 16-bit applications (DEBUG.COM), as well as a modified version called DEBUGX.COM, which is compatible with 16-bit and 32-bit applications that run in protected mode (DPMI-enabled ).

    The application runs in the command console, allowing you to view a list of all the available commands by accessing the "Help" section.

    Among the additional features that DOS Debug brings you can find improvements to the assembler and dissassembler, (which can notify you in case processor incompatibilities are detected), support for FPU Opcodes, 80386+ CPUs and as such, 32-bit register names.

    Also, it can act as a hex dump application and bundles options for analyzing memory content, comparing or filling a range of addresses, displaying the MCB chain (DOS memory control block). Other commands allow you to gain access to certain disk sections, ports and memory sectors or set a program"s name.

    DEBUG.COM runs as a 16-bit program, which means that it can act on 16-bit applications only, but its improved version (DEBUGX.COM) allows the debugging of 32-bit DPMI programs as well.

    Intended for experienced programmers, DOS Debug provides an utility that can replace the MS DEBUG command. It can process both 16-bit and 32-bit DPMI packages and includes detailed function description in the documentation, which allows the easy understanding of what each command does.