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
26342c98
Commit
26342c98
authored
May 01, 2000
by
Eric Pouech
Committed by
Alexandre Julliard
May 01, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed segv when debugger registry key doesn't exist.
parent
0a892727
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
+23
-19
winedbg.c
debugger/winedbg.c
+23
-19
No files found.
debugger/winedbg.c
View file @
26342c98
...
...
@@ -67,26 +67,32 @@ static BOOL DEBUG_IntVarsRW(int read)
#undef INTERNAL_VAR
}
if
(
!
RegOpenKey
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
WineDbg"
,
&
hkey
))
{
for
(
i
=
0
;
i
<
DBG_IV_LAST
;
i
++
)
{
if
(
read
)
{
if
(
!
DEBUG_IntVars
[
i
].
pval
)
{
if
(
!
RegQueryValueEx
(
hkey
,
DEBUG_IntVars
[
i
].
name
,
0
,
&
type
,
(
LPSTR
)
&
val
,
&
count
))
DEBUG_IntVars
[
i
].
val
=
val
;
DEBUG_IntVars
[
i
].
pval
=
&
DEBUG_IntVars
[
i
].
val
;
}
else
{
*
DEBUG_IntVars
[
i
].
pval
=
0
;
}
if
(
RegOpenKey
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
WineDbg"
,
&
hkey
)
&&
RegCreateKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
WineDbg"
,
&
hkey
))
{
/* since the IVars are not yet setup, DEBUG_Printf doesn't work,
* so don't use it */
fprintf
(
stderr
,
"Cannot create WineDbg key in registry
\n
"
);
return
FALSE
;
}
for
(
i
=
0
;
i
<
DBG_IV_LAST
;
i
++
)
{
if
(
read
)
{
if
(
!
DEBUG_IntVars
[
i
].
pval
)
{
if
(
!
RegQueryValueEx
(
hkey
,
DEBUG_IntVars
[
i
].
name
,
0
,
&
type
,
(
LPSTR
)
&
val
,
&
count
))
DEBUG_IntVars
[
i
].
val
=
val
;
DEBUG_IntVars
[
i
].
pval
=
&
DEBUG_IntVars
[
i
].
val
;
}
else
{
/* FIXME: type should be infered from basic type -if any- of intvar */
if
(
DEBUG_IntVars
[
i
].
pval
==
&
DEBUG_IntVars
[
i
].
val
)
RegSetValueEx
(
hkey
,
DEBUG_IntVars
[
i
].
name
,
0
,
type
,
(
LPCVOID
)
DEBUG_IntVars
[
i
].
pval
,
count
);
*
DEBUG_IntVars
[
i
].
pval
=
0
;
}
}
else
{
/* FIXME: type should be infered from basic type -if any- of intvar */
if
(
DEBUG_IntVars
[
i
].
pval
==
&
DEBUG_IntVars
[
i
].
val
)
RegSetValueEx
(
hkey
,
DEBUG_IntVars
[
i
].
name
,
0
,
type
,
(
LPCVOID
)
DEBUG_IntVars
[
i
].
pval
,
count
);
}
RegCloseKey
(
hkey
);
}
RegCloseKey
(
hkey
);
return
TRUE
;
}
...
...
@@ -549,9 +555,7 @@ static DWORD DEBUG_MainLoop(DWORD pid)
int
DEBUG_main
(
int
argc
,
char
**
argv
)
{
DWORD
pid
=
0
,
retv
=
0
;
int
i
;
for
(
i
=
0
;
i
<
argc
;
i
++
)
fprintf
(
stderr
,
"argv[%d]=%s
\n
"
,
i
,
argv
[
i
]);
#ifdef DBG_need_heap
/* Initialize the debugger heap. */
dbg_heap
=
HeapCreate
(
HEAP_NO_SERIALIZE
,
0x1000
,
0x8000000
);
/* 128MB */
...
...
@@ -562,7 +566,7 @@ int DEBUG_main(int argc, char** argv)
DEBUG_InitCVDataTypes
();
/* Initialize internal vars */
DEBUG_IntVarsRW
(
TRUE
)
;
if
(
!
DEBUG_IntVarsRW
(
TRUE
))
return
-
1
;
/* keep it as a guiexe for now, so that Wine won't touch the Unix stdin,
* stdout and stderr streams
...
...
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