DynamoRIO / DynamoRIO/dynamorio

on Windows 8.1, cannot attach debugger at process exit time

Open
#1,320 1 comment 0 reactions 0 assignees View on GitHub
Maintainability Migrated OpSys-Windows Priority-Medium Type-Feature
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on November 13, 2013 14:20:01_

I'm filing this to document this behavior and to cover finding some
workaround allowing us to attach at exit time on Win8.1.
I first hit this with Dr. Memory's -pause_at_exit:

# bin/drmemory.exe -dr_debug -pause_at_exit -batch -- ../free.exe

Now attach the debugger while the msgbox is up: it starts to attach and
then aborts, and the app exits:

~~Dr.M~~ WARNING: application exited with abnormal code 0xc0000354

The code means:
// Debugger Inactive: Windows may have been started without kernel debugging enabled.
//
#define STATUS_DEBUGGER_INACTIVE ((NTSTATUS)0xC0000354L)

Ditto w/ -msgbox_mask 15 stop msg.
Ditto on hello.exe under plain DR:
# dynamorio/bin32/drrun -quiet -debug -stderr_mask 15 -msgbox_mask 15 -- ../hello.exe

Attaching at exit time works fine on Win8, so they've added yet another
user-mode reliance for the debugger.

_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1320_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.