[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gdb: setgid() causes SIGTRAP
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: gdb: setgid() causes SIGTRAP
- From: Claus Assmann <ca+OpenBSD_misc_(_at_)_zardoc_(_dot_)_endmail_(_dot_)_org>
- Date: Fri, 26 Nov 1999 16:14:23 -0800
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).
Visit your host, monkey.org