This article is a part of working with bug reports.
1. When GUI is available
If you're working in Delphi, browse EurekaLog error dialog or use a EurekaLog viewer - you can just double click on any line in call stack. You'll be moved to that location. Very simple.
Few notes here:
2. When line number is available
When GUI doesn't work or not available, but you have line numbers in call stack - you need to open unit in IDE manually and use Search / Go to line number command in IDE main menu. Enter line number and press OK - you'll be moved to line location.
If you can't find a unit version, which matches your compiled application, then you may try to use line number offset. Open unit and find target procedure or method. Move down manually for line number offset lines. That will be your location. See this article for more info.
3. When procedure/method name is available
If you don't have line numbers information or this information is obsolete (doesn't match source), but you have a subroutine name - you can find subroutine in target unit and try to guess, where the call was. For example, if you have such call stack
And your DoWork routine looks like this:
for X := 1 to 5 do
Then you can guess that call stack either points to first call DoSomething(-1) or second call DoSomething(X). But it doesn't point to Prepare or Done.
5. When code address is available
Next fallback case is raw code address. There can be two options: either you have a code address OR you have module name and code offset.
Note: you don't need a base address of the module.
In either case you need to run IDE, open your project, run it and put it on pause (Run / Pause). Now, use the Search / Go to address command. Enter absolute code address. Don't forget to add '$', if you enter HEX.
Note: if you have code offset and module name, you need to calculate code address first. Go to View / Debug windows / Modules to open Modules window. Find your module here and get its base address. Now add a code offset to this address (include a $1000, if needed) - this will be your final code address.
When you press OK - you'll be moved to exact location. If it's possible - you'll see a source code (.pas file). If not (say, no debug information available) - you'll see a CPU debugger.
Second case (having a code offset + module name) is better than first case (having code address). Even though you have to make calculations first, but first case doesn't allow you to find location, if module on your machine is loaded at different location than module on client's machine.