Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
a7172a8f
Commit
a7172a8f
authored
Nov 13, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win64: report crashes
parent
17b57777
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
37 deletions
+42
-37
bin/winvlc.c
bin/winvlc.c
+42
-37
No files found.
bin/winvlc.c
View file @
a7172a8f
...
...
@@ -39,10 +39,8 @@
# include <shlobj.h>
# include <wininet.h>
# define HeapEnableTerminationOnCorruption (HEAP_INFORMATION_CLASS)1
# ifndef _WIN64
static
void
check_crashdump
(
void
);
LONG
WINAPI
vlc_exception_filter
(
struct
_EXCEPTION_POINTERS
*
lpExceptionInfo
);
# endif
#endif
#ifndef UNDER_CE
...
...
@@ -173,14 +171,11 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
argv
[
argc
]
=
NULL
;
LocalFree
(
wargv
);
# ifndef _WIN64
/* We don't know how to manage crashes on Win64 yet */
if
(
crash_handling
)
{
check_crashdump
();
SetUnhandledExceptionFilter
(
vlc_exception_filter
);
}
# endif
#else
/* UNDER_CE */
char
**
argv
,
psz_cmdline
[
wcslen
(
lpCmdLine
)
*
4
];
...
...
@@ -210,7 +205,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
return
0
;
}
#if !defined( UNDER_CE )
&& !defined( _WIN64 )
#if !defined( UNDER_CE )
/* Crashdumps handling */
static
void
get_crashdump_path
(
wchar_t
*
wdir
)
{
...
...
@@ -321,46 +316,56 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
const
CONTEXT
*
const
pContext
=
(
const
CONTEXT
*
)
lpExceptionInfo
->
ContextRecord
;
const
EXCEPTION_RECORD
*
const
pException
=
(
const
EXCEPTION_RECORD
*
)
lpExceptionInfo
->
ExceptionRecord
;
/*No nested exceptions for now*/
fwprintf
(
fd
,
L"
\n\n
[exceptions]
\n
%08x at %
08
x"
,
pException
->
ExceptionCode
,
fwprintf
(
fd
,
L"
\n\n
[exceptions]
\n
%08x at %
p
x"
,
pException
->
ExceptionCode
,
pException
->
ExceptionAddress
);
if
(
pException
->
NumberParameters
>
0
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
pException
->
NumberParameters
;
i
++
)
fwprintf
(
fd
,
L" | %08x"
,
pException
->
ExceptionInformation
[
i
]
);
}
fwprintf
(
fd
,
L"
\n\n
[context]
\n
EDI:%08x
\n
ESI:%08x
\n
"
\
"EBX:%08x
\n
EDX:%08x
\n
ECX:%08x
\n
EAX:%08x
\n
"
\
"EBP:%08x
\n
EIP:%08x
\n
ESP:%08x
\n
"
,
for
(
unsigned
int
i
=
0
;
i
<
pException
->
NumberParameters
;
i
++
)
fwprintf
(
fd
,
L" | %p"
,
pException
->
ExceptionInformation
[
i
]
);
#ifdef WIN64
fwprintf
(
fd
,
L"
\n\n
[context]
\n
RDI:%px
\n
RSI:%px
\n
"
\
"RBX:%px
\n
RDX:%px
\n
RCX:%px
\n
RAX:%px
\n
"
\
"RBP:%px
\n
RIP:%px
\n
RSP:%px
\n
R8:%px
\n
"
\
"R9:%px
\n
R10:%px
\n
R11:%px
\n
R12:%px
\n
"
\
"R13:%px
\n
R14:%px
\n
R15:%px
\n
"
,
pContext
->
Rdi
,
pContext
->
Rsi
,
pContext
->
Rbx
,
pContext
->
Rdx
,
pContext
->
Rcx
,
pContext
->
Rax
,
pContext
->
Rbp
,
pContext
->
Rip
,
pContext
->
Rsp
,
pContext
->
R8
,
pContext
->
R9
,
pContext
->
R10
,
pContext
->
R11
,
pContext
->
R12
,
pContext
->
R13
,
pContext
->
R14
,
pContext
->
R15
);
#else
fwprintf
(
fd
,
L"
\n\n
[context]
\n
EDI:%px
\n
ESI:%px
\n
"
\
"EBX:%px
\n
EDX:%px
\n
ECX:%px
\n
EAX:%px
\n
"
\
"EBP:%px
\n
EIP:%px
\n
ESP:%px
\n
"
,
pContext
->
Edi
,
pContext
->
Esi
,
pContext
->
Ebx
,
pContext
->
Edx
,
pContext
->
Ecx
,
pContext
->
Eax
,
pContext
->
Ebp
,
pContext
->
Eip
,
pContext
->
Esp
);
#endif
fwprintf
(
fd
,
L"
\n
[stacktrace]
\n
#EIP|base|module
\n
"
);
wchar_t
module
[
256
];
MEMORY_BASIC_INFORMATION
mbi
;
VirtualQuery
(
(
DWORD
*
)
pContext
->
Eip
,
&
mbi
,
sizeof
(
mbi
)
)
;
HINSTANCE
hInstance
=
mbi
.
AllocationBase
;
GetModuleFileName
(
hInstance
,
module
,
256
)
;
fwprintf
(
fd
,
L"%08x|%s
\n
"
,
pContext
->
Eip
,
module
);
DWORD
pEbp
=
pContext
->
Ebp
;
DWORD
caller
=
*
((
DWORD
*
)
pEbp
+
1
);
unsigned
i_line
=
0
;
do
#ifdef WIN64
LPCVOID
caller
=
(
LPCVOID
)
pContext
->
Rip
;
LPVOID
*
pBase
=
(
LPVOID
*
)
pContext
->
Rbp
;
#else
LPVOID
*
pBase
=
(
LPVOID
*
)
pContext
->
Ebp
;
LPCVOID
caller
=
(
LPCVOID
)
pContext
->
Eip
;
#endif
for
(
unsigned
frame
=
0
;
frame
<=
100
;
frame
++
)
{
VirtualQuery
(
(
DWORD
*
)
caller
,
&
mbi
,
sizeof
(
mbi
)
)
;
HINSTANCE
hInstance
=
mbi
.
AllocationBase
;
GetModuleFileName
(
hInstance
,
module
,
256
)
;
fwprintf
(
fd
,
L"%08x|%s
\n
"
,
caller
,
module
);
pEbp
=
*
(
DWORD
*
)
pEbp
;
caller
=
*
((
DWORD
*
)
pEbp
+
1
)
;
i_line
++
;
/*The last EBP points to NULL!*/
}
while
(
caller
&&
i_line
<
100
);
MEMORY_BASIC_INFORMATION
mbi
;
wchar_t
module
[
256
];
VirtualQuery
(
caller
,
&
mbi
,
sizeof
(
mbi
)
)
;
GetModuleFileName
(
mbi
.
AllocationBase
,
module
,
256
);
fwprintf
(
fd
,
L"%p|%s
\n
"
,
caller
,
module
);
/*The last BP points to NULL!*/
caller
=
*
(
pBase
+
1
);
if
(
!
caller
)
break
;
pBase
=
*
pBase
;
}
fclose
(
fd
);
fflush
(
stderr
);
...
...
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