[lldb-dev] lldb typedefs
Zachary Turner
zturner at google.com
Thu Jun 26 19:50:07 PDT 2014
Is there a clear explanation of the intention of each of lldb's typedefs?
I've found a number of issues on Windows related to incorrect type usage,
but the purpose of the types is ambiguous enough that I'm not yet sure how
to fix these issues correctly. Some of the issues I've run into are:
1) We use off_t in some places. I think this is almost always an error, as
off_t's purpose is to deal with files and only in a limited number of cases
do we actually deal with files.
2) I'm not sure what lldb::offset_t is supposed to represent. Is it an
offset in a process's address space? Then why not just use size_t in that
case?
3) Why is lldb::addr_t always 64-bit? I assume it's because a target
process can be either 32 or 64-bit, is this just for convenience so that we
only need a single type to represent a pointer in the target process?
4) Windows has separate notions of pids and process handles, and similarly
for threads. I'd like to abstract this into separate typedefs, if there's
no objections (on non-Windows platforms, pid_t would just be the same type
as process_handle_t), and update various methods to take handles instead of
pids.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140626/49174ef9/attachment.html>
More information about the lldb-dev
mailing list