Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH: mi-cmd-file.c]
Date: Wed, 30 Jan 2008 01:57:00 -0000	[thread overview]
Message-ID: <18335.55189.966269.492998@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20080129180629.GI3773@caradoc.them.org>

 > > 2008-01-10  Nick Roberts  <nickrob@snap.net.nz>
 > > 
 > > 	* 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  <nickrob@snap.net.nz>

	* 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;
  }
  


  reply	other threads:[~2008-01-30  1:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10  3:30 Nick Roberts
2008-01-29 18:08 ` Daniel Jacobowitz
2008-01-30  1:57   ` Nick Roberts [this message]
2008-01-30  3:06     ` Daniel Jacobowitz
2008-01-30  3:32       ` Nick Roberts
2008-01-30  7:19         ` Vladimir Prus
2008-01-30  9:30           ` 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

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

  git send-email \
    --in-reply-to=18335.55189.966269.492998@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox