public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/24943] New: [hppa64] Bad dwarf output using non-preserved base register
@ 2005-11-19 17:08 tausq at debian dot org
2005-11-20 3:38 ` [Bug debug/24943] " tausq at debian dot org
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: tausq at debian dot org @ 2005-11-19 17:08 UTC (permalink / raw)
To: gcc-bugs
Given a program like this:
int foo(int a, int b, int c)
{
return a+b+c;
}
int bar(int a, int b, int c)
{
return foo(a, b, c);
}
int main(int argc, char **argv)
{
return bar(1,2,3);
}
for foo and bar, gcc generates code that stores the arguments a, b, and c on
the stack by using the argument pointer, but it does this indirectly, like so:
foo
.PROC
.CALLINFO FRAME=80,NO_CALLS,SAVE_SP,ENTRY_GR=3
.ENTRY
copy %r3,%r1
copy %r30,%r3
std,ma %r1,80(%r30)
std %r3,-8(%r30)
ldo -64(%r29),%r20
stw %r26,4(%r20)
stw %r25,12(%r20)
stw %r24,20(%r20)
[...]
gcc proceeds to emit debug info for a, b, and c relative to r20:
$ opt/bin/readelf -wi dwarfbug
[...]
<2><7d>: Abbrev Number: 3 (DW_TAG_formal_parameter)
DW_AT_name : a
DW_AT_decl_file : 1
DW_AT_decl_line : 1
DW_AT_type : <a2>
DW_AT_location : 2 byte block: 84 4 (DW_OP_breg20: 4)
<2><89>: Abbrev Number: 3 (DW_TAG_formal_parameter)
DW_AT_name : b
DW_AT_decl_file : 1
DW_AT_decl_line : 1
DW_AT_type : <a2>
DW_AT_location : 2 byte block: 84 c (DW_OP_breg20: 12)
<2><95>: Abbrev Number: 3 (DW_TAG_formal_parameter)
DW_AT_name : c
DW_AT_decl_file : 1
DW_AT_decl_line : 1
DW_AT_type : <a2>
DW_AT_location : 2 byte block: 84 14 (DW_OP_breg20: 20)
The problem is that since r20 is not a call preserved register, when you are
doing a stack unwind, you have no way to retrieve those variables in anything
other than the topmost frame.
I've seen it do this with r20 and r28, but I guess it can do it with any
available register.
On 32-bit hppa, the parameters are always described relative to the frame base
(DW_OP_fbreg), which works fine.
I'm testing this on hpux, but this looks like it affects all 64-bit hppa
targets.
--
Summary: [hppa64] Bad dwarf output using non-preserved base
register
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tausq at debian dot org
GCC build triplet: hppa64-hp-hpux11.11
GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/24943] [hppa64] Bad dwarf output using non-preserved base register
2005-11-19 17:08 [Bug debug/24943] New: [hppa64] Bad dwarf output using non-preserved base register tausq at debian dot org
@ 2005-11-20 3:38 ` tausq at debian dot org
2005-12-08 5:26 ` tausq at debian dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: tausq at debian dot org @ 2005-11-20 3:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tausq at debian dot org 2005-11-20 03:38 -------
I forgot to mention that the above was compiled with gcc -g -o dwarfbug
dwarfbug.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/24943] [hppa64] Bad dwarf output using non-preserved base register
2005-11-19 17:08 [Bug debug/24943] New: [hppa64] Bad dwarf output using non-preserved base register tausq at debian dot org
2005-11-20 3:38 ` [Bug debug/24943] " tausq at debian dot org
@ 2005-12-08 5:26 ` tausq at debian dot org
2006-03-18 17:31 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: tausq at debian dot org @ 2005-12-08 5:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tausq at debian dot org 2005-12-08 05:26 -------
Some discussion about this PR is here:
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01563.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/24943] [hppa64] Bad dwarf output using non-preserved base register
2005-11-19 17:08 [Bug debug/24943] New: [hppa64] Bad dwarf output using non-preserved base register tausq at debian dot org
2005-11-20 3:38 ` [Bug debug/24943] " tausq at debian dot org
2005-12-08 5:26 ` tausq at debian dot org
@ 2006-03-18 17:31 ` pinskia at gcc dot gnu dot org
2006-03-18 17:57 ` dave at hiauly1 dot hia dot nrc dot ca
2006-03-20 2:34 ` tausq at debian dot org
4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-18 17:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-03-18 17:31 -------
I thought this was fixed for 4.1.0.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|3.3.4 4.0.1 4.1.0 |3.3.4 4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/24943] [hppa64] Bad dwarf output using non-preserved base register
2005-11-19 17:08 [Bug debug/24943] New: [hppa64] Bad dwarf output using non-preserved base register tausq at debian dot org
` (2 preceding siblings ...)
2006-03-18 17:31 ` pinskia at gcc dot gnu dot org
@ 2006-03-18 17:57 ` dave at hiauly1 dot hia dot nrc dot ca
2006-03-20 2:34 ` tausq at debian dot org
4 siblings, 0 replies; 9+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2006-03-18 17:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca 2006-03-18 17:57 -------
Subject: Re: [hppa64] Bad dwarf output using non-preserved base register
> ------- Comment #3 from pinskia at gcc dot gnu dot org 2006-03-18 17:31 -------
> I thought this was fixed for 4.1.0.
I don't think so. It was another dwarf2 report filed by Randolph
involving the passing of structs that Jim Wilson fixed.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/24943] [hppa64] Bad dwarf output using non-preserved base register
2005-11-19 17:08 [Bug debug/24943] New: [hppa64] Bad dwarf output using non-preserved base register tausq at debian dot org
` (3 preceding siblings ...)
2006-03-18 17:57 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2006-03-20 2:34 ` tausq at debian dot org
4 siblings, 0 replies; 9+ messages in thread
From: tausq at debian dot org @ 2006-03-20 2:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from tausq at debian dot org 2006-03-20 02:34 -------
Indeed, as Dave said this is a different and not yet fixed problem.
--
tausq at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|3.3.4 4.0.1 |3.3.4 4.0.1 4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/24943] [hppa64] Bad dwarf output using non-preserved base register
[not found] <bug-24943-4@http.gcc.gnu.org/bugzilla/>
2012-01-11 14:55 ` rguenth at gcc dot gnu.org
2012-01-11 16:30 ` dave.anglin at bell dot net
@ 2012-01-12 9:18 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-12 9:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-12 09:17:52 UTC ---
Thus, confirmed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/24943] [hppa64] Bad dwarf output using non-preserved base register
[not found] <bug-24943-4@http.gcc.gnu.org/bugzilla/>
2012-01-11 14:55 ` rguenth at gcc dot gnu.org
@ 2012-01-11 16:30 ` dave.anglin at bell dot net
2012-01-12 9:18 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 9+ messages in thread
From: dave.anglin at bell dot net @ 2012-01-11 16:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
--- Comment #7 from dave.anglin at bell dot net 2012-01-11 16:29:48 UTC ---
On 1/11/2012 9:54 AM, rguenth at gcc dot gnu.org wrote:
> Is this still an issue?
>
Yes.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/24943] [hppa64] Bad dwarf output using non-preserved base register
[not found] <bug-24943-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-11 14:55 ` rguenth at gcc dot gnu.org
2012-01-11 16:30 ` dave.anglin at bell dot net
2012-01-12 9:18 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-11 14:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24943
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-01-11
Ever Confirmed|0 |1
Known to fail| |
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-11 14:54:03 UTC ---
Is this still an issue?
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-01-12 9:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-19 17:08 [Bug debug/24943] New: [hppa64] Bad dwarf output using non-preserved base register tausq at debian dot org
2005-11-20 3:38 ` [Bug debug/24943] " tausq at debian dot org
2005-12-08 5:26 ` tausq at debian dot org
2006-03-18 17:31 ` pinskia at gcc dot gnu dot org
2006-03-18 17:57 ` dave at hiauly1 dot hia dot nrc dot ca
2006-03-20 2:34 ` tausq at debian dot org
[not found] <bug-24943-4@http.gcc.gnu.org/bugzilla/>
2012-01-11 14:55 ` rguenth at gcc dot gnu.org
2012-01-11 16:30 ` dave.anglin at bell dot net
2012-01-12 9:18 ` rguenth at gcc dot gnu.org
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).