Re: How to write a program to track the value of a certain variable at run-time using debug features???
- From: Paul Pluzhnikov <ppluzhnikov-nsp@xxxxxxxxxxx>
- Date: Mon, 19 Mar 2007 20:34:01 -0700
"classicalmania" <trungthanh78@xxxxxxxxx> writes:
One possible solution, as suggested by Martin Irman from
microsoft.public.vc.debugger is to use C++ wrapper class.
If you are going to restrict your users in certain ways, such as
above, a much simpler solution is to tell them:
- when you are solving for a given f(x), you must ensure that f()
is a true function of x (i.e. ensure that no external parameter
modification happens).
- when you are done with f(x), you can change what f(x) does in
arbitrary ways, but you must call solver_reset() routine.
As I see, some debuggers (ddd for example) can show the list of global
variables and their value at run-time, so I wonder whether it is
possible for me to re-use some API from the debugger.
The only API Linux debuggers use is ptrace(). In order to "reuse" it,
your program must have detailed understanding of the ELF file format,
which isn't too difficult, but isn't trivial either.
Besides, this approach doesn't solve *anything*: if some globals
are pointers, then you must track not only that the pointer itself
didn't change, but the "pointed to" thing didn't change either.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.
- Follow-Ups:
- References:
- Re: How to write a program to track the value of a certain variable at run-time using debug features???
- From: Paul Pluzhnikov
- Re: How to write a program to track the value of a certain variable at run-time using debug features???
- From: classicalmania
- Re: How to write a program to track the value of a certain variable at run-time using debug features???
- From: classicalmania
- Re: How to write a program to track the value of a certain variable at run-time using debug features???
- Prev by Date: Re: no Hello World!!
- Next by Date: Re: Is splint the best for static code checking? I mean free.
- Previous by thread: Re: How to write a program to track the value of a certain variable at run-time using debug features???
- Next by thread: Re: How to write a program to track the value of a certain variable at run-time using debug features???
- Index(es):
Relevant Pages
|