@@ -634,9 +635,32 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
case AT_ENTRY_POINT:
{
CORE_ADDR dummy_addr;
+ gdb_byte *insn;
+ CORE_ADDR insn_len;
real_pc = funaddr;
dummy_addr = entry_point_address ();
+
+ /* If the inferior call throws an uncaught C++ exception the inferior
+ unwinder will try to unwind all the frames incl. the dummy frame.
+ Using the entry_point_address directly will try to find FDE at the
+ function right before the entry_point_address address as the
+ unwinder subtracts 1 to get at the call instruction. FDE of the
+ preceding function, if found, would be invalid for the dummy frame
+ and it would crash the inferior's unwinder. Therefore attempt to
+ skip the very first instruction of entry_point_address. */
+