google/EXEgesis

Generate C/C++ header from .bptxt file

Opened this issue · 2 comments

How to convert .pbtxt to valid C/C++ headers?

I've used protoc.exe but it needs .proto files

Hi Dmitry,

I'm not sure what you're trying to do, but you can't generate C/C++ headers from .pbtxt files - these files contain the actual data (in text format), not the definition of the format.

The following assumes that the .pbtxt you have is the instruction set data produced by the EXEgesis parser:

  • the corresponding .proto file with the definition of the data format is in exegesis/proto/instructions.proto. You can use this file with the proto compiler to get the generated code.
  • if you build EXEgesis with Bazel, the generated C++ code for the proto files will be in bazel-genfiles/exegesis/proto.
  • if you build your own code with Bazel too, you can simply make it depend on the cc_proto_library() and bazel will sort out the details for you.

Hope this helps. I'm closing this issue as there is not much for us to do, but feel free to follow up.

I want to generate C/C++ header from Intel's manual