Re: [PATCH 1/7] New macro THREAD_WITHIN_SINGLE_STEP_RANGE

Pedro Alves
2013-05-14T19:24:36Z

Hi Yao,

Finally I'm replying to this series. As I said before, I ended up
working on the code, and I'll post a v3 next. I'm still replying to
the individual patches, to point out some of the issues I found.

On 03/11/2013 12:51 PM, Yao Qi wrote:
> This patch moves code into a macro, which will be used in my
> following patches.

I agree with the idea.

> 2013-03-11 Yao Qi <yao@codesourcery.com>
>
> * gdbthread.h (THREAD_WITHIN_SINGLE_STEP_RANGE): New macro.
> * infrun.c (handle_inferior_event): Use it.

However, the gdbserver patch does:

+/* Return true if THREAD is in range stepping. PC is the value of pc
+ of THREAD. */
+
+int
+thread_in_range_stepping_p (struct thread_info *thread, CORE_ADDR pc)
+{
+ return (pc >= thread->start && pc < thread->end);
}

If we have code doing the exact same at the same conceptual level
in both gdb and gdbserver, I'd rather it is similar.

--
Pedro Alves