This is the mail archive of the gdb@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] |
On 04/12/2011 09:16 AM, Edjunior Barbosa Machado wrote:Hi,
running the testcase gdb.base/gdb1090.exp on ppc64 using gcc 4.3.4, noticed an unexpected error in the second test:
#1 0x00000000100005dc in foo () at ../../../gdb.git/gdb/testsuite/gdb.base/gdb1090.c:39^M 39 marker (s24);^M (gdb) PASS: gdb.base/gdb1090.exp: up from marker print s24^M $1 =<optimized out>^M (gdb) FAIL: gdb.base/gdb1090.exp: print s24
According to readelf output, s24 uses r9, which is a volatile register. However, the content is properly printed when using gcc 4.4.5 (var s24 goes to r30, which is not volatile on power)
Just wondering, can we consider this last test as untested (or even pass) when print returns "optimized out", since it does not print garbage (which was the original issue from gdb/1090)?
If we set breakpoint directly on a certain line of main(), and check the value of `s24' in main(). Can we get the value of `s24'? If we can, we may modify test case a little bit, instead of marking this case as untested (or even pass).
It works fine if I set a breakpoint in the end of foo() (which is the function where 's24' is declared). My only concern is if this check in the same frame will not affect the main purpose of the testcase. If there is no problem with this, please consider the patch below.
Thanks, -- Edjunior
* testsuite/gdb.base/gdb1090.exp: change breakpoint location to read the content of 's24' correctly (avoiding "optimized out"). * testsuite/gdb.base/gdb1090.c: add comment in order to set breakpoint.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |