Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: gdb@sourceware.org
Subject: Re: "optimized out" on gdb.base/gdb1090.exp
Date: Tue, 12 Apr 2011 02:21:00 -0000	[thread overview]
Message-ID: <4DA3B701.3060902@codesourcery.com> (raw)
In-Reply-To: <4DA3A7D0.2000701@linux.vnet.ibm.com>

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).

-- 
Yao (齐尧)


  reply	other threads:[~2011-04-12  2:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12  1:16 Edjunior Barbosa Machado
2011-04-12  2:21 ` Yao Qi [this message]
2011-04-12 13:44   ` Edjunior Barbosa Machado
2011-04-12 16:02     ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DA3B701.3060902@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox