Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Pierre Muller <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC/RFA] avoid spurious Watchpoint X output on cygwin native target.
Date: Mon, 15 Jul 2002 09:42:00 -0000	[thread overview]
Message-ID: <20020715164212.GA22578@nevyn.them.org> (raw)
In-Reply-To: <4.2.0.58.20020715174048.02a55688@ics.u-strasbg.fr>

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.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-07-15 16:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-15  9:31 Pierre Muller
2002-07-15  9:42 ` Daniel Jacobowitz [this message]
2002-07-16  7:24   ` Pierre Muller

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=20020715164212.GA22578@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=muller@ics.u-strasbg.fr \
    /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