We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac94ccd commit 8c8e714Copy full SHA for 8c8e714
lldb/test/API/tools/lldb-server/main.cpp
@@ -344,8 +344,10 @@ int main(int argc, char **argv) {
344
} else if (consume_front(arg, "process:sync:")) {
345
// this is only valid after fork
346
const char *filenames[] = {"parent", "child"};
347
- std::string my_file = arg + "." + filenames[is_child];
348
- std::string other_file = arg + "." + filenames[!is_child];
+ size_t pos = arg.find_last_of("/\\");
+ std::string file_name = arg.substr(pos + 1);
349
+ std::string my_file = file_name + "." + filenames[is_child];
350
+ std::string other_file = file_name + "." + filenames[!is_child];
351
352
// indicate that we're ready
353
FILE *f = fopen(my_file.c_str(), "w");
0 commit comments