aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/dwarf-mode.el12
2 files changed, 13 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 162159f..5037d91 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-12 Tom Tromey <tromey@adacore.com>
+
+ * dwarf-mode.el (Version): Now 1.6.
+ (dwarf-die-button-action): Tighten DIE reference regexp.
+ (dwarf-font-lock-keywords): Update name regexp.
+
2020-08-12 Nick Clifton <nickc@redhat.com>
PR binutils/26331
diff --git a/binutils/dwarf-mode.el b/binutils/dwarf-mode.el
index a1b2fdb..4d35c4a 100644
--- a/binutils/dwarf-mode.el
+++ b/binutils/dwarf-mode.el
@@ -1,6 +1,6 @@
;;; dwarf-mode.el --- Browser for DWARF information. -*-lexical-binding:t-*-
-;; Version: 1.5
+;; Version: 1.6
;; Copyright (C) 2012-2020 Free Software Foundation, Inc.
@@ -27,7 +27,7 @@
(defconst dwarf-font-lock-keywords
'(
;; Name and linkage name.
- ("DW_AT_[a-z_]*name\\s *: .*:\\(.*\\)\\s *$"
+ ("DW_AT_[a-zA-Z_]*name\\s *:\\(?:\\s *(.*):\\)?\\s *\\(.*\\)\\s *$"
(1 font-lock-function-name-face))
("Compilation Unit @ offset 0x[0-9a-f]+"
@@ -120,9 +120,11 @@ A prefix argument means expand all children."
;; Either follows a DIE reference, or expands a "...".
(defun dwarf-die-button-action (button)
(let* ((die (button-get button 'die))
- ;; Note that the first number can only be decimal.
- (die-rx (concat "^\\s *\\(<[0-9]+>\\)?<"
- die ">[^<]"))
+ ;; Note that the first number can only be decimal. It is
+ ;; included in this search because otherwise following a ref
+ ;; might lead to a zero-length boolean attribute in the
+ ;; previous DIE.
+ (die-rx (concat "^\\s *<[0-9]+><" die ">:"))
(old (point))
(is-ref (button-get button 'die-ref)))
(if is-ref