qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a grou


From: Jakub Jermar
Subject: Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation
Date: Fri, 01 Jul 2011 14:57:52 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11

On 1.7.2011 12:41, Artyom Tarasenko wrote:
> Looks like it's a pretty nice test case.
> 
> The test case scenario is to load the initial values into the
> registers (you already know them),
> calculate the mins, cmp the result with expected and jump somewhere.
> Since it happens with interrupts disabled, we don't need an OS or bios
> to test that. The binary just has to have an entry point at 0x20,
> then we can load it instead of bios.
> 
> Care to produce the test case? (Otherwise I'll do it, but probably not
> until the weekend after the next one).

Yes I have a small reproducible testcase, see the attachments.

When _not_ singlestepping via GDB's `stepi`, the testcase will fail and
crash Qemu like this:

qemu: fatal: Trap 0x0101 while trap level (5) >= MAXTL (5), Error state
<register dumped here>

On the other hand, when I attach GDB to Qemu and step through all
instructions using `stepi`, the testcase will succeed and crash Qemu
like this:

qemu: fatal: Trap 0x0100 while trap level (5) >= MAXTL (5), Error state
<registers dumped here>

Mind the difference in the trap type - 0x100 for success, 0x101 for failure.

This is how I run the test:

Without GDB:
$ qemu-system-sparc64 -bios ./testcase

With GDB:
$ qemu-system-sparc64 -bios ./testcase -s -S

>From another terminal:
$ /usr/local/cross/sparc64/bin/sparc64-linux-gnu-gdb
(gdb) set architecture sparc:v9
(gdb) target remote localhost:1234
(gdb) stepi
...

Hope this helps to fix the problem.

Jakub

Attachment: Makefile
Description: Text document

Attachment: testcase
Description: Binary data

Attachment: testcase.S
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]