This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Add support of software single step to process record
- From: Pedro Alves <pedro at codesourcery dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: ping huang <harderock at gmail dot com>, shuchang zhou <shuchang dot zhou at gmail dot com>, gdb-patches at sourceware dot org, Joel Brobecker <brobecker at adacore dot com>, Michael Snyder <msnyder at vmware dot com>, paawan oza <paawan1982 at yahoo dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Fri, 11 Jun 2010 14:55:35 +0100
- Subject: Re: [RFC] Add support of software single step to process record
- References: <daef60380912180021h5d029e55k7dc4e3f4c8d33b36@mail.gmail.com> <AANLkTin8YlU8tJyWj8ji-FOwANvJZxagchVvMVnGT8kN@mail.gmail.com> <AANLkTimkYn0XfpHHgcrOJItxlRwro9cpD4OhMJfxQ6YF@mail.gmail.com>
Hi Hui,
> 3. Ping got some gdb_assert in sometime. And I am not close to his
> board. So I didn't know what happen. So I add following:
> @@ -1534,7 +1535,8 @@ a command like `return' or `jump' to con
> /* If STEP is set, it's a request to use hardware stepping
> facilities. But in that case, we should never
> use singlestep breakpoint. */
> - gdb_assert (!(singlestep_breakpoints_inserted_p && step));
> + gdb_assert (!(execution_direction == EXEC_FORWARD
> + && singlestep_breakpoints_inserted_p && step));
>
> The lost one still need be test.
I'm felling a bit dense, and I don't see what is that actually
catching. If going backwards, the assertion always ends up
evaled as true, nomatter if sofware single-steps are inserted
or not, or whether `step' is set. Did you mean to assert
that when going backwards, there shouldn't ever be software
single-step breakpoints inserted?
This patch is okay otherwise. Thanks.
--
Pedro Alves