[Lldb-commits] [PATCH] D73067: [lldb/CMake] Auto-generate the Initialize and Terminate calls for plugins (WIP)

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 21 08:05:52 PST 2020


labath added a comment.

Since the initialization function will have to have predictable names anyway, instead of generating the `#include` directives, we could just automatically forward declare the needed functions. So, the .def file would expand to something like:

  extern lldb_initialize_objectfile_elf();
  lldb_initialize_objectfile_elf();
  extern lldb_initialize_objectfile_macho();
  lldb_initialize_objectfile_macho();
  ...

That way we would have only one generated file, and we could ditch the `Initialization.h` file for every plugin (which would contain just the two forward declarations anyway). And this approach would be pretty close to what we'd need to do for dynamically loaded plugins (where instead of an extern declaration we'd have a dlsym lookup).


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73067/new/

https://reviews.llvm.org/D73067





More information about the lldb-commits mailing list