gdb is broken

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Fri, 13 Apr 2007 11:35:25 -0700
It appears that someone has broken gdb in -current.

laptop:kargl[250] cat > hello.c
#include <stdio.h>
int main(void) {
  printf("Hello world!\n");
  return 0;
}
laptop:kargl[251] cc -o z -g hello.c 
laptop:kargl[252] ./z
Hello world!
laptop:kargl[253] gdb z
(gdb) run
Starting program: /usr/home/kargl/tmp/z 
Terminated

gdb appears to spwan the csh comamnd below and then just spins.

last pid:   871;  load averages:  1.10,  0.63,  0.33    up 0+00:12:51  11:20:59
41 processes:  2 running, 37 sleeping, 1 stopped, 1 zombie
CPU states: 27.3% user,  0.0% nice, 71.9% system,  0.8% interrupt,  0.0% idle
Mem: 27M Active, 44M Inact, 70M Wired, 2372K Cache, 60M Buf, 350M Free
Swap: 1008M Total, 1008M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
  863 kargl         1 112    0  5784K  3980K RUN      0:50 67.77% gdb
  864 kargl         1 103    0  3236K  1832K STOP     0:23 31.49% csh
  871 kargl         1  44    0  3484K  1688K RUN      0:00  0.10% top

A ktrace of gdb shows
 
       "Starting program: /usr/home/kargl/tmp/z 
       "
   904 gdb      RET   write 41/0x29
   904 gdb      CALL  vfork
   904 gdb      RET   vfork 905/0x389
   904 gdb      CALL  wait4(0xffffffff,0xbfbfdee8,<invalid>0,0)
   904 gdb      RET   wait4 905/0x389
   904 gdb      CALL  kill(0x389,SIG 0)
   904 gdb      RET   kill 0
   904 gdb      CALL  ptrace(PT_GETREGS,0x389,0xbfbfdca0,0)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  ptrace(PT_GETDBREGS,0x389,0xbfbfddb0,0)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  fcntl(0,F_GETFL,0)
   904 gdb      RET   fcntl 2
   904 gdb      CALL  ioctl(0,TIOCGETA,0x284af730)
   904 gdb      RET   ioctl 0
   904 gdb      CALL  ioctl(0,TIOCGPGRP,0xbfbfdf80)
   904 gdb      RET   ioctl 0
   904 gdb      CALL  ioctl(0,TIOCGETA,0x284af760)
   904 gdb      RET   ioctl 0
   904 gdb      CALL  fcntl(0,F_SETFL,O_RDONLY)
   904 gdb      RET   fcntl 0
   904 gdb      CALL  fcntl(0,F_SETFL,O_RDONLY)
   904 gdb      RET   fcntl 0
   904 gdb      CALL  ioctl(0,TIOCSETA,0x284af760)
   904 gdb      RET   ioctl 0
   904 gdb      CALL  ioctl(0,TIOCSPGRP,0xbfbfdfb0)
   904 gdb      RET   ioctl 0
   904 gdb      CALL  ptrace(PT_CONTINUE,0x389,0x1,0)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  wait4(0xffffffff,0xbfbfdee8,<invalid>0,0)
   904 gdb      RET   wait4 905/0x389
   904 gdb      CALL  kill(0x389,SIG 0)
   904 gdb      RET   kill 0
   904 gdb      CALL  ptrace(PT_GETREGS,0x389,0xbfbfdca0,0)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  ptrace(PT_GETDBREGS,0x389,0xbfbfddb0,0)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  ptrace(PT_CONTINUE,0x389,0x1,0x14)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  wait4(0xffffffff,0xbfbfdee8,<invalid>0,0)
   904 gdb      RET   wait4 905/0x389
   904 gdb      CALL  kill(0x389,SIG 0)
   904 gdb      RET   kill 0
   904 gdb      CALL  ptrace(PT_GETREGS,0x389,0xbfbfdca0,0)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  ptrace(PT_GETDBREGS,0x389,0xbfbfddb0,0)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  ptrace(PT_CONTINUE,0x389,0x1,0x14)
   904 gdb      RET   ptrace 0
   904 gdb      CALL  wait4(0xffffffff,0xbfbfdee8,<invalid>0,0)
   904 gdb      RET   wait4 905/0x389
   904 gdb      CALL  kill(0x389,SIG 0)
   904 gdb      RET   kill 0

The last ten lines are now endlessly repeated.

-- 
Steve
Received on Fri Apr 13 2007 - 16:34:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:08 UTC