Re: [Tinycc-devel] debug info broken

2017-12-31 Thread Michael Matz
Hi, On Thu, 28 Dec 2017, grischka wrote: Ok, I was able to reproduce the original problem on an suse 10.2 from 2007. He :) It is that in debug mode, tcc includes all sections in the image, that is also reloc sections that already have been applied. Hah, finally a reason to fix this long s

Re: [Tinycc-devel] debug info broken

2017-12-28 Thread grischka
grischka wrote: But why, as the comment suggests, some versions of GDB work better if dwarf info is broken remains a mystery to me. Maybe these won't load stabs if dwarf is ok. If it were me I'd still just remove that "&& (s->sh_flags & SHF_ALLOC))". Ok, I was able to reproduce the original p

Re: [Tinycc-devel] debug info broken

2017-12-19 Thread foobar
On Tue, 19 Dec 2017 00:26:34 +0100 grischka wrote: > And that might well be because of missing relocation which is because > of (as foobar wrote): > > maybe it's because i use musl libc > in combination with that patch here > http://repo.or.cz/tinycc.git/commitdiff/0ac29b53#patch8 > If it wer

Re: [Tinycc-devel] debug info broken

2017-12-18 Thread grischka
Michael Matz wrote: Maybe this is the problem in that gdb doesn't want to read debug info further after seeing this error? Yes, seems that GDB (or some version of) refuses to load any symbols at all, also not from stabs, if dwarf info (which comes from crt1/i/n.o) is broken. And that might w

Re: [Tinycc-devel] debug info broken

2017-12-18 Thread foobar
On Mon, 18 Dec 2017 20:24:52 +0100 (CET) Michael Matz wrote: > > I've built 0.9.27 for x86_64 and tried a see if debugging works, but: > > > > $ cat true.c > > int main() { return 0; } > > > > $ tcc true.c -g -o true > > Above works for me (with 0.9.27 release and others). The .stabs debug

Re: [Tinycc-devel] debug info broken

2017-12-18 Thread Michael Matz
Hi, On Sun, 17 Dec 2017, foobar wrote: > Hi list, > > First of all, thanks for the release! > I've built 0.9.27 for x86_64 and tried a see if debugging works, but: > > $ cat true.c > int main() { return 0; } > > $ tcc true.c -g -o true Above works for me (with 0.9.27 release and others). Th

[Tinycc-devel] debug info broken

2017-12-17 Thread foobar
Hi list, First of all, thanks for the release! I've built 0.9.27 for x86_64 and tried a see if debugging works, but: $ cat true.c int main() { return 0; } $ tcc true.c -g -o true $ gdb ./true GNU gdb (GDB) 7.6.2 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3