This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
How do I get regexp from expect at gdb_expect?
- From: Bob Rossi <bob at brasko dot net>
- To: GDB <gdb at sources dot redhat dot com>
- Date: Fri, 28 Jan 2005 21:57:43 -0500
- Subject: How do I get regexp from expect at gdb_expect?
Hi,
I'm using expect with GDB and I've come across a problem. For instance,
say I have,
gdb_expect $tmt {
-re "(Ending remote debugging.*$mi_gdb_prompt\[ \]*$)" {
# at this point, how do I get the string that matched the above
# regex?
}
}
}
I need to be able to get the string that matched the regex at the -re.
If I can get this data, I think I will successfully be able to get the
MI output parser to parse the output of GDB with the existing testsuite.
This will at least ensure that the syntax is correct, and will stay
correct.
I hope it is possible to get the information that I need ...
Any help would be greatly appreciated,
Thanks,
Bob Rossi