473,385 Members | 1,337 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,385 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 3303
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.