This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: random gdb errors: corruption of nptl_db event buffers ?


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.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]