User forums > General (but related to Code::Blocks)
GCC 4.4.0-tdm-1 for MinGW (with installer)
sahasranaman:
Hi.
I tried rebuilding libsigc++ from source with GCC 4.4.0-tdm-1 (r2), and the .a file I get here appears to have the _Unwind_* symbols.
I downloaded libsigc++-2.2.3 and tried building with the newer release. I did a make, and the library file got built successfully, but the test programs that come with the source didn't get built, and it gave the same redefinition of _Unwind_* found, even when it was using the newly built library files built by the same make command. I'm pasting the output here.
I'm not sure if I have missed something. Or is there something I should change in the makefile? Please advice.
--- Code: ---g++ -shared -nostdlib c:/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../dllcrt2.o c:/mingw/bin/../lib/gcc/mingw32/4.4.0/crtbegin.o .libs/signal.o .libs/signal_base.o .libs/trackable.o .libs/connection.o .libs/slot.o .libs/slot_base.o .libs/lambda.o -Lc:/mingw/bin/../lib/gcc/mingw32/4.4.0 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/4.4.0/../../.. -L/mingw/lib -lstdc++ -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/4.4.0/crtend.o -Wl,--export-all-symbols -o .libs/libsigc-2.0-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libsigc-2.0.dll.a
Creating library file: .libs/libsigc-2.0.dll.a
copying selected object files to avoid basename conflicts...
rm -fr .libs/libsigc-2.0.lax
mkdir .libs/libsigc-2.0.lax
ar cru .libs/libsigc-2.0.a signal.o signal_base.o trackable.o connection.o slot.o slot_base.o lambda.o
ranlib .libs/libsigc-2.0.a
rm -fr .libs/libsigc-2.0.lax
creating libsigc-2.0.la
(cd .libs && rm -f libsigc-2.0.la && cp -p ../libsigc-2.0.la libsigc-2.0.la)
make[3]: Leaving directory `/c/opt/libsigc++-2.2.3/sigc++'
make[2]: Leaving directory `/c/opt/libsigc++-2.2.3/sigc++'
Making all in tests
make[2]: Entering directory `/c/opt/libsigc++-2.2.3/tests'
g++ -I. -I.. -I.. -I.. -g -O2 -MT test_trackable.o -MD -MP -MF .deps/test_trackable.Tpo -c -o test_trackable.o test_trackable.cc
mv -f .deps/test_trackable.Tpo .deps/test_trackable.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o test_trackable.exe test_trackable.o ../sigc++/libsigc-2.0.la
mkdir .libs
g++ -g -O2 -o .libs/test_trackable.exe test_trackable.o ../sigc++/.libs/libsigc-2.0.dll.a -L/usr/local/lib
c:/mingw/bin/../lib/gcc/mingw32/4.4.0/libgcc_eh.a(unwind-sjlj.o): In function `Unwind_SjLj_Unregister':
d:\crossdev\b4.4.0-tdm-1\mingw32\libgcc/../../../gcc-4.4.0/libgcc/../gcc/unwind-sjlj.c:189: multiple definition of `_Unwind_SjLj_Unregister'
../sigc++/.libs/libsigc-2.0.dll.a(d000019.o):(.text+0x0): first defined here
c:/mingw/bin/../lib/gcc/mingw32/4.4.0/libgcc_eh.a(unwind-sjlj.o): In function `Unwind_SjLj_Register':
d:\crossdev\b4.4.0-tdm-1\mingw32\libgcc/../../../gcc-4.4.0/libgcc/../gcc/unwind-sjlj.c:142: multiple definition of `_Unwind_SjLj_Register'
../sigc++/.libs/libsigc-2.0.dll.a(d000016.o):(.text+0x0): first defined here
c:/mingw/bin/../lib/gcc/mingw32/4.4.0/libgcc_eh.a(unwind-sjlj.o): In function `Unwind_SjLj_Resume':
d:\crossdev\b4.4.0-tdm-1\mingw32\libgcc/../../../gcc-4.4.0/libgcc/../gcc/unwind.inc:220: multiple definition of `_Unwind_SjLj_Resume'
../sigc++/.libs/libsigc-2.0.dll.a(d000017.o):(.text+0x0): first defined here
collect2: ld returned 1 exit status
make[2]: *** [test_trackable.exe] Error 1
--- End code ---
TDragon:
Post the output after adding "-v" to the link command for libsigc-2.0.dll.
ollydbg:
Hi, I found a problem that I can't set breakpoint in a inline function.
For example: I have three files:
main.cpp
--- Code: ---#include <iostream>
using namespace std;
#include "a.h"
int main()
{
f1();
return 0;
}
--- End code ---
a.cpp
--- Code: ---#include "a.h"
void f2(){
f1();
}
--- End code ---
a.h
--- Code: ---inline void f1(){
int a=7;
a=a+1;
a=5;
};
--- End code ---
Note, I can't set breakpoint in a.h in function f1().
When start debugging, I will receive this error from debugger(debug)
--- Quote ---> break "C:/test/test_for_xiaowei/a.h:3"
Breakpoint 2 at 0x6: file C:/test/test_for_xiaowei/a.h, line 3. (2 locations)
>>>>>>cb_gdb:
> break "C:/test/test_for_xiaowei/main.cpp:11"
Breakpoint 3 at 0x401343: file C:\test\test_for_xiaowei\main.cpp, line 11.
>>>>>>cb_gdb:
> run
Warning:
Cannot insert breakpoint 2.
Error accessing memory address 0x6: Input/output error.
gdb: win32_init_thread_list
--- End quote ---
Any comments?
Thanks.
By the way ,I have tried many mingw package. Only TDM-MinGW can set breakpoints in a header file in CB :D
@John
Since the offical MinGW package abandon the SJLJ and use Dwarf-2 Unwinding by default.
Can TDM GCC do like this?
Thanks. :D
ollydbg:
I have fond this gdb return a bad address
--- Quote ---> break "C:/test/test_for_xiaowei/a.h:3"
Breakpoint 2 at 0x6: file C:/test/test_for_xiaowei/a.h, line 3. (2 locations)
--- End quote ---
Why the address is 0x6??
Ceniza:
I wouldn't be surprised you cannot set a breakpoint in an inline function, unless you tell the compiler not to inline it. Think about it. How can you break in a function that is no longer a function? I mean, once it is inlined, its code becomes part of the calling function.
I have no idea why it considers address 0x6, though.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version