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: $_ and info breakpoint [PATCH]
Date: Tue, 10 Jul 2007 00:22:00 -0000	[thread overview]
Message-ID: <18066.53564.134378.88590@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20070709115647.GC3095@caradoc.them.org>

 > >                       The convenience variable `$_' and the default
 > >     examining-address for the `x' command are set to the address of
 > >     the last breakpoint listed
 > 
 > I didn't know this was there, but if it's a documented feature, we
 > should probably leave it be.  But it's not documented for -break-list
 > and I can't see any reason why it should be.
 > 
 > > 1) That "info breakpoint" doesn't set $_.  At least -break-list shouldn't
 > >    do this.
 > 
 > Is changing -break-list enough to fix your problem?  If so, I
 > recommend that; either by separating -break-list and info break into
 > different functions, or by the old hack of ui_out_is_mi_like_p.

At the moment Emacs still uses "info breakpoint".  I certainly will change
the behaviour of -break-list but for the moment I would like to implement
my last suggestion:

									make
   "server info breakpoint" not set $_ and this would seem a more natural step
   too.

AFAICS the server prefix was written for use with annotations and front-ends.
This shouldn't affect existing use and we can put a caveat in the
documentaion in the manual:

                       The convenience variable `$_' and the default
     examining-address for the `x' command are set to the address of
     the last breakpoint listed unless the command is prefixed with
     'server ' (see Command History).


-- 
Nick                                           http://www.inet.net.nz/~nickrob


2007-07-10  Nick Roberts  <nickrob@snap.net.nz>

	* breakpoint.c: Include "top.h".
	(breakpoint_1): Don't set convenience variable $_ if server prefix
	is used.
	(_initialize_breakpoint): Describe this behaviour in command help.

*** breakpoint.c	03 Jul 2007 16:45:50 +1200	1.255
--- breakpoint.c	10 Jul 2007 12:11:31 +1200	
***************
*** 55,60 ****
--- 55,61 ----
  #include "exceptions.h"
  #include "memattr.h"
  #include "ada-lang.h"
+ #include "top.h"
  
  #include "gdb-events.h"
  #include "mi/mi-common.h"
*************** breakpoint_1 (int bnum, int allflag)
*** 3828,3834 ****
      {
        /* Compare against (CORE_ADDR)-1 in case some compiler decides
  	 that a comparison of an unsigned with -1 is always false.  */
!       if (last_addr != (CORE_ADDR) -1)
  	set_next_address (last_addr);
      }
  
--- 3829,3835 ----
      {
        /* Compare against (CORE_ADDR)-1 in case some compiler decides
  	 that a comparison of an unsigned with -1 is always false.  */
!       if (last_addr != (CORE_ADDR) -1 && !server_command)
  	set_next_address (last_addr);
      }
  
*************** breakpoint will be disabled.  The \"Addr
*** 8161,8167 ****
  address and file/line number respectively.\n\
  \n\
  Convenience variable \"$_\" and default examine address for \"x\"\n\
! are set to the address of the last breakpoint listed.\n\n\
  Convenience variable \"$bpnum\" contains the number of the last\n\
  breakpoint set."));
      }
--- 8162,8169 ----
  address and file/line number respectively.\n\
  \n\
  Convenience variable \"$_\" and default examine address for \"x\"\n\
! are set to the address of the last breakpoint listed unless the command\n\
! is prefixed with \"server \".\n\n\
  Convenience variable \"$bpnum\" contains the number of the last\n\
  breakpoint set."));
      }
*************** breakpoint will be disabled.  The \"Addr
*** 8177,8183 ****
  address and file/line number respectively.\n\
  \n\
  Convenience variable \"$_\" and default examine address for \"x\"\n\
! are set to the address of the last breakpoint listed.\n\n\
  Convenience variable \"$bpnum\" contains the number of the last\n\
  breakpoint set."));
  
--- 8179,8186 ----
  address and file/line number respectively.\n\
  \n\
  Convenience variable \"$_\" and default examine address for \"x\"\n\
! are set to the address of the last breakpoint listed unless the command\n\
! is prefixed with \"server \".\n\n\
  Convenience variable \"$bpnum\" contains the number of the last\n\
  breakpoint set."));
  
*************** breakpoint will be disabled.  The \"Addr
*** 8193,8199 ****
  address and file/line number respectively.\n\
  \n\
  Convenience variable \"$_\" and default examine address for \"x\"\n\
! are set to the address of the last breakpoint listed.\n\n\
  Convenience variable \"$bpnum\" contains the number of the last\n\
  breakpoint set."));
  
--- 8196,8203 ----
  address and file/line number respectively.\n\
  \n\
  Convenience variable \"$_\" and default examine address for \"x\"\n\
! are set to the address of the last breakpoint listed unless the command\n\
! is prefixed with \"server \".\n\n\
  Convenience variable \"$bpnum\" contains the number of the last\n\
  breakpoint set."));
  
*************** breakpoint will be disabled.  The \"Addr
*** 8212,8219 ****
  address and file/line number respectively.\n\
  \n\
  Convenience variable \"$_\" and default examine address for \"x\"\n\
! are set to the address of the last breakpoint listed.\n\
! \n\
  Convenience variable \"$bpnum\" contains the number of the last\n\
  breakpoint set."),
  	   &maintenanceinfolist);
--- 8216,8223 ----
  address and file/line number respectively.\n\
  \n\
  Convenience variable \"$_\" and default examine address for \"x\"\n\
! are set to the address of the last breakpoint listed unless the command\n\
! is prefixed with \"server \".\n\n\
  Convenience variable \"$bpnum\" contains the number of the last\n\
  breakpoint set."),
  	   &maintenanceinfolist);


       reply	other threads:[~2007-07-10  0:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <18064.7905.924535.720690@kahikatea.snap.net.nz>
     [not found] ` <20070709115647.GC3095@caradoc.them.org>
2007-07-10  0:22   ` Nick Roberts [this message]
2007-07-10  1:43     ` Daniel Jacobowitz
2007-07-10  3:20       ` Eli Zaretskii
2007-07-10 11:20         ` Daniel Jacobowitz
2007-07-10 23:11           ` Nick Roberts
2007-07-10 23:51             ` Daniel Jacobowitz
2007-07-11  0:35               ` Nick Roberts
2007-07-11 11:32                 ` Daniel Jacobowitz
2007-07-11 18:15     ` Jim Blandy
2007-07-11 22:56       ` $_ and info breakpoint [PATCH: doco] Nick Roberts
2007-07-12  3:19         ` Eli Zaretskii

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=18066.53564.134378.88590@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