This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TUI + gdbserver broken?


On Mon, Mar 19, 2007 at 08:50:56PM +0000, Pedro Alves wrote:
> Is TUI testable?

Probably, but it would require someone comfortable with expect to set
it up, I suspect.

> Since TUI is sitting on top of deprecated hooks, it TUI itself deprecated?

No.

> 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);

Insight wants to be notified even if there's no frame, apparently
(gross, I hate the way Insight is still attached at the hip to GDB -
I honestly believe that in a few years we'll have no choice but to
break Insight).  But TUI doesn't.

> Here is an updated patch that also fixes the problem.
> The comments in the patch should make it obvious, and I think it does
> what you hinted at.

No, I meant at a higher level (i.e. why we were calling the hook).
The frame cache is supposed to be a cache - we should be able to
discard it at any and every time.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]