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: [RFC/RFA] avoid spurious Watchpoint X output on cygwin native target.


At 18:42 15/07/2002 , Daniel Jacobowitz a écrit:
>On Mon, Jul 15, 2002 at 06:15:01PM +0200, Pierre Muller wrote:
> > 
> > The following patch suppresses all 
> > spurious output when a DLL is loaded in native cygwin GDB.
> > 
> > Its a RFC for two reasons:
> > 
> > First reason:
> > Question:  Why do we currently get ouptut while loading a DLL
> > while the safe_symbol_file_add does redefine gdb_stdout and 
> > gdbstderr to dummy output exactly to suppress all output?
> > 
> > Answer: Because, despite gdb_stdout is redefined as a 
> > dummy file does noting with the strings it gets
> > (and thus is a correct way of suppressing ouptut 
> > sent to gdb_stdout), the Watchpoint X...
> > message is sent to uiout struct
> > (see mention function in breakpoint.c source)
> > The only question here is if a change of gdb_stdout should not 
> > also change the global uiout variable behavior.
> > This could easily be achieved by replacing 
> > the stream field of the data field of ui_out struct into a 
> > '** ui_file' instead of a simple '*ui_file'.
> > 
> >    Is that complete nonsense, or does it seem logical to someone?
> > 
> > (One argument for this is that you get the same unwanted output on 
> > loading of shared libraries on linux for instance ...)
> > 
> > 
> > Here is the win32 specific patch and the associated changelog.
> > 
> > 2nd reason: It does not free the uiout struct created because I didn't find 
> > how to free this cleanly.
>
>
>This is an amusing coincidence, I discovered the same thing yesterday,
>working on a different patch.
>
>I believe that uiout should write to gdb_stdout no matter what instead
>of saving a stream, and that things which wish to change where output
>goes should redirect gdb_stdout.  Your patch is definitely suspect,
>because the current uiout might not be CLI; I don't know that it
>matters for your case, although it definitely did for mine.

   OK, if ou are working on a different way of correcting this problem, 
I am happy to withdraw my RFA and waiting for your patch !

   Isn't the suggestion above (of replacement 
of the  ui_file * into a ui_file **) 
just enough to solve the problems?



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


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