Re: [RFC PATCH] Support debuginfo and source file fetching via debuginfo server

Frank Ch. Eigler
2019-11-05T10:25:29Z

Hi -

> Maybe a user_data void pointer would be useful, to be able to get some
> context in the callback?

In your case, with a single-threaded app with C++ lambda captured
variables, you wouldn't need the library to do that. In a
multithreaded app's case, __thread variables and the promise to call
those functions back from the calling thread should again let one get
context if required.

> I am noticing that debuginfod calls don't have any "context" or "handle"
> parameters, which could suggest that the state of the library (if there
> is any) is kept as global variables. [...]

It turns out it's the opposite: except for this callback function
pointer, it's practically all local variables therefore multithread-safe.

- FChE