Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
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
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
Worker.N
openairinterface5G
Commits
be55d1be
Commit
be55d1be
authored
8 years ago
by
Rohit Gupta
Browse files
Options
Downloads
Patches
Plain Diff
Gitlab CI: run tests with gdb support
parent
8b732dc7
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
cmake_targets/autotests/tools/run_gdb
+52
-0
52 additions, 0 deletions
cmake_targets/autotests/tools/run_gdb
with
52 additions
and
0 deletions
cmake_targets/autotests/tools/run_gdb
0 → 100755
+
52
−
0
View file @
be55d1be
#!/bin/bash
#arg0 -> Name of executable
#args[1...N] -> arguments to be passed to executable
if
[
-z
"
$OPENAIR_DIR
"
]
then
echo
"OPENAIR_DIR environment not set. Exiting.."
exit
fi
source
$OPENAIR_DIR
/cmake_targets/tools/build_helper
args
=(
$*
)
exec_name
=
${
args
[0]
}
exe_args
=(
${
args
[@]
:1
}
)
gdb_file
=
$OPENAIR_DIR
/targets/bin/gdb_file
gdb_log
=
$OPENAIR_DIR
/targets/bin/gdb_log.bt
echo
"args =
${
args
[@]
}
"
echo
"exec_name =
$exec_name
"
echo
"exe_args =
${
exe_args
[@]
}
"
echo
"gdb log file =
$gdb_log
"
$SUDO
rm
-fr
$gdb_file
$gdb_log
$SUDO
touch
$gdb_file
$gdb_log
$SUDO
chmod
777
$gdb_file
$gdb_log
$SUDO
echo
"file
$exec_name
"
>>
$gdb_file
$SUDO
echo
"set args
${
exe_args
[@]
}
"
>>
$gdb_file
$SUDO
echo
"run"
>>
$gdb_file
$SUDO
echo
"set logging overwrite on"
>>
$gdb_file
$SUDO
echo
"set logging file
$gdb_log
"
>>
$gdb_file
$SUDO
echo
"set logging on"
>>
$gdb_file
$SUDO
echo
"set pagination off"
>>
$gdb_file
$SUDO
echo
"handle SIG33 pass nostop noprint"
>>
$gdb_file
$SUDO
echo
"echo backtrace:
\n
"
>>
$gdb_file
$SUDO
echo
"backtrace full"
>>
$gdb_file
$SUDO
echo
"echo
\n\n
registers:
\n
"
>>
$gdb_file
$SUDO
echo
"info registers"
>>
$gdb_file
$SUDO
echo
"echo
\n\n
current instructions:
\n
"
>>
$gdb_file
$SUDO
echo
"x/16i
\$
pc"
>>
$gdb_file
$SUDO
echo
"echo
\n\n
threads backtrace:
\n
"
>>
$gdb_file
$SUDO
echo
"thread apply all backtrace"
>>
$gdb_file
$SUDO
echo
"set logging off"
>>
$gdb_file
$SUDO
echo
"quit"
>>
$gdb_file
echo
"Contents of gdb_file...start"
$SUDO
cat
$gdb_file
echo
"Contents of gdb_file...finish"
$SUDO
gdb
-n
-x
$gdb_file
2>&1
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