From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19611 invoked by alias); 30 Jan 2008 01:49:42 -0000 Received: (qmail 19598 invoked by uid 22791); 30 Jan 2008 01:49:41 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Jan 2008 01:49:16 +0000 Received: from kahikatea.snap.net.nz (192.31.255.123.static.snap.net.nz [123.255.31.192]) by viper.snap.net.nz (Postfix) with ESMTP id 7A47C3D9E5C; Wed, 30 Jan 2008 14:49:13 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 083068FC6D; Wed, 30 Jan 2008 14:49:10 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18335.55189.966269.492998@kahikatea.snap.net.nz> Date: Wed, 30 Jan 2008 01:57:00 -0000 To: Daniel Jacobowitz Cc: gdb-patches@sourceware.org Subject: Re: [PATCH: mi-cmd-file.c] In-Reply-To: <20080129180629.GI3773@caradoc.them.org> References: <18309.37153.798074.919481@kahikatea.snap.net.nz> <20080129180629.GI3773@caradoc.them.org> X-Mailer: VM 7.19 under Emacs 23.0.60.5 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00754.txt.bz2 > > 2008-01-10 Nick Roberts > > > > * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Add field > > for preprocessor macro information. > > Needs a manual update, of course. Otherwise looks OK to me. > > GUD uses this to avoid expanding macros if it knows they are not > available, right? Actually Emacs turns tooltips off if there is no macro information in case of something like: #define STOP abort () and the mouse hovers over STOP. Macro information allows Emacs to ensure that a macro doesn't expand to a function first. I've committed it with the formatting changes below as obvious. Thanks. -- Nick http://www.inet.net.nz/~nickrob 2008-01-30 Nick Roberts * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Add field for preprocessor macro information. Formatting changes. *** mi-cmd-file.c.~1.7.~ 2008-01-04 10:24:34.000000000 +1300 --- mi-cmd-file.c 2008-01-10 16:15:10.000000000 +1300 *************** *** 29,46 **** current file being executed. */ enum mi_cmd_result ! mi_cmd_file_list_exec_source_file(char *command, char **argv, int argc) { struct symtab_and_line st; int optind = 0; char *optarg; ! if ( !mi_valid_noargs("mi_cmd_file_list_exec_source_file", argc, argv) ) error (_("mi_cmd_file_list_exec_source_file: Usage: No args")); /* Set the default file and line, also get them */ ! set_default_source_symtab_and_line(); ! st = get_current_source_symtab_and_line(); /* We should always get a symtab. Apparently, filename does not need to be tested for NULL. --- 29,46 ---- current file being executed. */ enum mi_cmd_result ! mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc) { struct symtab_and_line st; int optind = 0; char *optarg; ! if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_file", argc, argv)) error (_("mi_cmd_file_list_exec_source_file: Usage: No args")); /* Set the default file and line, also get them */ ! set_default_source_symtab_and_line (); ! st = get_current_source_symtab_and_line (); /* We should always get a symtab. Apparently, filename does not need to be tested for NULL. *************** mi_cmd_file_list_exec_source_file(char * *** 59,64 **** --- 59,66 ---- if (st.symtab->fullname) ui_out_field_string (uiout, "fullname", st.symtab->fullname); + ui_out_field_int (uiout, "macro-info", st.symtab->macro_table ? 1 : 0); + return MI_CMD_DONE; }