bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `print' does not print


From: Ralf Fassel
Subject: Re: `print' does not print
Date: Fri, 22 Mar 2002 23:18:44 +0100

* Eli Zaretskii
| Hmmm... what about the stdout FILE object--can you look at its
| members and see if something's wrong with it at that point?

gcc:
    Breakpoint 3, printchar (ch=10, fun=273132596) at print.c:333
    333           fwrite (str, 1, len, stdout);
    (gdb) p __iob[1]
    $1 = {
      _cnt = 0, 
      _ptr = 0x0, 
      _base = 0x0, 
      _flag = 2 '\002', 
      _o_file = 1 '\001', 
      _file = 1
    }
    (gdb) next
    334           noninteractive_need_newline = 1;
    (gdb) p __iob[1]
    $2 = {
      _cnt = 0, 
      _ptr = 0x0, 
      _base = 0x0, 
      _flag = 2 '\002', 
      _o_file = 1 '\001', 
      _file = 1
    }
unchanged.


cc:
    Breakpoint 4, printchar (ch=10, fun=272911412) at print.c:333
    333           fwrite (str, 1, len, stdout);
    (gdb) p __iob[1]
    $6 = {
      _cnt = 0, 
      _ptr = 0x0, 
      _base = 0x0, 
      _flag = 2 '\002', 
      _o_file = 1 '\001', 
      _file = 1
    }
    (gdb) next
    334           noninteractive_need_newline = 1;
    (gdb) p __iob[1]
    $7 = {
      _cnt = 0, 
      _ptr = 0x10389f20 "\n", 
      _base = 0x10389f20 "\n", 
      _flag = 66 'B', 
      _o_file = 1 '\001', 
      _file = 1
    }
filled.


So there _is_ a difference: cc fills the struct, gcc doesn't.

Here is what happens if I `step' into fwrite:
I see with
gcc:

    fwrite () at engine.c:601
    _wrtchk () at exportent.c:396
!   setoserror () at aio.c:314
    _wrtchk () at exportent.c:383
    383 exportent.c: No such file or directory.
    fwrite () at engine.c:554
    printchar (ch=34, fun=273132596) at print.c:334

==========================================================
cc:
    fwrite () at engine.c:601
    _wrtchk () at exportent.c:396
!   _findbuf () at aio.c:397
    ctlslave () at aio.c:549
    isatty () at aio.c:200
    ioctl () at mpconf.c:160
    Program received signal SIGTRAP, Trace/breakpoint trap.

and I always get that SIGTRAP which restarts the fwrite again, but the
difference at ! is obvious.

BTW, the bootstrap-emacs in the CVS tree shows the same symptoms as
21.2, no printing.  gmake has not yet finished completely (compiling
.elc files currently), but I don't expect it to behave differently in
the end :-(

Bedtime now.
R'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]