[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, master, updated. v2.1.0-174-g93009a7
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. v2.1.0-174-g93009a7 |
Date: |
Thu, 29 Aug 2013 18:50:33 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=93009a7acaf172d1e9a8b3763cf83e616567a04f
The branch, master has been updated
via 93009a7acaf172d1e9a8b3763cf83e616567a04f (commit)
from 610295ec9dbf3c21a59b4e579d0889ca90c499e6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 93009a7acaf172d1e9a8b3763cf83e616567a04f
Author: Andy Wingo <address@hidden>
Date: Thu Aug 29 20:50:19 2013 +0200
,xx for RTL images
* module/scripts/disassemble.scm (disassemble):
* module/system/vm/disassembler.scm (disassemble-file): Factor
disassemble-file out.
* module/system/repl/command.scm (disassemble-file): Map ,xx to
disassemble RTL images.
-----------------------------------------------------------------------
Summary of changes:
module/scripts/disassemble.scm | 10 +---------
module/system/repl/command.scm | 5 ++++-
module/system/vm/disassembler.scm | 8 +++++++-
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/module/scripts/disassemble.scm b/module/scripts/disassemble.scm
index 3825bc1..426f87c 100644
--- a/module/scripts/disassemble.scm
+++ b/module/scripts/disassemble.scm
@@ -27,20 +27,12 @@
;;; Code:
(define-module (scripts disassemble)
- #:use-module (system vm objcode)
- #:use-module (system vm program)
#:use-module (system vm disassembler)
- #:use-module ((language assembly disassemble)
- #:renamer (symbol-prefix-proc 'asm:))
#:export (disassemble))
(define %summary "Disassemble a compiled .go file.")
(define (disassemble . files)
- (for-each (lambda (file)
- (let* ((thunk (load-thunk-from-file file))
- (elf (find-mapped-elf-image (rtl-program-code thunk))))
- (disassemble-image elf)))
- files))
+ (for-each disassemble-file files))
(define main disassemble)
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index 215451e..e084cf1 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -487,6 +487,9 @@ Run the optimizer on a piece of code and print the result."
(define (disassemble-program x)
((@ (system vm disassembler) disassemble-program) x))
+(define (disassemble-file x)
+ ((@ (system vm disassembler) disassemble-file) x))
+
(define-meta-command (disassemble repl (form))
"disassemble EXP
Disassemble a compiled procedure."
@@ -503,7 +506,7 @@ Disassemble a compiled procedure."
(define-meta-command (disassemble-file repl file)
"disassemble-file FILE
Disassemble a file."
- (guile:disassemble (load-thunk-from-file (->string file))))
+ (disassemble-file (->string file)))
;;;
diff --git a/module/system/vm/disassembler.scm
b/module/system/vm/disassembler.scm
index 482d68f..ad7bb2b 100644
--- a/module/system/vm/disassembler.scm
+++ b/module/system/vm/disassembler.scm
@@ -32,7 +32,8 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-4)
#:export (disassemble-program
- disassemble-image))
+ disassemble-image
+ disassemble-file))
(define-syntax-rule (u32-ref buf n)
(bytevector-u32-native-ref buf (* n 4)))
@@ -357,3 +358,8 @@ address of that offset."
ctx)
(display "\n\n" port)))))
(values))
+
+(define (disassemble-file file)
+ (let* ((thunk (load-thunk-from-file file))
+ (elf (find-mapped-elf-image (rtl-program-code thunk))))
+ (disassemble-image elf)))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. v2.1.0-174-g93009a7,
Andy Wingo <=