www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.debugger - [ddbg] wrong line numbers with unhandled exception

reply ore-sama <spam here.lot> writes:
Given this code:
--------------------
RunApplication...
30	//somw code;
31	yo(res);
32	return 1;
}
34
void yo(int r)
{
37	int[] s=new int[5];
38	s[6]=0;
39	if(r)throw new Exception("yooo");
}
------------------

ddbg describe exception thrown at line 39 as thrown at line 31:


Unhandled D Exception (object.Exception
 "yooo") at KERNEL32.dll (0x77e6d756) thread(1016)
->us




, instance = 0x00400000) at tmp.d:76




while exception at line 38 is desribed correctly as thrown at line 38:

Unhandled D Exception (std.array.ArrayBoundsError
 "ArrayBoundsError tmp.d(38)") at KERNEL32.dll (0x77e6d756) thread(1348)
->us





, instance = 0x00400000) at tmp.d:76



dmd 2.019, ddbg 0.11.3 beta.
Oct 10 2008
parent ore-sama <spam here.lot> writes:
For some reason it losts functions from stacktrace
When explicit throw occurs, RunApplication calls yo, yo calls _d_throw
directly, yo is lost. On ArrayBoundsError yo calls _array, _array calls
_d_array_bounds, _d_array_bounds calls _d_throw; _array and _d_array_bounds are
lost.
Oct 10 2008