Printing all the pre defined gcc macros

26.10.2007 at 22:50

Another thing which is quite useful when dealing with preprocessor issues is a list of all compiler defined macros. So here you go.

gcc -dM -E - < /dev/null


read more comments

Preserving preprocessor symbols for debugging purposes

22.10.2007 at 12:12

I have spent half of the weekend debugging a bug in tcc without much progress so far. Anyway one thing which is quite useful while debugging an application which uses preprocessor symbols (#defines etc) is to make them available to gdb. The following options tell gcc to embed the required debugging information in the executable.

gcc -gdwarf-2 -g3 [other options as needed]


read more comments

Bring back deleted files with lsof

09.10.2007 at 22:04

Today i accidentally deleted a PDF file, fortunately the pdf reader was still open and had a reference to the file so i could copy it back from


There is an article on which explains the procedure if your unfamiliar with it.


read more comments

PCC another C Compiler

05.10.2007 at 23:14

Ok today somebody pissed of Rob with the effect that he stopped maintaining his tcc fork which sucks. It seems that he will try to get pcc, a thirty year old C compiler recently resurrected by the OpenBSD people, to compile Linux. I haven't used pcc yet but from reading it's project page it seems that it won't be as fast as tcc. After all pcc is a two-pass compiler which allows more optimizations but is slower, whereas tcc is a one-pass compiler.

We will see what works out, competition in the compiler field is definitely a good thing. In this context one should also take a look at clang, a C frontend for llvm.


read more comments

Tiny Browsers for embedded Systems

05.10.2007 at 22:48

Ok i am starting to look around for suitable applications for my embedded like desktop distribution. Ideally i would like a xhtml/css/javascript compilant browser which is still lightweight.

The well known text browser like lynx, w3m, elinks, links or links2 (known for it's graphic -g mode) are not really what i want.

So i checked the current status of dillo and noticed that the long awaited release of the FLTK2 port finally happened.

Another more advanced rendering engine is tkhtml3 and it's corresponding browser hv3 which even passes the ACID2 test. It uses libsee for the javascript support. As the name suggests a rather big part of the browser is written in Tcl using the Tk ui-toolkit, the core rendering engine is however implemented in C. A statically compiled hv3 with all dependencies (Tcl,Tk,libsee) is about ~3.4M. I asked Dan Kennedy the maintainer whether it would be possible to port it to a different toolkit and get rid of Tcl, he thinks it should be doable, however according to him replacing the browser functionality which is written in Tcl is a rather big undertaking. As i currently both lack the required skills and time i won't even try it right now.


read more comments

<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 >>