1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 01:09:47 +01:00
RIOT/dist/gdbinit-docker
Gaëtan Harter 41a891f284
tools: use 'BOARDSDIR' for the boards directory
Replace uses of 'RIOTBOARD' by 'BOARDSDIR' for tools.
2019-12-16 15:35:04 +01:00

37 lines
996 B
Plaintext

# 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['BOARDSDIR']
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