public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.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
Date: Tue, 22 Mar 2011 22:04:00 -0000	[thread overview]
Message-ID: <bug-48220-4-Xuz2AFqf34@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48220-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48220

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.03.22 20:34:34
     Ever Confirmed|0                           |1

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 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?


  parent reply	other threads:[~2011-03-22 20:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 16:35 [Bug debug/48220] New: " jakub at gcc dot gnu.org
2011-03-21 16:56 ` [Bug debug/48220] " jakub at gcc dot gnu.org
2011-03-22 22:04 ` ebotcazou at gcc dot gnu.org [this message]
2011-03-23 17:07 ` jakub at gcc dot gnu.org
2011-03-23 17:50 ` ebotcazou at gcc dot gnu.org
2011-03-23 21:13 ` jakub at gcc dot gnu.org
2011-06-02 19:40 ` ebotcazou at gcc dot gnu.org
2011-07-11 16:02 ` [Bug debug/48220] DW_OP_GNU_entry_value/DW_TAG_GNU_call_site_parameter vs register window ebotcazou at gcc dot gnu.org
2011-07-11 16:42 ` jakub at gcc dot gnu.org
2011-07-14 21:49 ` ebotcazou at gcc dot gnu.org
2011-07-15 17:10 ` ebotcazou at gcc dot gnu.org
2011-08-04 11:52 ` jakub at gcc dot gnu.org

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-48220-4-Xuz2AFqf34@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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: link
Be 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).