(amd64obsd_trapframe_sniffer): Add comment.
* i386obsd-tdep.c (i386obsd_trapframe_cache): Fix typos.
(i386obsd_trapframe_sniffer): Add comment.
2005-12-22 Mark Kettenis <kettenis@gnu.org>
+ * amd64obsd-tdep.c (amd64obsd_trapframe_cache): Fix typos.
+ (amd64obsd_trapframe_sniffer): Add comment.
+ * i386obsd-tdep.c (i386obsd_trapframe_cache): Fix typos.
+ (i386obsd_trapframe_sniffer): Add comment.
+
* amd64obsd-tdep.c (amd64obsd_trapframe_cache): Fix detection of
interrupts from user space.
+
* i386obsd-tdep.c (i386obsd_trapframe_cache): Handle interrupt
frames too.
(i386obsd_trapframe_sniffer): Turn into a proper unwinder sniffer.
sp = frame_unwind_register_unsigned (next_frame, AMD64_RSP_REGNUM);
find_pc_partial_function (func, &name, NULL, NULL);
- if (name && strncmp(name, "Xintr", 5) == 0)
+ if (name && strncmp (name, "Xintr", 5) == 0)
addr = sp + 8; /* It's an interrupt frame. */
else
addr = sp;
cs = read_memory_unsigned_integer (addr, 8);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
{
- /* Trap from use space; terminate backtrace. */
+ /* Trap from user space; terminate backtrace. */
trad_frame_set_id (cache, null_frame_id);
}
else
ULONGEST cs;
char *name;
+ /* Check Current Privilige Level and bail out if we're not executing
+ in kernel space. */
cs = frame_unwind_register_unsigned (next_frame, AMD64_CS_REGNUM);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
return 0;
sp = frame_unwind_register_unsigned (next_frame, I386_ESP_REGNUM);
find_pc_partial_function (func, &name, NULL, NULL);
- if (name && strncmp(name, "Xintr", 5) == 0)
+ if (name && strncmp (name, "Xintr", 5) == 0)
addr = sp + 8; /* It's an interrupt frame. */
else
addr = sp;
cs = read_memory_unsigned_integer (addr, 4);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
{
- /* Trap from use space; terminate backtrace. */
+ /* Trap from user space; terminate backtrace. */
trad_frame_set_id (cache, null_frame_id);
}
else
ULONGEST cs;
char *name;
+ /* Check Current Privilige Level and bail out if we're not executing
+ in kernel space. */
cs = frame_unwind_register_unsigned (next_frame, I386_CS_REGNUM);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
- return NULL;
+ return 0;
find_pc_partial_function (frame_pc_unwind (next_frame), &name, NULL, NULL);
return (name && ((strcmp (name, "calltrap") == 0)