This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] cleanup: Wunused corefile.c
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sat, 02 Feb 2013 22:05:23 -0200
- Subject: Re: [patch] cleanup: Wunused corefile.c
- References: <510AC74E.1010709@qnx.com> <87vcad5cf1.fsf@fleche.redhat.com> <510AD43E.3040405@qnx.com> <87boc34z0o.fsf@fleche.redhat.com> <510C3418.4040802@qnx.com> <510C3998.5050309@qnx.com>
On Friday, February 01 2013, Aleksandar Ristovski wrote:
> Index: gdb/corefile.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/corefile.c,v
> retrieving revision 1.71
> diff -u -p -r1.71 corefile.c
> --- gdb/corefile.c 14 Jan 2013 21:03:54 -0000 1.71
> +++ gdb/corefile.c 1 Feb 2013 21:48:42 -0000
> @@ -149,7 +149,11 @@ reopen_exec_file (void)
> cleanups = make_cleanup (xfree, filename);
> res = stat (filename, &st);
>
> - if (exec_bfd_mtime && exec_bfd_mtime != st.st_mtime)
> + if (res != 0 && info_verbose)
> + warning (_("File %s could not be stat-ed (%s)\n"), filename,
> + strerror (errno));
Thanks for that. GDB uses `safe_strerror' instead of `strerror'.
--
Sergio