]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
dummy_frame_dtor_ftype vs. call_function_by_hand_dummy_dtor_ftype cleanup
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 13 May 2015 13:55:09 +0000 (15:55 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 13 May 2015 13:55:09 +0000 (15:55 +0200)
Both dummy_frame_dtor_ftype and call_function_by_hand_dummy_dtor_ftype
represent the same type, there was some mistake/duplication during check-in.

gdb/ChangeLog
2015-05-08  Jan Kratochvil  <jan.kratochvil@redhat.com>

* dummy-frame.c (struct dummy_frame): Use proper typedef for dtor.
* dummy-frame.h (dummy_frame_dtor_ftype): Add its comment.
* infcall.c (call_function_by_hand_dummy): Use proper typedef for
dummy_dtor parameter.
* infcall.h: Include dummy-frame.h.
(call_function_by_hand_dummy_dtor_ftype): Remove.
(call_function_by_hand_dummy): Use proper typedef for dummy_dtor
parameter.

gdb/ChangeLog
gdb/dummy-frame.c
gdb/dummy-frame.h
gdb/infcall.c
gdb/infcall.h

index 082886e188d53ceeeb889cc0ad9b20a14fe7e3cd..6af4d2672a309bc37fd949da89f0165864934f7d 100644 (file)
@@ -1,3 +1,14 @@
+2015-05-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * dummy-frame.c (struct dummy_frame): Use proper typedef for dtor.
+       * dummy-frame.h (dummy_frame_dtor_ftype): Add its comment.
+       * infcall.c (call_function_by_hand_dummy): Use proper typedef for
+       dummy_dtor parameter.
+       * infcall.h: Include dummy-frame.h.
+       (call_function_by_hand_dummy_dtor_ftype): Remove.
+       (call_function_by_hand_dummy): Use proper typedef for dummy_dtor
+       parameter.
+
 2015-05-13  Patrick Palka  <patrick@parcs.ath.cx>
 
        PR gdb/17820
index 0fbbeb1e5855ba58b088539c4bfd9e6529fffea4..f193289aeda78d213243f1cb750999be9c91a337 100644 (file)
@@ -64,7 +64,7 @@ struct dummy_frame
 
   /* If non-NULL, a destructor that is run when this dummy frame is
      popped.  */
-  void (*dtor) (void *data);
+  dummy_frame_dtor_ftype *dtor;
 
   /* Arbitrary data that is passed to DTOR.  */
   void *dtor_data;
index bdc406a5b5926e5d042a808375f5dba72447aea1..ffd3b0ad02595fe85fab44ae80da50c79ba70dd5 100644 (file)
@@ -54,10 +54,12 @@ extern void dummy_frame_discard (struct frame_id dummy_id, ptid_t ptid);
 
 extern const struct frame_unwind dummy_frame_unwind;
 
+/* Destructor for dummy_frame.  DATA is supplied by registrant.  */
+typedef void (dummy_frame_dtor_ftype) (void *data);
+
 /* Call DTOR with DTOR_DATA when DUMMY_ID frame of thread PTID gets discarded.
    Dummy frame with DUMMY_ID must exist.  There must be no other call of
    register_dummy_frame_dtor for that dummy frame.  */
-typedef void (dummy_frame_dtor_ftype) (void *data);
 extern void register_dummy_frame_dtor (struct frame_id dummy_id, ptid_t ptid,
                                       dummy_frame_dtor_ftype *dtor,
                                       void *dtor_data);
index 26c64f60b9a692ce4d77441a2c87ba77aed58228..cef6b915d635406169fb54aa75f6c2065c794a0a 100644 (file)
@@ -490,7 +490,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
 struct value *
 call_function_by_hand_dummy (struct value *function,
                             int nargs, struct value **args,
-                            call_function_by_hand_dummy_dtor_ftype *dummy_dtor,
+                            dummy_frame_dtor_ftype *dummy_dtor,
                             void *dummy_dtor_data)
 {
   CORE_ADDR sp;
index d038b6a7e917f77b777fe8b2c7ca3bc977e0f1d5..77c510179ae82a3d3d735723a17ccede354a64db 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef INFCALL_H
 #define INFCALL_H
 
+#include "dummy-frame.h"
+
 struct value;
 struct type;
 
@@ -42,11 +44,10 @@ extern struct value *call_function_by_hand (struct value *function, int nargs,
    register_dummy_frame_dtor with DUMMY_DTOR and DUMMY_DTOR_DATA for the
    created inferior call dummy frame.  */
 
-typedef void (call_function_by_hand_dummy_dtor_ftype) (void *data);
 extern struct value *
   call_function_by_hand_dummy (struct value *function, int nargs,
                               struct value **args,
-                            call_function_by_hand_dummy_dtor_ftype *dummy_dtor,
+                              dummy_frame_dtor_ftype *dummy_dtor,
                               void *dummy_dtor_data);
 
 #endif