-^done,depth="12"
+^done,depth="12",reason="All frames"
(gdb)
-stack-info-depth 4
-^done,depth="4"
+^done,depth="4",reason="Reached frame limit"
(gdb)
-stack-info-depth 12
-^done,depth="12"
+^done,depth="12",reason="Reached frame limit"
(gdb)
-stack-info-depth 11
-^done,depth="11"
+^done,depth="11",reason="Reached frame limit"
(gdb)
-stack-info-depth 13
-^done,depth="12"
+^done,depth="12",reason="All frames"
+(gdb)
+@end smallexample
+
+An example where there are 3 valid stack frames, after which the stack
+pointer is corrupted and gdb is unable to unwind the stack further:
+
+@smallexample
+(gdb)
+-stack-info-depth
+^done,depth="3",reason="Cannot access memory at address 0xffffffff"
+(gdb)
+-stack-info-depth 4
+^done,depth="3",reason="Cannot access memory at address 0xffffffff"
+(gdb)
+-stack-info-depth 3
+^done,depth="3",reason="Reached frame limit"
(gdb)
@end smallexample