Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2d309da2
Commit
2d309da2
authored
Mar 04, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for Ctrl-C handling if not running in a console.
Added (maintenance) configuration var to trigger external debugger on winedbg's exceptions.
parent
a2b7141a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
31 deletions
+50
-31
dbg.y
programs/winedbg/dbg.y
+38
-26
debugger.h
programs/winedbg/debugger.h
+1
-0
intvar.h
programs/winedbg/intvar.h
+1
-0
winedbg.c
programs/winedbg/winedbg.c
+10
-5
No files found.
programs/winedbg/dbg.y
View file @
2d309da2
...
...
@@ -386,32 +386,44 @@ void DEBUG_Exit(DWORD ec)
static WINE_EXCEPTION_FILTER(wine_dbg_cmd)
{
DEBUG_Printf(DBG_CHN_MESG, "\nwine_dbg_cmd: ");
switch (GetExceptionCode()) {
case DEBUG_STATUS_INTERNAL_ERROR:
DEBUG_Printf(DBG_CHN_MESG, "WineDbg internal error\n");
break;
case DEBUG_STATUS_NO_SYMBOL:
DEBUG_Printf(DBG_CHN_MESG, "Undefined symbol\n");
break;
case DEBUG_STATUS_DIV_BY_ZERO:
DEBUG_Printf(DBG_CHN_MESG, "Division by zero\n");
break;
case DEBUG_STATUS_BAD_TYPE:
DEBUG_Printf(DBG_CHN_MESG, "No type or type mismatch\n");
break;
case DEBUG_STATUS_NO_FIELD:
DEBUG_Printf(DBG_CHN_MESG, "No such field in structure or union\n");
break;
case DEBUG_STATUS_ABORT:
break;
default:
DEBUG_Printf(DBG_CHN_MESG, "Exception %lx\n", GetExceptionCode());
DEBUG_ExternalDebugger();
break;
}
return EXCEPTION_EXECUTE_HANDLER;
if (DBG_IVAR(ExtDbgOnInternalException))
DEBUG_ExternalDebugger();
DEBUG_Printf(DBG_CHN_MESG, "\nwine_dbg_cmd: ");
switch (GetExceptionCode()) {
case DEBUG_STATUS_INTERNAL_ERROR:
DEBUG_Printf(DBG_CHN_MESG, "WineDbg internal error\n");
if (DBG_IVAR(ExtDbgOnInternalException))
DEBUG_ExternalDebugger();
break;
case DEBUG_STATUS_NO_SYMBOL:
DEBUG_Printf(DBG_CHN_MESG, "Undefined symbol\n");
break;
case DEBUG_STATUS_DIV_BY_ZERO:
DEBUG_Printf(DBG_CHN_MESG, "Division by zero\n");
break;
case DEBUG_STATUS_BAD_TYPE:
DEBUG_Printf(DBG_CHN_MESG, "No type or type mismatch\n");
break;
case DEBUG_STATUS_NO_FIELD:
DEBUG_Printf(DBG_CHN_MESG, "No such field in structure or union\n");
break;
case DEBUG_STATUS_ABORT:
break;
case CONTROL_C_EXIT:
/* this is generally sent by a ctrl-c when we run winedbg outside of wineconsole */
DEBUG_Printf(DBG_CHN_MESG, "Ctrl-C\n");
/* stop the debuggee, and continue debugger execution, we will be reintered by the
* debug events generated by stopping
*/
DEBUG_InterruptDebuggee();
return EXCEPTION_CONTINUE_EXECUTION;
default:
DEBUG_Printf(DBG_CHN_MESG, "Exception %lx\n", GetExceptionCode());
DEBUG_ExternalDebugger();
break;
}
return EXCEPTION_EXECUTE_HANDLER;
}
static void set_default_channels(void)
...
...
programs/winedbg/debugger.h
View file @
2d309da2
...
...
@@ -543,6 +543,7 @@ extern void DEBUG_DelThread(DBG_THREAD* t);
extern
BOOL
DEBUG_ProcessGetString
(
char
*
buffer
,
int
size
,
HANDLE
hp
,
LPSTR
addr
);
extern
BOOL
DEBUG_ProcessGetStringIndirect
(
char
*
buffer
,
int
size
,
HANDLE
hp
,
LPVOID
addr
);
extern
void
DEBUG_WaitNextException
(
DWORD
cont
,
int
count
,
int
mode
);
extern
BOOL
DEBUG_InterruptDebuggee
(
void
);
extern
int
curr_frame
;
/* gdbproxy.c */
...
...
programs/winedbg/intvar.h
View file @
2d309da2
...
...
@@ -33,6 +33,7 @@ INTERNAL_VAR(StdChannelMask, 0, NULL, DT_BASIC_CONST_INT)
/* debugging debugger */
INTERNAL_VAR
(
ExtDbgOnInvalidAddress
,
FALSE
,
NULL
,
DT_BASIC_CONST_INT
)
INTERNAL_VAR
(
ExtDbgOnInternalException
,
FALSE
,
NULL
,
DT_BASIC_CONST_INT
)
/* current process/thread */
INTERNAL_VAR
(
ThreadId
,
FALSE
,
&
DEBUG_CurrTid
,
DT_BASIC_CONST_INT
)
...
...
programs/winedbg/winedbg.c
View file @
2d309da2
...
...
@@ -988,15 +988,20 @@ void DEBUG_Run(const char* args)
}
}
BOOL
DEBUG_InterruptDebuggee
(
void
)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"Ctrl-C: stopping debuggee
\n
"
);
/* FIXME: since we likely have a single process, signal the first process
* in list
*/
return
DEBUG_ProcessList
&&
DebugBreakProcess
(
DEBUG_ProcessList
->
handle
);
}
static
BOOL
WINAPI
DEBUG_CtrlCHandler
(
DWORD
dwCtrlType
)
{
if
(
dwCtrlType
==
CTRL_C_EVENT
)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"Ctrl-C: stopping debuggee
\n
"
);
/* FIXME: since we likely have a single process, signal the first process
* in list
*/
return
DEBUG_ProcessList
&&
DebugBreakProcess
(
DEBUG_ProcessList
->
handle
);
return
DEBUG_InterruptDebuggee
();
}
return
FALSE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment