This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: Building GDB under GLIBC 2.8
- From: "Jim Blandy" <jimb at red-bean dot com>
- To: tromey at redhat dot com
- Cc: "Joel Brobecker" <brobecker at adacore dot com>, "Pedro Alves" <pedro at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Tue, 6 Jan 2009 10:32:33 -0800
- Subject: Re: RFA: Building GDB under GLIBC 2.8
- References: <8f2776cb0812121804n1008f921h3898bb7bda1581c9@mail.gmail.com> <200812152016.56353.pedro@codesourcery.com> <8f2776cb0812191645m56a7bd29ob563ea7d4e79724b@mail.gmail.com> <20081229055001.GK4216@adacore.com> <m3ljtyzgte.fsf@fleche.redhat.com>
I've committed these two patches, with the suggestion made by Joel.
2009-01-06 Jim Blandy <jimb@red-bean.com>
Check return values of functions declared with warn_unused_result
attribute in GLIBC 2.8.
* cli/cli-cmds.c (pwd_command): Check return value from getcwd.
* inflow.c (check_syscall): New function.
(new_tty): Use check_syscall to check return values from open and dup.
* linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
* main.c (captured_main): Call cwd after setting up gdb_stderr;
check for errors from getcwd.
* mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
* ui-file.c (stdio_file_write): Ignore return value from fwrite.
(stdio_file_fputs): Same.
* utils.c (internal_vproblem): abort if last-ditch error message
write fails.
* top.c (gdb_init): Don't set the current directory here; that's
already been done in captured_main.