This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] cleanup: Wunused infrun, jit
- From: Tom Tromey <tromey at redhat dot com>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 31 Jan 2013 10:47:43 -0700
- Subject: Re: [patch] cleanup: Wunused infrun, jit
- References: <5109F11A.60308@qnx.com>
>>>>> "Aleksandar" == Aleksandar Ristovski <aristovski@qnx.com> writes:
Aleksandar> * infrun.c (handle_syscall_event): Remove unused GDBARCH.
Aleksandar> (save_infcall_suspend_state): Remove unused INF.
Aleksandar> (restore_infcall_suspend_state): Remove unused INF.
Aleksandar> * jit.c (jit_register_code): Remove unused I, B, INF_DATA.
Aleksandar> (jit_frame_sniffer): Remove unused INF_DATA.
Mostly ok with the renaming.
Aleksandar> @@ -6745,7 +6743,6 @@ save_infcall_suspend_state (void)
Aleksandar> {
Aleksandar> struct infcall_suspend_state *inf_state;
Aleksandar> struct thread_info *tp = inferior_thread ();
Aleksandar> - struct inferior *inf = current_inferior ();
This one and the one in restore_infcall_suspend_state are weird.
They refer to commented-out code.
Later in the function:
#if 0 /* Currently unused and empty structures are not valid C. */
inf_state->inferior_suspend = inf->suspend;
#endif
The type "definition":
#if 0 /* Currently unused and empty structures are not valid C. */
struct inferior_suspend_state
{
};
#endif
If you want to #if 0 the definitions, I'll approve that.
Otherwise I think Pedro or Jan should weigh in.
The rest is ok.
Tom