Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SMPStaticAnalyzer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
SMPStaticAnalyzer
Commits
a390e15c
Commit
a390e15c
authored
9 years ago
by
clc5q
Browse files
Options
Downloads
Patches
Plain Diff
Add delay loop for attaching gdb.
Former-commit-id: 173108a18f542a40fa9bcff060c5d493eda93a8b
parent
1bdceb57
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
src/drivers/irdb/stars_driver.cpp
+18
-1
18 additions, 1 deletion
src/drivers/irdb/stars_driver.cpp
with
18 additions
and
1 deletion
src/drivers/irdb/stars_driver.cpp
+
18
−
1
View file @
a390e15c
#include
<ctime>
#include
<stdlib.h>
#include
<fstream>
#include
<libIRDB-core.hpp>
...
...
@@ -8,6 +10,8 @@ using namespace libIRDB;
#include
"stars_irdb.hpp"
#define SMP_DEBUG_DELAY 0 // for setting an early breakpoint
void
usage
(
char
*
name
)
{
...
...
@@ -22,7 +26,20 @@ int main(int argc, char **argv)
exit
(
1
);
}
string
programName
(
argv
[
0
]);
// For debugging, we can add a delay loop so we have time to attach gdb to the
// running process and set a breakpoint.
#if SMP_DEBUG_DELAY
time_t
start
;
time_t
current
;
time
(
&
start
);
cerr
<<
"delay for 15 seconds."
<<
endl
;
do
{
time
(
&
current
);
}
while
(
difftime
(
current
,
start
)
<
15.0
);
#endif
string
programName
(
argv
[
0
]);
int
variantID
=
atoi
(
argv
[
1
]);
VariantID_t
*
pidp
=
NULL
;
...
...
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