From: Greg Law <glaw@undo-software.com>
To: gdb-patches@sourceware.org
Subject: Re: SIGSEGV on gdb 6.7*
Date: Mon, 04 Feb 2008 22:36:00 -0000 [thread overview]
Message-ID: <47A79369.8030709@undo-software.com> (raw)
In-Reply-To: <20080204221036.GA26939@caradoc.them.org>
[-- Attachment #1: Type: text/plain, Size: 924 bytes --]
Daniel Jacobowitz wrote:
> On Mon, Feb 04, 2008 at 09:58:42PM +0000, Greg Law wrote:
>> Should it be just flushregs that invalidates the frame cache, or should
>> it happen from registers_changed()?
>
> Good question :-) Probably registers_changed, but I suspect that
> makes a lot of other reinit_frame_cache calls redundant.
>
Well, calling reinit_frame_cache() from registers_changed() does indeed
fix the problem. It doesn't seem that a few redundant calls to
reinit_frame_cache() is a big issue: if it's already NULL then there
isn't much work for that function to do. OTOH, not calling it where it
should be called clearly is pretty serious.
The attached patch does this. I guess copyright assignment etc is
rather over the top for such a small change, but if you prefer we go
through those hoops then I'm happy to do so.
g
--
Greg Law, Undo Software http://undo-software.com/
[-- Attachment #2: regcache_fix.patch --]
[-- Type: text/x-patch, Size: 658 bytes --]
Index: gdb/regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.163
diff -u -r1.163 regcache.c
--- gdb/regcache.c 1 Jan 2008 22:53:12 -0000 1.163
+++ gdb/regcache.c 4 Feb 2008 22:24:32 -0000
@@ -472,6 +472,9 @@
regcache_xfree (current_regcache);
current_regcache = NULL;
+ /* Need to forget about any frames we have cached, too. */
+ reinit_frame_cache ();
+
/* Force cleanup of any alloca areas if using C alloca instead of
a builtin alloca. This particular call is used to clean up
areas allocated by low level target code which may build up
next prev parent reply other threads:[~2008-02-04 22:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 20:50 Greg Law
2008-02-04 21:04 ` Daniel Jacobowitz
2008-02-04 21:39 ` Greg Law
[not found] ` <47A7850B.10202@undo-software.com>
2008-02-04 21:45 ` Daniel Jacobowitz
2008-02-04 21:59 ` Greg Law
2008-02-04 22:11 ` Daniel Jacobowitz
2008-02-04 22:36 ` Greg Law [this message]
2008-02-11 20:59 ` Greg Law
2008-02-26 23:00 ` Michael Snyder
2008-02-27 0:37 ` Daniel Jacobowitz
2008-02-27 0:43 ` Michael Snyder
2008-02-27 0:51 ` Daniel Jacobowitz
2008-02-27 0:54 ` Michael Snyder
2008-02-27 1:05 ` Daniel Jacobowitz
2008-02-27 1:08 ` Michael Snyder
2008-02-27 20:23 ` Greg Law
2008-02-28 7:46 ` Vladimir Prus
2008-02-28 14:17 ` Thiago Jung Bauermann
2008-02-28 16:18 ` Daniel Jacobowitz
2008-02-28 14:17 ` Daniel Jacobowitz
2008-03-04 20:09 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47A79369.8030709@undo-software.com \
--to=glaw@undo-software.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox