This is the mail archive of the gdb-patches@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: SIGSEGV on gdb 6.7*


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




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