diff options
author | Tom Tromey <tromey@adacore.com> | 2019-06-03 08:07:29 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-06-10 07:55:18 -0600 |
commit | 422186a95cbb02ee1d34388adceeb4bd289074b9 (patch) | |
tree | 620dadf72a61c8e7ad41854048f23e8771012382 /gdb/gdbserver | |
parent | 58e07198f34c3a8bb7d64392e8b978a0d741244e (diff) | |
download | gdb-422186a95cbb02ee1d34388adceeb4bd289074b9.zip gdb-422186a95cbb02ee1d34388adceeb4bd289074b9.tar.gz gdb-422186a95cbb02ee1d34388adceeb4bd289074b9.tar.bz2 |
Remove newlines from warnings
ARI pointed out that a recent patch introduced a call to "warning"
with a string that ended in a newline:
https://sourceware.org/ml/gdb-patches/2019-06/msg00000.html
This is generally forbidden, I believe, because warning adds its own
newline.
This patch removes all of the trailing newlines I was able to find. I
searched for 'warning (.*\\n"' and then fixed the ones where the
newline appeared at the end of the string (some had internal
newlines).
Tested on x86-64 Fedora 29.
gdb/ChangeLog
2019-06-10 Tom Tromey <tromey@adacore.com>
* m32c-tdep.c (m32c_m16c_address_to_pointer): Don't end warning
with a newline.
* guile/guile.c (handle_boot_error): Don't end warning with a
newline.
* cli/cli-cmds.c (exit_status_set_internal_vars): Don't end
warning with a newline.
* s12z-tdep.c (s12z_skip_prologue): Don't end warning with a
newline.
(s12z_frame_cache): Likewise.
* dwarf-index-cache.c (index_cache::store): Don't end warning with
a newline.
* solib-svr4.c (disable_probes_interface): Don't end warning with
a newline.
* nat/fork-inferior.c (fork_inferior): Don't end warning with a
newline.
* python/python.c (do_finish_initialization): Don't end warning
with a newline.
gdb/gdbserver/ChangeLog
2019-06-10 Tom Tromey <tromey@adacore.com>
* remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
end warning with a newline.
* linux-s390-low.c (s390_get_wordsize): Don't end warning with a
newline.
* thread-db.c (attach_thread): Don't end warning with a newline.
(thread_db_notice_clone): Likewise.
* tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
newline.
* linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
end warning with a newline.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/gdbserver/linux-s390-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-x86-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 6 | ||||
-rw-r--r-- | gdb/gdbserver/thread-db.c | 4 | ||||
-rw-r--r-- | gdb/gdbserver/tracepoint.c | 4 |
6 files changed, 22 insertions, 9 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index bc554bd..7a78956 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,16 @@ +2019-06-10 Tom Tromey <tromey@adacore.com> + + * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't + end warning with a newline. + * linux-s390-low.c (s390_get_wordsize): Don't end warning with a + newline. + * thread-db.c (attach_thread): Don't end warning with a newline. + (thread_db_notice_clone): Likewise. + * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a + newline. + * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't + end warning with a newline. + 2019-06-04 Pedro Alves <palves@redhat.com> * server.c (captured_main): Use make_unique_xstrdup. diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c index f65a1ec..b23e3b1 100644 --- a/gdb/gdbserver/linux-s390-low.c +++ b/gdb/gdbserver/linux-s390-low.c @@ -479,7 +479,7 @@ s390_get_wordsize (int pid) (PTRACE_TYPE_ARG4) 0); if (errno != 0) { - warning (_("Couldn't determine word size, assuming 64-bit.\n")); + warning (_("Couldn't determine word size, assuming 64-bit.")); return 8; } /* Derive word size from extended addressing mode (PSW bit 31). */ diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index adddfe7..e84e7a1 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -1481,7 +1481,7 @@ x86_get_min_fast_tracepoint_insn_len (void) mention that something has gone awry. */ if (!warned_about_fast_tracepoints) { - warning ("4-byte fast tracepoints not available; %s\n", errbuf); + warning ("4-byte fast tracepoints not available; %s", errbuf); warned_about_fast_tracepoints = 1; } return 5; diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 1d27ea3..7c495be 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -1558,7 +1558,7 @@ look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb) if (!startswith (cs.own_buf, "qSymbol:")) { - warning ("Malformed response to qSymbol, ignoring: %s\n", cs.own_buf); + warning ("Malformed response to qSymbol, ignoring: %s", cs.own_buf); return -1; } @@ -1659,14 +1659,14 @@ relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc) if (cs.own_buf[0] == 'E') { - warning ("An error occurred while relocating an instruction: %s\n", + warning ("An error occurred while relocating an instruction: %s", cs.own_buf); return -1; } if (!startswith (cs.own_buf, "qRelocInsn:")) { - warning ("Malformed response to qRelocInsn, ignoring: %s\n", + warning ("Malformed response to qRelocInsn, ignoring: %s", cs.own_buf); return -1; } diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index d4d4958..387f22f 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -227,7 +227,7 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p) { std::string reason = linux_ptrace_attach_fail_reason_string (ptid, err); - warning ("Could not attach to thread %ld (LWP %d): %s\n", + warning ("Could not attach to thread %ld (LWP %d): %s", (unsigned long) ti_p->ti_tid, ti_p->ti_lid, reason.c_str ()); return 0; @@ -907,5 +907,5 @@ thread_db_notice_clone (struct thread_info *parent_thr, ptid_t child_ptid) = make_scoped_restore (¤t_thread, parent_thr); if (!find_one_thread (child_ptid)) - warning ("Cannot find thread after clone.\n"); + warning ("Cannot find thread after clone."); } diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 9577ab7..98d28e9 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -7194,7 +7194,7 @@ gdb_agent_helper_thread (void *arg) if (listen_fd == -1) { - warning ("could not create sync socket\n"); + warning ("could not create sync socket"); break; } @@ -7218,7 +7218,7 @@ gdb_agent_helper_thread (void *arg) if (fd < 0) { - warning ("Accept returned %d, error: %s\n", + warning ("Accept returned %d, error: %s", fd, strerror (errno)); break; } |