[3.7] bpo-29673: fix gdb scripts pystack and pystackv (GH-6126) (GH-6399)

(cherry picked from commit 3a9ccee0e5dbf7d67f5ab79f6095755969db117c)

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
4 files changed