#218 gdb can't find local variables in unoptimized main

closed-fixed
gcc (183)
5
2012-03-11
2011-10-09
Peter A. Bigot
No

The patch for ticket 3417263 works for normal functions, but not for naked functions like main where the frame offset does not include a return address. Fix this for the next major release.

Discussion

  • Peter A. Bigot
    Peter A. Bigot
    2012-03-11

    Fixed in both LTS/20110716 and development.

    commit a014bf518a8e35b45f78ebf9cc56055c33de8e3a
    Author: Peter A. Bigot <pabigot@users.sourceforge.net>
    Date: Wed Mar 7 13:33:04 2012 -0600

    SF 3420924 gdb can't find local variables in unoptimized main

    Change INCOMING_FRAME_SP_OFFSET to be a constant, matching gcc assumptions.
    Implement CFA_FRAME_BASE_OFFSET to adjust CFA for both ISRs and for
    fall-into-main.

     
  • Peter A. Bigot
    Peter A. Bigot
    2012-03-11

    • status: open --> closed-fixed