From 7788b822f57f6d44e0a8127627ec4c77458d143d Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 30 Jan 2023 14:51:09 -0500 Subject: [PATCH] skip the '/' --- scripts/jlibtool.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index 16f9f7d43b7..3efc8d81916 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -2754,7 +2754,11 @@ static int run_mode(command_t *cmd) * attached. */ q = strrchr(cmd->arglist->vals[0], '/'); - if (!q) q = cmd->arglist->vals[0]; + if (q) { + q++; + } else { + q = cmd->arglist->vals[0]; + } if ((strcmp(q, "gdb") == 0) || (strcmp(q, "lldb") == 0)) { setenv("DEBUGGER_ATTACHED", "yes", 1); -- 2.47.3