Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
3c7e6b9d
Commit
3c7e6b9d
authored
Jul 20, 1994
by
Richard M. Stallman
Browse files
(disassemble-1): Display the pc values.
(disassemble-column-1-indent): Increase to 8.
parent
41cf13b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
lisp/emacs-lisp/disass.el
lisp/emacs-lisp/disass.el
+19
-6
No files found.
lisp/emacs-lisp/disass.el
View file @
3c7e6b9d
...
...
@@ -41,7 +41,7 @@
;;; Since we don't use byte-decompile-lapcode, let's try not loading byte-opt.
(
require
'byte-compile
"bytecomp"
)
(
defvar
disassemble-column-1-indent
5
"*"
)
(
defvar
disassemble-column-1-indent
8
"*"
)
(
defvar
disassemble-column-2-indent
10
"*"
)
(
defvar
disassemble-recursive-indent
3
"*"
)
...
...
@@ -169,7 +169,7 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
(
setq
bytes
(
aref
obj
1
)
constvec
(
aref
obj
2
)))
(
let
((
lap
(
byte-decompile-bytecode
bytes
constvec
))
op
arg
opname
)
op
arg
opname
pc-value
)
(
let
((
tagno
0
)
tmp
(
lap
lap
))
...
...
@@ -177,12 +177,26 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
(
setcar
(
cdr
tmp
)
(
setq
tagno
(
1+
tagno
)))
(
setq
lap
(
cdr
(
memq
tmp
lap
)))))
(
while
lap
;; Take off the pc value of the next thing
;; and put it in pc-value.
(
setq
pc-value
nil
)
(
if
(
numberp
(
car
lap
))
(
setq
pc-value
(
car
lap
)
lap
(
cdr
lap
)))
;; Fetch the next op and its arg.
(
setq
op
(
car
(
car
lap
))
arg
(
cdr
(
car
lap
)))
(
setq
lap
(
cdr
lap
))
(
indent-to
indent
)
(
if
(
eq
'TAG
op
)
(
insert
(
int-to-string
(
car
arg
))
":"
)
(
progn
;; We have a label. Display it, but first its pc value.
(
if
pc-value
(
insert
(
format
"%d:"
pc-value
)))
(
insert
(
int-to-string
(
car
arg
))))
;; We have an instruction. Display its pc value first.
(
if
pc-value
(
insert
(
format
"%d"
pc-value
)))
(
indent-to
(
+
indent
disassemble-column-1-indent
))
(
if
(
and
op
(
string-match
"^byte-"
(
setq
opname
(
symbol-name
op
))))
...
...
@@ -241,8 +255,7 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
(
let
((
print-escape-newlines
t
))
(
prin1
arg
(
current-buffer
))))))
)
(
insert
"\n"
))
(
setq
lap
(
cdr
lap
)))))
(
insert
"\n"
)))))
nil
)
;;; disass.el ends here
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment