diff options
author | Yao Qi <yao@codesourcery.com> | 2014-07-01 19:30:54 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-07-08 16:48:22 +0800 |
commit | 161ac41e03a819bc34e8c70a3fd1bc26f43858a2 (patch) | |
tree | 99d7242374c6ddb8a07e609bb645dd0a9f6818c3 /gdb/testsuite/gdb.trace/entry-values.c | |
parent | 2e0488d33f8abbbc5bec214e1723d07048d7afcc (diff) | |
download | binutils-161ac41e03a819bc34e8c70a3fd1bc26f43858a2.zip binutils-161ac41e03a819bc34e8c70a3fd1bc26f43858a2.tar.gz binutils-161ac41e03a819bc34e8c70a3fd1bc26f43858a2.tar.bz2 |
Fix gdb.trace/entry-values.exp for thumb mode
We see some fails in gdb.trace/entry-values.exp in thumb mode
(-mthumb -march={armv4t,armv7-a}).
In thumb mode, the lsb of references to 'foo' and 'bar' in the assembly
(produced by dwarf assember) is set, so the generated debug
information is incorrect.
This patch copies the approach used by
[PATCH 4/4] Fix dw2-ifort-parameter.exp on PPC64
https://sourceware.org/ml/gdb-patches/2014-03/msg00202.html
to introduce new labels 'foo_start' and 'bar_start' which are about
the correct function address (without lsb set). This patch fixes
these fails we've seen.
gdb/testsuite:
2014-07-08 Yao Qi <yao@codesourcery.com>
* gdb.trace/entry-values.c: Define labels 'foo_start' and
'bar_start' at the beginning of functions 'foo' and 'bar'
respectively.
* gdb.trace/entry-values.exp: Use 'foo_start' and 'bar_start'
instead of 'foo' and 'bar'.
Diffstat (limited to 'gdb/testsuite/gdb.trace/entry-values.c')
-rw-r--r-- | gdb/testsuite/gdb.trace/entry-values.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.trace/entry-values.c b/gdb/testsuite/gdb.trace/entry-values.c index 4f80eb0..11bb739 100644 --- a/gdb/testsuite/gdb.trace/entry-values.c +++ b/gdb/testsuite/gdb.trace/entry-values.c @@ -15,12 +15,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +asm (".section \".text\""); +asm (".balign 8"); +asm ("foo_start: .globl foo_start"); + int foo (int i, int j) { return 0; } +asm ("bar_start: .globl bar_start"); + int bar (int i) { |