Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Subject: Re: TUI + gdbserver broken?
Date: Mon, 19 Mar 2007 23:31:00 -0000	[thread overview]
Message-ID: <45FF1571.2080401@portugalmail.pt> (raw)
In-Reply-To: <20070319221430.GA24326@caradoc.them.org>

Daniel Jacobowitz wrote:
>   
>> static void
>> tui_selected_frame_level_changed_hook (int level)
>> {
>>     struct frame_info *fi;
>>     
>
>   
>>     fi = deprecated_safe_get_selected_frame ();
>>     /* Ensure that symbols for this frame are read in.  Also, determine the
>>        source language of this frame, and switch to it if desired.  */
>>     if (fi)
>>       {
>>         struct symtab *s;
>>     
>
> How about this:
>
>   if (level >= 0)
>     {
>       struct frame_info *fi = get_selected_frame (NULL);
>
>
>   

That has exactly the same effect as it was before the your select frame 
changes.
That is, only try to get the selected frame when there is one.  Maybe 
there should
still be a function like this in frame.c ?

struct frame_info *
deprecated_get_selected_frame ()
{
  return selected_frame;
}

(or perhaps call it get_selected_frame_if_any)

I don't think that the callbacks should ever change the selected_frame 
state, that is,
they should be pure observers - that is how it worked before, and your 
suggestion
would make it so too.

(I'll go try both versions)

Cheers,
Pedro Alves



  reply	other threads:[~2007-03-19 23:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19  1:53 Pedro Alves
2007-03-19  2:11 ` Daniel Jacobowitz
2007-03-19 15:58   ` Denis PILAT
2007-03-27 20:09     ` Daniel Jacobowitz
2007-04-17 15:48       ` [RFA] TUI is broken under Solaris Denis PILAT
2007-04-17 15:51         ` Daniel Jacobowitz
2007-04-18  8:24           ` Denis PILAT
2007-03-19 21:43   ` TUI + gdbserver broken? Pedro Alves
2007-03-19 22:14     ` Daniel Jacobowitz
2007-03-19 23:31       ` Pedro Alves [this message]
2007-03-19 23:41         ` Daniel Jacobowitz
2007-03-20  0:39           ` Pedro Alves
2007-03-20  2:56             ` Daniel Jacobowitz
2007-03-20  9:05               ` Pedro Alves
2007-03-20 23:21                 ` Pedro Alves
2007-03-22  2:51                   ` Pedro Alves
2007-03-27 20:15                     ` Daniel Jacobowitz
2007-03-29  2:26                       ` Pedro Alves
2007-03-29 18:55                         ` Daniel Jacobowitz
     [not found] <45F7480C.5010207@portugalmail.pt>
2007-03-14  8:29 ` Denis PILAT

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=45FF1571.2080401@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --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