[5/5] Fix styling in a few messages
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
fail
|
Test failed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
fail
|
Test failed
|
Commit Message
While working on fixing the `...' quoting, I stumbled across a few
spots that should use CLI styling but currently do not. This patch
fixes the ones I found.
---
gdb/ada-lang.c | 3 ++-
gdb/windows-nat.c | 3 ++-
gdb/xml-syscall.c | 8 ++++++--
3 files changed, 10 insertions(+), 4 deletions(-)
@@ -7888,7 +7888,8 @@ ada_template_to_fixed_record_type_1 (struct type *type,
warning (_("Invalid type size for \"%s\" detected: %s."),
rtype->name (), pulongest (type->length ()));
else
- warning (_("Invalid type size for <unnamed> detected: %s."),
+ warning (_("Invalid type size for %ps detected: %s."),
+ styled_string (metadata_style.style (), "<unnamed>"),
pulongest (type->length ()));
}
else
@@ -2867,7 +2867,8 @@ windows_nat_target::create_inferior (const char *exec_file,
ensure_only_one_process ();
if (!exec_file)
- error (_("No executable specified, use \"target exec\"."));
+ error (_("No executable specified, use \"%ps\"."),
+ styled_string (command_style.style (), "target exec"));
const char *inferior_cwd = current_inferior ()->cwd ().c_str ();
std::string expanded_infcwd;
@@ -22,6 +22,7 @@
#include "xml-support.h"
#include "xml-syscall.h"
#include "gdbarch.h"
+#include "cli/cli-style.h"
/* For the struct syscall definition. */
#include "target.h"
@@ -363,8 +364,11 @@ init_syscalls_info (struct gdbarch *gdbarch)
if (syscalls_info->syscalls.empty ())
{
if (xml_syscall_file != NULL)
- warning (_("Could not load the syscall XML file \"%s/%s\"."),
- gdb_datadir.c_str (), xml_syscall_file);
+ warning (_("Could not load the syscall XML file \"%p[%s/%s%p]\"."),
+ file_name_style.style ().ptr (),
+ gdb_datadir.c_str (),
+ xml_syscall_file,
+ nullptr);
else
warning (_("There is no XML file to open."));