Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_vcluster
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
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
argupta
openfpm_vcluster
Commits
7030e7f7
Commit
7030e7f7
authored
Jun 03, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small changes for print stack trace
parent
1856e665
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
src/VCluster/VCluster.cpp
src/VCluster/VCluster.cpp
+5
-14
No files found.
src/VCluster/VCluster.cpp
View file @
7030e7f7
#define PRINT_STACKTRACE
#include "VCluster.hpp"
#include <execinfo.h>
#include "util/print_stack.hpp"
Vcluster
*
global_v_cluster_private
=
NULL
;
// number of vcluster instances
...
...
@@ -15,25 +19,12 @@ std::string program_name;
// Segmentation fault signal handler
void
bt_sighandler
(
int
sig
,
siginfo_t
*
info
,
void
*
ctx_p
)
{
void
*
trace
[
16
];
char
**
messages
=
NULL
;
int
i
,
trace_size
=
0
;
if
(
sig
==
SIGSEGV
)
std
::
cout
<<
"Got signal "
<<
sig
<<
" faulty address is %p, "
<<
info
->
si_addr
<<
" from "
<<
info
->
si_pid
<<
std
::
endl
;
else
std
::
cout
<<
"Got signal "
<<
sig
<<
std
::
endl
;
trace_size
=
backtrace
(
trace
,
16
);
/* overwrite sigaction with caller's address */
trace
[
1
]
=
(
void
*
)
info
->
si_addr
;
messages
=
backtrace_symbols
(
trace
,
trace_size
);
/* skip first stack frame (points here) */
printf
(
"[bt] Execution path:
\n
"
);
for
(
i
=
1
;
i
<
trace_size
;
++
i
)
{
printf
(
"[bt] #%d %s
\n
"
,
i
,
messages
[
i
]);
}
print_stack
();
exit
(
0
);
}
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