This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Allow setting breakpoints on inline functions (PR 10738)

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]