From: Gene Smith <gds@chartertn.net>
To: insight@sources.redhat.com
Subject: Re: Insight (probably gdb) crashes on thumb-2 startup assembly code
Date: Sun, 27 Feb 2011 19:44:00 -0000 [thread overview]
Message-ID: <ike9iu$ngj$1@dough.gmane.org> (raw)
In-Reply-To: <4D694D0B.40802@redhat.com>
Keith Seitz wrote, On 02/26/2011 01:57 PM:
> Hi, Gene,
>
> On 02/25/2011 11:39 PM, Gene Smith wrote:
>> ../../insight_sources/gdb/regcache.c:182: internal-error: register_size:
>> Assertion `regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) +
>> gdbarch_num_pseudo_regs (gdbarch))' failed.
>> A problem internal to GDB has been detected,
>> further debugging may prove unreliable.
>> Quit this debugging session? (y or n)
>
> When you are doing this, do you have ANY windows open (esp the register
> window -- there is some bitrot in there that I have to address)?
Does it with and without the reg window open.
>
> If you don't have any other windows open (just console & source), then I
> recommend trying to reproduce with gdb.
>
> Run "[arm-*-]insight -nw" and try it again. If the internal error pops
> up again, it is, as you suspected, a gdb problem. Grab the backtrace
> from the coredump and either file a bug in gdb's bugzilla or ask on the
> gdb@ list.
I ran the arm-*-gdb program that is installed when I built insight and
it also has the problem. Haven't tried the insight -nw since I assume it
is basically the same.
I was able to "fix" the problem in regcache.c function register_size()
by commenting out the assert and always setting size to 4 (size of all
non-fp arm registers). Strangely enough, when I do this the previously
asserted condition (now signaled by printf) hasn't occurred.
int
register_size (struct gdbarch *gdbarch, int regnum)
{
struct regcache_descr *descr = regcache_descr (gdbarch);
int size;
#if 0 /* original code */
gdb_assert (regnum >= 0
&& regnum < (gdbarch_num_regs (gdbarch)
+ gdbarch_num_pseudo_regs (gdbarch)));
size = descr->sizeof_register[regnum];
#else /* my "fix" */
if ( !(regnum >= 0
&& regnum < (gdbarch_num_regs (gdbarch)
+ gdbarch_num_pseudo_regs (gdbarch))) )
{
printf("Was assert bad regnum = %d\n", regnum);
}
size = 4; /* definitely arm specific !! */
#endif
return size;
}
Also, I just did "cvs update" to the latest insight snapshot. Now
insight immediately crashes (I see console window appear and then
disappear when I connect to my remote target, no core file produced).
But when I run the latest insight snapshot's gdb there is no crash but
the same assert occurs when I step through startup assembly code.
-gene
prev parent reply other threads:[~2011-02-27 19:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-26 7:40 Gene Smith
2011-02-26 18:57 ` Keith Seitz
2011-02-27 19:44 ` Gene Smith [this message]
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='ike9iu$ngj$1@dough.gmane.org' \
--to=gds@chartertn.net \
--cc=insight@sources.redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).