Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Cc: Yao Qi <yao@codesourcery.com>, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: "optimized out" on gdb.base/gdb1090.exp
Date: Tue, 12 Apr 2011 16:02:00 -0000	[thread overview]
Message-ID: <20110412160220.GA18580@host1.jankratochvil.net> (raw)
In-Reply-To: <4DA4573D.1040101@linux.vnet.ibm.com>

On Tue, 12 Apr 2011 15:44:29 +0200, Edjunior Barbosa Machado wrote:
> My only concern is if this check in the same frame will not affect the main
> purpose of the testcase.

One should find the fix, I do not see it obvious which one it is.


> --- a/gdb/testsuite/gdb.base/gdb1090.exp
> +++ b/gdb/testsuite/gdb.base/gdb1090.exp
> @@ -40,12 +40,9 @@ gdb_start
>  gdb_reinitialize_dir $srcdir/$subdir
>  gdb_load ${binfile}
> -if ![runto marker] then {
> -    perror "couldn't run to breakpoint"
> -    continue
> -}
> -gdb_test "up" ".*foo.*" "up from marker"
> +gdb_breakpoint [gdb_get_line_number "break-here"]
> +gdb_run_cmd

gdb_run_cmd produces output which is not caught anywhere here.  This will
result in testcase races.

BTW runto expects a function name, not file:line notation.

This is why the pair
	gdb_breakpoint [gdb_get_line_number "break-here"]
	gdb_continue_to_breakpoint "break-here" ".* break-here .*"

is popular.


>  gdb_test_multiple "print s24" "print s24" {
>      -re "\\\$\[0-9\]* = \\{field_0 = 1170, field_1 = 64701\\}\r\n$gdb_prompt $" {
>  	pass "print s24"


Thanks,
Jan


      reply	other threads:[~2011-04-12 16:02 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
2011-04-12 13:44   ` Edjunior Barbosa Machado
2011-04-12 16:02     ` Jan Kratochvil [this message]

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=20110412160220.GA18580@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=emachado@linux.vnet.ibm.com \
    --cc=gdb@sourceware.org \
    --cc=yao@codesourcery.com \
    /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