Skip to content

Commit

Permalink
Add gdb script for ish
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Oct 13, 2017
1 parent 820dbdb commit f1071e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ish-gdb.gdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
handle SIGUSR1 noprint pass

define hook-run
python
import subprocess
if subprocess.run('ninja').returncode != 0:
raise gdb.CommandError('compilation failed')
end
end
8 changes: 8 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,11 @@ ish = declare_dependency(
subdir('tools')

executable('ish', ['main.c'], dependencies: [ish, softfloat, threads])

gdb_scripts = ['ish-gdb.gdb']
foreach script : gdb_scripts
custom_target(script,
output: script, input: script,
command: ['ln', '-sf', '@INPUT@', '@OUTPUT@'],
build_by_default: true)
endforeach

0 comments on commit f1071e2

Please sign in to comment.