[Ltrace-devel] [PATCH v2 7/8] mipsel: Singlestep over breakpoints

Petr Machata pmachata at redhat.com
Thu Sep 27 13:42:24 UTC 2012


edgar.iglesias at gmail.com writes:

> +int
> +arch_atomic_singlestep(struct Process *proc, struct breakpoint *sbp,
> +		       int (*add_cb)(void *addr, void *data),
> +		       void *add_cb_data)
> +{
> +	uint32_t pc = (uint32_t) get_instruction_pointer(proc);
> +	uint32_t newpcs[2];
> +	int nr;
> +
> +	nr = mips_next_pcs(proc, pc, newpcs);
> +
> +	while (nr--) {

This should be (nr-- > 0).

> +		arch_addr_t baddr = (arch_addr_t) newpcs[nr];
> +		/* Not sure what to do here. We've already got a bp?  */
> +		if (dict_find_entry(proc->breakpoints, baddr)) {

This should be != NULL.

Thanks,
PM



More information about the Ltrace-devel mailing list