disassemble.scm 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ;;; Disassemble --- Disassemble .go files into something human-readable
  2. ;; Copyright 2005, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
  3. ;;
  4. ;; This program is free software; you can redistribute it and/or
  5. ;; modify it under the terms of the GNU Lesser General Public License
  6. ;; as published by the Free Software Foundation; either version 3, or
  7. ;; (at your option) any later version.
  8. ;;
  9. ;; This program is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. ;; Lesser General Public License for more details.
  13. ;;
  14. ;; You should have received a copy of the GNU Lesser General Public
  15. ;; License along with this software; see the file COPYING.LESSER. If
  16. ;; not, write to the Free Software Foundation, Inc., 51 Franklin
  17. ;; Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. ;;; Author: Ludovic Courtès <ludo@gnu.org>
  19. ;;; Author: Andy Wingo <wingo@pobox.com>
  20. ;;; Commentary:
  21. ;; Usage: disassemble FILE...
  22. ;;; Code:
  23. (define-module (scripts disassemble)
  24. #:use-module (system vm disassembler)
  25. #:export (disassemble))
  26. (define %summary "Disassemble a compiled .go file.")
  27. (define (disassemble . files)
  28. (for-each disassemble-file files))
  29. (define main disassemble)