This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/7] New macro THREAD_WITHIN_SINGLE_STEP_RANGE
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 14 May 2013 19:30:04 +0100
- Subject: Re: [PATCH 1/7] New macro THREAD_WITHIN_SINGLE_STEP_RANGE
- References: <1363006291-13334-1-git-send-email-yao at codesourcery dot com> <1363006291-13334-2-git-send-email-yao at codesourcery dot com>
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