tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Debug info in linking


From: grischka
Subject: Re: [Tinycc-devel] Debug info in linking
Date: Mon, 04 Oct 2010 20:08:38 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

I cannot confirm this.
$ tcc -g -c examples\fib.c
$ tcc -g fib.o
$ gdb --args fib.exe 10
GNU gdb 6.8
...
This GDB was configured as "i686-pc-mingw32"...
(gdb) b main
Breakpoint 1 at 0x40105c: file examples/fib.c, line 14.
(gdb) list
5               if (n <= 2)
6                       return 1;
7               else
8                       return fib(n-1) + fib(n-2);
9       }
10
11      int main(int argc, char **argv)
12      {
13              int n;
14              if (argc < 2) {
(gdb)

Which means that fib.exe has line-number info and symbol info
(it knows about 'main').

Also fig.exe has .stab and .stabstr sections and both are not
empty.

(Using tcc from latest mob branch)

--- grischka

address@hidden wrote:
Hi,
Please what is wrong with this?

tcc -g test.c -L.
copy test.exe test1.exe
        1 file(s) copied.
tcc -g -c test.c
tcc -g test.o -L.
copy test.exe test2.exe
        1 file(s) copied.
tcc test.o -L.
copy test.exe test3.exe
        1 file(s) copied.

 cksum test*.exe
2227703240 3072 test1.exe
629199517 3072 test2.exe
3322364492 2048 test3.exe


Is this a bug or did I miss something?

To avoid misunderstandings, I'll try to explain what I meant.
The test1.exe is supposed to contain debugging information, which it does, that is ok. The test2.exe is in my oppinion is also supposed to contain debugging information, it 'sort of' does, but there is some problem with it. The test3.exe is not supposed to contain any debugging information, it doesn't and that is ok.

I looked inside the .exe files, I am not that familiar with tcc internals, but if I understand it correctly, then in test2.exe the debugging information section (symbol table) is present but for some reason it is empty.

With regards,
  Ondrej





reply via email to

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