Re: [PATCH v9 3.2 2/9] uprobes: handle breakpoint and signal step exception.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Srikar,
> 
>   Can we use existing SET_IP() instead of set_instruction_pointer() ?
> 

Oleg had already commented about this in one his uprobes reviews.

The GET_IP/SET_IP available in include/asm-generic/ptrace.h doesnt work
on all archs. Atleast it doesnt work on powerpc when I tried it.

Also most archs define instruction_pointer(). So I thought (rather Peter
Zijlstra suggested the name set_instruction_pointer())
set_instruction_pointer was a better bet than SET_IP. I 

Also I dont see any usage for SET_IP/GET_IP.

May be we should have something like this in
include/asm-generic/ptrace.h

#ifdef instruction_pointer
#define GET_IP(regs)		(instruction_pointer(regs))

#define set_instruction_pointer(regs, val) (instruction_pointer(regs) = (val))

#define SET_IP(regs, val)	(set_instruction_pointer(regs,val))

#endif

or should we do away with GET_IP/SET_IP esp since there are no many
users?

-- 
Thanks and Regards
Srikar

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]