RFA: some minor dwarf-mode.el changes

Tom Tromey tromey@redhat.com
Wed Mar 27 13:36:00 GMT 2013


This patch has a couple minor changes to dwarf-mode.el.

I've never found a reason to invoke dwarf-mode before the file is
loaded, so I removed this autoload cookie.

Also, I relaxed the dwarf-die-reference regexp a bit.  This lets
dwarf-mode correctly font-lock a reference to a DIE that appears in the
middle of a DWARF expression, like:

    <53>   DW_AT_location    : 6 byte block: f2 e9 1 0 0 0 	(DW_OP_GNU_implicit_pointer: <0x1e9> 0)

After this patch, the <0x1e9> is buttonized.

I bumped the version number as well.  This lets package.el users install
it if they have the previous version installed.

Ok?

Tom

2013-03-27  Tom Tromey  <tromey@redhat.com>

	* dwarf-mode.el: Bump version number.
	(dwarf-mode): Remove autoload.
	(dwarf-die-reference): Relax regexp.

---
 binutils/ChangeLog     | 6 ++++++
 binutils/dwarf-mode.el | 7 +++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/binutils/dwarf-mode.el b/binutils/dwarf-mode.el
index 49acaa1..c20c8d7 100644
--- a/binutils/dwarf-mode.el
+++ b/binutils/dwarf-mode.el
@@ -1,8 +1,8 @@
 ;;; dwarf-mode.el --- Browser for DWARF information.
 
-;; Version: 1.1
+;; Version: 1.2
 
-;; Copyright (C) 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2013 Free Software Foundation, Inc.
 
 ;; This file is not part of GNU Emacs, but is distributed under the
 ;; same terms:
@@ -98,7 +98,7 @@ A prefix argument means expand all children."
   'action #'dwarf-die-button-action)
 
 ;; Helper regexp to match a DIE reference.
-(defconst dwarf-die-reference ": \\(<0x\\([0-9a-f]+\\)>\\)\\s *$")
+(defconst dwarf-die-reference "\\(<0x\\([0-9a-f]+\\)>\\)")
 
 ;; Helper regexp to match a `...' indicating that there are hidden
 ;; children.
@@ -141,7 +141,6 @@ A prefix argument means expand all children."
 		    (expand-file-name dwarf-file)))
     (set-buffer-modified-p nil)))
 
-;;;###autoload
 (define-derived-mode dwarf-mode special-mode "DWARF"
   "Major mode for browsing DWARF output.
 
-- 
1.8.1.4



More information about the Binutils mailing list