Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] testsuite: Fix gdb.dwarf2/dw2-case-insensitive.exp testcase for ppc64
@ 2014-01-23 14:42 Edjunior Barbosa Machado
  2014-01-23 15:54 ` Will Newton
  2014-01-28 16:01 ` Ulrich Weigand
  0 siblings, 2 replies; 4+ messages in thread
From: Edjunior Barbosa Machado @ 2014-01-23 14:42 UTC (permalink / raw)
  To: gdb-patches

Hi,

gdb.dwarf2/dw2-case-insensitive.exp has currently 1 test failing on ppc64:

p fuNC_symtab^M
$2 = {<text variable, no debug info>} 0x10000694 <FUNC_lang_end>^M
(gdb) FAIL: gdb.dwarf2/dw2-case-insensitive.exp: p fuNC_symtab

This regression was introduced after a change in the testcase that added
function labels to the code, fixing failures on arm (commit
c7e8af9b3bc0881c59c999d7b78348d359383efe).

This patch moves the label FUNC_lang_end to the end of the function scope, so
ppc64 can understand the following function (fuNC_symtab) correctly.
Successfully tested on x86, ppc32 and ppc64, but didn't have the chance to check
on arm.

Thanks,
Edjunior

gdb/testsuite/
2014-01-23  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

	* gdb.dwarf2/dw2-case-insensitive.c (FUNC_lang): Move label
	FUNC_lang_end.

---
 gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
index 9ec7b25..bdeee1e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
@@ -26,10 +26,9 @@ asm ("FUNC_lang_start:");
 void
 FUNC_lang (void)
 {
-}
-
 asm (".globl FUNC_lang_end");
 asm ("FUNC_lang_end:");
+}
 
 /* Symbol is present only in ELF .symtab.  */
 
-- 
1.8.1.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] testsuite: Fix gdb.dwarf2/dw2-case-insensitive.exp testcase for ppc64
  2014-01-23 14:42 [PATCH] testsuite: Fix gdb.dwarf2/dw2-case-insensitive.exp testcase for ppc64 Edjunior Barbosa Machado
@ 2014-01-23 15:54 ` Will Newton
  2014-01-28 16:01 ` Ulrich Weigand
  1 sibling, 0 replies; 4+ messages in thread
From: Will Newton @ 2014-01-23 15:54 UTC (permalink / raw)
  To: Edjunior Barbosa Machado; +Cc: gdb-patches

On 23 January 2014 14:42, Edjunior Barbosa Machado
<emachado@linux.vnet.ibm.com> wrote:
> Hi,
>
> gdb.dwarf2/dw2-case-insensitive.exp has currently 1 test failing on ppc64:
>
> p fuNC_symtab^M
> $2 = {<text variable, no debug info>} 0x10000694 <FUNC_lang_end>^M
> (gdb) FAIL: gdb.dwarf2/dw2-case-insensitive.exp: p fuNC_symtab
>
> This regression was introduced after a change in the testcase that added
> function labels to the code, fixing failures on arm (commit
> c7e8af9b3bc0881c59c999d7b78348d359383efe).
>
> This patch moves the label FUNC_lang_end to the end of the function scope, so
> ppc64 can understand the following function (fuNC_symtab) correctly.
> Successfully tested on x86, ppc32 and ppc64, but didn't have the chance to check
> on arm.

The test passes successfully on arm too.

-- 
Will Newton
Toolchain Working Group, Linaro


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] testsuite: Fix gdb.dwarf2/dw2-case-insensitive.exp testcase for ppc64
  2014-01-23 14:42 [PATCH] testsuite: Fix gdb.dwarf2/dw2-case-insensitive.exp testcase for ppc64 Edjunior Barbosa Machado
  2014-01-23 15:54 ` Will Newton
@ 2014-01-28 16:01 ` Ulrich Weigand
  2014-01-28 18:20   ` Edjunior Barbosa Machado
  1 sibling, 1 reply; 4+ messages in thread
From: Ulrich Weigand @ 2014-01-28 16:01 UTC (permalink / raw)
  To: Edjunior Barbosa Machado; +Cc: gdb-patches

Edjunior Barbosa Machado wrote:

> gdb.dwarf2/dw2-case-insensitive.exp has currently 1 test failing on ppc64:
> 
> p fuNC_symtab^M
> $2 = {<text variable, no debug info>} 0x10000694 <FUNC_lang_end>^M
> (gdb) FAIL: gdb.dwarf2/dw2-case-insensitive.exp: p fuNC_symtab

So I guess this happens because FUNC_lang_end ends up at the same address
as FUNC_symtab?

> This patch moves the label FUNC_lang_end to the end of the function scope, so
> ppc64 can understand the following function (fuNC_symtab) correctly.

I'm not sure if this is the correct fix ... the DWARF end label really should
come after all the code in the function.

If the problem is indeed that FUNC_lang_end is at the same location as
FUNC_symtab, maybe a better fix would be to add some padding in between
(e.g. a ".byte 0" after the FUNC_lang_end label)?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] testsuite: Fix gdb.dwarf2/dw2-case-insensitive.exp testcase for ppc64
  2014-01-28 16:01 ` Ulrich Weigand
@ 2014-01-28 18:20   ` Edjunior Barbosa Machado
  0 siblings, 0 replies; 4+ messages in thread
From: Edjunior Barbosa Machado @ 2014-01-28 18:20 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: gdb-patches

On 01/28/2014 02:01 PM, Ulrich Weigand wrote:
> If the problem is indeed that FUNC_lang_end is at the same location as
> FUNC_symtab, maybe a better fix would be to add some padding in between
> (e.g. a ".byte 0" after the FUNC_lang_end label)?

Thanks Uli for the review. I've tested your suggestion and it fixed the problem
on ppc64. It was also successfully tested on x86.

If someone could take a look and check if this change doesn't affect the results
on arm, that would be great.

Thanks,
--
Edjunior

gdb/testsuite/
2014-01-28  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

	* gdb.dwarf2/dw2-case-insensitive.c: Add padding after FUNC_lang_end
	label.

---
 gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
index 9ec7b25..48a0694 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
@@ -30,6 +30,7 @@ FUNC_lang (void)
 
 asm (".globl FUNC_lang_end");
 asm ("FUNC_lang_end:");
+asm (".byte 0");
 
 /* Symbol is present only in ELF .symtab.  */
 
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-28 18:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-23 14:42 [PATCH] testsuite: Fix gdb.dwarf2/dw2-case-insensitive.exp testcase for ppc64 Edjunior Barbosa Machado
2014-01-23 15:54 ` Will Newton
2014-01-28 16:01 ` Ulrich Weigand
2014-01-28 18:20   ` Edjunior Barbosa Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox