Re: debugging xterm.

Adam (adam@cfar.umd.edu)
Wed, 23 May 2001 12:09:36 -0400 (EDT)


> > gdb seems to get lost when calling getuid), any idea?
> >Is there something special about getuid() I'm missing?
> >
> >(gdb) next
> >1612 uid_t ruid = getuid();
> >2: screen->respond = 1448543468
> >(gdb) next
> >1613 gid_t rgid = getgid();
> >2: screen->respond = Cannot access memory at address 0x4

> This has nothing to do with the Linux kernel whatsoever. Please
> send your request to xpert@xfree86.org for help.

It is easy to flame people.

In this particular case you really couldn't tell. It COULD have been
kernel, it could have been GDB, or it could have been GCC. Kernel was as
good guess as any other. (it is unlikely though it could have been X).

In this particular case it turns out it was either gdb or gcc. Since while
man page says you can use "-g" and "-O2" together, in practice I had to
remove the "-O2" in order to unconfuse gdb in the above example.

This or other way, when I got past this problem, I finally managed to fix
the decade old bug in XTERM which I was hunting after. For those curious
patch is at http://www.eax.com/patches/xterm2.diff

-- 
Adam
http://www.eax.com	The Supreme Headquarters of the 32 bit registers

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/