diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2017-09-22 17:00:33 -0300 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2017-09-22 17:00:33 -0300 |
commit | 9e0703de64a6dd4deae2ebd569955f14337f2710 (patch) | |
tree | cec45139f1febef6441deabae142c3fb3f2c61f3 /gdb/cli/cli-setshow.c | |
parent | 13b9f79a1904081d984a64037af6457c1e3ff7b6 (diff) | |
parent | 43573013c9836f2b91b74b9b29dac35fdb41e06b (diff) | |
download | gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.zip gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.gz gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.bz2 |
Merge remote-tracking branch 'remotes/master' into users/aoliva/SFN
Updated local changes to binutils/testsuite/binutils-all/readelf.exp
to match the unresolved (failed to assemble) messages introduced by
Alan Modra.
Diffstat (limited to 'gdb/cli/cli-setshow.c')
-rw-r--r-- | gdb/cli/cli-setshow.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index fb0bd49..f89d268 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -134,7 +134,7 @@ is_unlimited_literal (const char *arg) { size_t len = sizeof ("unlimited") - 1; - arg = skip_spaces_const (arg); + arg = skip_spaces (arg); return (strncmp (arg, "unlimited", len) == 0 && (isspace (arg[len]) || arg[len] == '\0')); @@ -367,24 +367,16 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) message. */ if (arg == NULL) { - char *msg; - int msg_len = 0; - - for (i = 0; c->enums[i]; i++) - msg_len += strlen (c->enums[i]) + 2; - - msg = (char *) xmalloc (msg_len); - *msg = '\0'; - make_cleanup (xfree, msg); + std::string msg; for (i = 0; c->enums[i]; i++) { if (i != 0) - strcat (msg, ", "); - strcat (msg, c->enums[i]); + msg += ", "; + msg += c->enums[i]; } error (_("Requires an argument. Valid arguments are %s."), - msg); + msg.c_str ()); } p = strchr (arg, ' '); |