Module: wine
Branch: master
Commit: 0b4dc016b9ffd7382dcaed68767b243d6ed5ef9b
URL: https://gitlab.winehq.org/wine/wine/-/commit/0b4dc016b9ffd7382dcaed68767b24…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com>
Date: Sun Apr 16 20:38:53 2023 -0400
include: Add windows.graphics.capture.interop.idl file.
Needed for PyWinRT.
---
include/Makefile.in | 1 +
include/windows.graphics.capture.interop.idl | 34 ++++++++++++++++++++++++++++
include/wtypes.idl | 2 ++
3 files changed, 37 insertions(+)
diff --git a/include/Makefile.in b/include/Makefile.in
index 54d6dca234d..7a6e5d62763 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -817,6 +817,7 @@ SOURCES = \
windows.gaming.ui.idl \
windows.globalization.idl \
windows.graphics.capture.idl \
+ windows.graphics.capture.interop.idl \
windows.graphics.directx.direct3d11.idl \
windows.graphics.directx.idl \
windows.graphics.effects.idl \
diff --git a/include/windows.graphics.capture.interop.idl b/include/windows.graphics.capture.interop.idl
new file mode 100644
index 00000000000..83c7158cf2c
--- /dev/null
+++ b/include/windows.graphics.capture.interop.idl
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2023 Mohamad Al-Jaf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifdef __WIDL__
+#pragma winrt ns_prefix
+#endif
+
+import "windows.ui.composition.idl";
+import "windows.graphics.capture.idl";
+import "sdkddkver.h";
+
+[
+ uuid(3628e81b-3cac-4c60-b7f4-23ce0e0c3356)
+]
+interface IGraphicsCaptureItemInterop : IUnknown
+{
+ HRESULT CreateForWindow([in] HWND window, [in] REFIID iid, [out, iid_is(iid)] void **result);
+ HRESULT CreateForMonitor([in] HMONITOR monitor, [in] REFIID iid, [out, iid_is(iid)] void **result);
+}
diff --git a/include/wtypes.idl b/include/wtypes.idl
index 5a09ed717cb..0db3a397d41 100644
--- a/include/wtypes.idl
+++ b/include/wtypes.idl
@@ -563,6 +563,7 @@ typedef [unique] RemotableHandle *wireHFONT;
typedef [unique] RemotableHandle *wireHICON;
typedef [unique] RemotableHandle *wireHMENU;
typedef [unique] RemotableHandle *wireHWND;
+typedef [unique] RemotableHandle *wireHMONITOR;
cpp_quote("#if 0") /* for IDL only (C/C++ defs are in windef.h) */
DECLARE_WIREM_HANDLE(HACCEL);
@@ -572,6 +573,7 @@ DECLARE_WIREM_HANDLE(HFONT);
DECLARE_WIREM_HANDLE(HICON);
DECLARE_WIREM_HANDLE(HMENU);
DECLARE_WIREM_HANDLE(HWND);
+DECLARE_WIREM_HANDLE(HMONITOR);
typedef HICON HCURSOR;
Module: wine
Branch: master
Commit: 812b4b1ca35319c317141587bb0ed8e3af9e014b
URL: https://gitlab.winehq.org/wine/wine/-/commit/812b4b1ca35319c317141587bb0ed8…
Author: Eric Pouech <epouech(a)codeweavers.com>
Date: Mon Apr 17 18:43:53 2023 +0200
dbghelp: Use source file path as stored in debug info format.
Currently, dbghelp returns the source file either:
- in DOS format when native module option isn't enabled
- as stored in debug info format otherwise
This used to work for PE modules inside ELF shared libraries but is broken
since evolution to REAL modules. This generates several issues:
- winedbg does not always set the native module option when calling dbghelp
for source file related functions, leading to heterogenous output to user
- some dbghelp function rely on matching source paths, hence leading to
errors in winedbg when mixing the two formats for the same source file.
Introduce a new Wine only dbghelp option to return the source paths as they
are stored inside debug information format, and activate it unconditionaly
inside winedbg.
This fixes some failure cases of command 'break <NN>' in winedbg.
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
---
dlls/dbghelp/dbghelp.c | 7 +++++++
dlls/dbghelp/dbghelp_private.h | 1 +
dlls/dbghelp/symbol.c | 2 +-
include/dbghelp.h | 4 ++++
programs/winedbg/winedbg.c | 2 ++
5 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c
index 3341bea442e..d3003fc44d2 100644
--- a/dlls/dbghelp/dbghelp.c
+++ b/dlls/dbghelp/dbghelp.c
@@ -68,6 +68,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
unsigned dbghelp_options = SYMOPT_UNDNAME;
BOOL dbghelp_opt_native = FALSE;
BOOL dbghelp_opt_real_path = FALSE;
+BOOL dbghelp_opt_source_actual_path = FALSE;
SYSTEM_INFO sysinfo;
static struct process* process_first /* = NULL */;
@@ -619,6 +620,10 @@ BOOL WINAPI SymSetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option, BOOL value)
old = dbghelp_opt_real_path;
dbghelp_opt_real_path = value;
break;
+ case SYMOPT_EX_WINE_SOURCE_ACTUAL_PATH:
+ old = dbghelp_opt_source_actual_path;
+ dbghelp_opt_source_actual_path = value;
+ break;
default:
FIXME("Unsupported option %d with value %d\n", option, value);
}
@@ -638,6 +643,8 @@ BOOL WINAPI SymGetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option)
return dbghelp_opt_native;
case SYMOPT_EX_WINE_MODULE_REAL_PATH:
return dbghelp_opt_real_path;
+ case SYMOPT_EX_WINE_SOURCE_ACTUAL_PATH:
+ return dbghelp_opt_source_actual_path;
default:
FIXME("Unsupported option %d\n", option);
}
diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index 9a9773269af..7ba10447771 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -112,6 +112,7 @@ void* hash_table_iter_up(struct hash_table_iter* hti) DECLSPEC_HIDDEN;
extern unsigned dbghelp_options DECLSPEC_HIDDEN;
extern BOOL dbghelp_opt_native DECLSPEC_HIDDEN;
extern BOOL dbghelp_opt_real_path DECLSPEC_HIDDEN;
+extern BOOL dbghelp_opt_source_actual_path DECLSPEC_HIDDEN;
extern SYSTEM_INFO sysinfo DECLSPEC_HIDDEN;
/* FIXME: this could be optimized later on by using relative offsets and smaller integral sizes */
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index e3352761c53..5579d79bf48 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -1882,7 +1882,7 @@ static BOOL get_line_from_function(struct module_pair* pair, struct symt_functio
if (found_dli)
{
BOOL ret;
- if (dbghelp_opt_native)
+ if (dbghelp_opt_source_actual_path)
{
/* Return native file paths when using winedbg */
ret = internal_line_set_nameA(pair->pcs, intl, (char*)source_get(pair->effective, dli->u.source_file), FALSE);
diff --git a/include/dbghelp.h b/include/dbghelp.h
index fda8fefa35f..84fa7e10595 100644
--- a/include/dbghelp.h
+++ b/include/dbghelp.h
@@ -1098,8 +1098,12 @@ typedef enum
SYMOPT_EX_MAX,
#ifdef __WINESRC__
+ /* Include ELF/Mach-O modules in module operations */
SYMOPT_EX_WINE_NATIVE_MODULES = 1000,
+ /* Return the Unix actual path of loaded module */
SYMOPT_EX_WINE_MODULE_REAL_PATH,
+ /* Return the raw source file path from debug info (not always mapped to DOS) */
+ SYMOPT_EX_WINE_SOURCE_ACTUAL_PATH,
#endif
} IMAGEHLP_EXTENDED_OPTIONS;
diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c
index 9815ed4a046..e7ba6afa2e4 100644
--- a/programs/winedbg/winedbg.c
+++ b/programs/winedbg/winedbg.c
@@ -722,6 +722,8 @@ int main(int argc, char** argv)
SYMOPT_LOAD_LINES | SYMOPT_DEFERRED_LOADS | SYMOPT_AUTO_PUBLICS |
SYMOPT_INCLUDE_32BIT_MODULES);
+ SymSetExtendedOption(SYMOPT_EX_WINE_SOURCE_ACTUAL_PATH, TRUE);
+
if (argc && !strcmp(argv[0], "--auto"))
{
switch (dbg_active_auto(argc, argv))
Module: wine
Branch: master
Commit: fd87ddfae795b438addc463366a7f8d03fe4f750
URL: https://gitlab.winehq.org/wine/wine/-/commit/fd87ddfae795b438addc463366a7f8…
Author: Eric Pouech <epouech(a)codeweavers.com>
Date: Mon Apr 17 18:43:53 2023 +0200
winedbg: Let 'break symbol : line' command work again.
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
---
programs/winedbg/break.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/break.c b/programs/winedbg/break.c
index 6cff37eb886..88c8eef20ab 100644
--- a/programs/winedbg/break.c
+++ b/programs/winedbg/break.c
@@ -340,8 +340,17 @@ void break_add_break_from_lineno(const char *filename, int lineno, BOOL swbp)
if (bkln.addr.Offset)
break_add_break(&bkln.addr, TRUE, swbp);
else
- dbg_printf("Unknown line number\n"
- "(either out of file, or no code at given line number)\n");
+ {
+ /* winedbg's lexer can't tell in 'break foo : 3' whether foo shall be interpreted
+ * as a debuggee symbol or as a debuggee source file.
+ * Try now symbol since source file failed.
+ */
+ if (filename)
+ break_add_break_from_id(filename, lineno, swbp);
+ else
+ dbg_printf("Unknown line number\n"
+ "(either out of file, or no code at given line number)\n");
+ }
}
/***********************************************************************