Bug 20682 - aarch64 regression: gdb.cp/nextoverthrow.exp
Summary: aarch64 regression: gdb.cp/nextoverthrow.exp
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: tdep (show other bugs)
Version: 7.12
: P2 normal
Target Milestone: 7.12.1
Assignee: Yao Qi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-11 12:38 UTC by Jan Kratochvil
Modified: 2016-10-12 13:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2016-10-11 12:38:16 UTC
https://sourceware.org/ml/gdb-patches/2016-10/msg00232.html

03bcd7394eefb9399f5ab97919a0463dea274c02 is the first bad commit
commit 03bcd7394eefb9399f5ab97919a0463dea274c02
Author: Yao Qi <yao.qi@linaro.org>
Date:   Fri Aug 19 14:49:31 2016 +0100
    [AArch64] Match instruction "STP with base register" in prologue

FAIL: gdb.cp/nextoverthrow.exp: tbreak _Unwind_RaiseException (GDB internal error)
FAIL: gdb.cp/nextoverthrow.exp: continuing to _Unwind_RaiseException (the program exited)
FAIL: gdb.cp/nextoverthrow.exp: finish (the program is no longer running)
FAIL: gdb.cp/nextoverthrow.exp: continuing to Second: resumebpt (the program is no longer running)
FAIL: gdb.cp/nextoverthrow.exp: continuing to done (the program is no longer running)
FAIL: gdb.cp/nextoverthrow.exp: post-check - advance

tbreak _Unwind_RaiseException^M
aarch64-tdep.c:335: internal-error: CORE_ADDR aarch64_analyze_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, aarch64_prologue_cache*):
Assertion `inst.operands[0].type == AARCH64_OPND_Rt' failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
Quit this debugging session? (y or n) FAIL: gdb.cp/nextoverthrow.exp: tbreak _Unwind_RaiseException (GDB internal error)

RHEL-7.3-20161007.n.0 Server aarch64
gcc-4.8.5-11.el7.aarch64
Comment 1 Sourceware Commits 2016-10-12 11:35:32 UTC
The master branch has been updated by Yao Qi <qiyao@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=187f5d00acf0ffe5390f282fd4d6285bcd6fccb9

commit 187f5d00acf0ffe5390f282fd4d6285bcd6fccb9
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Oct 11 12:12:46 2016 +0100

    [AArch64] Track FP registers in prologue analyzer
    
    We don't track FP registers in aarch64 prologue analyzer, so this causes
    an internal error when FP registers are saved by "stp" instruction in
    prologue (stp	d8, d9, [sp,#128]),
    
     tbreak _Unwind_RaiseException^M
     aarch64-tdep.c:335: internal-error: CORE_ADDR aarch64_analyze_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, aarch64_prologue_cache*): Assertion `inst.operands[0].type == AARCH64_OPND_Rt' failed.^M
     A problem internal to GDB has been detected,
    
    This patch teaches GDB to track FP registers (D registers) in prologue
    analyzer.
    
    gdb:
    
    2016-10-12  Yao Qi  <yao.qi@linaro.org>
    
    	PR tdep/20682
    	* aarch64-tdep.c: Replace 32 with AARCH64_D_REGISTER_COUNT.
    	(aarch64_analyze_prologue): Extend array 'regs' for D registers.
    	Assert that operand 0 and 1 can be X or D registers.  Update
    	register number for D registers.  Update registers in frame
    	cache.
    	* aarch64-tdep.h (AARCH64_D_REGISTER_COUNT): New macro.
Comment 2 Sourceware Commits 2016-10-12 11:43:44 UTC
The gdb-7.12-branch branch has been updated by Yao Qi <qiyao@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8268cfa384409770cd6988e54b386ae286c0f3d1

commit 8268cfa384409770cd6988e54b386ae286c0f3d1
Author: Yao Qi <yao.qi@linaro.org>
Date:   Wed Oct 12 12:38:56 2016 +0100

    [AArch64] Track FP registers in prologue analyzer
    
    We don't track FP registers in aarch64 prologue analyzer, so this causes
    an internal error when FP registers are saved by "stp" instruction in
    prologue (stp	d8, d9, [sp,#128]),
    
     tbreak _Unwind_RaiseException^M
     aarch64-tdep.c:335: internal-error: CORE_ADDR aarch64_analyze_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, aarch64_prologue_cache*): Assertion `inst.operands[0].type == AARCH64_OPND_Rt' failed.^M
     A problem internal to GDB has been detected,
    
    This patch teaches GDB to track FP registers (D registers) in prologue
    analyzer.
    
    gdb:
    
    2016-10-12  Yao Qi  <yao.qi@linaro.org>
    
    	PR tdep/20682
    	* aarch64-tdep.c: Replace 32 with AARCH64_D_REGISTER_COUNT.
    	(aarch64_analyze_prologue): Extend array 'regs' for D registers.
    	Assert that operand 0 and 1 can be X or D registers.  Update
    	register number for D registers.  Update registers in frame
    	cache.
    	* aarch64-tdep.h (AARCH64_D_REGISTER_COUNT): New macro.
Comment 3 Yao Qi 2016-10-12 13:45:50 UTC
Patch is pushed in.