[RFC PATCH] Support debuginfo and source file fetching via debuginfo server
Frank Ch. Eigler
fche@redhat.com
Tue Nov 5 15:50:00 GMT 2019
Hi, Simon -
> [...]
> I think that providing a void pointer for context is pretty standard thing
> for C libraries that accept callbacks. I would use __thread and the promise
> to call the function back in the same thread to "retro-fit" some thread-safety
> in an existing API that doesn't provide a context pointer,
Remember that this is a batch file downloading tool. We expect it to
be interrupted if a user gets impatient, in which case such a signal
would affect all downloads. In the absence of a plausible user story
for the need for fine control over multiple different debuginfo
transfers in progress, I believe something simple is enough for now.
> Ok, well I think it would be a good reason to adopt an API of the
> style: [...] Again, this is easy to add in the beginning, but hard
> to retro-fit later on.
Retro-fitting it later on is not that bad, when/if actual use cases
appear. The default 'client context' can be the current global one.
A hypothetical future api can pass void* context parameters; we can
have two callback function types. It being simple now does not
preclude necessary complexity later. I appreciate the ideas, really,
but I am about as wary of overengineering as underengineering.
- FChE
More information about the Gdb-patches
mailing list