473,473 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

trace of memory access

i would like a trace of a program in the sense of all the memory
addresses it is accessing...so for example each time a statement like
(variable=10) is executed, i would like the address of the variable...

is this possible in some way or can somebody just give me a point where
to start searching (some documentation, etc?)

Tnx,
Gregor
Nov 14 '05 #1
7 3307
Gregor Rot <za*********@yahoo.com> spoke thus:
i would like a trace of a program in the sense of all the memory
addresses it is accessing...so for example each time a statement like
(variable=10) is executed, i would like the address of the variable... is this possible in some way or can somebody just give me a point where
to start searching (some documentation, etc?)


Your post is off-topic for comp.lang.c. Please visit

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #2
Gregor Rot wrote:

i would like a trace of a program in the sense of all the memory
addresses it is accessing...so for example each time a statement
like (variable=10) is executed, i would like the address of the
variable...

is this possible in some way or can somebody just give me a point
where to start searching (some documentation, etc?)


Trace it in machine code.

--
Some useful references:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html>
<http://benpfaff.org/writings/clc/off-topic.html>

Nov 14 '05 #3
<posted & mailed>

Obviously C doesn't have anything to do with this, but the functionality you
seek is often provided by what is called a "debugger" -- an application to
aid in the debugging of compiled code. Chances are that if there's a C
compiler for the platform you are using, there's likely to be a debugger
too. Check forums that generally address issues related to your
compiler/platform for information about debuggers.

Gregor Rot wrote:
i would like a trace of a program in the sense of all the memory
addresses it is accessing...so for example each time a statement like
(variable=10) is executed, i would like the address of the variable...

is this possible in some way or can somebody just give me a point where
to start searching (some documentation, etc?)

Tnx,
Gregor


--
remove .spam from address to reply by e-mail.
Nov 14 '05 #4
In <40***************@yahoo.com> CBFalconer <cb********@yahoo.com> writes:
Gregor Rot wrote:

i would like a trace of a program in the sense of all the memory
addresses it is accessing...so for example each time a statement
like (variable=10) is executed, i would like the address of the
variable...

is this possible in some way or can somebody just give me a point
where to start searching (some documentation, etc?)


Trace it in machine code.


If you can do that and you compile it with debugger information, you can
also have it traced at the C source code level.

BTW, was your answer supposed to be helpful?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #5
In <1q****************@news.siol.net> Gregor Rot <za*********@yahoo.com> writes:
i would like a trace of a program in the sense of all the memory
addresses it is accessing...so for example each time a statement like
(variable=10) is executed, i would like the address of the variable...

is this possible in some way or can somebody just give me a point where
to start searching (some documentation, etc?)


Read your symbolic debugger's documentation. If it can't do it, your
only chance is to write a better one...

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #6
Dan Pop wrote:
CBFalconer <cb********@yahoo.com> writes:
Gregor Rot wrote:

i would like a trace of a program in the sense of all the memory
addresses it is accessing...so for example each time a statement
like (variable=10) is executed, i would like the address of the
variable...

is this possible in some way or can somebody just give me a
point where to start searching (some documentation, etc?)


Trace it in machine code.


If you can do that and you compile it with debugger information,
you can also have it traced at the C source code level.

BTW, was your answer supposed to be helpful?


Yes. The C source level debugger will usually show object values,
not their addresses. The machine code system will often show the
instruction operands, i.e. the addresses. They also often show
effective addresses, after evaluating indirection, indexing, etc.

This is all OT anyhow.

--
Some useful references:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html>
<http://benpfaff.org/writings/clc/off-topic.html>
Nov 14 '05 #7
In <40***************@yahoo.com> CBFalconer <cb********@yahoo.com> writes:
Dan Pop wrote:
CBFalconer <cb********@yahoo.com> writes:
Gregor Rot wrote:

i would like a trace of a program in the sense of all the memory
addresses it is accessing...so for example each time a statement
like (variable=10) is executed, i would like the address of the
variable...

is this possible in some way or can somebody just give me a
point where to start searching (some documentation, etc?)

Trace it in machine code.
If you can do that and you compile it with debugger information,
you can also have it traced at the C source code level.

BTW, was your answer supposed to be helpful?


Yes. The C source level debugger will usually show object values,
not their addresses.


Which is what you normally need. However, if you need the address of
a variable, the debugger will show it to you.
The machine code system will often show the
instruction operands, i.e. the addresses. They also often show
effective addresses, after evaluating indirection, indexing, etc.


If you have written your code in C, object names are usually much more
relevant than their addresses. You want to know when object X is
accessed, not when the address at which X is located is accessed, even
if the two things are equivalent.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Oxmard | last post by:
Armed with my new O'Reilly book Optimizing Oracle Performance I have been trying to get a better understanding of how Oracle works. The book makes the statement, " A database cal with dep=n + 1...
9
by: svenn.are | last post by:
Hi, has anybody thought of / already used graphviz to convert the output of trace.py into a graph? I looked at PyUMLGraph, but 1. PyUMLGraph does not successfully create a dot file, and 2. I...
12
by: Gregor Rot | last post by:
i would like a trace of a program in the sense of all the memory addresses it is accessing...so for example each time a statement like (variable=10) is executed, i would like the address of the...
4
by: Nick | last post by:
hi, all In c#, we know it has garbage collection. I am think is there anyway we can know an exe, how many thread in this exe, when the memory gets allocated, and when it gets destoryed. Becuase I...
0
by: martin | last post by:
Hi, I have created an asp.net application as a project, and also another project that is just a class library. My asp.net application calls a function in the class library. I am attempting to...
5
by: who be dat? | last post by:
Hello all. I'm writing an application that is writing trace information that can be viewed in trace.axd. I would like to rename this and use a different name specific to my application. I know...
3
by: Schorschi | last post by:
Ok, can someone point out to me why the following code does not work? In compiles, no errors, but MemoryStream never seems to receive any data? Dim theMemory As MemoryStream, _ theListener As...
8
by: Bryan | last post by:
Does anyone have an example of an application that can connect to a running process and capture Trace.WriteLine calls like in SQL Server Profiler? I know that we can inherit from a TraceListener...
3
by: | last post by:
If this is simple, forgive my ignorance, but I'm coming from the CompactFramework where we don't use AppDomains. I did a fair bit of archive searching and couldn't find an answer and I got no...
3
by: Sendil kumar | last post by:
Hi All, Problem Stetement:I have a problem in getting stack trace when I ues std::exception. In my code, I allocate virtual memory for certain kind of processing and will throw the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.