Commit | Line | Data |
---|---|---|
72f74528 AW |
1 | ;;; Disassemble --- Disassemble .go files into something human-readable |
2 | ||
8141fc3b | 3 | ;; Copyright 2005, 2008, 2009 Free Software Foundation, Inc. |
72f74528 AW |
4 | ;; |
5 | ;; This program is free software; you can redistribute it and/or | |
83ba2d37 NJ |
6 | ;; modify it under the terms of the GNU Lesser General Public License |
7 | ;; as published by the Free Software Foundation; either version 3, or | |
72f74528 AW |
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 | |
83ba2d37 | 13 | ;; Lesser General Public License for more details. |
72f74528 | 14 | ;; |
83ba2d37 NJ |
15 | ;; You should have received a copy of the GNU Lesser General Public |
16 | ;; License along with this software; see the file COPYING.LESSER. If | |
17 | ;; not, write to the Free Software Foundation, Inc., 51 Franklin | |
18 | ;; Street, Fifth Floor, Boston, MA 02110-1301 USA | |
72f74528 | 19 | |
8141fc3b | 20 | ;;; Author: Ludovic Courtès <ludo@gnu.org> |
72f74528 AW |
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) | |
8141fc3b LC |
31 | #:use-module ((language assembly disassemble) |
32 | #:renamer (symbol-prefix-proc 'asm:)) | |
72f74528 AW |
33 | #:export (disassemble)) |
34 | ||
8141fc3b | 35 | (define (disassemble . files) |
72f74528 | 36 | (for-each (lambda (file) |
8141fc3b LC |
37 | (asm:disassemble (load-objcode file))) |
38 | files)) | |
6d66647d AW |
39 | |
40 | (define main disassemble) |