-
Notifications
You must be signed in to change notification settings - Fork 3
/
readme.debugging
47 lines (31 loc) · 1.67 KB
/
readme.debugging
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
37
38
39
40
41
42
43
44
45
46
47
Debugging SpineML_2_BRAHMS code
-------------------------------
If the SpineML_2_BRAHMS-generated code crashes, you, or a friendly
developer will need to find out why.
You can debug SpineML_ 2_BRAHMS by giving the -D option to
convert_script_s2b, which will then compile components with debugging
symbols (the -g option for g++), generate a suitable gdbcmd file, and
then run the simulation with brahms-gdb which will mean you'll be able
to backtrace into the code that SpineML_2_BRAHMS generates. Note that
even if the simulation completes without a crash, you'll still end up
in the gdb command line environment; if you've nothing further to do,
type 'quit' or use Ctrl-D to exit.
You can use the -D option in conjunction with the -r option to ensure
all the components are re-built with debugging symbols
incorporated. It's best to do this the first time you run with -D to
debug.
---------------------------------------------------------------------
Old instructions follow (this was previously a manual process):
---------------------------------------------------------------------
How to modify SpineML_2_BRAHMS to debug a simulation using gdb:
Find brahms-gdb in the brahms source code.
Install brahms-gdb in your path
Create a gdbcmd file in your home dir containing something like:
dir ~/src/saccsim/src
dir ~/src/brahms
dir ~/src/SpineML_2_BRAHMS/Namespace/dev/SpineML/temp/WU/ConnectionListStaticoweight/brahms/0
run
Add as make of the Namespace/dev/SpineML paths as you need to debug your code.
Modify SpineML_2_BRAHMS/xsl/SpineML_2_BRAHMS_write_script.xsl
Change the BRAHMS_CMD fields to call brahms-gdb instead of plain brahms.
There's a similar scheme for brahms-vg - for valgrind.