
#5273: error and undefined should print a location -------------------------------------+------------------------------------- Reporter: augustss | Owner: Type: feature request | Status: closed Priority: low | Milestone: 7.12.1 Component: Compiler | Version: 7.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 9049 | Differential Revisions: Phab:D861 -------------------------------------+------------------------------------- Comment (by bgamari): One remaining question here is how this should interact with DWARF-based stacktraces (see Phab:D1198). The two mechanisms exhibit different strengths, * IP-based stacktraces: * Always accurate * Cheap to gather stack but have small effect on code generation * Can only provide limited stack depth * DWARF-based stacktraces: * May not point you at exactly the right place * More expensive to gather stack but no effect on code generation * Can provide full stack (but perhaps it's best if we capped the depth to avoid costly unwinding of deep stacks) * Requires that code be built with `-g` Given they are to some extent complementary, perhaps we should produce both if available? Note: technically there are two costs to DWARF stack collection: 1. Unwinding the stack: the task of actually walking the stack and collection the relevant addresses 2. Looking up the addresses: the task of looking up symbol names and source location information for the addresses we collected in step 1. In my experience (2) tend to be much more expensive than (1). In Phab:D1198 step (2) should occur lazily, so it will only be paid if the necessary. Step (1) however necessarily happens unconditionally. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/5273#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler