Sponsored Content
Full Discussion: ptrace-get register values
Top Forums Programming ptrace-get register values Post 302412472 by tristartom on Monday 12th of April 2010 04:27:06 PM
Old 04-12-2010
thanks for the advices. It works now... I copy the code from other places, multiplication of 4 may due to that EBX may not be accordance to byte address.
 

7 More Discussions You Might Find Interesting

1. Programming

[FreeBSD] ptrace( ) - Device busy

Hello, I'm trying to obtain process memory contents using ptrace( ) on FreeBSD 4.7. I know this is neither portable nor clean, yet I'd really like to get it to work... I read the manual help page and did a google search, but couldn't find anything helpful. First, the code I'm using to read an... (5 Replies)
Discussion started by: Driver
5 Replies

2. Programming

Tracing self process using ptrace()

Kindly correct me if any of the foll is wrong: I want to trace the current process from the C program itself which I think can be done using ptrace(PTRACE_ATTACH,getpid(),0,0); I would like to get control back after a segmentation fault, or arithmetric exception (i.e. all signals that end... (1 Reply)
Discussion started by: vpraveen84
1 Replies

3. Programming

ptrace-GETREGS

hello everybody!! I want to post a question!I am confused about the explanation of ptrace command. long ins; ins=ptrace(PTRACE_GETREGS,pid,NULL,&regs); with this command i am able to read, for instance, regs.eip context or get regs.eip address? And if i write the commad... (2 Replies)
Discussion started by: nicos
2 Replies

4. Programming

regarding ptrace equivalent in solairs

hi,'m using the 5.11 kernel version on amd64 architecture, 32-bit. i need help on the following issues 1)a proper structure to represent the register structure in the architecture 2)a function which would change the register values of the child when the control is with the parent.. ptrace_setregs... (0 Replies)
Discussion started by: sayaproj
0 Replies

5. Solaris

System call trapping using ptrace.

Hello experts, I am trying to trap system calls using ptrace available on Salaris. How to get the system call number which I am going to trap. In Linux I have done like below: ptrace(PTRACE_PEEKUSER, pid, 4 * ORIG_EAX, NULL); where PTRACE_PEEKUSER : is the request, this specifies the... (1 Reply)
Discussion started by: Patel
1 Replies

6. UNIX for Advanced & Expert Users

gdb and ptrace ????

Hi all What 's the relationship between gdb and ptrace, if the kernel does not support ptrace, can gdb work ? Is there some one can explain this for me (3 Replies)
Discussion started by: yanglei_fage
3 Replies

7. Solaris

<sys/ptrace.h> missing in Solaris 10

Does anyone know why this system include is not there. What can I install to get this and why is it missing? (4 Replies)
Discussion started by: steve701
4 Replies
STORE(9)						   BSD Kernel Developer's Manual						  STORE(9)

NAME
store, subyte, suibyte, suiword, sulong, suulong, suword -- store data to user-space SYNOPSIS
#include <sys/types.h> #include <sys/time.h> #include <sys/systm.h> #include <sys/resourcevar.h> int subyte(user_addr_t addr, int byte); int suibyte(user_addr_t addr, int byte); int suiword(user_addr_t addr, int word); int sulong(user_addr_t addr, int64_t longword); int suulong(user_addr_t addr, uint64_t longword); int suword(user_addr_t addr, int word); DESCRIPTION
The store functions are designed to copy small amounts of data to user-space. The store routines provide the following functionality: subyte() Stores a byte of data to the user-space address addr. suibyte() Stores a byte of data to the user-space address addr. This function is safe to call during an interrupt context. suiword() Stores a word of data to the user-space address addr. This function is safe to call during an interrupt context. sulong() Stores a long word of data to the user-space address addr. suulong() Stores a unsigned long word of data to the user-space address addr. suword() Stores a word of data to the user-space address addr. RETURN VALUES
The store functions return 0 on success or -1 on failure. SEE ALSO
copy(9), fetch(9) BSD
December 16, 2004 BSD
All times are GMT -4. The time now is 04:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy