From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19800 invoked by alias); 21 Jan 2003 07:38:56 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19680 invoked from network); 21 Jan 2003 07:38:55 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by 172.16.49.205 with SMTP; 21 Jan 2003 07:38:55 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id h0L7W28A017840; Tue, 21 Jan 2003 02:32:02 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id h0L7W1WO017836; Tue, 21 Jan 2003 02:32:01 -0500 To: gdb@sources.redhat.com Subject: obsoleting the annotate level 2 interface From: Jim Blandy Date: Tue, 21 Jan 2003 07:38:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.92 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-01/txt/msg00354.txt.bz2 GDB seems to support two different ways of doing detailed annotations of its output for consumption by other programs: MI and 'set annotate 2'. I don't think annotation level 2 has many active users, if any at all. It pervades GDB's code. Would it make sense to put 'set annotate 2' on the path to obsolescence? Some background: the 'set annotate' command sets the 'annotation_level' variable. There are only three distinguished values for this variable: 0: nothing special, GDB behaves normally. 1: in source.c:line_info and stack.c:print_frame_info, when we print the source line, we print out something extra that helps Emacs pop up the source code in a window. 2 or greater: we enable around 250 calls to a variety of functions in annotate.c to mark and identify lots of things GDB prints. I think we should keep level 1, since the standard Emacs GDB interface uses it, and it's not very much code. I'd like to see GDB dump level 2, since it duplicates MI, badly. MI's design ensures that whoever's trying to parse GDB's output gets something that's well-formed, whereas annotate just sticks escape codes into the outgoing stream of text. This means that, if you change the way anything prints, you may break an annotate level 2 client. But to break an MI client, you actually have to change a ui_out call, whose sole purpose is to produce output for clients to read. So MI is a much more maintainable approach, because it's easier for people to see what they're doing. If folks agree that annotate level 2 should go, we could: - announce that annotate level 2 will be disabled in the release after next; - in that release, disable the code, but leave it there, to see if anyone complains, and whether they can be persuaded to switch to MI; and - in the release after that, if all goes well, remove the code to support annotation level 2. Personally, I'd like to see Emacs switch from annotation level 1 to MI, too; then we could get rid of annotation altogether. But I think it makes sense to tackle level 2 first, since I don't think it has many users (if any).