public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/5199: Feature request: function call logging
@ 2001-12-26 18:06 ghudson
  0 siblings, 0 replies; only message in thread
From: ghudson @ 2001-12-26 18:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5199
>Category:       other
>Synopsis:       Feature request: function call logging
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 26 18:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     ghudson@mit.edu
>Release:        n/a
>Organization:
>Environment:

>Description:
I would like to see a gcc option, similar to the profiling option, to enable logging of function calls.  The idea is that, when the flag is set, a little bit of code would be added to the top of each function to write out the function name and argument values (and possibly some other relevant information, like the filename/lineno of the function and the current pid) to some standard filename.  The arguments could be written out in a binary format to be interpreted by some tool, or in text format; it doesn't really matter.  (You'd also need to write out something on function exit.)

Why I'd like this: most of my job is about integrating large software packages into a unified environment.  Frequently I need to make local changes or bug fixes.  As time goes on and open source software expands in scope, I find myself working with larger and more complicated software packages, which are harder to understand.  Simply finding the code responsible for a particular feature or behavior can take days of effort.  With a gcc logging flag, I could analyze the trace of a program's execution when I exercise a feature, making it easy to locate the responsible code.

(Sometimes I can get the information I want by stepping through a program with gdb.  But that can be tedious when you don't have a good starting point other than main(), and tricky when a program makes heavy use of threads and/or subprocesses.  Function call logging would let me get all of the call trace information into one place where I could sort through it in a variety of ways.)

Thanks for your consideration.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-27  2:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-26 18:06 other/5199: Feature request: function call logging ghudson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).