This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] manual/probes.texi: Add documentation of setjmp/longjmp probes
- From: Will Newton <will dot newton at linaro dot org>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>, Patch Tracking <patches at linaro dot org>
- Date: Tue, 28 Jan 2014 20:27:19 +0000
- Subject: Re: [PATCH 2/2] manual/probes.texi: Add documentation of setjmp/longjmp probes
- Authentication-results: sourceware.org; auth=none
- References: <1390919614-30727-1-git-send-email-will dot newton at linaro dot org> <1390919614-30727-2-git-send-email-will dot newton at linaro dot org> <20140128164044 dot GM2149 at spoyarek dot pnq dot redhat dot com>
On 28 January 2014 16:40, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> On Tue, Jan 28, 2014 at 02:33:34PM +0000, Will Newton wrote:
>> +These probes can be used to notify the debugger of a call to @code{setjmp},
>> +@code{sigsetjmp} or @code{longjmp}.
>> +
>
> Suggest: These probes are used to signal calls to setjmp, sigsetjmp or
> longjmp.
>
> i.e., avoid mentioning that they're for the debugger, since their
> usage is not limited to gdb. Likewise for the gdb mention in the last
> line.
Thanks for the suggestions, will fix.
>> +@deftp Probe setjmp (void *@var{$arg1}, int @var{$arg2}, void *@var{$arg3})
>> +This probe is hit whenever @code{setjmp} or @code{sigsetjmp} is called.
>> +Argument @var{$arg1} is a pointer to the @code{jmp_buf} passed as the first
>> +argument of @code{setjmp} or @code{sigsetjmp}, @var{$arg2} is the second
>> +argument of @code{sigsetjmp} or zero if this is a call to @code{setjmp}
>> +and @var{$arg3} is a pointer to the return address that will be stored
>> +in the @code{jmp_buf}.
>> +@end deftp
>> +
>> +@deftp Probe longjmp (void *@var{$arg1}, int @var{$arg2}, void *@var{$arg3})
>> +This probe is hit whenever @code{longjmp} is called. Argument @var{$arg1}
>> +is a pointer to the @code{jmp_buf} passed as the first argument of
>> +@code{longjmp}, @var{$arg2} is the return value passed as the second
>> +argument of @code{longjmp} and @var{$arg3} is a pointer to the return
>> +address @code{longjmp} will return to.
>> +@end deftp
>> +
>> +@deftp Probe longjmp_target (void *@var{$arg1}, int @var{$arg2}, void *@var{$arg3})
>> +This probe is hit whenever @code{longjmp} is called. Argument @var{$arg1}
>> +is a pointer to the @code{jmp_buf} passed as the first argument of
>> +@code{longjmp}, @var{$arg2} is the return value passed as the second
>> +argument of @code{longjmp} and @var{$arg3} is a pointer to the return
>> +address @code{longjmp} will return to.
>> +
>> +This probe is implemented on some architectures. It is not clear how it
>> +differs from the @code{longjmp} probe and it is not used by gdb.
>> +@end deftp
>
> The AFAIU, the longjmp probe marks the entry point of the longjmp
> call, while longjmp_target is hit after unwinding and just before
> jumping to the target. One might want separate notifications of
> having hit longjmp and then having successfully unwound and jumped to
> the target.
Yeah, I figured that out not long after I sent the patch. Not sure how
I missed it in the SystemTap testsuite.
I'll send an updated patch.
--
Will Newton
Toolchain Working Group, Linaro