overriding function calls without recompiling


 
Thread Tools Search this Thread
Operating Systems AIX overriding function calls without recompiling
# 1  
Old 07-18-2005
Question overriding function calls without recompiling

i want to replace the *alloc and free function calls in an existing project with my own functions, to be able to log the adresses etc in a text file. (memoryleak debugging)
I think LD_PRELOAD is what i am looking for.
That way i could create a Library with my own malloc functions and link them into the project with the LD_PRELOAD environment.

--> But <--
LD_PRELOAD is not aviable on AIX 5.2.
Is there another way (workaround) to override certain functions without having recompiling to the whole source?
I could live with re-linking the executable but ofcourse it would be the most comfortable way, not having to touch the exe.

i am thankful for any kind of tipps or hints
Lazzar
# 2  
Old 07-22-2005
try DPCL

Hi

You can use DPCL, this is a tool that allows dynamic code change on an existing running process image, and the image change does not require recompiling nor restarting the process, look at this page here http://sourceforge.net/projects/dpcl/

Good luck
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Relink without recompiling

Hello, There is a need to link a new dynamic library to a big number of exes. Unfortunately, I cannot recompile/link all these exes against the new library. Is there any way to link an existing executable with the new library? (everything has been compiled using the xlc tool) Thanks (1 Reply)
Discussion started by: geodimo
1 Replies

2. UNIX for Dummies Questions & Answers

Recompiling and uninstalling existing applications

Hi everyone, I'm new-ish to Unix outside of being a basic user in the past. So some background on my experience level when asking this question. My current laptop, running OS X 10.5, had Apache and PHP installed when I bought it. However I need to recompile these now to add features which... (0 Replies)
Discussion started by: werdenaz
0 Replies

3. UNIX for Advanced & Expert Users

Linkage of POSIX threads function calls

I wonder if someone knows what is the rationale behind linking function calls of the POSIX threads library at link-time vs. run-time. For example, if I create the following program: #include <pthread.h> void noop() { return; } int main() { pthread_self(); pthread_atfork(noop,... (1 Reply)
Discussion started by: jsimsa
1 Replies

4. Shell Programming and Scripting

Question about Function calls

Hello everyone, here's my problem: I want to create two shell scripts. one of them should includes some functions, the other one just the function calls. Is this possible? Can i call a function which is placed in a scriptfile eg functions.sh out of another script eg call.sh? :confused: And if... (2 Replies)
Discussion started by: Sebi0815
2 Replies

5. Programming

C++ overriding Vs hiding

class B { public: void fns(void){//base def;} }; class D:public B { public: void fns(void) {//new def;} }; I was thinking the above is overriding but somewhere else i found the above is just hiding.Only virtual functions can be considered as overriding? This is the exact statement ... (1 Reply)
Discussion started by: johnbach
1 Replies

6. Programming

ndd commands using function calls

Hi, Is there any function calls available ( for using in a C program ) to get the Ethernet Link status. ? I am looking for the status available from ndd /dev/hme link_status And how about plumbing and configuring an interface using C program ? BTW, Is all this documented... (3 Replies)
Discussion started by: shibz
3 Replies

7. Programming

Tracing Function Calls in a program

Apart from writing debug and statements in constructors is there any way by which we can trace the function call stack at any depth? The issue that we always face is that when program crashes (Web Server running on Linux) we have no idea where it crashes and we have to do the hard way of... (1 Reply)
Discussion started by: uunniixx
1 Replies

8. Shell Programming and Scripting

Overriding PATH

Hello, I'm using Sun solaris . I'm trying to override the environmental variable in my script, however when I execute the script, the PATH whatever being set in .profile is taking precedence. I have done the sanity checks like order of my entry in path, permissions for the user etc., To... (1 Reply)
Discussion started by: brainyoung
1 Replies

9. Programming

overriding the dynamic library

Hi, I wonder how can we override the dynamic library loaded by ld on start up.(dynamic linked application). so that linker uses the new library to find symbols. Is it possible to do. Cheers. (4 Replies)
Discussion started by: Raom
4 Replies

10. IP Networking

Identification of data calls & voice calls

Is there any facility to filter/identify the data calls and voice calls coming throug modem? OR Can we get the data or voice calls information through a script(preferably C Kermit)? (0 Replies)
Discussion started by: pcsaji
0 Replies
Login or Register to Ask a Question