diff --git a/programs/winedbg/crashdlg.c b/programs/winedbg/crashdlg.c
index 89082b4..ede5d2c 100644
--- a/programs/winedbg/crashdlg.c
+++ b/programs/winedbg/crashdlg.c
@@ -2,6 +2,7 @@
  * The dialog that displays after a crash
  *
  * Copyright 2008 Mikolaj Zalewski
+ * Copyright 2011 André Hentschel
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -21,6 +22,7 @@
 #include "debugger.h"
 #include "wingdi.h"
 #include "winuser.h"
+#include "commdlg.h"
 #include "commctrl.h"
 #include "shellapi.h"
 #include "psapi.h"
@@ -32,6 +34,19 @@
 
 #define MAX_PROGRAM_NAME_LENGTH 80
 
+static HINSTANCE hInstance;
+static LPWSTR g_ProgramName;
+static HFONT g_hBoldFont;
+static HWND hEdit;
+static HANDLE hFile;
+static WCHAR filename[MAX_PATH];
+
+enum output_targets
+{
+    TO_EDIT_CONTROL,
+    TO_STD_ERROR_HANDLE,
+};
+
 int msgbox_res_id(HWND hwnd, UINT textId, UINT captionId, UINT uType)
 {
     WCHAR caption[256];
@@ -82,9 +97,6 @@ static WCHAR *get_program_name(HANDLE hProcess)
     return output;
 }
 
-static LPWSTR g_ProgramName;
-static HFONT g_hBoldFont;
-
 static void set_bold_font(HWND hDlg)
 {
     HFONT hNormalFont = (HFONT)SendDlgItemMessageW(hDlg, IDC_STATIC_TXT1,
@@ -96,6 +108,103 @@ static void set_bold_font(HWND hDlg)
     SendDlgItemMessageW(hDlg, IDC_STATIC_TXT1, WM_SETFONT, (WPARAM)g_hBoldFont, TRUE);
 }
 
+void report_save_to_tmp(void)
+{
+    WCHAR path[MAX_PATH];
+
+    if (!GetTempPathW(MAX_PATH, path)) return;
+    if (!GetTempFileNameW(path, NULL, 0, filename)) return;
+    hFile = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
+    if (hFile == INVALID_HANDLE_VALUE) return;
+    else dbg_houtput = hFile;
+}
+
+static void report_output(HWND hDlg, enum output_targets target)
+{
+    LPSTR pTemp;
+    DWORD size;
+    DWORD dwNumRead;
+    int lenW;
+    HANDLE myfile;
+
+    if (dbg_houtput != hFile) return;
+    CloseHandle(hFile);
+
+    myfile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+                        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+    if (myfile == INVALID_HANDLE_VALUE) return;
+
+    size = GetFileSize(myfile, NULL);
+    if (size == INVALID_FILE_SIZE)
+    {
+        CloseHandle(myfile);
+        return;
+    }
+
+    /* Extra memory for (WCHAR)'\0'-termination. */
+    pTemp = HeapAlloc(GetProcessHeap(), 0, size+2);
+    if (!pTemp)
+    {
+        CloseHandle(myfile);
+        return;
+    }
+
+    if (!ReadFile(myfile, pTemp, size, &dwNumRead, NULL))
+    {
+        CloseHandle(myfile);
+        HeapFree(GetProcessHeap(), 0, pTemp);
+        return;
+    }
+
+    CloseHandle(myfile);
+
+    lenW = dwNumRead/sizeof(WCHAR);
+
+    switch(target)
+    {
+        case TO_EDIT_CONTROL:
+            SetWindowTextA(hEdit, pTemp);
+            break;
+        case TO_STD_ERROR_HANDLE:
+            WriteFile(GetStdHandle(STD_ERROR_HANDLE), pTemp, size, NULL, NULL);
+            DeleteFileW(filename);
+            break;
+    }
+    HeapFree(GetProcessHeap(), 0, pTemp);
+}
+
+static LRESULT WINAPI report_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+    switch (msg)
+    {
+    case WM_CREATE:
+    {
+        static const WCHAR editW[] = { 'e','d','i','t',0 };
+        DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | ES_READONLY |
+                        ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL | WS_HSCROLL | ES_AUTOHSCROLL;
+        RECT rc;
+        GetClientRect(hwnd, &rc);
+
+        hEdit = CreateWindowExW(WS_EX_CLIENTEDGE, editW, NULL,
+                                dwStyle, 0, 0, rc.right, rc.bottom, hwnd,
+                                NULL, NULL, NULL);
+        break;
+    }
+
+    case WM_SIZE:
+        SetWindowPos(hEdit, NULL, 0, 0, LOWORD(lParam), HIWORD(lParam),
+                     SWP_NOOWNERZORDER | SWP_NOZORDER);
+        break;
+
+    case WM_DESTROY:
+        hEdit = NULL;
+        /* fall through */
+    default:
+        return DefWindowProcW(hwnd, msg, wParam, lParam);
+    }
+    return 0;
+}
+
 static void set_message_with_filename(HWND hDlg)
 {
     WCHAR originalText[1000];
@@ -109,11 +218,22 @@ static void set_message_with_filename(HWND hDlg)
 
 static INT_PTR WINAPI DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
+    static const WCHAR className[]   = {'B','a','c','k','t','r','a','c','e',0};
     static const WCHAR openW[] = {'o','p','e','n',0};
     switch (msg)
     {
     case WM_INITDIALOG:
     {
+        WNDCLASSEXW class;
+        hInstance = (HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE);
+        ZeroMemory(&class, sizeof(class));
+        class.cbSize = sizeof(class);
+        class.lpfnWndProc = report_WndProc;
+        class.hInstance = hInstance;
+        class.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
+        class.lpszClassName = className;
+        if (!RegisterClassExW(&class)) return FALSE;
+
         set_bold_font(hwnd);
         set_message_with_filename(hwnd);
         return TRUE;
@@ -141,8 +261,34 @@ static INT_PTR WINAPI DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
     case WM_COMMAND:
         switch (LOWORD(wParam))
         {
-            case IDOK:
-            case IDCANCEL:
+            case ID_SHOWDETAILS:
+            {
+                RECT dlg;
+                LPWSTR name;
+                INT len;
+
+                if (hEdit)
+                {
+                    SetFocus(hEdit);
+                    return TRUE;
+                }
+
+                len = GetWindowTextLengthW(hwnd) + 1;
+                name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+                if (name)
+                    GetWindowTextW(hwnd, name, len);
+
+                GetWindowRect(hwnd, &dlg);
+                CreateWindowW(className, name, WS_VISIBLE | WS_OVERLAPPEDWINDOW,
+                              dlg.right, dlg.top, 2*(dlg.right-dlg.left), 2*(dlg.bottom-dlg.top),
+                              hwnd, NULL, hInstance, NULL);
+                HeapFree(GetProcessHeap(), 0, name);
+                report_output(hwnd, TO_EDIT_CONTROL);
+                return TRUE;
+            }
+             case IDOK:
+             case IDCANCEL:
+                report_output(hwnd, TO_STD_ERROR_HANDLE);
                 EndDialog(hwnd, LOWORD(wParam));
                 return TRUE;
         }
diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h
index fc3aada..91a6790 100644
--- a/programs/winedbg/debugger.h
+++ b/programs/winedbg/debugger.h
@@ -309,6 +309,7 @@ extern int              break_add_condition(int bpnum, struct expr* exp);
 
   /* crashdlg.c */
 extern void             display_crash_dialog(void);
+extern void             report_save_to_tmp(void);
 extern int              msgbox_res_id(HWND hwnd, UINT textId, UINT captionId, UINT uType);
 
   /* dbg.y */
@@ -446,6 +447,7 @@ extern struct dbg_type  types_find_type(unsigned long linear, const char* name,
   /* winedbg.c */
 extern void	        dbg_outputW(const WCHAR* buffer, int len);
 extern const char*      dbg_W2A(const WCHAR* buffer, unsigned len);
+extern HANDLE           dbg_houtput;
 #ifdef __GNUC__
 extern int	        dbg_printf(const char* format, ...) __attribute__((format (printf,1,2)));
 #else
diff --git a/programs/winedbg/resource.h b/programs/winedbg/resource.h
index fcf0416..6563a53 100644
--- a/programs/winedbg/resource.h
+++ b/programs/winedbg/resource.h
@@ -26,6 +26,9 @@
 #define IDC_STATIC_BG   100
 #define IDC_STATIC_TXT1 101
 #define IDC_STATIC_TXT2 102
+#define IDC_CRASHLOG    103
+
+#define ID_SHOWDETAILS  200
 
 #define IDS_AUTO_CAPTION      16
 #define IDS_INVALID_PARAMS    17
diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c
index 099b353..913740b 100644
--- a/programs/winedbg/tgt_active.c
+++ b/programs/winedbg/tgt_active.c
@@ -766,7 +766,8 @@ enum dbg_start dbg_active_auto(int argc, char* argv[])
             msgbox_res_id(NULL, IDS_INVALID_PARAMS, IDS_AUTO_CAPTION, MB_OK);
             return ds;
         }
-        display_crash_dialog();
+
+        report_save_to_tmp();
 
         hFile = parser_generate_command_file("echo Modules:", "info share",
                                              "echo Threads:", "info threads",
diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c
index a3a9f16..7f8a407 100644
--- a/programs/winedbg/winedbg.c
+++ b/programs/winedbg/winedbg.c
@@ -88,12 +88,12 @@ struct dbg_thread*	dbg_curr_thread = NULL;
 DWORD_PTR	        dbg_curr_tid = 0;
 DWORD_PTR	        dbg_curr_pid = 0;
 CONTEXT                 dbg_context;
+HANDLE                  dbg_houtput;
 BOOL    	        dbg_interactiveP = FALSE;
 
 static struct list      dbg_process_list = LIST_INIT(dbg_process_list);
 
 struct dbg_internal_var         dbg_internal_vars[DBG_IV_LAST];
-static HANDLE                   dbg_houtput;
 
 static void dbg_outputA(const char* buffer, int len)
 {
@@ -675,7 +675,9 @@ int main(int argc, char** argv)
         dbg_houtput = GetStdHandle(STD_ERROR_HANDLE);
         switch (dbg_active_auto(argc, argv))
         {
-        case start_ok:          return 0;
+        case start_ok:
+            display_crash_dialog();
+            return 0;
         case start_error_parse: return dbg_winedbg_usage(FALSE);
         case start_error_init:  return -1;
         }
diff --git a/programs/winedbg/winedbg.rc b/programs/winedbg/winedbg.rc
index 539fdcb..fbd1410 100644
--- a/programs/winedbg/winedbg.rc
+++ b/programs/winedbg/winedbg.rc
@@ -43,5 +43,6 @@ BEGIN
                     this application.\n\n\
                     If this problem is not present under Windows and has not been reported \
                     yet, you can <a href=\"http://wiki.winehq.org/Bugs\">file a bug report</a>.",IDC_STATIC_TXT2,"SysLink",0,27,60,224,100
+    PUSHBUTTON      "Show Details", ID_SHOWDETAILS, 140, 151, 60, 16
     DEFPUSHBUTTON   "Close", IDOK, 205, 151, 60, 16, WS_TABSTOP
 END
