Re: expected behavior of GNU/Linux gcore and corefiles

Daniel Jacobowitz
2003-03-02T20:32:25Z

On Sun, Mar 02, 2003 at 03:17:31PM -0500, Andrew Cagney wrote:
> Dig dig, this has come up before. Up until this change:
>
> >2002-01-04 Daniel Jacobowitz <drow@mvista.com>
> >
> > * thread-db.c (thread_db_new_objfile): Do not enable thread_db
> > for core files.
> >
>
> GDB was barfing when trying to load the thread DB. Looking back through
> that thread, part of the problem appears to have stemed from GDB
> thinking that the GNU/Linux core file contained threads instead of LWPs :-(
>
> Andrew
>
> http://sources.redhat.com/ml/gdb-patches/2002-01/msg00017.html
> http://sources.redhat.com/ml/gdb-patches/2001-12/msg00345.html

Yep. Among other things the problems arise because thread_db passes
requests to lin-lwp instead of properly along the target stack; lin-lwp
should be sitting in the "process" slot on the target stack.

There are also load/unload issues; observers are the perfect way to fix
that.