Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
wangjie
OpenXG-RAN
Commits
be55d1be
Commit
be55d1be
authored
Aug 14, 2016
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gitlab CI: run tests with gdb support
parent
8b732dc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
cmake_targets/autotests/tools/run_gdb
cmake_targets/autotests/tools/run_gdb
+52
-0
No files found.
cmake_targets/autotests/tools/run_gdb
0 → 100755
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
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