Browsing All posts tagged under »debugging«

A bug that always gets me

October 21, 2012

3

This week I made an error that I already repeated at least twice in my career; it doesn’t seem to stick in my brain. I’m going to write about it here, so that maybe I will stop doing it, and maybe it will prevent the same kind of error for my readers. Let’s see if you can spot […]

Ongoing project: Arduino as a JTAG adapter

January 7, 2012

7

I started a project to try to use Arduino as a JTAG interface to perform debugging, programming and scans. The objective is to have a setup like the following diagram: The complete project should include: Arduino sketch OpenOCD integration Python API Arduino shield with common connectors etc. In particular the shield should have: Level shifters between […]

A nasty string initialization bug in C

May 31, 2011

5

Today I encountered a bug that was quite difficult to find regarding strings. In order for strings to work they must be null-terminated, and this implies that an array of characters can contain a string with a length equal to the array size minus one, because there must be space for the null character. I […]

Trace and profile function calls with GCC

October 6, 2010

22

Software debugging is a complex task. There is always the need to collect all available information, in order to detect and understand the problem fast and to think of a proper solution. Sometimes it’s more convenient to debug step-by-step, sometimes it’s better to make the program run completely, and then trace the execution flow “offline”. […]

Follow

Get every new post delivered to your Inbox.

Join 394 other followers