This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [pushed] gdbserver: redo stepping over breakpoint that was on top of a permanent breakpoint
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 24 Feb 2015 12:25:11 +0000
- Subject: Re: [pushed] gdbserver: redo stepping over breakpoint that was on top of a permanent breakpoint
- Authentication-results: sourceware.org; auth=none
- References: <1424723261-15719-1-git-send-email-palves at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> + unsigned int increment_pc;
> +
> + if (the_low_target.breakpoint_len > the_low_target.decr_pc_after_break)
> + increment_pc = the_low_target.breakpoint_len;
> + else
> + increment_pc = the_low_target.decr_pc_after_break;
AFAICS, the_low_target.breakpoint_len is greater or equal to
the_low_target.decr_pc_after_break. Why don't we use .breakpoint_len
instead? The code is correct, however, the comparison here leads me to
think under what situation .breakpoint_len is less than .decr_pc_after_break.
--
Yao (éå)