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] |
I'm not thrilled with it myself. Let me explain what I'm trying to do, and let's see if we can come up with a better model. I have a function which temporarily redirects GDB's output. How does it do this? Well, the best way seems to be to modify gdb_std{out,err,log}. But the old value of gdb_stdout is cached in the cli_out object.
So the assertion: global uiout->stream->ui_file == global gdb_stdout doesn't hold :-(
Both of those are still wrong. The global gdb_stdout should be going away replaced with some sort of explicitly parameterized i/o object. That is why catch_exceptions() takes a ui_out.The two minimal solutions were the one above (using a ui_file**) or hardcoding gdb_stdout (since that's the only thing it's ever used for at present). They're both a bit of a step backwards. I could provide methods to query and set the underlying stream of a ui_out object, but the differences between the different ui_out objects make that a little awkward. Would that be better?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |