public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [testsuite patch] Fix recent GCC FAIL: gdb.arch/i386-signal.exp
Date: Wed, 05 Oct 2016 08:15:00 -0000	[thread overview]
Message-ID: <CAH=s-PNO4knGKK-1R+sOHGN7GO=3zsZBdpoA+fRiFjypx4UreQ@mail.gmail.com> (raw)
In-Reply-To: <20161004163944.GA8002@host1.jankratochvil.net>

On Tue, Oct 4, 2016 at 5:39 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Tue, 04 Oct 2016 18:19:00 +0200, Jan Kratochvil wrote:
>> On Tue, 04 Oct 2016 18:07:56 +0200, Yao Qi wrote:
>> > > The .c patch will properly create a new corresponding source line .debug_line
>> > > entry for the 'mov $0x0,%eax' instruction and I also do not think it is
>> > > relevant to the purpose of this testfile.
>> >
>> > Why do we need the second one?
>>
>> I find it more cleaner but that is up to you.
>
> To make that my reason more explanatory - given the testcase expected output
> is affected by that missing "return 0;" and its .debug_line record I find it
> more clear for this testcase to put there the source line "return 0;"
> explicitly than to depend on such implicit line by compiler as then the debug
> info is unclear for that line - even among different compilers.
>

We need the first chunk "($hex in )?main" because the unwind pc may point
to the first instruction of a source line or the non-first instruction
of a line.
Either is possible.   It doesn't matter that "callq  setup" and
"mov    $0x0,%eax" are mapped to the same line or not.

Change in gdb.arch/i386-signal.exp is good to me, but change
in gdb.arch/i386-signal.c is not necessary.

-- 
Yao (齐尧)

  reply	other threads:[~2016-10-05  8:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 20:35 Jan Kratochvil
2016-10-04 16:08 ` Yao Qi
2016-10-04 16:19   ` Jan Kratochvil
2016-10-04 16:39     ` Jan Kratochvil
2016-10-05  8:15       ` Yao Qi [this message]
2016-10-05 19:59         ` [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='CAH=s-PNO4knGKK-1R+sOHGN7GO=3zsZBdpoA+fRiFjypx4UreQ@mail.gmail.com' \
    --to=qiyaoltc@gmail.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).