Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jan.kratochvil@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] entry values: Fix resolving in inlined frames
Date: Fri, 05 Oct 2012 15:18:00 -0000	[thread overview]
Message-ID: <201210051518.q95FID1J003796@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20121005124107.GA22927@host2.jankratochvil.net> (message from	Jan Kratochvil on Fri, 5 Oct 2012 14:41:07 +0200)

> Date: Fri, 5 Oct 2012 14:41:07 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> 
> Hi,
> 
> Breakpoint 1, fn2 (y=<optimized out>, x=6) at gdb.arch/amd64-entry-value-inline.c:32
> 32	      y = -2 + x;	/* break-here */
> (gdb) info addr y
> (gdb) bt
> #0  fn2 (y=<optimized out>, x=6) at gdb.arch/amd64-entry-value-inline.c:32
> #1  fn3 (x=x@entry=6, y=y@entry=25) at gdb.arch/amd64-entry-value-inline.c:42
> #2  0x00000000004004af in main () at gdb.arch/amd64-entry-value-inline.c:48
> (gdb) info frame
> Stack level 0, frame at 0x7fffffffdb68:
>  rip = 0x4005bc in fn2 (gdb.arch/amd64-entry-value-inline.c:32); saved rip 0x4004af
>  inlined into frame 1
> [...]
> (gdb) set debug entry-values 1
> (gdb) p y
> DW_OP_GNU_entry_value resolving expects callee fn1 at 0x4005a0 but the called frame is for fn3 at 0x4005b0
> 
> FAIL:
> -----
> $1 = <optimized out>
> PASS:
> -----
> $1 = 25
> 
> (gdb) p/x $pc
> $2 = 0x4005bc
> (gdb) up
> #1  fn3 (x=x@entry=6, y=y@entry=25) at gdb.arch/amd64-entry-value-inline.c:42
> (gdb) p/x $pc
> $3 = 0x4005bc
> 
> The problem is that DW_TAG_GNU_call_site <-> DW_OP_GNU_entry_value binding
> exists between DW_TAG_subprogram, nor DW_TAG_inlined_subroutine as described
> by Jakub Jelinek.  This makes sense, when we look at DW_TAG_GNU_call_site and
> we just unwind the current inlined frame we get the same PC - this is no new
> information.
> 
> TAILCALL_FRAME is a different case, while also an artificial frame the
> sequence cannot be determined at compile time and the binding
> DW_TAG_GNU_call_site <-> DW_OP_GNU_entry_value exists also for
> TAILCALL_FRAMEs.

Your explanation makes no sense to me, and unfortunately that extends
to the comment you added in the code.

> +  /* Skip any inlined frames, entry value call sites work between real
> +     functions.  They do not make sense between inline functions as even PC
> +     does not change there.  */

I realize that you're not a native speaker, but a big part of the
problem is that there are a lot of grammatical mistakes in your
english.  Can you get some help from a native speaker to make sure the
comments in the code make sense?


  reply	other threads:[~2012-10-05 15:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 12:41 Jan Kratochvil
2012-10-05 15:18 ` Mark Kettenis [this message]
2012-10-05 15:45   ` Jan Kratochvil
2012-10-05 16:34     ` Joel Brobecker
2012-10-16  8:47     ` [comment commit] " Jan Kratochvil
2012-10-08  9:18   ` Yao Qi
2012-10-15 19:16 ` [commit] " Jan Kratochvil

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=201210051518.q95FID1J003796@glazunov.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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