Skip to contentSkip to conversation

smokey/gdb: search gdb in PATH

PATCH Applied Norbert Lange 2 participants 2 messages Oct 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smokey/gdb: search gdb in PATH

---
 testsuite/smokey/gdb/gdb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
testsuite/smokey/gdb/gdb.c +2 -2
index 33c16fe87..4f39f3f6c 100644
@@ -280,8 +280,8 @@ static int run_gdb(struct smokey_test *t, int argc, char *const argv[])
 
 			snprintf(run_param, sizeof(run_param), "--run=%d",
 				 t->__reserved.id);
-			execl("/usr/bin/gdb", "gdb", "--args",
-			      argv[0], run_param, "run_target", NULL);
+			execlp("gdb", "gdb", "--args",
+			      argv[0], run_param, "run_target", (char *)NULL);
 			_exit(ESRCH);
 
 		default:
Signature · 1 line
2.23.0
Applied
#1 lore raw
Quoted 11 lines · Norbert Lange via Xenomai
---
  testsuite/smokey/gdb/gdb.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
testsuite/smokey/gdb/gdb.c +0 -0
index 33c16fe87..4f39f3f6c 100644

testsuite/smokey/gdb/gdb.c static int run_gdb(struct smokey_test *t, int argc, char *const argv[]) · line 287

Quoted 10 lines
testsuite/smokey/gdb/gdb.c +2 -2
@@ -280,8 +280,8 @@ static int run_gdb(struct smokey_test *t, int argc, char *const argv[])
 
  			snprintf(run_param, sizeof(run_param), "--run=%d",
  				 t->__reserved.id);
-			execl("/usr/bin/gdb", "gdb", "--args",
-			      argv[0], run_param, "run_target", NULL);
+			execlp("gdb", "gdb", "--args",
+			      argv[0], run_param, "run_target", (char *)NULL);
  			_exit(ESRCH);
 
  		default:

Thanks, applied.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux