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

gdb: setgid() causes SIGTRAP



This is a "followup" to my mail from 1999-11-24: 2.6 snapshot gdb unstable?
Here is a simple program which causes the problem:

#include <stdio.h>
main(int argc, char *argv[])
{
  int r;
  gid_t i;

  i = getgid();
  r = setgid(i);
  exit(r);
}

To reproduce(?) the problem:
$ cc -g t.c
$ gdb ./a.out
(gdb) break main
Breakpoint 1 at 0x17a3: file t.c, line 8.
(gdb) run
Starting program: /tmp/./a.out 

Breakpoint 1, main (argc=1, argv=0xdfbfda10) at t.c:8
8         i = getgid();
(gdb) n
9         r = setgid(i);
(gdb) n

Program received signal SIGTRAP, Trace/breakpoint trap.


Is this only my problem? If so, what should I check?
TIA!

PS: the (i386) machine is running 2.6 (snapshot 1999-11-29).