Commit | Line | Data |
---|---|---|
72f74528 AW |
1 | ;;; Disassemble --- Disassemble .go files into something human-readable |
2 | ||
3 | ;; Copyright 2005,2008 Free Software Foundation, Inc. | |
4 | ;; | |
5 | ;; This program is free software; you can redistribute it and/or | |
6 | ;; modify it under the terms of the GNU General Public License as | |
7 | ;; published by the Free Software Foundation; either version 2, or | |
8 | ;; (at your option) any later version. | |
9 | ;; | |
10 | ;; This program is distributed in the hope that it will be useful, | |
11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | ;; General Public License for more details. | |
14 | ;; | |
15 | ;; You should have received a copy of the GNU General Public License | |
16 | ;; along with this software; see the file COPYING. If not, write to | |
17 | ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
18 | ;; Boston, MA 02110-1301 USA | |
19 | ||
20 | ;;; Author: Ludovic Courtès <ludovic.courtes@laas.fr> | |
21 | ;;; Author: Andy Wingo <wingo@pobox.com> | |
22 | ||
23 | ;;; Commentary: | |
24 | ||
25 | ;; Usage: disassemble [ARGS] | |
26 | ||
27 | ;;; Code: | |
28 | ||
29 | (define-module (scripts disassemble) | |
30 | #:use-module (system vm objcode) | |
9bb8012d | 31 | #:use-module (language assembly disassemble) |
72f74528 AW |
32 | #:export (disassemble)) |
33 | ||
34 | (define (disassemble args) | |
35 | (for-each (lambda (file) | |
9bb8012d | 36 | (disassemble (load-objcode file))) |
72f74528 | 37 | (cdr args))) |
6d66647d AW |
38 | |
39 | (define main disassemble) |