This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, Dec 7, 2012 at 5:56 PM, Pedro Alves <palves@redhat.com> wrote: > On 12/07/2012 08:01 AM, Hui Zhu wrote: >> +ui_file_fseek (struct ui_file * file, long offset, int whence) > > No space after '*'. Several instances of this issue in the patch. Fixed. > > On 12/07/2012 08:01 AM, Hui Zhu wrote: >> +static void >> +stdio_file_fseek (struct ui_file * file, long offset, int whence) >> +{ > ... >> + if (fseek (stdio->file, offset, whence)) >> + error (_("fseek fail: %s"), safe_strerror (errno)); > > I think that if we want to support error handling, then this should > return the fseek result to the caller instead of throwing an exception. > See e.g., the comment in stdio_file_write. > What about I change error to warning? Then it don't need some handle and something. And if really got some issue with this syscall, user can find issue with this warning? > -- > Pedro Alves > Post a new version. Thanks, Hui 2012-12-10 Hui Zhu <hui_zhu@mentor.com> * ui-file.c (ui_file): Add to_fseek. (ui_file_new): Call set_ui_file_fseek. (null_file_fseek, ui_file_fseek, set_ui_file_fseek, stdio_file_fseek): New functions. (stdio_file_new): Call set_ui_file_fseek. * ui-file.h (ui_file_fseek_ftype): New typedef. (set_ui_file_fseek, ui_file_fseek): New externs.
Attachment:
ui-file-fseek.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |