Homepage of Thomas Maier


Linux Stuff

A little shell script to control the pktcdvd driver using the sysfs interface available since Linux 2.6.19-rc2-mm2 (see also pktcdvd sysfs patch):

Download: pktcdvd tool Oct. 2006

Type pktcdvd -h for help information:

# add new packet device for block device.
# a device node is created: /dev/pktcdvd/
pktcdvd -a pktname blkdev

# remove a packet device
pktcdvd -r pktname|pktmajor:pktminor

# show packet device stat infos
pktcdvd -i pktname|pktmajor:pktminor

# set write congestion marks for packet device
pktcdvd -C pktname|pktmajor:pktminor on [off]

# print write congestion marks for packet device
pktcdvd -c pktname|pktmajor:pktminor

# print device mapping
pktcdvd -m

Example:

modprobe pktcdvd
pktcdvd -a dvdram /dev/hdc
mkudffs /dev/pktcdvd/dvdram
mount -t udf -o rw,noatime /dev/pktcdvd/dvdram /dvdram
cp files /dvdram
umount /dvdram
pktcdvd -r dvdram

notebookd is a little Linux daemon program that is able to control several notebook related functions. It was written mainly to run on a Toshiba Portege M200 Tablet PC, but it should run on several other notebooks and laptops too.

For more details please consult the README or the manual page notebookd.8 .
You need Linux Version 2.6.x or above to run this software!

Download: notebookd-0.6.0.tar.gz   Sep. 2006



Knotebook is a KDE 3.x taskbar applet for the notebookd daemon.

For more details please consult the README.

Download: knotebook-1.1.0.tar.gz   Sep. 2006

This modification is only made for commands like "break [source]:<lineno>". For C++ constructors and destructors, the modification creates more than one breakpoint at the source at lineno, but each generated breakpoint will have another address! (Why this should be so, see the entry in the gdb's PROBLEMS file below)
NOTE: this is only a simple hack. Use it on your own risk! I have spent only one day to get into gdb source code and do the modification.
It would be better, to create only one breakpoint in such C++ constructors and destructors and assign multiple addresses to it. But this needs a huge modification of gdb, i guess ;)

Download: patch-gdb-6.3-c++-bpconstr 03. May 2005

gdb 6.3 itself can be found on http://www.gnu.org/software/gdb.

How to patch gdb 6.3:

Extract gdb-6.3.tar.bz2 and apply the patch as follows:

bunzip2 -c gdb-6.3.tar.bz2 | tar xvf -
cd gdb-6.3
patch -p1 < $patchfilepath/patch-gdb-6.3-c++-bpconstr
./configure
make
su root
make install


See also: (taken from gdb's PROBLEMS file)
gdb/1091: Constructor breakpoints ignored
gdb/1193: g++ 3.3 creates multiple constructors: gdb 5.3 can't set breakpoints
When gcc 3.x compiles a C++ constructor or C++ destructor, it generates
2 or 3 different versions of the object code. These versions have
unique mangled names (they have to, in order for linking to work), but
they have identical source code names, which leads to a great deal of
confusion. Specifically, if you set a breakpoint in a constructor or a
destructor, gdb will put a breakpoint in one of the versions, but your
program may execute the other version. This makes it impossible to set
breakpoints reliably in constructors or destructors.
gcc 3.x generates these multiple object code functions in order to
implement virtual base classes. gcc 2.x generated just one object code
function with a hidden parameter, but gcc 3.x conforms to a multi-vendor
ABI for C++ which requires multiple object code functions.


Space Simulation

The amazing space simulation from EGOSOFT i worked on.

Bala Gi's X2 site (german only)
Bala Gi's X2 Photo Album or Adventures Second Part (german only)
Bala Gi's Adventures First Part (german english)




eMail: mailto:balagi@justmail.de
Last update: 24. Oct. 2006

You are visitor number