From: Keith M. <kei...@to...> - 2007-04-04 10:16:23
|
James Steward wrote, quoting me: >> gcc -c -g -O2 -I. -I../../mingw-catgets-0.1/include \ >> -I/mingw/include -DHAVE_CONFIG_H -L. \ >> ../../mingw-catgets-0.1/catopen.c >> >> gcc -o catgets-1.dll -shared -g -O2 catopen.o catgets.o \ >> catclose.o mctab.o mcref.o mcfree.o \ >> -Wl,--out-implib=libcatgets.dll.a >> Creating library file: libcatgets.dll.a >> >> gcc -o gencat.exe -g -O2 -L. gencat.o setlocale.o \ >> mkstemp.o langinfo.o basename.o mcload.o mciconv.o \ >> mcsource.o mcmerge.o -liconv -lcatgets >> >> I then loaded gencat.exe into gdb, set a breakpoint at catopen, >> (which is in catgets-1.dll), and ran to the break; absolutely >> no problem viewing source at that point, nor in tracing onward >> from it at source level. > > Ah - on my system, if I build an implib with the name libfoo.a > instead of libfoo.dll.a I have trouble tracing into the dll (when > linking directly to the dll instead of manually loading it). How strange! > However with the naming libfoo.dll.a it works fine for me compiled > and linked as you have here Keith. Ok, I just threw away all the *.o, *.a and *.exe files from my build directory, and hacked the Makefile to suppress making the *static* libcatgets.a, (which I hadn't shown in my previous post), and to name the implib libcatgets.a instead of libcatgets.dll.a . Following a new `make', (taking the liberty of setting `CFLAGS="-g -O0"', which makes source level debugging soooo much easier), I *still* cannot reproduce this problem. > Notice the OP is creating; > >>> gcc -shared \ >>> mf_psnt2.o mfbo_all.o mfbo_txt.o rs232w32.o \ >>> -o mfpsn232.dll \ >>> -Wl,--out-implib,libmfpsn232.a >>> Creating library file: libmfpsn232.a > > Maybe this is why gdb can't find what it's looking for? Not indicated by what I'm seeing. I don't doubt that you are both seeing a real problem, but I can't reproduce it, which is why I asked: >> What version of gdb are you using? From whence? For the record, mine is from here[1]: https://sourceforge.net/project/showfiles.php?group_id=2435&package_id=82725&release_id=358837 and my GCC version is: $ gcc --version gcc.exe (GCC) 3.4.5 (mingw special) Copyright (C) 2004 Free Software Foundation, Inc. Regards, Keith. [1] Contrary to a vaguely remembered report I mentioned a week or so ago, this version *does* seem to work for me. There was also an insight-6.3.50-20051116-cvs release in the Contributed package set, which crashed on the first attempt to step through code; I've now hidden that from public view. |