Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: Hui Zhu <teawater@gmail.com>,
	gdb-patches ml <gdb-patches@sourceware.org>,
	       Joel Brobecker <brobecker@adacore.com>
Subject: [commit+7.6] [patch+7.6] [TUI] Fix scrolling crash 7.6 regression  [Re: [PATCH] Fix gdb crash with tui]
Date: Thu, 14 Mar 2013 14:41:00 -0000	[thread overview]
Message-ID: <20130314144035.GA11439@host2.jankratochvil.net> (raw)
In-Reply-To: <5141C38B.1080204@redhat.com>

On Thu, 14 Mar 2013 13:33:15 +0100, Pedro Alves wrote:
> On 03/13/2013 06:54 PM, Jan Kratochvil wrote:
> > That's true but I expect there has to be output a lot of other garbage like
> > "\tin " or "\n" so I did not consider "file" to be significant.  I guess the
> > same crash could happen before just after much more scrollings.
> 
> Hmm, I'm not seeing how.  tui_show_source does no other output
> to gdb_stdout.

When I investigate it I agree there is no accidental output, I thought it is:

print_source_lines_base:
         ui_out_field_int (uiout, "line", line);
         ui_out_text (uiout, "\tin ");
         ui_out_field_string (uiout, "file",
                              symtab_to_filename_for_display (s));

and TUI:
  tui_ui_out_impl.text = tui_text;
tui_text:
  if (data->line > 0)
    {
      if (strchr (string, '\n') != 0)
        {
          data->line = -1;
          data->start_of_line = 0;
        }
      return;
    }

That "\tin " is discarded thanks to that 'return' and 'data->line > 0'.

This was the mistake I made in the patch...


> > -	  /* TUI expects the "fullname" field.  While it is
> > -	     !ui_out_is_mi_like_p compared to CLI it is !ui_source_list.  */
> > +	  /* CLI expects only the "file" field.  TUI expects only the
> > +	     "fullname" field (and TUI does break if "file" is printed).
> > +	     MI expects both the fields.  ui_source_list is set only for CLI,
> 
> s/both the fields/both fields/

done


> I'm wondering about whether this "fullname" handling gross-ness in the
> TUI is really necessary.

Probably not but I was fixing absolute pathnames across GDB, not fixing TUI.
I am still not done with the absolute pathnames task.


Checked in:
	http://sourceware.org/ml/gdb-cvs/2013-03/msg00133.html
and for 7.6:
	http://sourceware.org/ml/gdb-cvs/2013-03/msg00134.html


Thanks,
Jan


  reply	other threads:[~2013-03-14 14:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-09 14:14 [PATCH] Fix gdb crash with tui Hui Zhu
2013-03-11 19:25 ` Jan Kratochvil
2013-03-12  3:15   ` Hui Zhu
2013-03-12 12:22     ` Hui Zhu
2013-03-12 12:37       ` Jan Kratochvil
2013-03-12 13:21         ` Hui Zhu
2013-03-12 14:21           ` Hui Zhu
2013-03-12 16:04         ` Pedro Alves
2013-03-12 16:35           ` Pedro Alves
2013-03-12 18:36 ` Pedro Alves
2013-03-12 18:42   ` Pedro Alves
2013-03-13 18:55   ` [patch+7.6] [TUI] Fix scrolling crash 7.6 regression [Re: [PATCH] Fix gdb crash with tui] Jan Kratochvil
2013-03-14  1:46     ` Hui Zhu
2013-03-14 12:33     ` Pedro Alves
2013-03-14 14:41       ` Jan Kratochvil [this message]
2013-03-14 14:57         ` [commit+7.6] " Pedro Alves
2013-03-13 18:55   ` [patch+7.6] [TUI] Fix scrolling missing '>' " Jan Kratochvil
2013-03-14  1:46     ` Hui Zhu
2013-03-14 12:53     ` Pedro Alves
2013-03-14 14:44       ` [commit+7.6] " Jan Kratochvil

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=20130314144035.GA11439@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=teawater@gmail.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