Browse thread
RE: Where did the exception occur?
- Greg Morrisett
[
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: | -- (:) |
| From: | Greg Morrisett <jgm@c...> |
| Subject: | RE: Where did the exception occur? |
> Otherwise, the addition you mentioned is interesting, if only we could > implement it with no penalty on the speed of exception raising. Have > you an idea of such a compilation scheme ? If you have a mapping from return addresses to functions, then when raising an exception, you could walk the stack frames and add the name of each function to a list that gets accumulated as part of the exception packet. This only has overhead for exception raising, but believe me, it's well worth it. At the worst you could make it a compiler option (like array bounds checks.) (To avoid allocating, you could pre-allocate k slots in the exception packet and only record the first k stack frames' function names.) -Greg