This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH,Testsuite] Add .align 2 for labels on Thumb
- From: Yao Qi <yao at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 12 Aug 2010 16:18:14 +0800
- Subject: [PATCH,Testsuite] Add .align 2 for labels on Thumb
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
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