Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG
OpenXG UE
Commits
09403314
Commit
09403314
authored
Dec 29, 2020
by
Michael Cook
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdb.txt: Refine
Based on issues discovered by Zaid
parent
e4159b43
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
cmake_targets/gdb.txt
cmake_targets/gdb.txt
+31
-2
cmake_targets/sudo-gdb
cmake_targets/sudo-gdb
+1
-1
No files found.
cmake_targets/gdb.txt
View file @
09403314
-------------------------------------------------------------------------------
Build.
Make sure you've built with debug info:
Make sure you've built with debug info:
cd ~/openairinterface5g # or wherever
cd ~/openairinterface5g # or wherever
...
@@ -6,6 +9,9 @@ Make sure you've built with debug info:
...
@@ -6,6 +9,9 @@ Make sure you've built with debug info:
./build_oai --UE --eNB --verbose-compile --run-with-gdb RelWithDebInfo
./build_oai --UE --eNB --verbose-compile --run-with-gdb RelWithDebInfo
make -C ran_build/build -j4 lte-softmodem lte-uesoftmodem
make -C ran_build/build -j4 lte-softmodem lte-uesoftmodem
-------------------------------------------------------------------------------
Verify.
Verify the build was done correctly:
Verify the build was done correctly:
$ ./gdb-helper
$ ./gdb-helper
...
@@ -46,9 +52,32 @@ the build as above.
...
@@ -46,9 +52,32 @@ the build as above.
(gdb) b main
(gdb) b main
Using Vscode
-------------------------------------------------------------------------------
Password-less sudo.
Vscode launches lte-softmodem via sudo. Make sure sudo does not prompt you
for a password:
sudo -n id
If that command fails, do the following:
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
Then verify:
sudo -n id
-------------------------------------------------------------------------------
Vscode.
Launch Vscode:
cd ~/openairinterface5g # or wherever
cd ~/openairinterface5g # or wherever
code . targets/RT/USER/lte-softmodem.c .vscode/launch.json
code . targets/RT/USER/lte-softmodem.c .vscode/launch.json
See launch.json for details about how lte-softmodem is launched.
See launch.json for details about how vscode launches lte-softmodem for debugging.
For example, in lte-softmodem.c, scroll to main() and click the line number to
the left of main to add a breakpoint. then do Run => Start debugging (F5) to
run lte-softmodem in the debugger
cmake_targets/sudo-gdb
View file @
09403314
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
cd
"
$(
dirname
"
$0
"
)
/.."
||
exit
cd
"
$(
dirname
"
$0
"
)
/.."
||
exit
source
oaienv
source
oaienv
cd
cmake_targets
||
exit
cd
cmake_targets
||
exit
exec sudo
-E
gdb
"
$@
"
exec sudo
-
n
E
gdb
"
$@
"
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