[Mono-list] Source lines in backtraces ....

Martin Baulig martin@gnome.org
22 May 2002 13:14:00 +0200


"Lawrence Pit" <loz@cable.a2000.nl> writes:

> This is only supposed to work on Linux though? As in cygwin I get the
> following:

Hi Lawrence,

> $ mcs -g T26.cs
> error CS-0018: Cannot generate debugging information on this platform
> Error: Compilation failed

You cannot use this with mscorlib:

a) due to lacking documentation, we do not know how microsofts symbol
   writer works.

b) we also do not know how to use a different symbol writer with mscorlib.

So to make this work on Windows, you must run mcs in mono, so that it's
using our corlib.

> $ mono --debugdwarf ./T26.exe

That should be --debug=dwarf, hmm.

> Recreating T26.il from ./T26.exe.
> Assembler messages:
> Error: can't open T26-debug.s for reading
> T26-debug.s: No such file or directory

You can ignore this message, it's trying to open the mcs-generated symbol file
which does not exist.  I'll add a check for this.

> (process:1928): ** WARNING **: Can't open symbol file: T26-debug.o

Same here, it's trying to open the non-existant symbol file.

> X
> RESULT: 0
> Message: debug-dwarf2.c:776:dwarf2_write_class(): System.Object - 0x1c -
> 0x10000
> 1
> Message: debug-dwarf2.c:776:dwarf2_write_class(): System.IntPtr - 0x18 -
> 0x2109
> ./T26.exe-dwarf.s: Assembler messages:
> ./T26.exe-dwarf.s:168: Error: unknown pseudo-op: `.previous'
> ./T26.exe-dwarf.s:174: Error: unknown pseudo-op: `.2byte'
> ./T26.exe-dwarf.s:209: Warning: rest of line ignored; first ignored

Ok, that's a bug.  I'll fix it.

-- 
Martin Baulig
martin@gnome.org