Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] Allow setting breakpoints on inline functions (PR 10738)
Date: Thu, 01 Dec 2011 18:53:00 -0000	[thread overview]
Message-ID: <20111201172807.GA5605@host2.jankratochvil.net> (raw)
In-Reply-To: <20111201134058.GB3708@redhat.com>

On Thu, 01 Dec 2011 14:40:58 +0100, Gary Benson wrote:
> Are you saying I should move the testcase from gdb.opt and into
> gdb.dwarf2?  I can do that.
> 
> Is there some difference between the way the various directories
> of tests are treated?  And, is there something I should read to help
> decide where to put tests?

It is not just about the directory name.  The goal is that in gdb.dwarf2/ you
provide .S files and not .c files.  That is they are precompiled, and
therefore independent from possible compiler changes.  The tests should test
GDB, not the compiler.

The drawback is if you generate that .S files by `gcc -S -dA' it starts to be
arch-dependent.  Typically the tests there are either i386 or x86_64 that way.
There is a way to make them arch-independent (such as
gdb.dwarf2/dw2-skip-prologue.* and others) but it is a lot of hand coding
which is not required, it is only voluntary (f.e. I do them, Tom does not).


> As I understand it the -Winline is there to cause the test to fail
> if the methods don't get inlined.  I may very well be wrong, I don't
> understand the syntax 100%, but as I read it any unexpected compiler
> output causes gdb_compile to assume the compilation failed.

OK, thanks for info, I see now.


> Thanks, I added the extra '\'s on my branch.  Would it be better
> to to use {} here, or does that make other changes?

Some people prefer it that way some the other way.

By using {} you prevent one level of interpretation.  Therefore it halves the
number of backslashes.  But it also prevents you from using \r\n or $variable
insertions, in those cases you still have to use "" and double the number of
backslashes there.


Thanks,
Jan


      reply	other threads:[~2011-12-01 18:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 15:02 Gary Benson
2011-11-30 17:07 ` Tom Tromey
2011-12-02 13:48   ` Gary Benson
2011-11-30 20:19 ` Jan Kratochvil
2011-12-01 13:41   ` Gary Benson
2011-12-01 18:53     ` Jan Kratochvil [this message]

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=20111201172807.GA5605@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@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: 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