Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jie Zhang <jie.zhang@analog.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Testsuite: Don't use global command in gdb_expect
Date: Mon, 15 Dec 2008 13:16:00 -0000	[thread overview]
Message-ID: <49465818.9060703@analog.com> (raw)
In-Reply-To: <20081215075228.GK6866@adacore.com>

Hi Joel,

Joel Brobecker wrote:
>> The Tcl global command has no effect unless executed in the context of
>> a proc body.  So the global commands in the following code are
>> useless. 
> 
> Verified in the Tcl 8.4 documentation.
> 
Yeah. The first sentence was just copied from Tcl documentation. ;-)

>> Even worse, they would cause unexpected result. When gdb_expect gets 
>> something containing "global", it will try to execute hex as a command, 
>> which will cause an error.
> 
> I'm wondering how this is happening, though. I presume that the test
> was working when the testcase was added by the original author...
> It's working for me too, actually.
> 
I'm working on the Blackfin port of GDB. Blackfin disassembler has a 
feature to guess the register value and output it in a comment beside 
the disassembling output of instruction. It also outputs a symbol if one 
can be found which matches the value. Unfortunately, the symbol found in 
this test case contains "global" as a substring, which caused the issue.

> That being said, these are only side questions. The patch looks correct
> to me.
> 
>> 2008-12-15  Jie Zhang  <jie.zhang@analog.com>
>>
>> 	* gdb.base/consecutive.exp: Don't use global in gdb_expect.
> 
> OK.
> 
Committed. Thanks.


Jie


  parent reply	other threads:[~2008-12-15 13:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15  6:07 Jie Zhang
2008-12-15  7:53 ` Joel Brobecker
2008-12-15  8:50   ` Andreas Schwab
2008-12-15 13:16   ` Jie Zhang [this message]
2008-12-18 19:57   ` Michael Snyder

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=49465818.9060703@analog.com \
    --to=jie.zhang@analog.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@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