Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: Vladimir Prus <vladimir@codesourcery.com>,
		gdb@sources.redhat.com, Jim Ingham <jingham@apple.com>
Subject: Re: mi_load_progress question
Date: Thu, 13 Jul 2006 06:47:00 -0000	[thread overview]
Message-ID: <20060713064616.BE4E11D3550@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20060712140431.GA18249@nevyn.them.org>

 > I am pretty sure that there was a bug report about this before, but I
 > can't find it now.  Ah, here:
 > 
 > http://sourceware.org/ml/gdb-patches/2005-11/msg00295.html
 > 
 > No one else commented at the time and I opted to stick with what we
 > already had.  Do you think we should just turn the progress reporting
 > back on for -i=mi2?  How about you, Nick?

I have no experience with remote debugging, so I can only suggest that it's
consistent i.e have progress reporting for all cases or turn it off completely
(I don't know how useful it is or why it should only exist in MI).

 > > Looking through the change history, other values didn't exist when the
 > > original code was written.  So I guess it's not desired behaviour.
 > > 
 > >  if (current_interp_named_p (INTERP_MI1))
 > >    uiout = mi_out_new (1);
 > >  else if (current_interp_named_p (INTERP_MI)
 > > 	  || current_interp_named_p (INTERP_MI2))
 > >    uiout = mi_out_new (2);
 > >  else if (current_interp_named_p (INTERP_MI3))
 > >    uiout = mi_out_new (3);
 > >  else
 > >    return;
 > > 
 > > would work (until new MI levels are introduced!).  It would be best to generalise
 > > this and similar code to make it future proof.
 > 
 > Or come up with some other way to do this that avoids the need for the
 > hack.  The problem was that we were calling the MI load progress hook
 > through the wrong interpreter.  We need to figure out how to do this
 > right.
 >
 > First question: Should typing "load" at the MI prompt issue +download
 > updates?  Currently it does.  It also issues the CLI's updates.
 > 
 > Second question: Should typing "-interpreter-exec console load" issue
 > +download updates?  Currently it does the same as "load" and
 > that's the right thing to do so this is the same as the first question.

If the answer is yes, I suggest something like the patch below.  Unless I'm
missing something mi_load_progress only gets called in MI.  I would like to
make similar but more fiddly changes to mi-interp.c, removing
mi`N'_command_loop, N = 1,2,3, and just using mi_command_loop.

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


*** mi-main.c	13 May 2006 16:42:07 +1200	1.84
--- mi-main.c	13 Jul 2006 18:41:37 +1200	
*************** mi_load_progress (const char *section_na
*** 1386,1397 ****
       of this function.  */
    saved_uiout = uiout;
  
!   if (current_interp_named_p (INTERP_MI))
!     uiout = mi_out_new (2);
!   else if (current_interp_named_p (INTERP_MI1))
!     uiout = mi_out_new (1);
!   else
!     return;
  
    update_threshold.tv_sec = 0;
    update_threshold.tv_usec = 500000;
--- 1386,1392 ----
       of this function.  */
    saved_uiout = uiout;
  
!   uiout = mi_out_new (mi_version (uiout));
  
    update_threshold.tv_sec = 0;
    update_threshold.tv_usec = 500000;


  parent reply	other threads:[~2006-07-13  6:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-12  8:39 Vladimir Prus
2006-07-12  9:33 ` Nick Roberts
2006-07-12 14:04   ` Daniel Jacobowitz
2006-07-12 17:34     ` Jim Ingham
2006-07-13  6:47     ` Nick Roberts [this message]
2006-07-13 13:03       ` Daniel Jacobowitz
2006-07-13 22:45         ` 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=20060713064616.BE4E11D3550@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=jingham@apple.com \
    --cc=vladimir@codesourcery.com \
    /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