* infcall.c (call_function_by_hand): Check for function pointer
authorDaniel Jacobowitz <drow@false.org>
Sun, 10 Sep 2006 15:44:36 +0000 (15:44 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 10 Sep 2006 15:44:36 +0000 (15:44 +0000)
types.

gdb/ChangeLog
gdb/infcall.c

index ec35909c4eb4f3028cd9936743cdcb7d84ac28a7..a65232186dca16009b9a2f99c87864e8a10fa5b9 100644 (file)
@@ -1,3 +1,8 @@
+2006-09-10  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * infcall.c (call_function_by_hand): Check for function pointer
+       types.
+
 2006-09-10  Andreas Schwab  <schwab@suse.de>
 
        * m68k-tdep.c (m68k_analyze_register_saves): Fix decoding of
index 3a1ad6aba7e9d1538547673f84e2b4f98a9cb316..9f12896102c0aa8f5577d8e4ce2a17b4d24ee0a2 100644 (file)
@@ -336,6 +336,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
   struct cleanup *caller_regcache_cleanup;
   struct frame_id dummy_id;
 
+  if (TYPE_CODE (ftype) == TYPE_CODE_PTR)
+    ftype = check_typedef (TYPE_TARGET_TYPE (ftype));
+
   if (!target_has_execution)
     noprocess ();