[Lldb-commits] [lldb] r315967 - Reverting r315966 - it caused a build failure on an ubuntu x android bot.
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 16 20:19:17 PDT 2017
Can anyone more familiar with the android SDK help out? Larry's patch in https://reviews.llvm.org/D38829 aadds this code to File.cpp:
+File::File(void *cookie,
+ int (*readfn)(void *, char *, int),
+ int (*writefn)(void *, const char *, int),
+ int (*closefn)(void *))
+ : IOObject(eFDTypeFile, false), m_descriptor(kInvalidDescriptor),
+ m_stream(kInvalidStream), m_options(), m_own_stream(false),
+ m_is_interactive(eLazyBoolCalculate),
+ m_is_real_terminal(eLazyBoolCalculate),
+ m_supports_colors(eLazyBoolCalculate)
+{
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ m_stream = funopen(cookie, readfn, writefn, NULL, closefn);
+#elif defined(__linux__)
+ cookie_io_functions_t io_funcs = {};
+ io_funcs.read = read_wrapper;
+ io_funcs.write = write_wrapper;
+ io_funcs.close = close_wrapper;
+ const char *mode = NULL;
+ if (readfn && writefn) {
+ mode = "r+";
+ } else if (readfn) {
+ mode = "r";
+ } else if (writefn) {
+ mode = "w";
+ }
+ if (mode) {
+ struct context *ctx = new context;
+ ctx->readfn = readfn;
+ ctx->writefn = writefn;
+ ctx->closefn = closefn;
+ ctx->cookie = cookie;
+ m_stream = fopencookie(ctx, mode, io_funcs);
+ if (!m_stream) {
+ delete ctx;
+ }
+ }
+#endif
but maybe fopencookie(3) on android doesn't define this type? v. http://www.gnu.org/software/libc/manual/html_node/Streams-and-Cookies.html
FAILED: /lldb-buildbot/android-ndk-r15b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=i686-none-linux-android --gcc-toolchain=/lldb-buildbot/android-ndk-r15b/toolchains/x86-4.9/prebuilt/linux-x86_64 --sysroot=/lldb-buildbot/android-ndk-r15b/sysroot -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DLLDB_CONFIGURATION_RELEASE -DLLDB_DISABLE_CURSES -DLLDB_DISABLE_LIBEDIT -DLLDB_DISABLE_PYTHON -DLLDB_USE_BUILTIN_DEMANGLER -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lldb/source/Host -I/lldb-buildbot/buildServerSlave/lldb-android-buildserver/llvm/tools/lldb/source/Host -Itools/lldb/include -I/lldb-buildbot/buildServerSlave/lldb-android-buildserver/llvm/tools/lldb/include -Iinclude -I/lldb-buildbot/buildServerSlave/lldb-android-buildserver/llvm/include -I/lldb-buildbot/buildServerSlave/lldb-android-buildserver/llvm/tools/clang/include -Itools/lldb/../clang/include -I/lldb-buildbot/buildServerSlave/lldb-android-buildserver/llvm/tools/lldb/source/. -isystem /lldb-buildbot/android-ndk-r15b/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /lldb-buildbot/android-ndk-r15b/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include -isystem /lldb-buildbot/android-ndk-r15b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /lldb-buildbot/android-ndk-r15b/sysroot/usr/include/i686-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -Os -DNDEBUG -fno-exceptions -fno-rtti -MD -MT tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/File.cpp.o -MF tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/File.cpp.o.d -o tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/File.cpp.o -c /lldb-buildbot/buildServerSlave/lldb-android-buildserver/llvm/tools/lldb/source/Host/common/File.cpp
/lldb-buildbot/buildServerSlave/lldb-android-buildserver/llvm/tools/lldb/source/Host/common/File.cpp:168:5: error: unknown type name 'cookie_io_functions_t'
cookie_io_functions_t io_funcs = {};
^
1 error generated.
ninja: build stopped: subcommand failed.
More information about the lldb-commits
mailing list