5.2/sim/ppc/hw_com.c

"[email protected]" <[email protected]>
Newsgroups gmane.comp.gdb.bugs.general
Message-ID <[email protected]>
By inspection, this seems to be a bug in gdb-5.2/sim/ppc/hw_com.c.
I have not tested it.  The section of code is setting up output.file
but the test for bad open is for input.file.

Matt



diff -c hw_com.c-orig hw_com.c
*** hw_com.c-orig Sun Oct  6 09:26:22 2002
--- hw_com.c  Sun Oct  6 09:26:31 2002
***************
*** 249,255 ****
    if (device_find_property(me, "output-file") != NULL) {
      const char *output_file = device_find_string_property(me,
      "output-file");
      com->output.file = fopen(output_file, "w");
!     if (com->input.file == NULL)
        device_error(me, "Problem opening output file %s\n",
        output_file);
      if (device_find_property(me, "output-buffering") != NULL) {
        const char *buffering = device_find_string_property(me,
        "output-buffering");
--- 249,255 ----
    if (device_find_property(me, "output-file") != NULL) {
      const char *output_file = device_find_string_property(me,
      "output-file");
      com->output.file = fopen(output_file, "w");
!     if (com->output.file == NULL)
        device_error(me, "Problem opening output file %s\n",
        output_file);
      if (device_find_property(me, "output-buffering") != NULL) {
        const char *buffering = device_find_string_property(me,
        "output-buffering");
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.