On Thu, 12 Jun 2014 15:16:03 GMT, Sönke Ludwig wrote:

On Thu, 12 Jun 2014 05:30:44 GMT, Erika wrote:

So, I have a rather large project where the main() function is in a file that comes fairly late in lexical order, but it looks like dub passes files to dmd in (roughly) alphabetical order.

This shouldn't matter, but it looks like dmd clobbers some of the debug information if the module with main() in it doesn't get passed first on the command line (Namely it seems that it can't find the 'frame base' which prevents DDT's debugger from looking at stack variables).

Is there any way to override this, to ensure that a particular module gets passed to dmd first?

We have discussed supporting a deterministic randomization of the sources for similar issues before (ticket: #235). However, I haven't heard of this particular issue before, so it sounds like another additional mechanism may be needed. I'll mention this in the ticket.

Thanks! It looks like the problem is specific to 64-bit mode (and perhaps only 64-bit linux), and since it only affects some of the debug info (e.g. backtraces still work) it might have slipped under the radar. I'm asking dmd people about it atm :)