Sorry, I'm lost here.
Say, instead of a libthread_db, we had gdb/libthread-db.c which could be
compiled on all systems. It would have some sort of procedural
interface, and would grub around in target data to find thread X lwp
maps. However, it could be written in a way that was host architecture
netural.
Sure. But the design of libthread_db says, "I am 100% coupled to the
private structure of this thread implementation. I must match its
version exactly if you want predictable results. My details can change
in minor revisions or even more frequently." That's not part of the
implementation; it's more like the purpose of the design. It is a
layer between implementation-specific details with no guaranteed
structure and a structured client interface.
Right.