This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] cleanup: Wunused infrun, jit


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]