Browse thread
Name of currently executing function
- Dave Benjamin
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2008-07-14 (05:27) |
From: | Dave Benjamin <dave@r...> |
Subject: | Name of currently executing function |
Hello, Is there any way to find out the name of the currently executing function from within an OCaml program? I guess, technically, I'm interested in the grandparent. Something that would allow this: let log msg = Printf.eprintf "%s: %s\n%!" (get_caller_function_name ()) msg I'm guessing the above is not possible, but perhaps there's some way to accomplish this using some combination of camlp4, back traces, profiling, or debugging? Thanks, Dave