aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-04-24 01:45:47 +0000
committerFred Fish <fnf@specifix.com>1992-04-24 01:45:47 +0000
commitc8094777b6651ee38c6093995c2a676a5ceda3fa (patch)
treef5abc7d9fd0ea4e55cb4b365ce5cd28a15b4fcd6 /gdb
parent55c0061edd2ad838f407b926fb1ce375b3cf208a (diff)
downloadgdb-c8094777b6651ee38c6093995c2a676a5ceda3fa.zip
gdb-c8094777b6651ee38c6093995c2a676a5ceda3fa.tar.gz
gdb-c8094777b6651ee38c6093995c2a676a5ceda3fa.tar.bz2
Call warning() to print warnings, which deals properly with leading and
trailing newlines, as well as presenting a consistent prefix for warnings (IE "warning: ").
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/core.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 734630f..57796e2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+Thu Apr 23 18:43:17 1992 Fred Fish (fnf@cygnus.com)
+
+ * core.c (core_open): Call warning() to print warnings.
+
Wed Apr 22 09:55:42 1992 Stu Grossman (grossman at cygnus.com)
* symtab.c (lookup_symbol): Need to check if msymbol->name is
diff --git a/gdb/core.c b/gdb/core.c
index 4ae4933..3c1e4bb 100644
--- a/gdb/core.c
+++ b/gdb/core.c
@@ -189,9 +189,9 @@ core_open (filename, from_tty)
select_frame (get_current_frame (), 0);
print_stack_frame (selected_frame, selected_frame_level, 1);
} else {
- printf (
-"Warning: you won't be able to access this core file until you terminate\n\
-your %s; do ``info files''\n", current_target->to_longname);
+ warning (
+"you won't be able to access this core file until you terminate\n\
+your %s; do ``info files''", current_target->to_longname);
}
}
@@ -263,9 +263,9 @@ validate_files ()
if (exec_bfd && core_bfd)
{
if (!core_file_matches_executable_p (core_bfd, exec_bfd))
- printf ("Warning: core file may not match specified executable file.\n");
+ warning ("core file may not match specified executable file.");
else if (bfd_get_mtime(exec_bfd) > bfd_get_mtime(core_bfd))
- printf ("Warning: exec file is newer than core file.\n");
+ warning ("exec file is newer than core file.");
}
}