From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: Re: font-lock in machine mode of gdba Date: Sun, 24 Oct 2004 08:49:13 +0900 (JST) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <20041024.084913.71110562.jet@gyve.org> References: <16757.5765.225553.503676@farnswood.snap.net.nz> <20041020.013816.97281206.jet@gyve.org> <16762.54914.444953.532606@farnswood.snap.net.nz> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1098575590 32701 80.91.229.6 (23 Oct 2004 23:53:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 23 Oct 2004 23:53:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 24 01:52:56 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CLVgu-0001eS-00 for ; Sun, 24 Oct 2004 01:52:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CLVoT-0004Vg-Ot for ged-emacs-devel@m.gmane.org; Sat, 23 Oct 2004 20:00:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CLVnt-0004Lt-Bm for emacs-devel@gnu.org; Sat, 23 Oct 2004 20:00:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CLVnr-0004LL-5B for emacs-devel@gnu.org; Sat, 23 Oct 2004 20:00:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CLVnq-0004LI-To for emacs-devel@gnu.org; Sat, 23 Oct 2004 20:00:07 -0400 Original-Received: from [210.130.136.40] (helo=r-maa.spacetown.ne.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CLVg3-00037P-UT for emacs-devel@gnu.org; Sat, 23 Oct 2004 19:52:04 -0400 Original-Received: from localhost (h219-110-076-148.catv01.itscom.jp [219.110.76.148]) by r-maa.spacetown.ne.jp (8.11.6) with ESMTP id i9NNpxI29186; Sun, 24 Oct 2004 08:52:00 +0900 (JST) Original-To: nickrob@snap.net.nz In-Reply-To: <16762.54914.444953.532606@farnswood.snap.net.nz> X-Mailer: Mew version 4.0.62 on Emacs 21.3.50 / Mule 5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28811 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28811 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))