This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]