Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: gdb-patches@sourceware.org
Cc: dodji@seketeli.org
Subject: [PATCH] Avoid breakpoint query in MI
Date: Thu, 17 Apr 2008 15:12:00 -0000	[thread overview]
Message-ID: <18439.18322.632208.43670@kahikatea.snap.net.nz> (raw)


This updates my earlier patch
(http://sourceware.org/ml/gdb-patches/2008-01/msg00421.html) from the thread
"bug in mi when setting breakpoint" started last year by Dodji Seketeli.  It is
simplified by Joel's recent patch for multiple symbols and Vladimir's concept
of top-level interpreter.

I see the default for multiple-symbols is 'all' (it used to be 'ask', perhaps
this change should be mentioned in NEWS) which might make this change more
acceptable.

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


2008-04-18  Nick Roberts  <nickrob@snap.net.nz>

	* interps.c (interp_top_level): New function.

	* interps.h: New extern.

	* linespec.c: Include interps.h and mi/mi-cmds.h.
	(decode_line_2): When using MI, always set all breakpoints in menu.


*** interps.h	15 Mar 2008 18:14:50 +1300	1.14
--- interps.h	18 Apr 2008 00:47:56 +1200	
*************** extern int current_interp_display_prompt
*** 66,71 ****
--- 66,72 ----
  extern void current_interp_command_loop (void);
  /* Returns opaque data associated with the top-level interpreter.  */
  extern void *top_level_interpreter_data (void);
+ extern void *interp_top_level (void);
  
  extern void clear_interpreter_hooks (void);
  

*** interps.c	15 Mar 2008 18:14:50 +1300	1.23
--- interps.c	16 Apr 2008 15:37:01 +1200	
*************** interpreter_completer (char *text, char 
*** 476,482 ****
    return matches;
  }
  
! extern void *
  top_level_interpreter_data (void)
  {
    gdb_assert (top_level_interpreter);
--- 476,488 ----
    return matches;
  }
  
! void *
! interp_top_level (void)
! {
!   return top_level_interpreter;  
! }
! 
! void *
  top_level_interpreter_data (void)
  {
    gdb_assert (top_level_interpreter);


*** linespec.c	18 Apr 2008 00:10:58 +1200	1.75
--- linespec.c	18 Apr 2008 00:21:29 +1200	
***************
*** 36,41 ****
--- 36,43 ----
  #include "linespec.h"
  #include "exceptions.h"
  #include "language.h"
+ #include "interps.h"
+ #include "mi/mi-cmds.h"
  
  /* We share this one with symtab.c, but it is not exported widely. */
  
*************** See set/show multiple-symbol."));
*** 524,530 ****
  
    /* If select_mode is "all", then do not print the multiple-choice
       menu and act as if the user had chosen choice "1" (all).  */
!   if (select_mode == multiple_symbols_all)
      args = "1";
    else
      {
--- 526,533 ----
  
    /* If select_mode is "all", then do not print the multiple-choice
       menu and act as if the user had chosen choice "1" (all).  */
!   if (select_mode == multiple_symbols_all
!       || ui_out_is_mi_like_p (interp_ui_out (interp_top_level ())))
      args = "1";
    else
      {


             reply	other threads:[~2008-04-17 12:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 15:12 Nick Roberts [this message]
2008-04-17 16:42 ` Vladimir Prus
2008-04-17 21:25   ` Nick Roberts
     [not found]     ` <200804180153.32013.ghost@cs.msu.su>
2008-04-19 14:12       ` Nick Roberts
2008-04-19 17:07         ` Daniel Jacobowitz
2008-04-20  7:20           ` Nick Roberts
2008-04-21  7:10           ` Eli Zaretskii
2008-04-17 23:02   ` Nick Roberts
2008-04-19  0:10     ` Vladimir Prus

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=18439.18322.632208.43670@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=dodji@seketeli.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