AerScript Debugger #46

Açık
belliash tarafından 2018-09-06 10:01:02 +02:00 açıldı · 2 yorum
Sahibi

We have already made a lot of changes to compiler and VM, that improves the error reporting. However I think we still miss real debugger. Actually we are only capable of displaying a list of instructions that have been executed by VM with the values of P1, P2 and address of P3 pointer, as well as source file and line number the instruction comes from. I think this is not sufficient. What is more, using the debugging currently increases memory usage a lot, because a list of instructions is cached and then put to the OutputCallback. Thus debug information is sent to the same place where script output and displayed just afterwards.

In scope of this ticket, I would like to discuss an ability to implement a real debugger that will put all information in the real time into some separate container. As Aer can be used with (Fast)CGI, we cannot simply output the debug information. I think we should consider a debugger putting all information into some file that could be analyzed later, after execution (manually or with help of some additional application), or to create a thread listening on some port/socket that would be sending all information to separate process.

What are your ideas about debugger?

We have already made a lot of changes to compiler and VM, that improves the error reporting. However I think we still miss real debugger. Actually we are only capable of displaying a list of instructions that have been executed by VM with the values of P1, P2 and address of P3 pointer, as well as source file and line number the instruction comes from. I think this is not sufficient. What is more, using the debugging currently increases memory usage a lot, because a list of instructions is cached and then put to the OutputCallback. Thus debug information is sent to the same place where script output and displayed just afterwards. In scope of this ticket, I would like to discuss an ability to implement a real debugger that will put all information in the real time into some separate container. As Aer can be used with (Fast)CGI, we cannot simply output the debug information. I think we should consider a debugger putting all information into some file that could be analyzed later, after execution (manually or with help of some additional application), or to create a thread listening on some port/socket that would be sending all information to separate process. What are your ideas about debugger?
belliash
enhancement
etiketini 2018-09-06 10:01:02 +02:00 ekledi
Sahibi

First of all, we should implement a logging support. All output from compiler and VM could be logged then. Having this, we could use same mechanism to log debugging information to another file. Such file, can be then manually interpreted or we can write some additional application for that purpose in the future.

I imagine, that debugger would save the following information:

  • every method call,
  • every value change,
  • file and line number triggered OP call,
  • OP call execution time
First of all, we should implement a logging support. All output from compiler and VM could be logged then. Having this, we could use same mechanism to log debugging information to another file. Such file, can be then manually interpreted or we can write some additional application for that purpose in the future. I imagine, that debugger would save the following information: * every method call, * every value change, * file and line number triggered OP call, * OP call execution time
Yazar
Sahibi

I have moved a debugging related code to debug.c in 9d762a235.

I have moved a debugging related code to debug.c in 9d762a235.
Bu konuşmaya katılmak için oturum aç.
Kilometre Taşı Yok
Atanan Kişi Yok
2 Katılımcı
Bildirimler
Bitiş Tarihi
Bitiş tarihi geçersiz veya aralık dışında. Lütfen 'yyyy-aa-gg' biçimini kullanın.

Bitiş tarihi atanmadı.

Bağımlılıklar

Bağımlılık yok.

Referans: aerscript/Aer#46
Herhangi bir açıklama sağlanmadı.