Browse Source
export BUILD_IN_DOCKER=1 to use Docker for building inside a Docker container. GDB debug file paths will be wrong after building inside the container, use the script provided in `dist/gdbinit-docker` to set the correct GDB substitution paths (copy and paste the contents into your `~/.gdbinit`) The environment variable DOCKER_FLAGS can be used to pass extra parameters to the Docker process.dev/timer

3 changed files with 78 additions and 0 deletions
@ -0,0 +1,36 @@
|
||||
# Set some path substitution rules to be able to list source code while |
||||
# debugging after the build was run inside a Docker container |
||||
# These are harmless as they only apply to filenames beginning with /data/riotbuild/ |
||||
python |
||||
import os |
||||
try: |
||||
path = os.environ['RIOTBASE'] |
||||
except KeyError: |
||||
# Environment variable wasn't set. |
||||
pass |
||||
else: |
||||
gdb.execute('set substitute-path /data/riotbuild/riotbase ' + path) |
||||
try: |
||||
path = os.environ['RIOTCPU'] |
||||
except KeyError: |
||||
# Environment variable wasn't set. |
||||
pass |
||||
else: |
||||
gdb.execute('set substitute-path /data/riotbuild/riotcpu ' + path) |
||||
try: |
||||
path = os.environ['RIOTBOARD'] |
||||
except KeyError: |
||||
# Environment variable wasn't set. |
||||
pass |
||||
else: |
||||
gdb.execute('set substitute-path /data/riotbuild/riotboard ' + path) |
||||
try: |
||||
path = os.environ['RIOTPROJECT'] |
||||
except KeyError: |
||||
# Environment variable wasn't set. |
||||
pass |
||||
else: |
||||
gdb.execute('set substitute-path /data/riotbuild/riotproject ' + path) |
||||
end |
||||
|
||||
show substitute-path |
Loading…
Reference in new issue