|
From: Thierry L. <thi...@in...> - 2010-04-06 12:30:43
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Andrea,<br>
<br>
Even with the Cecil patch, it seems it does not work...<br>
I recompiled my test program (named induction.dbg.exe) and try to debug
it with mdb. The link still generates an .mdb file which is (a bit)
smaller than the original .o.mdb... What I found strange is that when I
ask mdb to list the source main method, it displays a main method which
is not the main method of my test program! Also, I set up a breakpoint
at main, but mdb never stops in the main of the program being
debugged...<br>
You'll find below some output.<br>
How did you check that your ld merges well all input .mdb files?<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">Thierry Lafage.
</pre>
<br>
<br>
<blockquote><tt>lafage$ ls -l
induction.dbg.*
<br>
-rwxr-x--- 1 lafage alf 3072 2010-04-06 14:11
induction.dbg.exe*
<br>
-rw-r----- 1 lafage alf 405 2010-04-06 14:11
induction.dbg.exe.mdb
<br>
-rw-r----- 1 lafage alf 3584 2010-04-01 11:37
induction.dbg.o
<br>
-rw-r----- 1 lafage alf 485 2010-04-01 11:37
induction.dbg.o.mdb
<br>
-rwxr-x--- 1 lafage alf 4392 2010-04-01 11:37
induction.dbg.s*
<br>
-rw-r----- 1 lafage alf 112 2010-04-01 11:24
induction.dbg.s.mdb
<br>
lafage@dingdong src$ cil32-mdb induction.dbg.exe<br>
Mono Debugger <br>
(mdb) b main <br>
Breakpoint 3 at main <br>
(mdb) l main <br>
ERROR: No target.<br>
(mdb) run<br>
Starting program: induction.dbg.exe<br>
Cannot read symbol file `/udd/lafage/gcc/image/lib/gcc4net.dll.mdb':
Could not find file "/udd/lafage/gcc/image/lib/gcc4net.dll.mdb".<br>
Cannot read symbol file `/udd/lafage/gcc/image/lib/libstd.dll.mdb':
Could not find file "/udd/lafage/gcc/image/lib/libstd.dll.mdb".<br>
Thread @1 stopped at #0: 0xb67c720d in <induction.dbg:.start
(string[])>+0x15 at 1.<br>
1 IL_0000: call 0x06000001<br>
(mdb) l main<br>
1 #include <config.h><br>
2 #include "mini.h"<br>
3 #ifndef PLATFORM_WIN32<br>
4 #include "buildver.h"<br>
5 #endif<br>
6<br>
7 #ifdef PLATFORM_WIN32<br>
8<br>
9 int<br>
10 main ()<br>
11 {<br>
12 int argc;<br>
13 gunichar2** argvw;<br>
14 gchar** argv;<br>
15 int i;<br>
16<br>
17 argvw = CommandLineToArgvW (GetCommandLine (), &argc);<br>
18 argv = g_new0 (gchar*, argc + 1);<br>
19 for (i = 0; i < argc; i++)<br>
20 argv [i] = g_utf16_to_utf8 (argvw [i], -1, NULL, NULL,
NULL);<br>
(mdb) c<br>
Cannot read symbol file
`/udd/lafage/gcc/image/lib/MSCorelibWrapper.dll.mdb': Could not find
file "/udd/lafage/gcc/image/lib/MSCorelibWrapper.dll.mdb".<br>
<HERE IS THE OUTPUT OF MY TEST PROGRAM><br>
Thread @1 exited.<br>
Process #1 exited.<br>
(mdb) Target exited.<br>
</tt></blockquote>
<br>
Thierry Lafage a écrit :
<blockquote cite="mid:4BB...@in..." type="cite">
<pre wrap="">Andrea,
I did not see your patch for Cecil inthe bugzilla... So, I'll try it
Sorry,
Thierry Lafage.
Thierry Lafage a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">Hi Andrea,
Thanks for fixing it. By the way, I can't have it working properly.
I generate a .s with line numbers. Then I use my patched ilasm to
generated a .o and a .o.mdb.
Then I use your new ld to make a .exe and a .exe.mdb
It actually produces a .exe.mdb, but it seems that it does not contain
the correct information: I run mdb on the .exe and "list main" does not
list the main of the program but something else I don't understand...
Moreover, the .exe.mdb is smaller than the .o.mdb ; I think the .exe.mdb
may be at least as big as the .o.mdb since it should include it,
shouldn't it?
$ ls -l
-rw-r----- 1 lafage alf 671 2010-03-31 14:21 induction.c
-rwxr-x--- 1 lafage alf 3072 2010-04-01 11:56 induction.exe*
-rw-r----- 1 lafage alf 112 2010-04-01 11:56 induction.exe.mdb
-rw-r----- 1 lafage alf 3584 2010-04-01 11:37 induction.o
-rw-r----- 1 lafage alf 485 2010-04-01 11:37 induction.o.mdb
-rwxr-x--- 1 lafage alf 4392 2010-04-01 11:37 induction.s*
-rw-r----- 1 lafage alf 3648 2010-03-31 14:22 induction.s
Any clue?
Thierry Lafage.
Andrea Carlo Ornstein a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">There is a bug in Mono.Cecil
<a class="moz-txt-link-freetext" href="https://bugzilla.novell.com/show_bug.cgi?id=592849">https://bugzilla.novell.com/show_bug.cgi?id=592849</a>
otherwise it seems to be working.
At least small examples.
I looked ONLY at line numbers in the code stream.
We do not do anything special for the debug information.
If there is a problem it would be from mono. Cecil :)
I added the option -g to cil32-as
it has to be passed down when -g is passed to gcc.
I use this change:
Index: gcc/config/cil32/cil32.h
===================================================================
--- gcc/config/cil32/cil32.h (revision 157653)
+++ gcc/config/cil32/cil32.h (working copy)
@@ -53,7 +53,7 @@
#else
#error "Unrecognized binutils: impossible to choose default compiler
driver arguments"
#endif
-#define ASM_SPEC "%{!O0:%{O*:-O}}"
+#define ASM_SPEC "%{!O0:%{O*:-O}} %{g*:-g}"
#define LIB_SPEC "-l libstd.dll"
#define LINK_SPEC "%{shared:--shared} %{mthreads:-mt}"
#define STARTFILE_SPEC ""
Andrea
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/intel-sw-dev">http://p.sf.net/sfu/intel-sw-dev</a>
_______________________________________________
Clibinutils-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cli...@li...">Cli...@li...</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/clibinutils-devel">https://lists.sourceforge.net/lists/listinfo/clibinutils-devel</a>
</pre>
</blockquote>
</body>
</html>
|