Re:

From: Timur Tabi (ttabi@interactivesi.com)
Date: Mon Oct 15 2001 - 11:02:58 EST


David Ford wrote:

> That should throw a segmentation fault, in the kernel an OOPS, in this
> statement the code is trying to dereference a NULL pointer and store a
> value at 0x0.

I much smarter way to do this would be to use this code:

static inline void int3(void) { __asm__ __volatile__ (".byte 0xCC\n"); };

Granted, it's x86-specific, but it works better, since gdb will halt the code
right at that spot rather than inside some trap hander. And it's just more
elegant.

-
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/



This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:58 EST