From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 41E8C386FC2B; Mon, 19 Apr 2021 10:44:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41E8C386FC2B From: "dclarke at blastwave dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/27750] local variables have wrong address and values on sparc64 Date: Mon, 19 Apr 2021 10:44:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dclarke at blastwave dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2021 10:44:29 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27750 --- Comment #10 from Dennis Clarke --- I did checkout the gdb-10-branch and after a long and tedious build I was surprised to see that "make install" seemed to actually install nothing. That is a separate issue that I will figure out.=20 However I can report that the behaviour seems sane : mimas$ uname -a=20 Linux mimas 5.10.0-6-sparc64 #1 Debian 5.10.28-1 (2021-04-09) sparc64 GNU/L= inux mimas$ cat /etc/debian_version=20 11.0 mimas$ cat -n foo.c 1 2 #include 3 #include 4 5 int main(int argc, char **argv) 6 { 7 int a =3D 1; 8 9 printf("a =3D %i\n", a); 10 11 printf("&a =3D %p\n", &a); 12 13 return EXIT_SUCCESS; 14 15 } 16 mimas$ /usr/bin/sparc64-linux-gnu-gcc-10 --version=20 sparc64-linux-gnu-gcc-10 (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. mimas$ /usr/bin/sparc64-linux-gnu-gcc-10 -std=3Diso9899:1999 \ > -pedantic -pedantic-errors -fno-builtin -g -m64 -O0 \ > -mno-app-regs -mcpu=3Dultrasparc -mmemory-model=3Dtso \ > -o foo_gcc-10 foo.c mimas$=20 mimas$ $HOME/local/build/binutils-gdb/gdb/gdb --version GNU gdb (GDB) 10.1.90.20210419-git Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. mimas$=20 mimas$ TERM=3Ddumb LC_ALL=3DC $HOME/local/build/binutils-gdb/gdb/gdb ./foo_= gcc-10 GNU gdb (GDB) 10.1.90.20210419-git Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "sparc64-unknown-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./foo_gcc-10... (gdb) break foo.c:13 Breakpoint 1 at 0x858: file foo.c, line 13. (gdb) run Starting program: /home/dclarke/foo_gcc-10=20 a =3D 1 &a =3D 0x7fefffff4fc Breakpoint 1, main (argc=3D1, argv=3D0x7fefffff8a8) at foo.c:13 13 return EXIT_SUCCESS; (gdb) print &a $1 =3D (int *) 0x7fefffff4fc (gdb) print a $2 =3D 1 (gdb) info frame Stack level 0, frame at 0x7fefffff500: pc =3D 0x10000000858 in main (foo.c:13); saved pc =3D 0xfffff8010014e804 source language c. Arglist at 0x7fefffff500, args: argc=3D1, argv=3D0x7fefffff8a8 Locals at 0x7fefffff500, Previous frame's sp in fp Saved registers: l0 at 0x7fefffff500, l1 at 0x7fefffff508, l2 at 0x7fefffff510, l3 at 0x7fefffff518, l4 at 0x7fefffff520, l5 at 0x7fefffff528, l6 at 0x7fefffff530, l7 at 0x7fefffff538, i0 at 0x7fefffff540, i1 at 0x7fefffff548, i2 at 0x7fefffff550, i3 at 0x7fefffff558, i4 at 0x7fefffff560, i5 at 0x7fefffff568, fp at 0x7fefffff570, i7 at 0x7fefffff578 (gdb) cont Continuing. [Inferior 1 (process 162221) exited normally] (gdb) quit mimas$=20 Seems valid.=20 Why is the status of this bug "unconfirmed"?=20 --=20 Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional --=20 You are receiving this mail because: You are on the CC list for the bug.=