Tag: debugging
-
The agony and the ecstasy of debugging
View image | gettyimages.com If you have ever written a computer program with any degree of seriousness then you will know the feeling: your heart sinking as you realise what you thought was a perfectly good piece of code has a bug somewhere less than obvious. In my case this has happened twice in a…
-
Squashing the LRU bug
Just for once I did not rush to an online forum and say I had found a bug in a product – and I was right not too. Having tried three different cross compiler toolchains I convinced myself that the issue was plainly neither compiler (or, to be more accurate in this case, assembler) output…
-
Curses on ncurses
Every programmer will be familiar with something like this… A little while back I wrote a program that simulates – crudely but effectively – a multicore NoC device. I use it to model the execution times of different page replacement algorithms. The input is XML generated via a step by step trace of a working…
-
Trying to stay calm
Debugging can be deeply frustrating. Not knowing how the debugger works can make it worse. Still, there are always books (ordered today) and the deeper assurance that, in computing, nothing is truly random – your code breaks for a reason: find the reason and you fix the code. At least that is what I am…
-
Going on a bug(?) hunt
I now have some code that is meant to parse an XML file of approximately 5 billion lines. Unfortunately it fails, every time (it seems), on line 4,295,025,275. This is something of a nightmare to debug – but it looks like an overflow bug (in the xerces-c parser) of some sort. Do I try to…
-
How to get a job as a developer
Last night I went to a Birkbeck training session for prospective mentors. I did not realise before I turned up that all, or almost all, the would-be mentors would be MSc Computer Science graduates. In the end that fact alone turned what could have been a pretty dull way to spend a Friday night into…
-
Taking down the bug
Finally nailed the bug in my readdir function. The code was stuck in an endless loop because it did not return an empty dirent when it reached the end of the directory – instead returning the list of files in the directory over and over again. To fix this I made sure that any following…
-
A question for a C guru
The debugging continues, but unfortunately I have not yet been able to identify what is fundamentally broken with my file system code. But along the way I have spotted and fixed various bugs. Here is one, I am not even sure why it compiled in the first place, so maybe a C guru could tell…
-
One of those debugging nights
It must be a situation every programmer is familiar with – you write some code, you are pretty pleased with it, but it just doesn’t work and while you know it is only a small thing that is stopping it from functioning properly, but you just cannot track it down. That is exactly where I…