Commit 784a143b authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix #192: Print radix marker in disassemblies; adjust note column

parent 8826d962
Loading
Loading
Loading
Loading
+3 −1
Changes for src/code/exports.lisp: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1365,7 +1365,9 @@
  (:export "*NOTE-COLUMN*" "*OPCODE-COLUMN-WIDTH*" "ADD-COMMENT-HOOK"
	   "ADD-HOOK" "ADD-NOTE-HOOK" "ARG-VALUE" "CREATE-DSTATE"
	   "DISASSEM-STATE" "DISASSEMBLE" "DISASSEMBLE-CODE-COMPONENT"
	   "DISASSEMBLE-FUNCTION" "DISASSEMBLE-MEMORY" "DISASSEMBLE-SEGMENT"
	   "DISASSEMBLE-FUNCTION" "DISASSEMBLE-MEMORY"
	   "*DISASSEMBLE-PRINT-RADIX*"
	   "DISASSEMBLE-SEGMENT"
	   "DISASSEMBLE-SEGMENTS" "DSTATE-CODE" "DSTATE-CURPOS"
	   "DSTATE-GET-PROP" "DSTATE-NEXTPOS" "DSTATE-SEGMENT-LENGTH"
	   "DSTATE-SEGMENT-SAP" "DSTATE-SEGMENT-START" "FIELD-TYPE"
+3 −1
Changes for src/code/misc.lisp: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -181,5 +181,7 @@
  "Disassemble the machine code associated with OBJECT, which can be a
  function, a lambda expression, or a symbol with a function definition.  If
  it is not already compiled, the compiler is called to produce something to
  disassemble."
  disassemble.

  Also see disassem:disassemble for finer control of disassembly."
  (disassem:disassemble object))
+9 −3
Changes for src/compiler/disassem.lisp: 9 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -102,7 +102,9 @@
  "The width of the column in which instruction-names are printed.
  NIL means use the default.  A value of zero gives the effect of not
  aligning the arguments at all.")
(defvar *note-column* 45
(defvar *note-column*
  #-x86 45
  #+x86 55
  "The column in which end-of-line comments for notes are started.")

(defconstant default-opcode-column-width 6)
@@ -3316,12 +3318,16 @@
		:format-control (intl:gettext "Can't make a compiled function from ~S")
		:format-arguments (list name)))))

(defvar *disassemble-print-radix*
  t
  "Default value for :radix argument for disassem:disassemble")

(defun disassemble (object &key (stream *standard-output*)
			     (use-labels t)
			     (backend c:*native-backend*)
			     (base 16)
			     (case :downcase)
			     (radix *print-radix*))
			     (radix *disassemble-print-radix*))
  "Disassemble the machine code associated with OBJECT, which can be a
  function, a lambda expression, or a symbol with a function definition.  If
  it is not already compiled, the compiler is called to produce something to
@@ -3336,7 +3342,7 @@
  :Radix
      The disassembler uses the specified base, case, and radix when
      printing the disassembled code.  The default values are 16,
      :downcase, and *print-radix*, respectively."
      :downcase, and *disassemble-print-radix*, respectively."
  (declare (type (or function symbol cons) object)
	   (type (or (member t) stream) stream)
	   (type (member t nil) use-labels)
+8 −2
Changes for src/i18n/locale/cmucl.pot: 8 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -5694,7 +5694,9 @@ msgid ""
"If\n"
"  it is not already compiled, the compiler is called to produce something "
"to\n"
"  disassemble."
"  disassemble.\n"
"\n"
"  Also see disassem:disassemble for finer control of disassembly."
msgstr ""
#: src/code/misc-doc.lisp
@@ -17387,6 +17389,10 @@ msgstr ""
msgid "Can't make a compiled function from ~S"
msgstr ""
#: src/compiler/disassem.lisp
msgid "Default value for :radix argument for disassem:disassemble"
msgstr ""
#: src/compiler/disassem.lisp
msgid ""
"Disassemble the machine code associated with OBJECT, which can be a\n"
@@ -17405,7 +17411,7 @@ msgid ""
"  :Radix\n"
"      The disassembler uses the specified base, case, and radix when\n"
"      printing the disassembled code.  The default values are 16,\n"
"      :downcase, and *print-radix*, respectively."
"      :downcase, and *disassemble-print-radix*, respectively."
msgstr ""
#: src/compiler/disassem.lisp