* -file-list-exec-source-files testcase
@ 2004-02-24 17:22 Bob Rossi
2004-02-24 23:27 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Bob Rossi @ 2004-02-24 17:22 UTC (permalink / raw)
To: gdb
Hi,
I was wondering, the testcase I am writing for
-file-list-exec-source-files has output like
(gdb)
-file-list-exec-source-files
^done,files=[
{filename="/build/buildd/glibc-2.3.2.ds1/build-tree/i386-libc/csu/crtn.S"},
{filename="/build/buildd/glibc-2.3.2.ds1/build-tree/i386-libc/csu/crti.S"},
{filename="init.c"},
{filename="../sysdeps/i386/elf/start.S"},
{filename="./gdb.mi/basics.c",fullname="/home/bob/cvs/src/src/src/gdb/testsuite/gdb.mi/basics.c"}
]
(gdb)
There are no line breaks in the real output, that is for convenience above.
So, I was wondering, the output of the MI command looks like
{filename=.*}+ or {filename=.*,fullname=/.*}+
where you can have 0 or more filename or filename/fullname pairs. Since I
am testing the program 'basics' should I just test the literal output of
this command when run against basics, or should I make it general so
that it should work for any output of -file-list-exec-source-files?
Hope this is clear.
Thanks,
Bob Rossi
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: -file-list-exec-source-files testcase
2004-02-24 17:22 -file-list-exec-source-files testcase Bob Rossi
@ 2004-02-24 23:27 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2004-02-24 23:27 UTC (permalink / raw)
To: gdb
On Tue, Feb 24, 2004 at 12:22:18PM -0500, Bob Rossi wrote:
> Hi,
>
> I was wondering, the testcase I am writing for
> -file-list-exec-source-files has output like
>
> (gdb)
> -file-list-exec-source-files
> ^done,files=[
> {filename="/build/buildd/glibc-2.3.2.ds1/build-tree/i386-libc/csu/crtn.S"},
> {filename="/build/buildd/glibc-2.3.2.ds1/build-tree/i386-libc/csu/crti.S"},
> {filename="init.c"},
> {filename="../sysdeps/i386/elf/start.S"},
> {filename="./gdb.mi/basics.c",fullname="/home/bob/cvs/src/src/src/gdb/testsuite/gdb.mi/basics.c"}
> ]
> (gdb)
>
>
> There are no line breaks in the real output, that is for convenience above.
>
> So, I was wondering, the output of the MI command looks like
> {filename=.*}+ or {filename=.*,fullname=/.*}+
> where you can have 0 or more filename or filename/fullname pairs. Since I
> am testing the program 'basics' should I just test the literal output of
> this command when run against basics, or should I make it general so
> that it should work for any output of -file-list-exec-source-files?
You probably want to match any additional entries before or after the
one for basics.c, and make sure that basics.c is listed. Something
like:
({filename="\[^"\]*"(,{fullname="\[^"\]*"})?,)*
({filename="\[^"\]*/basics.c"(,{fullname="/\[^"\]*/basics.c"})?,)*
({filename="\[^"\]*"(,{fullname="\[^"\]*"})?,)*
I'm not sure if the leading / is OK. Probably you'll need to accept
some sort of drive prefix for one of the DOS/Windows based environments
too...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-24 23:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-24 17:22 -file-list-exec-source-files testcase Bob Rossi
2004-02-24 23:27 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox