aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64obsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2005-12-22 15:57:04 +0000
committerMark Kettenis <kettenis@gnu.org>2005-12-22 15:57:04 +0000
commit6d566cffb02d92dfe6e8b3387d8bd8b4cf9e2abe (patch)
tree4a93693c53e5242a09ab051866b2cde94dcc27ab /gdb/amd64obsd-tdep.c
parent1f6293bd04bdb069ce8784abeaa7652e782cf49e (diff)
downloadgdb-6d566cffb02d92dfe6e8b3387d8bd8b4cf9e2abe.zip
gdb-6d566cffb02d92dfe6e8b3387d8bd8b4cf9e2abe.tar.gz
gdb-6d566cffb02d92dfe6e8b3387d8bd8b4cf9e2abe.tar.bz2
* 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.
Diffstat (limited to 'gdb/amd64obsd-tdep.c')
-rw-r--r--gdb/amd64obsd-tdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c
index a0611c0..17c7219 100644
--- a/gdb/amd64obsd-tdep.c
+++ b/gdb/amd64obsd-tdep.c
@@ -360,7 +360,7 @@ amd64obsd_trapframe_cache(struct frame_info *next_frame, void **this_cache)
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;
@@ -374,7 +374,7 @@ amd64obsd_trapframe_cache(struct frame_info *next_frame, void **this_cache)
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
@@ -418,6 +418,8 @@ amd64obsd_trapframe_sniffer (const struct frame_unwind *self,
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;