[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet
António Afonso via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 4 23:03:09 PDT 2019
aadsm marked an inline comment as done.
aadsm added inline comments.
================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2778
+ for (auto const &library : library_list) {
+ response.Printf("<library name=\"%s\" ", library.name.c_str());
+ response.Printf("lm=\"0x%" PRIx64 "\" ", library.link_map);
----------------
aadsm wrote:
> labath wrote:
> > You're completely ignoring escaping here, which is a pretty complex topic, and one of the reasons why constructing this via the DOM api is so complicated. There are a couple of considerations here:
> > - `"`, `&`, and other special xml characters: these will definitely need to be xml-escaped properly
> > - non-7-bit characters: how these will come out depends on whether the client&server agree on the encoding used. I'm not sure what's the best thing to do here
> > - low ascii (nonprintable) characters: it looks like these cannot be represented in xml (1.0) at all (?)
> >
> > It might be good to check what gdb does in these situations
> Oh yeah, this is a path so of course that will happen. (we probably should update ds2 for that as well).
gdb manually escapes < > " and & into their respective &code; but doesn't seem to handle characters like \r, etc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62502/new/
https://reviews.llvm.org/D62502
More information about the lldb-commits
mailing list