Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
e90c1399
Commit
e90c1399
authored
14 years ago
by
Andrew A. de Laix
Browse files
Options
Downloads
Plain Diff
Automated merge with
ssh://hg.lindenlab.com/q/viewer-release
parents
db846ceb
9a57dc0c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llcommon/llapp.cpp
+44
-3
44 additions, 3 deletions
indra/llcommon/llapp.cpp
with
44 additions
and
3 deletions
indra/llcommon/llapp.cpp
+
44
−
3
View file @
e90c1399
...
@@ -32,6 +32,12 @@
...
@@ -32,6 +32,12 @@
#include
<cstdlib>
#include
<cstdlib>
#ifdef LL_DARWIN
#include
<sys/types.h>
#include
<unistd.h>
#include
<sys/sysctl.h>
#endif
#include
"linden_common.h"
#include
"linden_common.h"
#include
"llapp.h"
#include
"llapp.h"
...
@@ -306,7 +312,42 @@ void LLApp::setupErrorHandling()
...
@@ -306,7 +312,42 @@ void LLApp::setupErrorHandling()
setup_signals
();
setup_signals
();
// Add google breakpad exception handler configured for Darwin/Linux.
// Add google breakpad exception handler configured for Darwin/Linux.
if
(
mExceptionHandler
==
0
)
bool
installHandler
=
true
;
#ifdef LL_DARWIN
// For the special case of Darwin, we do not want to install the handler if
// the process is being debugged as the app will exit with value ABRT (6) if
// we do. Unfortunately, the code below which performs that test relies on
// the structure kinfo_proc which has been tagged by apple as an unstable
// API. We disable this test for shipping versions to avoid conflicts with
// future releases of Darwin. This test is really only needed for developers
// starting the app from a debugger anyway.
#ifndef LL_RELEASE_FOR_DOWNLOAD
int
mib
[
4
];
mib
[
0
]
=
CTL_KERN
;
mib
[
1
]
=
KERN_PROC
;
mib
[
2
]
=
KERN_PROC_PID
;
mib
[
3
]
=
getpid
();
struct
kinfo_proc
info
;
memset
(
&
info
,
0
,
sizeof
(
info
));
size_t
size
=
sizeof
(
info
);
int
result
=
sysctl
(
mib
,
sizeof
(
mib
)
/
sizeof
(
*
mib
),
&
info
,
&
size
,
NULL
,
0
);
if
((
result
==
0
)
||
(
errno
==
ENOMEM
))
{
// P_TRACED flag is set, so this process is being debugged; do not install
// the handler
if
(
info
.
kp_proc
.
p_flag
&
P_TRACED
)
installHandler
=
false
;
}
else
{
// Failed to discover if the process is being debugged; default to
// installing the handler.
installHandler
=
true
;
}
#endif
#endif
if
(
installHandler
&&
(
mExceptionHandler
==
0
))
{
{
std
::
string
dumpPath
=
"/tmp/"
;
std
::
string
dumpPath
=
"/tmp/"
;
mExceptionHandler
=
new
google_breakpad
::
ExceptionHandler
(
dumpPath
,
0
,
&
unix_post_minidump_callback
,
0
,
true
);
mExceptionHandler
=
new
google_breakpad
::
ExceptionHandler
(
dumpPath
,
0
,
&
unix_post_minidump_callback
,
0
,
true
);
...
@@ -364,7 +405,7 @@ void LLApp::setError()
...
@@ -364,7 +405,7 @@ void LLApp::setError()
void
LLApp
::
setMiniDumpDir
(
const
std
::
string
&
path
)
void
LLApp
::
setMiniDumpDir
(
const
std
::
string
&
path
)
{
{
llassert
(
mExceptionHandler
)
;
if
(
mExceptionHandler
==
0
)
return
;
#ifdef LL_WINDOWS
#ifdef LL_WINDOWS
wchar_t
buffer
[
MAX_MINDUMP_PATH_LENGTH
];
wchar_t
buffer
[
MAX_MINDUMP_PATH_LENGTH
];
mbstowcs
(
buffer
,
path
.
c_str
(),
MAX_MINDUMP_PATH_LENGTH
);
mbstowcs
(
buffer
,
path
.
c_str
(),
MAX_MINDUMP_PATH_LENGTH
);
...
@@ -376,7 +417,7 @@ void LLApp::setMiniDumpDir(const std::string &path)
...
@@ -376,7 +417,7 @@ void LLApp::setMiniDumpDir(const std::string &path)
void
LLApp
::
writeMiniDump
()
void
LLApp
::
writeMiniDump
()
{
{
llassert
(
mExceptionHandler
)
;
if
(
mExceptionHandler
==
0
)
return
;
mExceptionHandler
->
WriteMinidump
();
mExceptionHandler
->
WriteMinidump
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment