Title: [9845] trunk/drivers/misc/kgdbts.c: kgdbts: use new ptrace api for updating the instruction pointer as mainline doesnt like the current style
Revision
9845
Author
vapier
Date
2011-04-14 21:16:13 -0400 (Thu, 14 Apr 2011)

Log Message

kgdbts: use new ptrace api for updating the instruction pointer as mainline doesnt like the current style

Modified Paths

Diff

Modified: trunk/drivers/misc/kgdbts.c (9844 => 9845)


--- trunk/drivers/misc/kgdbts.c	2011-04-15 01:13:44 UTC (rev 9844)
+++ trunk/drivers/misc/kgdbts.c	2011-04-15 01:16:13 UTC (rev 9845)
@@ -285,25 +285,26 @@
 static int check_and_rewind_pc(char *put_str, char *arg)
 {
 	unsigned long addr = lookup_addr(arg);
+	unsigned long ip;
 	int offset = 0;
 
 	kgdb_hex2mem(&put_str[1], (char *)kgdbts_gdb_regs,
 		 NUMREGBYTES);
 	gdb_regs_to_pt_regs(kgdbts_gdb_regs, &kgdbts_regs);
-	v2printk("Stopped at IP: %lx\n", instruction_pointer(&kgdbts_regs));
+	ip = instruction_pointer(&kgdbts_regs);
+	v2printk("Stopped at IP: %lx\n", ip);
 #ifdef GDB_ADJUSTS_BREAK_OFFSET
 	/* On some arches, a breakpoint stop requires it to be decremented */
-	if (addr + BREAK_INSTR_SIZE == instruction_pointer(&kgdbts_regs))
+	if (addr + BREAK_INSTR_SIZE == ip)
 		offset = -BREAK_INSTR_SIZE;
 #endif
-	if (strcmp(arg, "silent") &&
-		instruction_pointer(&kgdbts_regs) + offset != addr) {
+	if (strcmp(arg, "silent") && ip + offset != addr) {
 		eprintk("kgdbts: BP mismatch %lx expected %lx\n",
-			   instruction_pointer(&kgdbts_regs) + offset, addr);
+			   ip + offset, addr);
 		return 1;
 	}
 	/* Readjust the instruction pointer if needed */
-	instruction_pointer(&kgdbts_regs) += offset;
+	instruction_pointer_set(&kgdbts_regs, ip + offset);
 	return 0;
 }
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to