GDB uses normalized errno values for vFile errors. Implement
the translation between them and system errno values in the gdb-remote
plugin.
Details
Diff Detail
Event Timeline
I think this would be a good use case for a llvm-style .def file. It would provide a central place listing all the known constants, and one could use it to generate the enum definition and both of the conversion functions (by defining a suitable macro).
So basically a new thingie for lldb's TableGen? or is there some generic thingie I could reuse for this?
Nah, tablegen is overkill. I was thinking of something similar to (but simpler than) include/llvm/BinaryFormat/Dwarf.def.
LG, modulo the comment. Keep an eye out on the bots though. I fear some systems (windows, in particular), may not have all errno constants defined, and we'll need to do something smarter.
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | ||
---|---|---|
3075 | Normally, it's the job of the .def file to undef this macro. |
Judging by https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-constants?view=msvc-160, this may just work, so let's cross that bridge when we get to it.
Normally, it's the job of the .def file to undef this macro.