Eric Pouech : dbghelp: SymSetContext should return FALSE when setting
twice the same
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jan 23 10:35:11 CST 2006
Module: wine
Branch: refs/heads/master
Commit: e5d09bf374bdfecee2f176bf53956c6f40222118
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e5d09bf374bdfecee2f176bf53956c6f40222118
Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date: Mon Jan 23 16:30:25 2006 +0100
dbghelp: SymSetContext should return FALSE when setting twice the same
frame context.
---
dlls/dbghelp/dbghelp.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c
index 66d687d..289e113 100644
--- a/dlls/dbghelp/dbghelp.c
+++ b/dlls/dbghelp/dbghelp.c
@@ -338,6 +338,18 @@ BOOL WINAPI SymSetContext(HANDLE hProces
struct process* pcs = process_find_by_handle(hProcess);
if (!pcs) return FALSE;
+ if (pcs->ctx_frame.ReturnOffset == StackFrame->ReturnOffset &&
+ pcs->ctx_frame.FrameOffset == StackFrame->FrameOffset &&
+ pcs->ctx_frame.StackOffset == StackFrame->StackOffset)
+ {
+ TRACE("Setting same frame {rtn=%s frm=%s stk=%s}\n",
+ wine_dbgstr_longlong(pcs->ctx_frame.ReturnOffset),
+ wine_dbgstr_longlong(pcs->ctx_frame.FrameOffset),
+ wine_dbgstr_longlong(pcs->ctx_frame.StackOffset));
+ SetLastError(ERROR_ACCESS_DENIED); /* latest MSDN says ERROR_SUCCESS */
+ return FALSE;
+ }
+
pcs->ctx_frame = *StackFrame;
/* MSDN states that Context is not (no longer?) used */
return TRUE;
More information about the wine-cvs
mailing list