[Crash-utility] [tools-team] Questions on multi-thread for crash
Tao Liu
ltao at redhat.com
Sun Feb 12 03:35:01 UTC 2023
Hi Florian,
Thanks a lot for your reply,
On Fri, Feb 10, 2023 at 3:48 PM Florian Weimer <fweimer at redhat.com> wrote:
>
> * Andrew Burgess:
>
> > If this is the case, then no, GDB is certainly not thread safe. GDB
> > isn't a library, and was not written as one. I guess it'll work just
> > fine if you only try to use a single instance of GDB within "crash", but
> > if you have multiple threads calling into different parts of GDB then
> > things are going to go wrong quickly.
>
> Furthermore, GDB needs to use kernel interfaces which have properties
> that are awkward for certain threading use cases, such as having to
> conduct operations from specific threads. But if you only want to look
> at coredumps, that won't matter (in theory, GDB is of course still
> structured around such interfaces to some extent).
>
OK, I see...
> > I don't know if any other debuggers are written more as a library, so
> > can't help here, sorry.
>
> There is LLDB, but some time ago, I found it curiously non-aligned with
> typical Linux userspace usage scenarios. It may matter less for kernel
> crash dumps.
>
> There's also the possibility to read the ELF data structures directly.
> It's harder for DWARF.
>
Thanks a lot for providing the info, so I can evaluate the effort
needed for the project.
Thanks,
Tao Liu
> Thanks,
> Florian
>
More information about the Crash-utility
mailing list