From: Aleksandar Ristovski <aristovski@qnx.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Vladimir Prus <ghost@cs.msu.su>, gdb-patches@sources.redhat.com
Subject: Re: [RFC] gdb.mi tests
Date: Wed, 12 Mar 2008 20:49:00 -0000 [thread overview]
Message-ID: <47D841C4.4040004@qnx.com> (raw)
In-Reply-To: <20080312193423.GA837@caradoc.them.org>
Daniel Jacobowitz wrote:
> On Wed, Mar 12, 2008 at 10:25:12PM +0300, Vladimir Prus wrote:
>> Aleksandar Ristovski wrote:
>>
>>>> Something like the diffs attached (I manually removed some things from my diff
>>>> so the diff may not be patchable, but it should be sufficient to illustrate what
>>>> am I talking about.
>>>>
>>> Attached working diff. Comments welcome.
>> I don't have any objections to this course of action, if this simplifies
>> your testing.
>>
>> But just for the record, can you tell how you override mi_gdb_start? Of course,
>> assuming it's not some proprietary information.
>
> FWIW, I tried something similar long ago and Elena preferred it the
> way it is - you'll see that sid and gdbserver target support is also
> in mi-support.exp, not in config/ with the other pieces.
>
> http://sources.redhat.com/ml/gdb-patches/2002-07/msg00227.html
>
> However, CodeSourcery's test harness goes to some trouble to work
> around this - you still can, you just need to be handy with TCL to do
> it. We load mi-support.exp in our board files and use "rename".
> Which is a bit silly to have to do.
>
The way I understand it, tcl is dynamically scoped language (I hope I used the
right term) and will, effectively override a definition with the subsequent
redefinition.
This means that the order in which files are loaded matters and the latter in
the process a file gets loaded, it carries more 'overriding' capabilities.
Therefore, first files loaded should be very generic, going towards
customization files.
If tests are run with --verbose flag, the order of loaded files is clear:
/usr/share/dejagnu/runtest.exp as main test driver$
site.exp (generated by the makefile, specifies tool name and such)
site.exp (global site.exp as defined by DEJAGNU env. var - optional, I use it to
add my baseboard directory)
then follow bunch of dejagnu framework files loaded by runtest.exp:
Loading /usr/share/dejagnu/utils.exp
Loading /usr/share/dejagnu/framework.exp
...
Loading /usr/share/dejagnu/libgloss.exp
Loading library file ../../../gdb/testsuite/lib/gdb.exp
After that,
boardfile is loaded and finally the test file.
For gdb.base tests, gdb_start, gdb_load and such are easily overriden by
redefinition in baseboard file. However, due to the fact that mi-support.exp is
explicitly loaded from gdb.mi/* tests, it will have the final say, thus
preventing us from overriding mi_gdb_load and such in the baseboard file.
Thanks,
Aleksandar
next prev parent reply other threads:[~2008-03-12 20:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 19:32 Aleksandar Ristovski
2008-03-12 19:18 ` Aleksandar Ristovski
2008-03-12 19:25 ` Vladimir Prus
2008-03-12 19:34 ` Daniel Jacobowitz
2008-03-12 20:49 ` Aleksandar Ristovski [this message]
2008-03-12 21:05 ` Daniel Jacobowitz
2008-03-14 18:07 ` Aleksandar Ristovski
2008-03-21 15:07 ` Daniel Jacobowitz
2008-03-28 15:24 Aleksandar Ristovski
2008-03-28 15:59 ` Daniel Jacobowitz
2008-03-28 16:00 ` Daniel Jacobowitz
2008-03-28 16:16 Aleksandar Ristovski
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=47D841C4.4040004@qnx.com \
--to=aristovski@qnx.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=ghost@cs.msu.su \
/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