On 9/9/20 4:33 AM, Jozef Lawrynowicz wrote: > There is no CFA information generated for instructions which manipulate the > stack during function epilogues. This means a debugger cannot determine the > position of variables on the stack whilst the epilogue is in progress. > > This can cause the debugger to give erroneous information when printing a > backtrace whilst stepping through the epilogue, or cause software watchpoints > set on stack variables to become invalidated after a function epilogue > is executed. > > The patch fixes this by marking stack manipulation insns as > frame_related, and adding reg_note RTXs to stack pop instructions in the > epilogue. > > Successfully regtested on trunk for msp430-elf in the default, -mlarge, > -mcpu=msp430 and -mlarge/-mcode-region=either/-mdata-region=either > configurations. > > This fixes some tests from watchpoint.exp in the GDB testsuite. > > Ok for trunk? > > Thanks, > Jozef > > 0001-MSP430-Fix-CFA-generation-during-function-epilogues.patch > > From 272b38a374eddf7327a61ff9b1730f0a2dd40233 Mon Sep 17 00:00:00 2001 > From: Jozef Lawrynowicz <joze...@mittosystems.com> > Date: Mon, 7 Sep 2020 20:34:40 +0100 > Subject: [PATCH] MSP430: Fix CFA generation during function epilogues > > There is no CFA information generated for instructions which manipulate the > stack during function epilogues. This means a debugger cannot determine the > position of variables on the stack whilst the epilogue is in progress. > > This can cause the debugger to give erroneous information when printing a > backtrace whilst stepping through the epilogue, or cause software watchpoints > set on stack variables to become invalidated after a function epilogue > is executed. > > The patch fixes this by marking stack manipulation insns as > frame_related, and adding reg_note RTXs to stack pop instructions in the > epilogue. > > gcc/ChangeLog: > > * config/msp430/msp430.c (increment_stack): Mark insns which increment > the stack as frame_related. > (msp430_expand_prologue): Add comments. > (msp430_expand_epilogue): Mark insns which decrement > the stack as frame_related. > Add reg_note to stack pop insns describing position of register > variables on the stack.
OK jeff
pEpkey.asc
Description: application/pgp-keys