[Lldb-commits] [PATCH] D68868: Fix build under musl

David Demelier via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 11 06:49:49 PDT 2019


markand created this revision.
Herald added subscribers: lldb-commits, JDevlieghere, abidh.
Herald added a project: LLDB.

This fixes the build under musl because of missing definitions.

  In file included from /src/vanilla/dev/lldb/lldb-9.0.0.src/source/API/SBReproducerPrivate.h:18:
  /src/vanilla/dev/lldb/lldb-9.0.0.src/include/lldb/Utility/ReproducerInstrumentation.h:567:58: error: invalid application of 'sizeof'
        to an incomplete type '_IO_FILE'
        m_stream.write(reinterpret_cast<const char *>(&t), sizeof(T));
                                                           ^~~~~~~~~
  /src/vanilla/dev/lldb/lldb-9.0.0.src/include/lldb/Utility/ReproducerInstrumentation.h:555:7: note: in instantiation of function
        template specialization 'lldb_private::repro::Serializer::Serialize<_IO_FILE>' requested here
        Serialize(*t);
        ^
  /src/vanilla/dev/lldb/lldb-9.0.0.src/include/lldb/Utility/ReproducerInstrumentation.h:541:5: note: in instantiation of function
        template specialization 'lldb_private::repro::Serializer::Serialize<_IO_FILE>' requested here
      Serialize(head);
      ^
  /src/vanilla/dev/lldb/lldb-9.0.0.src/include/lldb/Utility/ReproducerInstrumentation.h:542:5: note: in instantiation of function
        template specialization 'lldb_private::repro::Serializer::SerializeAll<_IO_FILE *>' requested here
      SerializeAll(tail...);
      ^
  /src/vanilla/dev/lldb/lldb-9.0.0.src/include/lldb/Utility/ReproducerInstrumentation.h:639:16: note: in instantiation of function
        template specialization 'lldb_private::repro::Serializer::SerializeAll<lldb::SBCommandReturnObject *, _IO_FILE *>' requested
        here
      serializer.SerializeAll(args...);
                 ^
  /src/vanilla/dev/lldb/lldb-9.0.0.src/source/API/SBCommandReturnObject.cpp:109:3: note: in instantiation of function template
        specialization 'lldb_private::repro::Recorder::Record<unsigned long, lldb::SBCommandReturnObject *, _IO_FILE *,
        lldb::SBCommandReturnObject *, _IO_FILE *>' requested here
    LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutOutput, (FILE *), fh);
    ^
  /src/vanilla/dev/lldb/lldb-9.0.0.src/include/lldb/Utility/ReproducerInstrumentation.h:112:17: note: expanded from macro
        'LLDB_RECORD_METHOD'
      sb_recorder.Record(                                                        \
                  ^
  //include/bits/alltypes.h:356:16: note: forward declaration of '_IO_FILE'
  typedef struct _IO_FILE FILE;
                 ^
  1 error generated.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68868

Files:
  include/lldb/Utility/ReproducerInstrumentation.h.orig


Index: include/lldb/Utility/ReproducerInstrumentation.h.orig
===================================================================
--- include/lldb/Utility/ReproducerInstrumentation.h.orig
+++ include/lldb/Utility/ReproducerInstrumentation.h.orig
@@ -16,6 +16,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/ErrorHandling.h"

+#include <cstdio>
 #include <iostream>
 #include <map>
 #include <type_traits>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68868.224583.patch
Type: text/x-patch
Size: 418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191011/57937a8a/attachment.bin>


More information about the lldb-commits mailing list