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 1/7] New macro THREAD_WITHIN_SINGLE_STEP_RANGE


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


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