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 a lot of preprocessor symbols (i.e. #defines) 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

Recovering 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 compliant 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 >>