public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug backtrace/16215] SPARC: can't compute CFA for this frame Date: Wed, 31 Dec 2014 07:22:00 -0000 [thread overview] Message-ID: <bug-16215-4717-KcgtYLy0VE@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-16215-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=16215 --- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, gdb-7.8-branch has been updated via ec95c61a84a69b706714793a15bda0c5801b6db9 (commit) from f0df25af07d11fcb5bd3c861eac6d6a82432b22e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ec95c61a84a69b706714793a15bda0c5801b6db9 commit ec95c61a84a69b706714793a15bda0c5801b6db9 Author: Joel Brobecker <brobecker@adacore.com> Date: Fri Nov 21 04:59:35 2014 +0100 Lift DWARF unwinder restriction in dwarf2-frame.c::dwarf2_frame_cfa GDB is currently broken on all SPARC targets when using GCC 4.9. When trying to print any local variable: (gdb) p x can't compute CFA for this frame This is related to the fact that the compiler now generates DWARF 4 debugging info by default, and in particular that it now emits DW_OP_call_frame_cfa, which triggers a limitation in dwarf2_frame_cfa: /* This restriction could be lifted if other unwinders are known to compute the frame base in a way compatible with the DWARF unwinder. */ if (!frame_unwinder_is (this_frame, &dwarf2_frame_unwind) && !frame_unwinder_is (this_frame, &dwarf2_tailcall_frame_unwind)) error (_("can't compute CFA for this frame")); We couldn't append the dwarf2 unwinder to all SPARC targets because it does not work properly with StackGhost: https://www.sourceware.org/ml/gdb-patches/2014-07/msg00012.html We also later discovered that using the DWARF2 unwinder means using it for computing the function's return address, which is buggy when it comes to functions returning a struct (where the return address is saved-pc+12 instead of saved-pc+8). This is because GCC is emitting the info about the return address as %o7/%i7 instead of the actual return address. For functions that have debugging info, we compensate by looking at the function's return type and add the extra +4, but for function without debug info, we're stuck. EricB and I twisted the issue in all the directions we could think of, and unfortunately couldn't find a way to make it work without introduction one regression or another. But, stepping back a little, just removing the restriction seems to work well for us on all both sparc-elf and {sparc,sparc64}-solaris. After reviewing the previous discussions about this test, I could not figure out whether some unwinders were already known to have incompatible CFAs or if the concern was purely theoretical: https://www.sourceware.org/ml/gdb-patches/2009-06/msg00191.html https://www.sourceware.org/ml/gdb-patches/2009-07/msg00570.html https://www.sourceware.org/ml/gdb-patches/2009-09/msg00027.html At the moment, we took the approach of trying it out, and see what happens... gdb/ChangeLog: PR backtrace/16215: * dwarf2-frame.c (dwarf2_frame_cfa): Remove the restriction the frame unwinder must either be the dwarf2_frame_unwind or the dwarf2_tailcall_frame_unwind. Verify that this_frame's stack_addr is valid before calling get_frame_base. Throw an error if not valid. Tested on sparc-solaris and sparc-elf with AdaCore's testsuite (the FSF testsuite crashes all of AdaCore's solaris machines). ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 9 +++++++++ gdb/dwarf2-frame.c | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2014-12-31 7:22 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-25 8:10 [Bug backtrace/16215] New: " sebastian.huber@embedded-brains.de 2013-11-27 13:09 ` [Bug backtrace/16215] " sebastian.huber@embedded-brains.de 2013-11-27 16:10 ` tromey at redhat dot com 2013-11-28 0:25 ` mkhoory at eiast dot ae 2014-03-24 18:21 ` sebastian.huber@embedded-brains.de 2014-09-24 11:39 ` sebastian.huber@embedded-brains.de 2014-12-13 13:27 ` cvs-commit at gcc dot gnu.org 2014-12-13 15:26 ` cvs-commit at gcc dot gnu.org 2014-12-25 0:46 ` cvs-commit at gcc dot gnu.org 2014-12-31 7:22 ` cvs-commit at gcc dot gnu.org [this message] 2015-01-15 11:40 ` brobecker at gnat dot com
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=bug-16215-4717-KcgtYLy0VE@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.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: linkBe 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).