old-cross-binutils/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
Omair Javaid c7e8af9b3b testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm
dw2-case-insensitive.exp: p fuNC_lang fails on arm. The problem occurs
when thumb mode code is generated. On ARM last bit of function pointer
value indicates whether the target function is an ARM (if 0) or Thumb
(if 1) routine. The PC address should refer to actual address in
either case. This patch adds new compile unit and function labels to
code which act as address ranges of compile unit and functions in
debug information. Therefore address ranges will have correct
addresses and not the ones with an incremented least significant bit.
This patch has been tested on x86_64 and arm machines.

gdb/testsuite/ChangeLog:

2013-11-14  Omair Javaid  <Omair.Javaid@linaro.org>

        * gdb.dwarf2/dw2-case-insensitive-debug.S: Updated compile unit
	and function label names.
        * gdb.dwarf2/dw2-case-insensitive.c: Created function and
	compile unit labels.
2013-11-14 15:18:17 +00:00

50 lines
1.2 KiB
C

/* This testcase is part of GDB, the GNU debugger.
Copyright 2011-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Use DW_LANG_Fortran90 for case insensitive DWARF. */
asm (".globl cu_text_start");
asm ("cu_text_start:");
asm (".globl FUNC_lang_start");
asm (".p2align 4");
asm ("FUNC_lang_start:");
void
FUNC_lang (void)
{
}
asm (".globl FUNC_lang_end");
asm ("FUNC_lang_end:");
/* Symbol is present only in ELF .symtab. */
void
FUNC_symtab (void)
{
}
int
main (void)
{
FUNC_lang ();
FUNC_symtab ();
return 0;
}
asm (".globl cu_text_end");
asm ("cu_text_end:");