This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: SIGSEGV on gdb 6.7*
- From: Michael Snyder <msnyder at specifix dot com>
- To: Greg Law <glaw at undo-software dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 26 Feb 2008 14:54:47 -0800
- Subject: Re: SIGSEGV on gdb 6.7*
- References: <47A77A6C.8050007@undo-software.com>
On Mon, 2008-02-04 at 20:49 +0000, Greg Law wrote:
> Hi list,
>
> I have been playing with gdb-6.7 and it appears there is a bug whereby
> reading registers can cause a SIGSEGV in gdb. The simplest way I've
> found to cause the problem is to try to read a register after calling
> the flushregs maintenance command:
First of all, I apologize for not joining this thread sooner --
it escaped my notice.
Secondly, I apologize because I wrote the flushregs
maintenance command, and it is clearly wrong. I actually
had the impression that I HAD made it flush the frame
cache -- I certainly meant to.
That said -- I agree with Daniel. I can see where
flushing the register cache and flushing the frame cache
are two things that should probably always be done at
the same time -- but I'm worried about the extra overhead
that this patch introduces. We call registers_changed
A LOT, and in doing so we assume that it has a very
low overhead.
I would prefer to just fix the reg_flush_command function
for now, and return to the question "should registers_changed
imply reinit_frame_cache (and vice versa) as an architectural
question later (or sooner).