From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: randolph@tausq.org (Randolph Chung)
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix dwarf register column to gdb register mapping
Date: Sun, 14 Sep 2008 19:35:00 -0000 [thread overview]
Message-ID: <20080914193459.520424DE6@hiauly1.hia.nrc.ca> (raw)
In-Reply-To: <1e3eba760809131800y3dcbcc33u8c8c4ccb4e06eb11@mail.gmail.com> from "Randolph Chung" at Sep 13, 2008 06:00:41 pm
> When I enabled the dwarf debugging support in gdb before i caused
> various errors and warnings about incorrect cfi. Do you still see that
> with this enabled? Is it compiler dependent? Because of those warnings
> and errors I had disabled the dwarf stuff on hppa before.
Investigating some more, I see there's a problem with the floating
point registers. A break on wack_double demonstrates the problem
on both hppa64-hpux and hppa-linux:
Starting program: /home/dave/xxx
Breakpoint 1, wack_double (u=warning: Unmapped DWARF Register #108 encountered.
../../src/gdb/regcache.c:164: internal-error: register_type: Assertion `regnum >= 0 && regnum < descr->nr_cooked_registers' failed.
Same problem for a break on add_double.
.debug_frame for wack_double appears ok when I dump it with readelf -wf:
0000002c 00000020 00000000 FDE cie=00000000 pc=00000028..0000008c
DW_CFA_advance_loc: 8 to 00000030
DW_CFA_register: r3 in r1
DW_CFA_offset_extended_sf: r2 at cfa-20
DW_CFA_advance_loc: 4 to 00000034
DW_CFA_def_cfa_register: r3
DW_CFA_advance_loc: 4 to 00000038
DW_CFA_offset: r3 at cfa+0
DW_CFA_advance_loc: 8 to 00000040
DW_CFA_offset: r49 at cfa+20
DW_CFA_offset: r48 at cfa+16
DW_CFA_nop
DW_CFA_nop
It gets the correct columns for the floating register saves. So, I
think it's gdb which has the problem. It's possible it is confused
by the fact that the stores are done using r1.
I'm going to look at the effect of disabling dwarf register numbers
on hppa64-hpux.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
double
add_double (register double u, register double v)
{
return u + v;
}
double
wack_double (register double u, register double v)
{
register double l = u, r = v;
l = add_double (l, r);
return l + r;
}
int
main ()
{
wack_double (-1, -2);
return 0;
}
next prev parent reply other threads:[~2008-09-14 19:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-13 23:32 John David Anglin
2008-09-14 1:01 ` Randolph Chung
2008-09-14 19:35 ` John David Anglin [this message]
[not found] <no.id>
2008-09-15 2:08 ` John David Anglin
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=20080914193459.520424DE6@hiauly1.hia.nrc.ca \
--to=dave@hiauly1.hia.nrc.ca \
--cc=gdb-patches@sourceware.org \
--cc=randolph@tausq.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