gdb substitute path

Substituting gdb debug paths

Gdb is a debugger with many, many, many(1) options. Some of them are rather obscure, others... less so.

While it's always had the ability to read source files and do useful stuff with them, recent versions of gdb have gained another interface (which you get by calling "gdb -tui") that makes it a bit easier to watch the source as you step through the code. Additionally (and I don't know how long that feature's been there), you can do some interesting things with source paths. Such as substituting a source path prefix by another prefix -- useful if you've moved sources around. This is accomplished by way of the 'set substitute-path' command:

(gdb) set substitute-path /home/buildd /home/wouter

Now whenever gdb is told by the debugging info to search for a file /home/buildd/foo/bar/baz.c, it will instead search for /home/wouter/foo/bar/baz.c. Very useful.

One problem with the above approach, however, is that you need to know what the original path is—the /home/buildd in our example. If you've built the binary yourself, you just need to remember where you built it, and you're all set. But what if you haven't built the binary yourself? I used to use strings for that, and look for any likely candidates, but that isn't very reliable and requires a bit of hunting through many many lines that just happen to look like strings to what really is a fairly naive program. Additionally, it doesn't work when the debugging symbols are in a separate file (as implemented by dh_strip), amongst others.

But no worries! There's a simple solution. Rather than using strings, use readelf -w instead, and grep for DW_AT_comp_dir, which will give you the correct source directory to substitute.

I'm happily single-stepping through a library now. If that isn't nice.

1 no really, many

Posted
2011-going

Going

I'm going to FOSDEM, the
Free and Open Source Software Developers' European Meeting

Obviously.

In contrast to what I claimed a few years ago, I am now also part of the FOSDEM info team, the central team that organizes this great meeting that happens every year in Brussels, Belgium. Currently, my involvement is limited to doing the same things that I did last year (except then by actually being part of the team rather than talking to them through mail), but this might change for future editions.

These "things" involve organizing the cross-distro development room. The schedule isn't finalized yet (that'll happen sometime later this week), but interested parties can go have a look at the list of proposed talks for the cross-distro devroom. There's an interesting lot, IMO.

Posted
dvd ready

DVD's ready

Yesterday, I was finally able to fetch this:

Baobab DVD

(plus 99 more like it)

It's been a while since the concert back in march, which we recorded (with dvswitch); the reason it took that long was mainly due to a few organizational reasons where people who needed to order couldn't because someone else was delaying (you don't want to know). But the DVD's are now, finally, ready. I (really) like what they look like.

There'll probably be a few leftovers, but I can deal with those.

Posted
pmw

PMW vs Lilypond

A few days ago, I discovered From Punched Cards To Flat Screens, the "technical memoirs" of Philip Hazel (of exim and PCRE fame). This document, by itself a very good read, mentioned something about him having written a piece of software for the Acorn RISC OS platform, starting in the early 90s, to typeset music based on a text file; very much the way in which lilypond operates. The document also mentioned that after the demise of Acorn's platform, Philip had ported that application, PMW, to the unix platform. Being interested in music, this had me curious, so I did a bit of investigation.

Lilypond is an interesting piece of software, but as I've written before, I do have a few gripes with it. Once you get beyond the basics, the lilypond syntaxis is somewhat counter-intuitive in my opinion, and there are a number of things that are just wrong with it. Upon reading through the first few examples, I quickly learned that most of the major issues that I have with lilypond's syntaxis simply do not exist with PMW, and that it also has quite a number of features which lilypond in its (in the mean time) fairly long history, still does not support. And while lilypond does have a slightly higher amount of output options, that simply does not weigh against the much higher processing speed and much more sensible input syntaxis of PMW.

I've made a short comparison of the two, which shows some of their differences, and contains some notes on my opinion of the two. This table may grow in the future...

I've only been playing with PMW for a few days now, but I've already decided that I'm going to ditch Lilypond.

Posted
bios battery

Dear lazyweb,

I found out the hard way that my laptop's BIOS is not battery-backed. This means that if the battery runs flat (or it is removed for a prolonged time), that BIOS forgets two things: the system time (which is annoying, but easily fixed), and the MAC address of eth0 (which is more than annoying).

As a result, my laptop's MAC address is now set to something rather invalid. Since this MAC address is configured in a few DHCP servers here and there which give me a fixed IP address when they notice my laptop on the network, I'd like to set it back to what it should be.

With ip link set eth0 address <mac> I can easily set the address back to what it used to be. But, of course, that isn't permanent, and once we reboot, it's gone.

So, dear lazyweb: how does one change a MAC address in a permanent way?

Posted
good bad

Good news and bad news

... in the world of Belgian Tennis.

I learned yesterday that Justine Henin, ex-number 1 tennis player and still one of the great talents amongst women's tennis, is forced to stop her come-back attempt due to an elbow injury which she had been dealing with since the last Wimbledon.

I don't want to guess what's going through her mind at this point in time, but it must be terrible. She'd been working so hard for tennis for all her life, but took a break from the sport because she realized that she needed to give her life apart from the sport a serious boost. And when she'd done that and realized that she still loves tennis and wants to do a come-back, this happens—before she'd even been able to accomplish even one of her goals that she'd set for her come-back.

Terrible.

Justine, on the off chance that you read this: you have my greatest possible sympathies.

The slightly better news also involves an injury; but this time it's not a Belgian player, but it involves Venus Williams. Now I'm not one to gloat at sportspeople's problems, and I do wish Venus all the best and a speedy recovery; but since her injury means she won't be able to make it for the Fed Cup tie against Belgium, slightly over a week from now, the result is that Belgium is now favourite for winning this tie. Of course, the team can't claim having won until the tie is over, but hey.

Too bad I can't be there. But there's this other thing that I'm involved with, which just happens to be in the same weekend. Oh well.

Posted
mestach

Two belgian women playing the singles finals of the Australian Open

... yet it is not a Belgian final. How is this possible?

Answer: An-Sophie Mestach just won the juniors singles title, while Kim Clijsters will compete for the singles titles in the main event in about half an hour.

While not as impressive as winning the main event, it's certainly great! Especially since she also won the Doubles title, together with the Dutch Demi Schuurs

Congratulations, An-Sophie!

Posted