From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFvT1-0001eP-B8 for qemu-devel@nongnu.org; Thu, 05 Apr 2012 18:47:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFvSz-0001I6-QQ for qemu-devel@nongnu.org; Thu, 05 Apr 2012 18:47:46 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:34838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFvSz-0001Hh-FN for qemu-devel@nongnu.org; Thu, 05 Apr 2012 18:47:45 -0400 Received: by bkcjg9 with SMTP id jg9so2020194bkc.4 for ; Thu, 05 Apr 2012 15:47:43 -0700 (PDT) From: Max Filippov Date: Fri, 6 Apr 2012 02:46:50 +0400 Message-Id: <1333666012-16094-3-git-send-email-jcmvbkbc@gmail.com> In-Reply-To: <1333666012-16094-1-git-send-email-jcmvbkbc@gmail.com> References: <1333666012-16094-1-git-send-email-jcmvbkbc@gmail.com> Subject: [Qemu-devel] [PATCH 2/4] target-xtensa: improve unit tests debugging List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , Max Filippov , Anthony Liguori - add testcase announcement; - add global symbols for individual tests; - add host-debug-* makefile target. Signed-off-by: Max Filippov --- tests/tcg/xtensa/Makefile | 3 +++ tests/tcg/xtensa/macros.inc | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile index 7e1e619..0ff0ccf 100644 --- a/tests/tcg/xtensa/Makefile +++ b/tests/tcg/xtensa/Makefile @@ -72,5 +72,8 @@ run-test_fail.tst: test_fail.tst debug-%.tst: %.tst $(SIM) $(SIMDEBUG) $(SIMFLAGS) ./$< +host-debug-%.tst: %.tst + gdb --args $(SIM) $(SIMFLAGS) ./$< + clean: $(RM) -fr $(TESTCASES) $(CRT) diff --git a/tests/tcg/xtensa/macros.inc b/tests/tcg/xtensa/macros.inc index 2d4515e..23bf3e9 100644 --- a/tests/tcg/xtensa/macros.inc +++ b/tests/tcg/xtensa/macros.inc @@ -29,7 +29,24 @@ main: exit .endm +.macro print text +.data +97: .ascii "\text\n" +98: + .align 4 +.text + movi a2, 4 + movi a3, 2 + movi a4, 97b + movi a5, 98b + sub a5, a5, a4 + simcall +.endm + .macro test name + //print test_\name +test_\name: +.global test_\name .endm .macro test_end -- 1.7.7.6