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
17d93f98
Commit
17d93f98
authored
Dec 19, 2005
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Implemented SymMatchString.
parent
a80d93c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
7 deletions
+29
-7
dbghelp.spec
dlls/dbghelp/dbghelp.spec
+1
-1
symbol.c
dlls/dbghelp/symbol.c
+26
-6
dbghelp.h
include/dbghelp.h
+2
-0
No files found.
dlls/dbghelp/dbghelp.spec
View file @
17d93f98
...
...
@@ -81,7 +81,7 @@
@ stdcall SymLoadModule(long long str str long long)
@ stdcall SymLoadModuleEx(long long str str double long ptr long)
@ stdcall SymMatchFileName(str str ptr ptr)
@ st
ub SymMatchString
@ st
dcall SymMatchString(str str long)
@ stdcall SymRegisterCallback64(long ptr double)
@ stdcall SymRegisterCallback(long ptr ptr)
@ stdcall SymRegisterFunctionEntryCallback64(ptr ptr double)
...
...
dlls/dbghelp/symbol.c
View file @
17d93f98
...
...
@@ -81,11 +81,12 @@ static inline void re_append(char** mask, unsigned* len, char ch)
* + 1 or more of preceding char
* escapes \ on #, ?, [, ], *, +. don't work on -
*/
static
void
compile_regex
(
const
char
*
str
,
int
numchar
,
regex_t
*
re
)
static
void
compile_regex
(
const
char
*
str
,
int
numchar
,
regex_t
*
re
,
BOOL
_case
)
{
char
*
mask
=
HeapAlloc
(
GetProcessHeap
(),
0
,
1
);
unsigned
len
=
1
;
BOOL
in_escape
=
FALSE
;
unsigned
flags
=
REG_NOSUB
;
re_append
(
&
mask
,
&
len
,
'^'
);
...
...
@@ -118,7 +119,8 @@ static void compile_regex(const char* str, int numchar, regex_t* re)
}
re_append
(
&
mask
,
&
len
,
'$'
);
mask
[
len
-
1
]
=
'\0'
;
if
(
regcomp
(
re
,
mask
,
REG_NOSUB
))
FIXME
(
"Couldn't compile %s
\n
"
,
mask
);
if
(
_case
)
flags
|=
REG_ICASE
;
if
(
regcomp
(
re
,
mask
,
flags
))
FIXME
(
"Couldn't compile %s
\n
"
,
mask
);
HeapFree
(
GetProcessHeap
(),
0
,
mask
);
}
...
...
@@ -733,7 +735,7 @@ static BOOL symt_enum_locals(struct process* pcs, const char* mask,
BOOL
ret
;
regex_t
preg
;
compile_regex
(
mask
?
mask
:
"*"
,
-
1
,
&
preg
);
compile_regex
(
mask
?
mask
:
"*"
,
-
1
,
&
preg
,
FALSE
);
ret
=
symt_enum_locals_helper
(
pcs
,
module
,
&
preg
,
EnumSymbolsCallback
,
UserContext
,
sym_info
,
&
((
struct
symt_function
*
)
sym
)
->
vchildren
);
...
...
@@ -780,8 +782,8 @@ BOOL WINAPI SymEnumSymbols(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR Mask,
if
(
bang
==
Mask
)
return
FALSE
;
compile_regex
(
Mask
,
bang
-
Mask
,
&
mod_regex
);
compile_regex
(
bang
+
1
,
-
1
,
&
sym_regex
);
compile_regex
(
Mask
,
bang
-
Mask
,
&
mod_regex
,
FALSE
);
compile_regex
(
bang
+
1
,
-
1
,
&
sym_regex
,
FALSE
);
for
(
module
=
pcs
->
lmodules
;
module
;
module
=
module
->
next
)
{
...
...
@@ -824,7 +826,7 @@ BOOL WINAPI SymEnumSymbols(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR Mask,
Mask
=
bang
+
1
;
}
compile_regex
(
Mask
?
Mask
:
"*"
,
-
1
,
&
sym_regex
);
compile_regex
(
Mask
?
Mask
:
"*"
,
-
1
,
&
sym_regex
,
FALSE
);
symt_enum_module
(
module
,
&
sym_regex
,
EnumSymbolsCallback
,
UserContext
);
regfree
(
&
sym_regex
);
...
...
@@ -1288,3 +1290,21 @@ DWORD WINAPI UnDecorateSymbolName(LPCSTR DecoratedName, LPSTR UnDecoratedName,
return
0
;
return
strlen
(
UnDecoratedName
);
}
/******************************************************************
* SymMatchString (DBGHELP.@)
*
*/
BOOL
WINAPI
SymMatchString
(
PCSTR
string
,
PCSTR
re
,
BOOL
_case
)
{
regex_t
preg
;
BOOL
ret
;
TRACE
(
"%s %s %c
\n
"
,
string
,
re
,
_case
?
'Y'
:
'N'
);
compile_regex
(
re
,
-
1
,
&
preg
,
_case
);
ret
=
regexec
(
&
preg
,
string
,
0
,
NULL
,
0
)
==
0
;
regfree
(
&
preg
);
return
ret
;
}
include/dbghelp.h
View file @
17d93f98
...
...
@@ -820,6 +820,8 @@ typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE, ULONG, ULONG64, U
BOOL
WINAPI
SymRegisterCallback64
(
HANDLE
,
PSYMBOL_REGISTERED_CALLBACK64
,
ULONG64
);
BOOL
WINAPI
SymUnDName
(
PIMAGEHLP_SYMBOL
,
PSTR
,
DWORD
);
DWORD
WINAPI
UnDecorateSymbolName
(
LPCSTR
,
LPSTR
,
DWORD
,
DWORD
);
BOOL
WINAPI
SymMatchString
(
PCSTR
string
,
PCSTR
re
,
BOOL
_case
);
BOOL
WINAPI
SymMatchStringW
(
PCWSTR
string
,
PCWSTR
re
,
BOOL
_case
);
/*************************
* Source Files *
...
...
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