Article View: comp.unix.programmer
Article #3693Is there a C 'traceback' function?
From: Andrew E Page
Date: Thu, 17 Nov 1994 14:59
Date: Thu, 17 Nov 1994 14:59
49 lines
1668 bytes
1668 bytes
I'm working a on a significant body of someone elses code that I'm
translating to unix from the Mac and PC world.
Is there a function that can tell you the calling history of your
program? For example:
----------------------------
static void foo2(void)
{
char history_string_buffer[2048] ;
get_history(buffer, sizeof(buffer)) ;
printf("history is:\n%s\n", buffer) ;
}
static void foo1(void)
{
foo2() ;
}
main()
{
foo1() ;
}
---------------------------------
That would produce something along the lines of:
history is:
foo2
called from foo1
called from main.
Is there such a beast? If not could someone point me to a reference
so that I may create it?
--
Andrew E. Page (Warrior Poet) | Decision and Effort The Archer and Arrow
Mac Consultant | The difference between what we are
Macintosh and DSP Technology | and what we want to be.
Technical Details
Message-ID:
<CzF2zG.2C7@world.std.com>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!world!aepShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,7119e05035b91c13,start X-Google-Attributes: gid11318c,public X-Google-Thread: fc89c,7119e05035b91c13,start X-Google-Attributes: gidfc89c,public X-Google-Thread: 1014db,7119e05035b91c13,start X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 1994-11-17 07:29:34 PST Newsgroups: comp.unix.programmer,comp.lang.c,gnu.gcc.help Path: arc1-ca.pugleaf.net!nntp.gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!world!aep From: aep@world.std.com (Andrew E Page) Subject: Is there a C 'traceback' function? Message-ID: <CzF2zG.2C7@world.std.com> Organization: The World Public Access UNIX, Brookline, MA Date: Thu, 17 Nov 1994 14:59:40 GMT Lines: 49