This is the mail archive of the gdb-patches@sources.redhat.com 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: Recent breakage -- disassemble


Elena Zannoni wrote:
> 
> Elena Zannoni writes:
>  > Michael Snyder writes:
>  >  > Some time between February 18 and March 24, someone checked in a change
>  >  > which broke pagination in the disassemble command.  Although "list" will
>  >  > still print out a screen's worth of lines and then pause, "disassemble"
>  >  > will not.
>  >  >
>  >  > Sorry I can't pin it down closer than that -- my cvs client is giving me grief.
>  >  >
>  >  > Michael
>  >
>  > Hmmm, this could be due to the new disassembler. The old one was using
>  > printf_filtered while the new one uses ui_out functions. But the
>  > change happened in November 2002. Do a cvs log of printcmd.c. If you
>  > back out those changes, does the problem go away?
>  >
>  > elena
> 
> Ok, the problem is not that filtered prints were not used, but that
> there is code in fputs_maybe_filtered to bypass the filtered print, if
> this condition is true:
> 
>   /* Don't do any filtering if it is disabled.  */
>   if ((stream != gdb_stdout) || !pagination_enabled
>       || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX))
>     {
>       fputs_unfiltered (linebuffer, stream);
>       return;
>     }
> 
> In this case, stream is different from gdb_stdout.
> 
> Can you try this patch?

Thanks, Elena, your patch makes it work again.
Michael



> 
> Index: utils.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/utils.c,v
> retrieving revision 1.99
> diff -u -p -r1.99 utils.c
> --- utils.c     2 Apr 2003 03:02:46 -0000       1.99
> +++ utils.c     22 Apr 2003 14:28:00 -0000
> @@ -1887,7 +1887,7 @@ fputs_maybe_filtered (const char *linebu
>      return;
> 
>    /* Don't do any filtering if it is disabled.  */
> -  if ((stream != gdb_stdout) || !pagination_enabled
> +  if (!ui_file_isatty (stream) || !pagination_enabled
>        || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX))
>      {
>        fputs_unfiltered (linebuffer, stream);


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