This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Fix ppc64 single step over atomic sequence testcase


On 07/29/2013 04:38 AM, Anton Blanchard wrote:
> 
> (My apologies, I thought I'd got these patches merged but obviously I
> hadn't).
> 
> The current ppc64 single step over atomic sequence testcase is broken.
> Convert the test into assembly and use stepi to step through it.

Hi Anton,

thanks for reworking this patch! I do recall we discussed this in the
mailing list last year
(http://sourceware.org/ml/gdb-patches/2012-06/msg00162.html).

> 
> Anton
> --
> 
> 2013-07-29  Anton Blanchard  <anton@samba.org>
> 
> 	* gdb.arch/ppc64-atomic-inst.c: Remove
> 	* gdb.arch/ppc64-atomic-inst.s: New file
> 	* gdb.arch/ppc64-atomic-inst.exp: Adapt for asm based testcase 
> 

(just a nitpick: missing period at the end of the lines.)

> Index: gdb/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
> ===================================================================
> --- gdb.orig/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
> +++ gdb/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
> @@ -27,9 +27,9 @@ if {![istarget "powerpc*"] || ![is_lp64_
>  }
> 
>  set testfile "ppc64-atomic-inst"
> -set srcfile ${testfile}.c
> +set srcfile ${testfile}.s
>  set binfile ${objdir}/${subdir}/${testfile}
> -set compile_flags {debug quiet}
> +set compile_flags "debug quiet additional_flags=-I${srcdir}/gdb.asm"

I've noticed it fails to build with the following:

spawn -ignore SIGHUP gcc ../../../gdb.git/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s -I../../../gdb.git/gdb/testsuite/gdb.asm -g -lm -o /home/emachado/gdb/build/gdb/testsuite/gdb.arch/ppc64-atomic-inst^M
../../../gdb.git/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s: Assembler messages:^M
../../../gdb.git/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s:1: Error: can't open common.inc for reading: No such file or directory^M
../../../gdb.git/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s:2: Error: can't open powerpc64.inc for reading: No such file or directory^M
../../../gdb.git/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s:5: Error: Unrecognized opcode: `gdbasm_declare'^M
compiler exited with status 1

This seems to happen because -I option is not passed to the assembler. I've
tried adding this parameter using -Wa as:

set compile_flags "debug quiet additional_flags=-Wa,-I${srcdir}/gdb.asm"

and it fixes the build failure. With this change, the testcase passes OK, also
including the other 2 patches you sent on this thread.

Thanks and regards,
-- 
Edjunior


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]