473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 3305
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.