Files
seer/tests/gdbmi_condition/gdbmi_condition.cpp
T
Ernie Pasveer c84dd60a7e Cosmetic changes for specifying conditions in breakpoints.
Add the 'if' word to the dialogs.
Parse the breakpoints table more effieciently.
2023-11-24 13:11:49 -06:00

21 lines
609 B
C++

#include <iostream>
#include <string>
int main (int argc, char* argv[]) {
std::string name = "";
name = "ernie";
// Create the breakpoint with a string condition.
//
// -break-insert -c 'name.c_str() == "ernie"' gdbmi_condition.cpp:16 // Failed parsing.
// -break-insert -c '$_streq(name.c_str(), "ernie")' gdbmi_condition.cpp:16 // Failed parsing.
// -break-insert -c 'strcmp("xxxxx", name.c_str() == 0' gdbmi_condition.cpp:16 // Is accepted but breaks eventhough strings are different.
std::cout << "Name is: " << name << std::endl;
return 0;
}