GNU Binutils with patches for OS216
Revisión | 558e5469679897ee57ad6706074f55ff4952cf43 (tree) |
---|---|
Tiempo | 2015-05-13 22:55:09 |
Autor | Jan Kratochvil <jan.kratochvil@redh...> |
Commiter | Jan Kratochvil |
dummy_frame_dtor_ftype vs. call_function_by_hand_dummy_dtor_ftype cleanup
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.
@@ -1,3 +1,14 @@ | ||
1 | +2015-05-08 Jan Kratochvil <jan.kratochvil@redhat.com> | |
2 | + | |
3 | + * dummy-frame.c (struct dummy_frame): Use proper typedef for dtor. | |
4 | + * dummy-frame.h (dummy_frame_dtor_ftype): Add its comment. | |
5 | + * infcall.c (call_function_by_hand_dummy): Use proper typedef for | |
6 | + dummy_dtor parameter. | |
7 | + * infcall.h: Include dummy-frame.h. | |
8 | + (call_function_by_hand_dummy_dtor_ftype): Remove. | |
9 | + (call_function_by_hand_dummy): Use proper typedef for dummy_dtor | |
10 | + parameter. | |
11 | + | |
1 | 12 | 2015-05-13 Patrick Palka <patrick@parcs.ath.cx> |
2 | 13 | |
3 | 14 | PR gdb/17820 |
@@ -64,7 +64,7 @@ struct dummy_frame | ||
64 | 64 | |
65 | 65 | /* If non-NULL, a destructor that is run when this dummy frame is |
66 | 66 | popped. */ |
67 | - void (*dtor) (void *data); | |
67 | + dummy_frame_dtor_ftype *dtor; | |
68 | 68 | |
69 | 69 | /* Arbitrary data that is passed to DTOR. */ |
70 | 70 | void *dtor_data; |
@@ -54,10 +54,12 @@ extern void dummy_frame_discard (struct frame_id dummy_id, ptid_t ptid); | ||
54 | 54 | |
55 | 55 | extern const struct frame_unwind dummy_frame_unwind; |
56 | 56 | |
57 | +/* Destructor for dummy_frame. DATA is supplied by registrant. */ | |
58 | +typedef void (dummy_frame_dtor_ftype) (void *data); | |
59 | + | |
57 | 60 | /* Call DTOR with DTOR_DATA when DUMMY_ID frame of thread PTID gets discarded. |
58 | 61 | Dummy frame with DUMMY_ID must exist. There must be no other call of |
59 | 62 | register_dummy_frame_dtor for that dummy frame. */ |
60 | -typedef void (dummy_frame_dtor_ftype) (void *data); | |
61 | 63 | extern void register_dummy_frame_dtor (struct frame_id dummy_id, ptid_t ptid, |
62 | 64 | dummy_frame_dtor_ftype *dtor, |
63 | 65 | void *dtor_data); |
@@ -490,7 +490,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) | ||
490 | 490 | struct value * |
491 | 491 | call_function_by_hand_dummy (struct value *function, |
492 | 492 | int nargs, struct value **args, |
493 | - call_function_by_hand_dummy_dtor_ftype *dummy_dtor, | |
493 | + dummy_frame_dtor_ftype *dummy_dtor, | |
494 | 494 | void *dummy_dtor_data) |
495 | 495 | { |
496 | 496 | CORE_ADDR sp; |
@@ -20,6 +20,8 @@ | ||
20 | 20 | #ifndef INFCALL_H |
21 | 21 | #define INFCALL_H |
22 | 22 | |
23 | +#include "dummy-frame.h" | |
24 | + | |
23 | 25 | struct value; |
24 | 26 | struct type; |
25 | 27 |
@@ -42,11 +44,10 @@ extern struct value *call_function_by_hand (struct value *function, int nargs, | ||
42 | 44 | register_dummy_frame_dtor with DUMMY_DTOR and DUMMY_DTOR_DATA for the |
43 | 45 | created inferior call dummy frame. */ |
44 | 46 | |
45 | -typedef void (call_function_by_hand_dummy_dtor_ftype) (void *data); | |
46 | 47 | extern struct value * |
47 | 48 | call_function_by_hand_dummy (struct value *function, int nargs, |
48 | 49 | struct value **args, |
49 | - call_function_by_hand_dummy_dtor_ftype *dummy_dtor, | |
50 | + dummy_frame_dtor_ftype *dummy_dtor, | |
50 | 51 | void *dummy_dtor_data); |
51 | 52 | |
52 | 53 | #endif |