This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: random gdb errors: corruption of nptl_db event buffers ?
- From: Samuel Bronson <naesten at gmail dot com>
- To: Mathieu Lacage <mathieu dot lacage at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Sun, 26 Jul 2009 20:02:08 -0400
- Subject: Re: random gdb errors: corruption of nptl_db event buffers ?
- References: <74fef6df0907251005y1c02246ay9b6b1bd7e7c326d3@mail.gmail.com>
At Sat, 25 Jul 2009 19:05:45 +0200,
Mathieu Lacage wrote:
>
> hi,
>
> I am trying to debug some random errors I get from gdb while debugging
> my program. No, the bug is not in gdb, it's in the inferior process
> but it appears that the inferior process is confusing ntpl_db beyond
> repair.
It would be really nice if one could make GDB pretend it has no clue
about threads for situations like this where it only gets confused...
I had such an issue trying to debug something that happened in
DOSEMU's signal handlers which only happened when they were called
from DPMI code, which had a completely different ES or FS (whichever
it is that threads in Linux use to keep track of what thread is
running) from what libthread_db was expecting.
As a consequence, I believe GDB was refusing to even acknowledge that
the inferior had stopped -- something to do with an error() call
before it took note of that in the proper data structure, I think it
was?
(The error itself turned out to have the same cause, actually: I had
built dosemu for profiling, and the instrumentation functions called
from the signal handler were failing because of the very same register
having an unexpected value.)