[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] tcc 0.9.26 on win32 cannot compile Sqlite3 successful
Re: [Tinycc-devel] tcc 0.9.26 on win32 cannot compile Sqlite3 successfully
Wed, 28 Aug 2013 15:56:53 +0200
Thunderbird 220.127.116.11 (Windows/20090812)
Tiago Rodrigues wrote:
I'm having a small difficulty using tcc 0.9.26 to compile SQLite3 (both
in Windows XP and 7), as the resulting executable crashes when I try to
call the int sqlite3_initialize(void) function.
I am able to find the problem in a minute with a real debugger
(ollydbg here) but I have no idea how to do it with gdb.
What I get is:
Starting program: C:\tcc\win32\test.exe
[New thread 3988.0x122c]
Program received signal SIGSEGV, Segmentation fault.
0x0049e88c in ?? ()
#0 0x0049e88c in ?? ()
#1 0x0049e250 in ?? ()
#2 0x0049e93c in ?? ()
#3 0x00000000 in ?? ()
Unfortunately that's not even close to enough info about the stack
contents in order to spot the offending function. In the other
debugger I see:
0012FF38 0049E250 test.0049E250
0012FF3C 0049E93C test.0049E93C
0012FF48 |00497AB8 RETURN to test.00497AB8 from test.004058B0
0012FF4C |002920E0 ASCII ""C:\tcc\win32\test.exe""
0012FF54 |75F034F6 RETURN to msvcrt.75F034F6 from msvcrt.75F03526
0012FF5C |0040100F RETURN to test.0040100F from test.00497A91
0012FF64 |0049CF8F RETURN to test.0049CF8F from test.00401000
so there is actually much more down the stack that gdb does not show,
specifically that the last known good address within the program is at
00497AB8 RETURN to test.00497AB8 from test.004058B0
I can then single step through the function at 004058B0 to see what
But how do you find this in gdb? Or is it that free software is
stuck with a tool that is not practically useful?