[Ltrace-devel] [PATCH 2/2] linux-gnu/trace.c: Disable breakpoint before we resume execution

Petr Machata pmachata at redhat.com
Tue Mar 5 16:25:32 UTC 2013


Markos Chandras <markos.chandras at gmail.com> writes:

> diff --git a/sysdeps/linux-gnu/trace.c b/sysdeps/linux-gnu/trace.c
> index 9a57a0a..a526834 100644
> --- a/sysdeps/linux-gnu/trace.c
> +++ b/sysdeps/linux-gnu/trace.c
> @@ -909,6 +909,7 @@ continue_after_breakpoint(struct process *proc, struct breakpoint *sbp)
>  		continue_process(proc->pid);
>  	} else {
>  #if defined __sparc__  || defined __ia64___ || defined __metag__
> +		disable_breakpoint(proc, sbp);

Does this actually work?  Where do you enable that breakpoint again?

If the architecture doesn't have hardware singlestepping, you'll need to
use the software singlestepping support in ltrace, like MIPS, ARM (on
pmachata/arm branch) and to some degree PPC do.

FWIW, I doubt that SPARC support in fact works.  Also that IA64 ifdef
contains a typo, which is the reason that IA64 works.  This really
should have been removed a long time ago, and I commited that change
now.

Thanks,
PM



More information about the Ltrace-devel mailing list