473,398 Members | 2,125 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,398 software developers and data experts.

tracing function calls

hi,

i would like to trace the function that called the "current" function. i
need a type char name of that function. is that posibile?

eg.

void function()
{
char string[256];
GetCallerName(string);
printf(string);
}

void call()
{
function();
}

--
--------------------------------
Krečimir ©pes
B.B. & Idol Graphics
http:// bb.gamer.hr
Jul 19 '05 #1
2 1858
DigitalDragon wrote:
hi,

i would like to trace the function that called the "current" function.
i need a type char name of that function. is that posibile?


Not with standard C++.

Jul 19 '05 #2
There is a macro called __FUNCTION__ or __PRETTYFUNCTION__, but it is not
standard C++, I know for sure Visual C++ 6 does not implement it, but Visual
C++ 7, MW CodeWarrior and GCC does.. So when VC6 is phased out it will be
defacto standard i guess..

"DigitalDragon" <kr***********@zg.hinet.hr> wrote in message
news:bh**********@ls219.htnet.hr...
hi,

i would like to trace the function that called the "current" function. i
need a type char name of that function. is that posibile?

eg.

void function()
{
char string[256];
GetCallerName(string);
printf(string);
}

void call()
{
function();
}

--
--------------------------------
Krečimir ©pes
B.B. & Idol Graphics
http:// bb.gamer.hr

Jul 19 '05 #3

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

Similar topics

2
by: Stormbringer | last post by:
Greetings, I've been wondering if there is a mechanism similar to trace/untrace found in lisp, for example call trace(function-name) and whenever this function is called it will show its...
5
by: Stig | last post by:
I would like to output the sequence of method calls from a running c# applcaition, but I don't want to add Debug.trace calls at the entry and exit points in each an every methods. Does there...
0
by: Paul Ibison | last post by:
HI when I have a page which calls a component I want to do the following - tracing set to false on the pag tracing set to true in the componen tracing set to false in the page after the call to...
6
by: serge calderara | last post by:
Dear all, I have an applicatin that generate a querry to an SQL server, then display results on a second webform. I try to see how tracing works, then I have notice that as soon as I...
2
by: deepukutty | last post by:
Hi all, I know tht we can do tracing in two ways.one in application level and the other is at Page level. I am able to see the details of trace either on the page itself or .../trace.axd page....
4
by: Corno | last post by:
Hi all, My collegue finds tracing very important and therefore we have agreed that we will do quite a lot of it. The first and last line of every function will contain a trace stating which...
0
by: cnys | last post by:
We have an ASP.NET 2.0 (C#) app and we're trying to add tracing into it. The tracing functionality within .NET is great, but when we output this to a file, it's kind of sparse. So, we're looking...
4
by: magennisw | last post by:
Our three tier web application is "pausing" under test loading (IIS 6.0 (win2003) -> Web services (win2003) -> SQL server) . The CPU usage on the W3WP.exe on both the web server and middle tier...
6
by: Stephen Torri | last post by:
I am trying to produce a singleton class that I can use throughout my library to write tracing information to a file. My intent was to design such that someone using the library in its debug mode...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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.