[Lldb-commits] [PATCH] D24495: A little bit more pointer safety in the Breakpoint code
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 12 23:06:12 PDT 2016
zturner created this revision.
zturner added a reviewer: jingham.
zturner added subscribers: lldb-commits, LLDB.
This started out when I noticed a potential pitfall in the API of `SetCallback` where you could potentially get the class into a bad state. Ultimately I wasn't able to fix that in this patch, although I did include a comment in this patch explaining the problem and some possible fixes. But my initial attempts to fix it before I decided that the best approach wasn't clear ended up in this patch, which I think is still a net positive, so I'm uploading it anyway.
Basically, it makes the `Baton` classes a little bit more type-safe by plumbing `unique_ptrs` through a few more places so that you never have to deal with raw pointers, and it also makes it so Batons can clean up after themselves by default, so anyone implementing a new baton doesn't have to reimplement the exact same code in the destructor every time.
Also fixes a compiler error since SIZE_T_MAX isn't defined.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15205 bytes
Desc: not available
More information about the lldb-commits