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
5c4420fc
Commit
5c4420fc
authored
May 18, 2004
by
Patrik Stridvall
Committed by
Alexandre Julliard
May 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented the debug version of operator new (C++).
parent
8f14eb0e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
122 additions
and
8 deletions
+122
-8
configure
configure
+0
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/msvcrtd/Makefile.in
+3
-1
debug.c
dlls/msvcrtd/debug.c
+28
-4
msvcrtd.spec
dlls/msvcrtd/msvcrtd.spec
+3
-3
.cvsignore
dlls/msvcrtd/tests/.cvsignore
+3
-0
Makefile.in
dlls/msvcrtd/tests/Makefile.in
+14
-0
debug.c
dlls/msvcrtd/tests/debug.c
+70
-0
No files found.
configure
View file @
5c4420fc
This diff is collapsed.
Click to expand it.
configure.ac
View file @
5c4420fc
...
@@ -1580,6 +1580,7 @@ dlls/msvcrt/tests/Makefile
...
@@ -1580,6 +1580,7 @@ dlls/msvcrt/tests/Makefile
dlls/msvcrt20/Makefile
dlls/msvcrt20/Makefile
dlls/msvcrt40/Makefile
dlls/msvcrt40/Makefile
dlls/msvcrtd/Makefile
dlls/msvcrtd/Makefile
dlls/msvcrtd/tests/Makefile
dlls/msvidc32/Makefile
dlls/msvidc32/Makefile
dlls/msvideo/Makefile
dlls/msvideo/Makefile
dlls/mswsock/Makefile
dlls/mswsock/Makefile
...
...
dlls/msvcrtd/Makefile.in
View file @
5c4420fc
...
@@ -3,11 +3,13 @@ TOPOBJDIR = ../..
...
@@ -3,11 +3,13 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
msvcrtd.dll
MODULE
=
msvcrtd.dll
IMPORTS
=
msvcrt
IMPORTS
=
msvcrt
kernel32
C_SRCS
=
\
C_SRCS
=
\
debug.c
debug.c
SUBDIRS
=
tests
@MAKE_DLL_RULES@
@MAKE_DLL_RULES@
### Dependencies:
### Dependencies:
dlls/msvcrtd/debug.c
View file @
5c4420fc
...
@@ -20,16 +20,39 @@
...
@@ -20,16 +20,39 @@
#include "wine/debug.h"
#include "wine/debug.h"
#include "winbase.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
int
_crtAssertBusy
=
-
1
;
int
_crtAssertBusy
=
-
1
;
int
_crtBreakAlloc
=
-
1
;
int
_crtBreakAlloc
=
-
1
;
int
_crtDbgFlag
=
0
;
int
_crtDbgFlag
=
0
;
extern
int
_callnewh
(
unsigned
long
);
/*********************************************************************
* ??2@YAPAXIHPBDH@Z (MSVCRTD.@)
*/
void
*
MSVCRTD_operator_new_dbg
(
unsigned
long
nSize
,
int
nBlockUse
,
const
char
*
szFileName
,
int
nLine
)
{
void
*
retval
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nSize
);
TRACE
(
"(%lu, %d, '%s', %d) returning %p
\n
"
,
nSize
,
nBlockUse
,
szFileName
,
nLine
,
retval
);
if
(
!
retval
)
_callnewh
(
nSize
);
return
retval
;
}
/*********************************************************************
/*********************************************************************
* _CrtSetDumpClient (MSVCRTD.@)
* _CrtSetDumpClient (MSVCRTD.@)
*/
*/
void
*
_CrtSetDumpClient
()
void
*
_CrtSetDumpClient
(
void
*
dumpClient
)
{
{
return
NULL
;
return
NULL
;
}
}
...
@@ -38,7 +61,7 @@ void *_CrtSetDumpClient()
...
@@ -38,7 +61,7 @@ void *_CrtSetDumpClient()
/*********************************************************************
/*********************************************************************
* _CrtSetReportHook (MSVCRTD.@)
* _CrtSetReportHook (MSVCRTD.@)
*/
*/
void
*
_CrtSetReportHook
()
void
*
_CrtSetReportHook
(
void
*
reportHook
)
{
{
return
NULL
;
return
NULL
;
}
}
...
@@ -47,7 +70,7 @@ void *_CrtSetReportHook()
...
@@ -47,7 +70,7 @@ void *_CrtSetReportHook()
/*********************************************************************
/*********************************************************************
* _CrtSetReportMode (MSVCRTD.@)
* _CrtSetReportMode (MSVCRTD.@)
*/
*/
int
_CrtSetReportMode
()
int
_CrtSetReportMode
(
int
reportType
,
int
reportMode
)
{
{
return
0
;
return
0
;
}
}
...
@@ -77,7 +100,8 @@ int _CrtSetDbgFlag(int new)
...
@@ -77,7 +100,8 @@ int _CrtSetDbgFlag(int new)
/*********************************************************************
/*********************************************************************
* _CrtDbgReport (MSVCRTD.@)
* _CrtDbgReport (MSVCRTD.@)
*/
*/
int
_CrtDbgReport
()
int
_CrtDbgReport
(
int
reportType
,
const
char
*
filename
,
int
linenumber
,
const
char
*
moduleName
,
const
char
*
format
,
...)
{
{
return
0
;
return
0
;
}
}
...
...
dlls/msvcrtd/msvcrtd.spec
View file @
5c4420fc
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
@ cdecl -i386 ??1exception@@UAE@XZ() msvcrt.??1exception@@UAE@XZ
@ cdecl -i386 ??1exception@@UAE@XZ() msvcrt.??1exception@@UAE@XZ
@ cdecl -i386 ??1type_info@@UAE@XZ() msvcrt.??1type_info@@UAE@XZ
@ cdecl -i386 ??1type_info@@UAE@XZ() msvcrt.??1type_info@@UAE@XZ
@ cdecl ??2@YAPAXI@Z(long) msvcrt.??2@YAPAXI@Z
@ cdecl ??2@YAPAXI@Z(long) msvcrt.??2@YAPAXI@Z
@ cdecl ??2@YAPAXIHPBDH@Z(long
) msvcrt.??2@YAPAXIHPBDH@Z
@ cdecl ??2@YAPAXIHPBDH@Z(long
long str long) MSVCRTD_operator_new_dbg
@ cdecl ??3@YAXPAX@Z(ptr) msvcrt.??3@YAXPAX@Z
@ cdecl ??3@YAXPAX@Z(ptr) msvcrt.??3@YAXPAX@Z
@ cdecl -i386 ??4__non_rtti_object@@QAEAAV0@ABV0@@Z(ptr) msvcrt.??4__non_rtti_object@@QAEAAV0@ABV0@@Z
@ cdecl -i386 ??4__non_rtti_object@@QAEAAV0@ABV0@@Z(ptr) msvcrt.??4__non_rtti_object@@QAEAAV0@ABV0@@Z
@ cdecl -i386 ??4bad_cast@@QAEAAV0@ABV0@@Z(ptr) msvcrt.??4bad_cast@@QAEAAV0@ABV0@@Z
@ cdecl -i386 ??4bad_cast@@QAEAAV0@ABV0@@Z(ptr) msvcrt.??4bad_cast@@QAEAAV0@ABV0@@Z
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
@ cdecl _CItanh() msvcrt._CItanh
@ cdecl _CItanh() msvcrt._CItanh
@ stub _CrtCheckMemory
@ stub _CrtCheckMemory
@ stub _CrtDbgBreak
@ stub _CrtDbgBreak
@
cdecl
_CrtDbgReport(long ptr long ptr ptr)
@
varargs
_CrtDbgReport(long ptr long ptr ptr)
@ stub _CrtDoForAllClientObjects
@ stub _CrtDoForAllClientObjects
@ cdecl _CrtDumpMemoryLeaks()
@ cdecl _CrtDumpMemoryLeaks()
@ stub _CrtIsMemoryBlock
@ stub _CrtIsMemoryBlock
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
@ cdecl _CrtSetDumpClient(ptr)
@ cdecl _CrtSetDumpClient(ptr)
@ stub _CrtSetReportFile
@ stub _CrtSetReportFile
@ cdecl _CrtSetReportHook(ptr)
@ cdecl _CrtSetReportHook(ptr)
@ cdecl _CrtSetReportMode(long)
@ cdecl _CrtSetReportMode(long
long
)
@ cdecl _CxxThrowException(long long) msvcrt._CxxThrowException
@ cdecl _CxxThrowException(long long) msvcrt._CxxThrowException
@ cdecl -i386 -norelay _EH_prolog() msvcrt._EH_prolog
@ cdecl -i386 -norelay _EH_prolog() msvcrt._EH_prolog
@ cdecl _Getdays() msvcrt._Getdays
@ cdecl _Getdays() msvcrt._Getdays
...
...
dlls/msvcrtd/tests/.cvsignore
0 → 100644
View file @
5c4420fc
Makefile
debug.ok
testlist.c
dlls/msvcrtd/tests/Makefile.in
0 → 100644
View file @
5c4420fc
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
msvcrtd.dll
IMPORTS
=
msvcrtd
EXTRAINCL
=
-I
$(TOPSRCDIR)
/include/msvcrt
CTESTS
=
\
debug.c
@MAKE_TEST_RULES@
### Dependencies:
dlls/msvcrtd/tests/debug.c
0 → 100644
View file @
5c4420fc
/*
* Unit test suite for debug functions.
*
* Copyright 2004 Patrik Stridvall
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "wine/test.h"
/**********************************************************************/
static
void
*
(
*
pMSVCRTD_operator_new_dbg
)(
unsigned
long
,
int
,
const
char
*
,
int
)
=
NULL
;
/* Some exports are only available in later versions */
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(hModule,y)
#define SET(x,y) SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y)
int
init_functions
(
void
)
{
HMODULE
hModule
=
LoadLibraryA
(
"msvcrtd.dll"
);
ok
(
hModule
!=
NULL
,
"LoadLibraryA failed
\n
"
);
if
(
!
hModule
)
return
FALSE
;
SET
(
pMSVCRTD_operator_new_dbg
,
"??2@YAPAXIHPBDH@Z"
);
if
(
pMSVCRTD_operator_new_dbg
==
NULL
)
return
FALSE
;
return
TRUE
;
}
/**********************************************************************/
void
test_new
(
void
)
{
void
*
mem
;
mem
=
pMSVCRTD_operator_new_dbg
(
42
,
0
,
__FILE__
,
__LINE__
);
ok
(
mem
!=
NULL
,
"memory not allocated
\n
"
);
}
/**********************************************************************/
START_TEST
(
debug
)
{
if
(
!
init_functions
())
return
;
test_new
();
}
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