Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ATF tests hanging



On Wed, Dec 27, 2017 at 07:53:50PM +0100, Martin Husemann wrote:
> I must be missing something, or the test works on alpha and x86 due to a
> bug, but correctly fails on other architectures.

The same difference can be seen very simply by running the attached
program under gdb:

(gdb) run
Starting program: /tmp/a.out 
hello, before break

Program received signal SIGTRAP, Trace/breakpoint trap.
0x000000000040087f in main ()
(gdb) c
Continuing.
and after...
[Inferior 1 (process 3001) exited normally]


But on sparc* instead you see it hit the same breakpoint instruction
again after continuing. The interpretation of (void*)1 for new %pc
value must be different.

From our man page, I'd claim x86 is wrong and sparc* is right.

Martin
#include <stdio.h>
#include <sys/types.h>
#include <sys/ptrace.h>

int main(void)
{
	printf("hello, before break\n");
	PTRACE_BREAKPOINT_ASM;
	printf("and after...\n");
	return 0;
}


Home | Main Index | Thread Index | Old Index