llvm-project/lldb/include/lldb
Lawrence D'Anna b3faa01ff9 IOHandler: fall back on File::Read if a FILE* isn't available.
Summary:
IOHandler needs to read lines of input from a lldb::File.
The way it currently does this using, FILE*, which is something
we want to avoid now.   I'd prefer to just replace the FILE* code
with calls to File::Read, but it contains an awkward and
delicate workaround specific to ctrl-C handling on windows, and
it's not clear if or how that workaround would translate to
lldb::File.

So in this patch, we use use the FILE* if it's available, and only
fall back on File::Read if that's the only option.

I think this is a reasonable approach here for two reasons.  First
is that interactive terminal support is the one area where FILE*
can't be avoided.   We need them for libedit and curses anyway,
and using them here as well is consistent with that pattern.

The second reason is that the comments express a hope that the
underlying windows bug that's being worked around will be fixed one
day, so hopefully when that happens, that whole path can be deleted.

Reviewers: JDevlieghere, jasonmolenda, labath, lanza

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68622

llvm-svn: 374576
2019-10-11 17:43:32 +00:00
..
API update SBDebugger::SetInputFile() etc to work on native Files 2019-10-10 19:10:59 +00:00
Breakpoint Implement serializing scripted breakpoints and their extra args. 2019-10-10 17:44:50 +00:00
Core IOHandler: fall back on File::Read if a FILE* isn't available. 2019-10-11 17:43:32 +00:00
DataFormatters [lldb][NFC] Refactor and document *DumpToStreamOptions 2019-09-25 09:56:23 +00:00
Expression [lldb][NFC] Use unique_ptr in DiagnosticManager to express ownership 2019-10-10 08:30:10 +00:00
Host [lldb][ELF] Read symbols from .gnu_debugdata sect. 2019-10-07 10:32:16 +00:00
Initialization [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Interpreter [lldb][NFC] Remove strange bool parameter from Searcher::SearchCallback 2019-10-10 11:26:51 +00:00
Symbol [lldb-test] Modify lldb-test to print out ASTs from symbol file 2019-10-11 16:36:20 +00:00
Target StopInfo/Mach: Use early-exits, reflow messy comments, NFCI 2019-10-08 19:40:13 +00:00
Utility ProcessInstanceInfoMatch: Don't match processes with no name if a name match was requested, take 2 2019-10-11 10:56:54 +00:00
lldb-defines.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
lldb-enumerations.h Add missing dot. 2019-08-22 22:28:18 +00:00
lldb-forward.h [Windows] Use information from the PE32 exceptions directory to construct unwind plans 2019-10-11 09:03:29 +00:00
lldb-private-defines.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lldb-private-enumerations.h Generalize FindTypes with CompilerContext to support fuzzy lookup 2019-08-21 18:06:56 +00:00
lldb-private-forward.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
lldb-private-interfaces.h Extend FindTypes with CompilerContext to allow filtering by language. 2019-08-22 21:45:58 +00:00
lldb-private-types.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
lldb-private.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lldb-public.h Fix file names in file headers. NFC 2019-05-13 04:42:32 +00:00
lldb-types.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
lldb-versioning.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
module.modulemap [Reproducers] Make ReproducerInstrumentation a textual header 2019-03-11 23:09:09 +00:00