106     in /home/squalyl/projects/cegcc/src/gcc/libiberty/make-temp-file.c

> 0x0040f023 <choose_tmpdir+35>:   83 ec 0c       sub    $0xc,%esp
> 0x0040f026 <choose_tmpdir+38>:   68 97 b4 41 00 push   $0x41b497
> 0x0040f02b <choose_tmpdir+43>:   e8 e0 8a 00 00 call   0x417b10 <getenv>
> 0x0040f030 <choose_tmpdir+48>:   83 c4 10       add    $0x10,%esp
> 0x0040f033 <choose_tmpdir+51>:   83 ec 08       sub    $0x8,%esp
> 0x0040f036 <choose_tmpdir+54>:   ff 75 f4       pushl  -0xc(%ebp)
> 0x0040f039 <choose_tmpdir+57>:   50     push   %eax
> 0x0040f03a <choose_tmpdir+58>:   e8 0f 01 00 00 call   0x40f14e <try_dir>
> 0x0040f03f <choose_tmpdir+63>:   83 c4 10       add    $0x10,%esp
> 0x0040f042 <choose_tmpdir+66>:   89 45 f4       mov    %eax,-0xc(%ebp)
> (gdb)
>


(gdb) break
/home/squalyl/projects/cegcc/src/gcc/libiberty/make-temp-file.c:106
Breakpoint 3 at 0x40f023: file
/home/squalyl/projects/cegcc/src/gcc/libiberty/make-temp-file.c, line 106.

<mingw32 -lgcc -lceoldname -lmingwex -lcoredll -lcoredll -lmingw32 -lgcc
-lceoldname -lmingwex -lcoredll
Starting program:
c:/mingw/cross41-debug/bin/../libexec/gcc/arm-mingw32ce/4.1.0/collect2.exe
-Bdynamic -o test.exe c:/mingw/cross41-debug/bin/../lib/gcc/arm-min
gw32ce/4.1.0/../../../../arm-mingw32ce/lib/crt3.o
-Lc:/mingw/cross41-debug/bin/../lib/gcc/arm-mingw32ce/4.1.0
-Lc:/mingw/cross41-debug/bin/../lib/gcc -Lc:/mingw
/cross41-debug/bin/../lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/lib
C:\DOCUME~1\squalyl\LOCALS~1\Temp/ccYkdej9.o -lmingw32 -lgcc -lceoldname
-lmingw
ex -lcoredll -lcoredll -lmingw32 -lgcc -lceoldname -lmingwex -lcoredll
[New Thread 3428.0x16d8]

Breakpoint 1, main (argc=20, argv=0x3e4008) at
/home/squalyl/projects/cegcc/src/gcc/gcc/collect2.c:756
756     /home/squalyl/projects/cegcc/src/gcc/gcc/collect2.c: No such file or
directory.
        in /home/squalyl/projects/cegcc/src/gcc/gcc/collect2.c
0x00402166 <main+32>:    a1 90 92 41 00 mov    0x419290,%eax
0x0040216b <main+37>:    8b 15 70 91 41 00      mov    0x419170,%edx
0x00402171 <main+43>:    6a 00  push   $0x0
0x00402173 <main+45>:    50     push   %eax
0x00402174 <main+46>:    68 94 92 41 00 push   $0x419294
0x00402179 <main+51>:    52     push   %edx
0x0040217a <main+52>:    e8 58 da 00 00 call   0x40fbd7 <concat>
0x0040217f <main+57>:    83 c4 10       add    $0x10,%esp
0x00402182 <main+60>:    89 85 70 ff ff ff      mov    %eax,-0x90(%ebp)
(gdb) c
Continuing.

Breakpoint 2, prefix_from_env (env=0x4192ed "COMPILER_PATH",
pprefix=0x41d170) at /home/squalyl/projects/cegcc/src/gcc/gcc/collect2.c:687
687     in /home/squalyl/projects/cegcc/src/gcc/gcc/collect2.c
0x00401fc4 <prefix_from_env+6>:  83 ec 0c       sub    $0xc,%esp
0x00401fc7 <prefix_from_env+9>:  ff 75 08       pushl  0x8(%ebp)
0x00401fca <prefix_from_env+12>:         e8 41 5b 01 00 call   0x417b10
<getenv>
0x00401fcf <prefix_from_env+17>:         83 c4 10       add    $0x10,%esp
0x00401fd2 <prefix_from_env+20>:         89 45 fc       mov
%eax,-0x4(%ebp)
(gdb) c
Continuing.

Breakpoint 2, prefix_from_env (env=0x4192fb "PATH", pprefix=0x41d180) at
/home/squalyl/projects/cegcc/src/gcc/gcc/collect2.c:687
687     in /home/squalyl/projects/cegcc/src/gcc/gcc/collect2.c
0x00401fc4 <prefix_from_env+6>:  83 ec 0c       sub    $0xc,%esp
0x00401fc7 <prefix_from_env+9>:  ff 75 08       pushl  0x8(%ebp)
0x00401fca <prefix_from_env+12>:         e8 41 5b 01 00 call   0x417b10
<getenv>
0x00401fcf <prefix_from_env+17>:         83 c4 10       add    $0x10,%esp
0x00401fd2 <prefix_from_env+20>:         89 45 fc       mov
%eax,-0x4(%ebp)
(gdb) c
Continuing.

Breakpoint 3, choose_tmpdir () at
/home/squalyl/projects/cegcc/src/gcc/libiberty/make-temp-file.c:106
106     /home/squalyl/projects/cegcc/src/gcc/libiberty/make-temp-file.c: No
such file or directory.
        in /home/squalyl/projects/cegcc/src/gcc/libiberty/make-temp-file.c
0x0040f023 <choose_tmpdir+35>:   83 ec 0c       sub    $0xc,%esp
0x0040f026 <choose_tmpdir+38>:   68 97 b4 41 00 push   $0x41b497
0x0040f02b <choose_tmpdir+43>:   e8 e0 8a 00 00 call   0x417b10 <getenv>
0x0040f030 <choose_tmpdir+48>:   83 c4 10       add    $0x10,%esp
0x0040f033 <choose_tmpdir+51>:   83 ec 08       sub    $0x8,%esp
0x0040f036 <choose_tmpdir+54>:   ff 75 f4       pushl  -0xc(%ebp)
0x0040f039 <choose_tmpdir+57>:   50     push   %eax
0x0040f03a <choose_tmpdir+58>:   e8 0f 01 00 00 call   0x40f14e <try_dir>
0x0040f03f <choose_tmpdir+63>:   83 c4 10       add    $0x10,%esp
0x0040f042 <choose_tmpdir+66>:   89 45 f4       mov    %eax,-0xc(%ebp)
(gdb) n
collect2: ld returned 5 exit status

Program exited with code 05.

crash is really at assembly level. The incriminated line is the first of
these three:

  base = try_dir (getenv ("TMPDIR"), base);
  base = try_dir (getenv ("TMP"), base);
  base = try_dir (getenv ("TEMP"), base);

but... Why?!

I forgot to add -O0 to the debug CFLAGS. Now building the toolchain with:

export CFLAGS="-g -O0 -fno-inline"
export LDFLAGS=-g
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to