Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH,Testsuite] Add .align 2 for labels on Thumb
@ 2010-08-12  8:18 Yao Qi
  2010-08-12  9:38 ` Mark Kettenis
  0 siblings, 1 reply; 10+ messages in thread
From: Yao Qi @ 2010-08-12  8:18 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

We find test failures in gdb.dwarf2/dw2-ref-missing-frame.exp when
test cases are compiled as thumb.
https://bugs.launchpad.net/gdb-linaro/+bug/615997

In dw2-ref-missing-frame-func.c, it is assumed that address of label
'func_loopfb_start' is equal to address of function func_loopfb.
However, in thumb, the label is 16-bit aligned, while function is
32-bit aligned, so label address may not be equal to function address.

Patch below is to set labels 32-bit aligned.  Tested this patch on
both x86 and armel.  OK to apply?

-- 
Yao Qi
CodeSourcery
yao@codesourcery.com
(650) 331-3385 x739

[-- Attachment #2: align.patch --]
[-- Type: text/x-diff, Size: 950 bytes --]

gdb/testsuite/
2010-08-12  Yao Qi  <yao@codesourcery.com>

	* gdb.dwarf2/dw2-ref-missing-frame-func.c: Add .align 2 for labels
	func_nofb_start and func_loopfb_start, so that address of functions
	is equal to these labels on Thumb.

Index: gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c,v
retrieving revision 1.1
diff -u -r1.1 dw2-ref-missing-frame-func.c
--- gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c	25 Jun 2010 15:34:46 -0000	1.1
+++ gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c	12 Aug 2010 06:33:51 -0000
@@ -19,6 +19,7 @@
 asm ("cu_text_start:");
 
 asm (".globl func_nofb_start");
+asm (".align 2");
 asm ("func_nofb_start:");
 
 void
@@ -31,6 +32,7 @@
 asm ("func_nofb_end:");
 
 asm (".globl func_loopfb_start");
+asm (".align 2");
 asm ("func_loopfb_start:");
 
 void

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

end of thread, other threads:[~2010-08-18  3:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12  8:18 [PATCH,Testsuite] Add .align 2 for labels on Thumb Yao Qi
2010-08-12  9:38 ` Mark Kettenis
2010-08-12 11:49   ` Yao Qi
2010-08-12 12:35     ` Daniel Jacobowitz
2010-08-12 12:45       ` Andreas Schwab
2010-08-12 13:22       ` Yao Qi
2010-08-13 13:28         ` Daniel Jacobowitz
2010-08-16 15:39           ` Yao Qi
2010-08-16 18:19             ` Mark Kettenis
2010-08-18  3:22               ` Yao Qi

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