SOLVED: Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit

2005-08-01 Thread Rodrigo B. de Oliveira
On 7/28/05, Rodrigo B. de Oliveira [EMAIL PROTECTED] wrote:
 On 7/28/05, Rodrigo B. de Oliveira [EMAIL PROTECTED] wrote:
  ...
  I'm getting off-by-one errors only with raise/throw statements:
 
 
 The behavior is actually a little more complex but still predictable.
 The stack trace entry for the raise line is always the line of the
 next statement in the same method:
 

The workaround was to emit debugging information again for a Nop just
after the raise statement. Now the lines are reported correctly in
both runtimes.

-- 
bamboo
http://blogs.codehaus.org/people/bamboo/
Got objects? http://www.db4o.com/
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit

2005-07-28 Thread Rodrigo B. de Oliveira
On 7/28/05, Rodrigo B. de Oliveira [EMAIL PROTECTED] wrote:
 ...
 I'm getting off-by-one errors only with raise/throw statements:
 

The behavior is actually a little more complex but still predictable.
The stack trace entry for the raise line is always the line of the
next statement in the same method:

src name=other.boo
def foo():
 raise foo


 return 1
 
 def bar():
 foo()
 
 bar()
/src

I get then:
 
Unhandled Exception: System.ApplicationException: foo
 in [0xa] (at Other.boo:5) OtherModule:foo ()
 in [0x0] (at Other.boo:8) OtherModule:bar ()
 in [0x0] (at Other.boo:10) OtherModule:Main (System.String[] argv)
 
Any ideas?
bamboo
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit

2005-05-26 Thread Rodrigo B. de Oliveira
Hi,

I've just built the latest mono/mcs/debugger from the repository and
although debugging information is being emitted now, the runtime and
the debugger cannot make use of it. I get no source information on
stack traces and mdb is unable to display source lines.

The only important setting I've used on building mono was --with-preview=no.

Here's a console dump of a session with mdb:

[EMAIL PROTECTED]:~/dotnet/boo/build$ mdb booish.exe
Mono Debugger
(mdb) run
Starting program: booish.exe
** Message: x86-linux-ptrace.c:77: b6d53bb0 - can't read target memory
of 16935 at address b7ff7195 : Argumento inválido
Process @4 stopped at #0: 0xb725b430 in BooishModule.Main(System.String[]).
BooishModule.Main(System.String[]):
0xb725b430  push   %ebp
(mdb) n
Process @4 stopped at #0: 0xb725b431 in BooishModule.Main(System.String[])+0x1.
0xb725b431  mov%esp,%ebp
(mdb)

I'm running ubuntu hoary and uname -a reports:
Linux bambuntu 2.6.10-5-k7 #1 Fri May 20 15:49:12 UTC 2005 i686 GNU/Linux

Any ideas?
Rodrigo

On 5/17/05, Lluis Sanchez [EMAIL PROTECTED] wrote:
 Hi!
 
 This patch adds some basic support for generating debug info in SRE. 
 ...
 I'll commit if there are no objections.
 Lluis.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit

2005-05-22 Thread Rodrigo B. de Oliveira
is this already in?

On 5/18/05, Ben Maurer [EMAIL PROTECTED] wrote:
 Miguel asked me to look at the memory impact of this patch.
 ...
  So, this is probably ok.
 
 -- Ben

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit

2005-05-18 Thread Ben Maurer
Miguel asked me to look at the memory impact of this patch.

My only complaint is the amount of boxing that goes on in the
sequence-point list. Can you turn this into an array of structs that you
grow youself?

As far as I can tell, the list of sequence points is kept in memory for
*all* methods until the debug info is emitted. However, as far as I
know, this happens in many other places (eg, ILGenerator's are kept for
all members until the assembly is saved). So, this is probably ok.

-- Ben

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit

2005-05-17 Thread Rodrigo B. de Oliveira
On 5/17/05, Lluis Sanchez [EMAIL PROTECTED] wrote:
 Hi!
 
 This patch adds some basic support for generating debug info in SRE. It
 implements ModuleBuilder.DefineDocument and
 ILGenerator.MarkSequencePoint, and should be enough for most of
 compilers. With this patch, Boo and IKVM can generate correct debug
 info.
 

WAHOO!

:)
Rodrigo
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit

2005-05-17 Thread Kamil Skalski
Dnia wtorek, 17 maja 2005 17:25, Lluis Sanchez napisa:
 Hi!

 This patch adds some basic support for generating debug info in SRE. It
 implements ModuleBuilder.DefineDocument and
 ILGenerator.MarkSequencePoint, and should be enough for most of
 compilers. With this patch, Boo and IKVM can generate correct debug
 info.

This is really great news. Thanks a lot! Maybe now I will also try mono 
debugger for Nemerle development.


 The symbol writer is still implemented in
 Mono.CompilerServices.SymbolWriter. I added a wrapper class that
 implements ISymbolWritter and which is created by ModuleBuidler using
 reflection. This class just forwards the calls to MonoSymbolWriter (the
 one used by mcs).

 There is also a patch for reflection.c, which is a workaround for bug
 #74914. With this patch, MethodBuilder objects will return the correct
 token value after the module is saved. This fixes the problem because
 the debug info is generated after saving the module.

 I'll commit if there are no objections.
 Lluis.

-- 
Kamil Skalski
http://nazgul.omega.pl
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list