mirror of
https://github.com/lindbergh-loader/lindbergh-loader.git
synced 2026-10-05 05:08:17 +03:00
Add gdb mode to lindbergh util
This commit is contained in:
@@ -73,6 +73,7 @@ void printUsage(char *argv[])
|
||||
printf("%s [GAME_PATH] [OPTIONS]\n", argv[0]);
|
||||
printf("Options:\n");
|
||||
printf(" --test | -t Runs the test mode\n");
|
||||
printf(" --gdb Runs with GDB\n");
|
||||
printf(" --help Displays this usage text\n");
|
||||
}
|
||||
|
||||
@@ -133,13 +134,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
closedir(dir);
|
||||
|
||||
if (argc > 1)
|
||||
if (argc > 1 && strcmp(argv[1], "--help") == 0)
|
||||
{
|
||||
if (strcmp(argv[1], "--help") == 0)
|
||||
{
|
||||
printUsage(argv);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
printUsage(argv);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if (!lindberghSharedObjectFound)
|
||||
@@ -159,12 +157,20 @@ int main(int argc, char *argv[])
|
||||
strcpy(command, "./");
|
||||
strcat(command, game);
|
||||
|
||||
if (argc > 1)
|
||||
for (int i = 1; i < argc; i++)
|
||||
{
|
||||
if (strcmp(argv[1], "-t") == 0 || strcmp(argv[1], "--test") == 0)
|
||||
if (strcmp(argv[i], "-t") == 0 || strcmp(argv[i], "--test") == 0)
|
||||
{
|
||||
testModePath(command);
|
||||
}
|
||||
|
||||
if (strcmp(argv[i], "--gdb") == 0)
|
||||
{
|
||||
char temp[128];
|
||||
strcpy(temp, "gdb ");
|
||||
strcat(temp, command);
|
||||
strcpy(command, temp);
|
||||
}
|
||||
}
|
||||
|
||||
printf("$ %s\n", command);
|
||||
|
||||
Reference in New Issue
Block a user