[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 4 23:57:23 PDT 2019
labath added a comment.
Using the libxml function for the escaping is fine, but there are a couple of caveats. I believe people expect to be able to build lldb without libxml. At least that what all the existing xml-related code assumes (you'll see it has some #ifdefs and stuff). If we don't intend to change that, then we'll need to do something similar here. It's fine if some features (like this one) don't work without libxml, but they should degrade gracefully.
The svr reading support in the client depends on having libxml around, so depending on it here would be consistent. OTOH, lldb-server is used also in embedded(ish) environments where libxml is hard to come by (or just big), so it may make sense to try to avoid it here (particularly as you're still constructing the xml elements by hand).
So overall, it's up to you how you want to proceed here. However, if you do use libxml, I think you'll need to do something like:
- make sure the changes in XML.h compile without libxml (move stuff into an ifdef, provide a no-op implementation for the other case, and similar)
- only say we support the svr extension if `XMLDocument::XMLEnabled()` is true
- guard the tests with `@skipIfXmlSupportMissing`
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the lldb-commits