public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug backtrace/11838] New: Unwind should undefine caller-saved registers
@ 2010-07-24 16:40 jan dot kratochvil at redhat dot com
  2010-07-24 16:41 ` [Bug backtrace/11838] " jan dot kratochvil at redhat dot com
  2010-07-28  9:56 ` jan dot kratochvil at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-07-24 16:40 UTC (permalink / raw)
  To: gdb-prs

Formerly GDB tried to show what it can.  Nowadays with GCC VTA it should hide
values which may be / are corrupted as it may be misleading.

DWARF2_FRAME_REG_UNSPECIFIED is currently equal to DWARF2_FRAME_REG_SAME_VALUE.
DWARF2_FRAME_REG_UNSPECIFIED should respect target arch caller-saved vs.
callee-saved registers map and mark caller-saved registers as unknown (which is
currently only possible by DWARF2_FRAME_REG_UNDEFINED and thus
frame_unwind_got_optimized which is not completely right but it would work).


FAIL all these:
gcc (GCC) 4.6.0 20100724 (experimental)
gcc (GCC) 4.4.5 20100724 (prerelease)
gcc-4.4.4-10.fc13.x86_64
GNU gdb (GDB) 7.2.50.20100724-cvs


#0  breakat (q=0) at 1.c:7
#1  0x000000000040053b in f (a1=<value optimized out>, a2=2, a3=3, a4=4, a5=5,
a6=6, a7=7) at 2.c:6
#2  0x00000000004004fc in g (x=0) at 1.c:14
                             ^^^ x=10 here, it should be <value optimized out>
#3  0x000000000040051e in main () at 2.c:14


==> 1.c <==
#include <stdlib.h>

extern __attribute__((noreturn)) void f (long a1, long a2, long a3, long a4,
long a5, long a6, long a7);

__attribute__((noreturn)) void
breakat (long q)
{
  exit (0);
}

__attribute__((noinline)) void
g (long x)
{
  f (x, 2, 3, 4, 5, 6, 7);
}

==> 2.c <==
extern __attribute__((noreturn)) void breakat (long q);

__attribute__((noreturn)) void
f (long a1, long a2, long a3, long a4, long a5, long a6, long a7)
{
  breakat (0);
}

extern __attribute__((noinline)) void g (long x);

int
main (void)
{
  g (10);
  return 0;
}

-- 
           Summary: Unwind should undefine caller-saved registers
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: backtrace
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jan dot kratochvil at redhat dot com
                CC: gdb-prs at sourceware dot org
GCC target triplet: x86_64-fedora13-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11838

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug backtrace/11838] Unwind should undefine caller-saved registers
  2010-07-24 16:40 [Bug backtrace/11838] New: Unwind should undefine caller-saved registers jan dot kratochvil at redhat dot com
@ 2010-07-24 16:41 ` jan dot kratochvil at redhat dot com
  2010-07-28  9:56 ` jan dot kratochvil at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-07-24 16:41 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jan dot kratochvil at redhat dot com  2010-07-24 16:41 -------
Created an attachment (id=4883)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4883&action=view)
.s files for x86_64-unknown-linux-gnu.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11838

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug backtrace/11838] Unwind should undefine caller-saved registers
  2010-07-24 16:40 [Bug backtrace/11838] New: Unwind should undefine caller-saved registers jan dot kratochvil at redhat dot com
  2010-07-24 16:41 ` [Bug backtrace/11838] " jan dot kratochvil at redhat dot com
@ 2010-07-28  9:56 ` jan dot kratochvil at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-07-28  9:56 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jan dot kratochvil at redhat dot com  2010-07-28 09:56 -------
Filed as GCC PR: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45103

According to Jakub Jelinek there are GCC options -ffixed-X, -fcall-used-X which
may change the ABI-specified caller/callee-saved register set.  Jakub has a GCC
patch for this Bug.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=11838

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-28  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-24 16:40 [Bug backtrace/11838] New: Unwind should undefine caller-saved registers jan dot kratochvil at redhat dot com
2010-07-24 16:41 ` [Bug backtrace/11838] " jan dot kratochvil at redhat dot com
2010-07-28  9:56 ` jan dot kratochvil at redhat dot com

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