Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b2fe43b5
Commit
b2fe43b5
authored
Feb 04, 2022
by
Esme Povirk
Committed by
Alexandre Julliard
Feb 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diasymreader: Implement SymWriter_GetDebugInfo.
Signed-off-by:
Esme Povirk
<
esme@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3237e402
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
3 deletions
+63
-3
Makefile.in
dlls/diasymreader/Makefile.in
+1
-1
writer.c
dlls/diasymreader/writer.c
+62
-2
No files found.
dlls/diasymreader/Makefile.in
View file @
b2fe43b5
MODULE
=
diasymreader.dll
IMPORTS
=
uuid
IMPORTS
=
uuid
rpcrt4
EXTRADLLFLAGS
=
-Wb
,--prefer-native
...
...
dlls/diasymreader/writer.c
View file @
b2fe43b5
...
...
@@ -23,7 +23,9 @@
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "rpc.h"
#include "wine/mscvpdb.h"
#include "wine/debug.h"
#include "wine/heap.h"
...
...
@@ -34,6 +36,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(diasymreader);
typedef
struct
SymWriter
{
ISymUnmanagedWriter5
iface
;
LONG
ref
;
CRITICAL_SECTION
lock
;
GUID
pdb_guid
;
DWORD
pdb_age
;
WCHAR
pdb_filename
[
MAX_PATH
];
}
SymWriter
;
static
inline
SymWriter
*
impl_from_ISymUnmanagedWriter5
(
ISymUnmanagedWriter5
*
iface
)
...
...
@@ -87,6 +93,8 @@ static ULONG WINAPI SymWriter_Release(ISymUnmanagedWriter5 *iface)
if
(
ref
==
0
)
{
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
lock
);
heap_free
(
This
);
}
...
...
@@ -213,15 +221,62 @@ static HRESULT WINAPI SymWriter_SetMethodSourceRange(ISymUnmanagedWriter5 *iface
static
HRESULT
WINAPI
SymWriter_Initialize
(
ISymUnmanagedWriter5
*
iface
,
IUnknown
*
emitter
,
const
WCHAR
*
filename
,
IStream
*
pIStream
,
BOOL
fFullBuild
)
{
SymWriter
*
This
=
impl_from_ISymUnmanagedWriter5
(
iface
);
FIXME
(
"(%p,%p,%s,%p,%u)
\n
"
,
iface
,
emitter
,
debugstr_w
(
filename
),
pIStream
,
fFullBuild
);
EnterCriticalSection
(
&
This
->
lock
);
if
(
filename
)
wcsncpy_s
(
This
->
pdb_filename
,
MAX_PATH
,
filename
,
_TRUNCATE
);
LeaveCriticalSection
(
&
This
->
lock
);
return
S_OK
;
}
static
HRESULT
WINAPI
SymWriter_GetDebugInfo
(
ISymUnmanagedWriter5
*
iface
,
IMAGE_DEBUG_DIRECTORY
*
pIDD
,
DWORD
cData
,
DWORD
*
pcData
,
BYTE
data
[])
{
FIXME
(
"(%p,%p,%lu,%p,%p)
\n
"
,
iface
,
pIDD
,
cData
,
pcData
,
data
);
return
E_NOTIMPL
;
SymWriter
*
This
=
impl_from_ISymUnmanagedWriter5
(
iface
);
DWORD
name_length
,
data_size
;
OMFSignatureRSDS
*
rsds_data
=
(
OMFSignatureRSDS
*
)
data
;
TRACE
(
"(%p,%p,%lu,%p,%p)
\n
"
,
iface
,
pIDD
,
cData
,
pcData
,
data
);
EnterCriticalSection
(
&
This
->
lock
);
name_length
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
This
->
pdb_filename
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
data_size
=
FIELD_OFFSET
(
OMFSignatureRSDS
,
name
)
+
name_length
;
if
(
pcData
)
*
pcData
=
data_size
;
if
(
pIDD
)
{
pIDD
->
Characteristics
=
0
;
pIDD
->
MajorVersion
=
0
;
pIDD
->
MinorVersion
=
0
;
pIDD
->
Type
=
IMAGE_DEBUG_TYPE_CODEVIEW
;
pIDD
->
SizeOfData
=
data_size
;
}
if
(
data
)
{
if
(
data_size
>
cData
)
{
LeaveCriticalSection
(
&
This
->
lock
);
return
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
}
memcpy
(
rsds_data
->
Signature
,
"RSDS"
,
4
);
rsds_data
->
guid
=
This
->
pdb_guid
;
rsds_data
->
age
=
This
->
pdb_age
;
WideCharToMultiByte
(
CP_UTF8
,
0
,
This
->
pdb_filename
,
-
1
,
rsds_data
->
name
,
name_length
,
NULL
,
NULL
);
}
LeaveCriticalSection
(
&
This
->
lock
);
return
S_OK
;
}
static
HRESULT
WINAPI
SymWriter_DefineSequencePoints
(
ISymUnmanagedWriter5
*
iface
,
ISymUnmanagedDocumentWriter
*
document
,
...
...
@@ -367,6 +422,11 @@ HRESULT SymWriter_CreateInstance(REFIID iid, void **ppv)
This
->
iface
.
lpVtbl
=
&
SymWriter_Vtbl
;
This
->
ref
=
1
;
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": SymWriter.lock"
);
UuidCreate
(
&
This
->
pdb_guid
);
This
->
pdb_age
=
1
;
This
->
pdb_filename
[
0
]
=
0
;
hr
=
IUnknown_QueryInterface
(
&
This
->
iface
,
iid
,
ppv
);
...
...
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