aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-29 23:54:12 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-30 03:35:12 -0500
commit9950eccba15155dda9ef8025a5a1685dd9db53b7 (patch)
treef47ffb8c152b2768bce0582b945164306e1fbb07
parente1211e55062594679697d2175b7ea77dad173823 (diff)
downloadgdb-9950eccba15155dda9ef8025a5a1685dd9db53b7.zip
gdb-9950eccba15155dda9ef8025a5a1685dd9db53b7.tar.gz
gdb-9950eccba15155dda9ef8025a5a1685dd9db53b7.tar.bz2
sim: simplify STATE_MY_NAME setup
No point in writing basename ourselves when libiberty provides one.
-rw-r--r--sim/common/ChangeLog5
-rw-r--r--sim/common/sim-module.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index ae94846..58ffa6c 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-30 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-module.c (sim_pre_argv_init): Change STATE_MY_NAME assignment
+ to use lbasename.
+
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_NEW_COMMON_OBJS): Add sim-hload.o.
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index 3d49f57..33f5740 100644
--- a/sim/common/sim-module.c
+++ b/sim/common/sim-module.c
@@ -74,9 +74,7 @@ sim_pre_argv_init (SIM_DESC sd, const char *myname)
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
SIM_ASSERT (STATE_MODULES (sd) == NULL);
- STATE_MY_NAME (sd) = myname + strlen (myname);
- while (STATE_MY_NAME (sd) > myname && STATE_MY_NAME (sd)[-1] != '/')
- --STATE_MY_NAME (sd);
+ STATE_MY_NAME (sd) = lbasename (myname);
/* Set the cpu names to default values. */
{