unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Masatake YAMATO <jet@gyve.org>
Cc: emacs-devel@gnu.org
Subject: Re: font-lock in machine mode of gdba
Date: Sun, 24 Oct 2004 08:49:13 +0900 (JST)	[thread overview]
Message-ID: <20041024.084913.71110562.jet@gyve.org> (raw)
In-Reply-To: <16762.54914.444953.532606@farnswood.snap.net.nz>

Hi,

>  > I'm using disassembly for hacking and understanding glibc's
>  > /lib/ld-linux.so.2 on i386.  (gdba is extremely useful.)  I feel my
>  > definition is not so bad. The face usage is consistent with asm-mode.
> 
> OK. I've installed these changes, trying to bear in mind Stefan's comments.
> Note, however, that your fontification (gdb-assembler-font-lock-keywords)
> doesn't seem to work for system library functions e.g:
> 
> 0x40062155 <__libc_start_main+133>:	push   %edi
> 
> On my system (Mandrake 9.2) you can get this by breaking any C prgram in
> main and going up a level (you might have to click on the GUD buffer to get
> fontification).
> 
> Nick

I could reproduce the bug.

In my last kewords definition, underscores in a function name was not handled.
Now underscores and periods are handled.

I've changed my mind: the addresses have no fontification becuase finally I think 
too decorative.

The address fontification will be worth if other gud-ui buffers
introduce font-lock; the awareness of address string in the buffers
will be improved by using the same face on the all gud-ui buffers.
However, I have not used other buffers of gud-ui well yet, I should
not touch more. Switch view between source and machine code by
keyboard is much more important:)

Masatake YAMATO

Index: lisp/progmodes/gdb-ui.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/gdb-ui.el,v
retrieving revision 1.25
diff -u -r1.25 gdb-ui.el
--- lisp/progmodes/gdb-ui.el	23 Oct 2004 22:00:48 -0000	1.25
+++ lisp/progmodes/gdb-ui.el	23 Oct 2004 23:34:03 -0000
@@ -1950,13 +1981,15 @@
     map))
 
 (defvar gdb-assembler-font-lock-keywords
-  '(("[^\$]0x[0-9a-f]+" . font-lock-constant-face)
-    ("^\\(0x*[0-9a-f]+\\) ?\\(<\\(\\sw+\\)\\+[0-9]+>\\)?:[ \t]+\\(\\sw+\\)"
-     (1 font-lock-constant-face) 
-     (3 font-lock-function-name-face) 
+  '(;; <__function.name+n>
+    ("<\\(\\(\\sw\\|[_.]\\)+\\)\\(\\+[0-9]+\\)?>"
+     (1 font-lock-function-name-face))
+    ;; 0xNNNNNNNN <__function.name+n>: opcode
+    ("^0x[0-9a-f]+ \\(<\\(\\(\\sw\\|[_.]\\)+\\)\\+[0-9]+>\\)?:[ \t]+\\(\\sw+\\)"
      (4 font-lock-keyword-face))
+    ;; %register(at least i386)
     ("%\\sw+" . font-lock-variable-name-face)
-    ("^\\(Dump of assembler code for function\\) \\(.+\\):" 
+    ("^\\(Dump of assembler code for function\\) \\(.+\\):"
      (1 font-lock-comment-face)
      (2 font-lock-function-name-face))
     ("^\\(End of assembler dump\\.\\)" . font-lock-comment-face))

  reply	other threads:[~2004-10-23 23:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-17 15:29 font-lock in machine mode of gdba Masatake YAMATO
2004-10-17 16:55 ` Stefan Monnier
2004-10-18  2:14   ` Nick Roberts
2004-10-18  2:25 ` Nick Roberts
2004-10-19  2:26   ` Masatake YAMATO
2004-10-19 12:45     ` Stefan Monnier
2004-10-21 10:53       ` Nick Roberts
2004-10-19 13:28     ` Nick Roberts
2004-10-19 13:54       ` Stefan Monnier
2004-10-19 14:27         ` Masatake YAMATO
2004-10-19 16:38       ` Masatake YAMATO
2004-10-23 22:09         ` Nick Roberts
2004-10-23 23:49           ` Masatake YAMATO [this message]
2004-10-23 23:59             ` Nick Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041024.084913.71110562.jet@gyve.org \
    --to=jet@gyve.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).