From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30958 invoked by alias); 22 Mar 2011 20:35:44 -0000 Received: (qmail 30830 invoked by uid 22791); 22 Mar 2011 20:35:42 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Mar 2011 20:35:34 +0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/48220] DW_OP_GNU_entry_value/DW_TAG_GNU_call_site_parameter vs. register window targets X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 22 Mar 2011 22:04:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg02369.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48220 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.03.22 20:34:34 Ever Confirmed|0 |1 --- Comment #2 from Eric Botcazou 2011-03-22 20:34:34 UTC --- > For SPARC, my preference would be if DW_OP_GNU_entry_value contained the > output regs, after all when it is defined as value at the start of the > function (== put a breakpoint on the very first insn and use value of that > register), then the parameters are passed in %o[0-5] registers rather than > %i[0-5]. That depends on what you call the start of the function though. Doesn't GDB put the breakpoint at the end of the prologue (in fact 2nd loc directive) when you say "break my_function"? There the arguments are in %i[0-5] already. > And I guess the gdb changes should then magically work when using > DW_TAG_call_site info - it will just look up the same registers with no > translation. OT, seems if we wanted to be exact we'd need to model the > register window save/restrore insns in var-tracking adjust_insn and start in > vt_add_function_parameter with the outgoing regs instead of incoming that are > in DECL_INCOMING_RTL. > Current SVN trunk uses %i* instead of %o* in DW_OP_GNU_entry_value operands > and %o* registers in DW_AT_location of DW_OP_GNU_entry_value. "DW_AT_location of DW_TAG_GNU_call_site_parameter" I presume? I think that the current situation is consistent with what we do at -O0, i.e. home the arguments onto the stack in the prologue and emit a single location for them in the debug info, the location in the stack. This yields correct results with GDB because of the 2nd loc directive trick. Of course you have a small window of invalidity (we got complaints about it at AdaCore from folks working on other debuggers) so modeling the register window instructions would indeed be better. Would that be hard to do?