Comments
Patch
===================================================================
@@ -219,8 +219,15 @@
#define FRAME_OFFSET(FP) 0
#define PC_ADJUST -4
-#define STOP_FRAME(CURRENT, TOP_STACK) ((void *) (CURRENT) < (TOP_STACK))
+/* Eventhough the base PPC ABI states that a toplevel frame entry
+ should to feature a null backchain, AIX might expose a null return
+ address instead. */
+
+#define STOP_FRAME(CURRENT, TOP_STACK) \
+ (((void *) (CURRENT) < (TOP_STACK)) \
+ || (CURRENT)->return_address == NULL)
+
/* The PPC ABI has an interesting specificity: the return address saved by a
function is located in it's caller's frame, and the save operation only
takes place if the function performs a call.