Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
0f8f98c8
Commit
0f8f98c8
authored
Jun 24, 2000
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added insure debug support
parent
e384bfbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
util.c
util.c
+32
-0
No files found.
util.c
View file @
0f8f98c8
...
...
@@ -941,3 +941,35 @@ void wait_process(pid_t pid, int *status)
waitpid
(
pid
,
status
,
0
);
*
status
=
WEXITSTATUS
(
*
status
);
}
#ifdef __INSURE__
#include <dlfcn.h>
/*******************************************************************
This routine is a trick to immediately catch errors when debugging
with insure. A xterm with a gdb is popped up when insure catches
a error. It is Linux specific.
********************************************************************/
int
_Insure_trap_error
(
int
a1
,
int
a2
,
int
a3
,
int
a4
,
int
a5
,
int
a6
)
{
static
int
(
*
fn
)();
int
ret
;
char
cmd
[
1024
];
sprintf
(
cmd
,
"/usr/X11R6/bin/xterm -display :0 -T Panic -n Panic -e /bin/sh -c 'cat /tmp/ierrs.*.%d ; gdb /proc/%d/exe %d'"
,
getpid
(),
getpid
(),
getpid
());
if
(
!
fn
)
{
static
void
*
h
;
h
=
dlopen
(
"/usr/local/parasoft/insure++lite/lib.linux2/libinsure.so"
,
RTLD_LAZY
);
fn
=
dlsym
(
h
,
"_Insure_trap_error"
);
}
ret
=
fn
(
a1
,
a2
,
a3
,
a4
,
a5
,
a6
);
system
(
cmd
);
return
ret
;
}
#endif
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