changing registers of the child process


 
Thread Tools Search this Thread
Operating Systems Solaris changing registers of the child process
# 1  
Old 03-12-2009
changing registers of the child process

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 is not supported in solaris , nor we could find ptrace.h library in solaris. Even a dtrace equivalent to this would be fine..
3)can we modify the register values using ptrace_peekuser? the offset in the uarea is required for it.. how to get that?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies

2. Emergency UNIX and Linux Support

signal between parent process and child process

Hello, everyone. Here's a program: pid_t pid = fork(); if (0 == pid) // child process { execvp ...; } I send a signal (such as SIGINT) to the parent process, the child process receive the signal as well as the parent process. However I don't want to child process to receive the... (7 Replies)
Discussion started by: jackliang
7 Replies

3. Shell Programming and Scripting

script to get child process for a process

!/bin/sh pid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $1}') sid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $3}') ps -s "$sid" I am not able to get the desired output it says process list error if i use watch ps -s "$sid" it considers only the first session id (5 Replies)
Discussion started by: schippada
5 Replies

4. Shell Programming and Scripting

[KSH/Bash] Starting a parent process from a child process?

Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know. More detail. ScriptA (bash), ScriptB (ksh), ScriptC (bash) ScriptA, launches ScriptB ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies

5. Shell Programming and Scripting

Child Process Name

Hi , I want to find out the child process name given its PID. I have used the ps command but it displays the parent process name against child PID. Is there any way to find out name of child program executing under any parent program? (1 Reply)
Discussion started by: sneha_heda
1 Replies

6. Shell Programming and Scripting

How to make the parent process to wait for the child process

Hi All, I have two ksh script. 1st script calls the 2nd script and the second script calls an 'C' program. I want 1st script to wait until the 'C' program completes. I cant able to get the process id for the 'C' program (child process) to make the 1st script to wait for the second... (7 Replies)
Discussion started by: sennidurai
7 Replies

7. Shell Programming and Scripting

killing a child process

I am calling another script from my main script and making it run in the background,based upon the value of the input provided by the user I want to kill the child process ,I have written this code timer.ksh & PID=$$ print "\n Do you wish to continue .. (Y/N) : \c " read kill_proc if ]... (4 Replies)
Discussion started by: mervin2006
4 Replies

8. UNIX for Dummies Questions & Answers

about child process

hello every one, i want to know more about creation of child process. UNDER WHAT CIRCUMSTANCES child process is created? WHAT ARE THE PREREQUISITES for a child process to be created? let us say we have a prog.c, prog.obj(compiled.c),.a\.out files. is any child PROCESS CREATED... (12 Replies)
Discussion started by: compbug
12 Replies

9. UNIX for Dummies Questions & Answers

KDM child process

Hello all, I got this little problem. I don't know what happen, but its not stopping work but is more of an FYI. I have this funny process running when I do ps -aef (on RedHat AS3 ) server I get this funny child process. root 2345 1 .... /usr/bin/kdm -nodaemon root... (6 Replies)
Discussion started by: larryase
6 Replies

10. Programming

child process hang up, help!!!

Hi all, There is a pearent process with 3 child processes, they work perfect. Pearent process read from file and separate data by blocks and send it to child processes, after that pearent read the result of work and just print it out to standart output. All interprocess communication maded through... (2 Replies)
Discussion started by: prodigal
2 Replies
Login or Register to Ask a Question
ps_lgetregs(3PROC)					 Process Control Library Functions					ps_lgetregs(3PROC)

NAME
ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs, ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs - routines that access the target process register in libthread_db SYNOPSIS
#include <proc_service.h> ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset); ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, static prgregset_t gregset); ps_err_e ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lid, prfpregset_t *fpregs); ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, static prfpregset_t *fpregs); ps_err_e ps_lgetxregsize(struct ps_prochandle *ph, lwpid_t lid, int *xregsize); ps_err_e ps_lgetxregs(struct ps_prochandle *ph, lwpid_t lid, caddr_t xregset); ps_err_e ps_lsetxregs(struct ps_prochandle *ph, lwpid_t lid, caddr_t xregset); DESCRIPTION
ps_lgetregs(), ps_lsetregs(), ps_lgetfpregs(), ps_lsetfpregs(), ps_lgetxregsize(), ps_lgetxregs(), ps_lsetxregs() read and write register sets from lightweight processes (LWPs) within the target process identified by ph. ps_lgetregs() gets the general registers of the LWP identified by lid, and ps_lsetregs() sets them. ps_lgetfpregs() gets the LWP's floating point register set, while ps_lsetfpregs() sets it. SPARC Only ps_lgetxregsize(),ps_lgetxregs(), andps_lsetxregs() are SPARC-specific. They do not need to be defined by a controlling process on non- SPARC architecture. ps_lgetxregsize() returns in *xregsize the size of the architecture-dependent extra state registers. ps_lgetxregs() gets the extra state registers, and ps_lsetxregs() sets them. RETURN VALUES
PS_OK The call returned successfully. PS_NOFPREGS Floating point registers are neither available for this architecture nor for this process. PS_NOXREGS Extra state registers are not available on this architecture. PS_ERR The function did not return successfully. ATTRIBUTES
See attributes(5) for description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
libc_db(3LIB), proc_service(3PROC), attributes(5), threads(5) SunOS 5.11 30 Jan 1998 ps_lgetregs(3PROC)