This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Bug translator/12536] New: sdt v>=2 argument parsing can't parse '4+4(%esp)'
- From: Roland McGrath <roland at redhat dot com>
- To: systemtap at sources dot redhat dot com
- Date: Wed, 2 Mar 2011 17:30:13 -0800 (PST)
- Subject: Re: [Bug translator/12536] New: sdt v>=2 argument parsing can't parse '4+4(%esp)'
- References: <bug-12536-1110@http.sourceware.org/bugzilla/>
I filed this PR when I hit problems trying to develop a test case for the
new setjmp/longjmp probes. The probe argument in glibc is not going to
change, so I think this needs to be fixed before a test case can pass for
i686. I think I'll try to develop the full test suite case and get it
working on x86-64, where there won't be this problem because it doesn't
happen to come up in those probe arguments.
For reference, here is the program I was using when I filed that PR.
#include <stdio.h>
#include <setjmp.h>
struct env
{
jmp_buf jmp;
};
struct env saved;
void __attribute__ ((noinline))
bar (struct env *env, int x)
{
if (x == 0)
siglongjmp (env->jmp, 1);
}
void __attribute__ ((noinline))
foo (void)
{
if (sigsetjmp (saved.jmp, 1) == 0)
{
puts ("foo the first time");
bar (&saved, 0);
}
else
puts ("foo the second time");
}
int
main (void)
{
foo ();
return 0;
}