tinycc-devel
[Top][All Lists]
Advanced

[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


From: grischka
Subject: Re: [Tinycc-devel] tcc 0.9.26 on win32 cannot compile Sqlite3 successfully
Date: Wed, 28 Aug 2013 15:56:53 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Tiago Rodrigues wrote:
Hello, all,

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:

(gdb) r
Starting program: C:\tcc\win32\test.exe
[New thread 3988.0x122c]

Program received signal SIGSEGV, Segmentation fault.
0x0049e88c in ?? ()
(gdb) bt
#0  0x0049e88c in ?? ()
#1  0x0049e250 in ?? ()
#2  0x0049e93c in ?? ()
#3  0x00000000 in ?? ()
(gdb)

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
0012FF40   00000000
0012FF44  /0012FF58
0012FF48  |00497AB8  RETURN to test.00497AB8 from test.004058B0
0012FF4C  |002920E0  ASCII ""C:\tcc\win32\test.exe""
0012FF50  |0012FF58
0012FF54  |75F034F6  RETURN to msvcrt.75F034F6 from msvcrt.75F03526
0012FF58  ]0012FF60
0012FF5C  |0040100F  RETURN to test.0040100F from test.00497A91
0012FF60  ]0012FFA0
0012FF64  |0049CF8F  RETURN to test.0049CF8F from test.00401000
0012FF68  |00000001
...

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
happens.

But how do you find this in gdb?  Or is it that free software is
stuck with a tool that is not practically useful?

--- grischka




reply via email to

[Prev in Thread] Current Thread [Next in Thread]