Blame view

RIOT/dist/gdbinit-docker 996 Bytes
fb11e647   vrobic   reseau statique a...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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