Showing posts with label gdb. Show all posts
Showing posts with label gdb. Show all posts

Friday, 1 February 2019

Using GDB with a BBC micro:bit

This note is about using Segger J-Link software to help debug code on a BBC micro:bit.

Monday, 19 November 2018

Mojave vs. GDB

Apple's software development tools are based on LLVM, and Apple don't seem to feel it necessary to keep GCC and friends up to date with changes in the Apple tools or security policies.

GDB has been particularly affected by this. You can see why a tool which is capable of interacting with running programs would have to be treated with caution.

Monday, 13 February 2017

GDB vs macOS Sierra

We probably feel downhearted if we need to use the debugger to find out what's wrong with our Ada code.

Under those circumstances, we feel even more frustrated if the debugger doesn't work!

This is exactly what has happened with gdb and macOS Sierra.

Saturday, 12 March 2016

Tuesday, 18 August 2015

Arduino Due/Segger J-Link EDU

I’ve been porting my Cortex-based RTS to Arduino Due, using the J-Link JTAG interface (because who can make an RTS without a debugger?). I’ve probably forgotten my initial problems with ST-LINK (an equivalent interface included for free on the STM32F4 board, supported by OSS software), but it seemed a much less trying experience than with Segger.

There are two things with J-Link GDB Server: first, it seems like a bad idea to keep the server alive after a GDB session ends, so start it with -singlerun; and second, you absolutely must issue monitor reset before running your program. If you don’t you’ll end up like I did, scratching my head for three days trying to understand why I was getting a HardFault at the SVC that FreeRTOS uses to kick tasking off.

Sunday, 29 January 2012

Catching exceptions in GDB

There's a problem running gdb from GNAT GPL 2011 (which works fine with programs compiled with GNAT GPL 2011) on programs compiled with GCC 4.6 on Max OS X Lion and possibly earlier; you can't catch exceptions as you'd expect:

(gdb) break exception
Unable to insert catchpoint. Try to start the program first.

Saturday, 6 August 2011

Debugging and stack traces on Mac OS X Lion

Mac OS X 10.7 Lion (really, Xcode 4) has changed the way that the system linker works in a way which makes debugging and interpreting stack traces difficult-to-impossible without special action.

Debugging with Mac OS X shared libraries

Writing Ada means you don't need the debugger that often. But when you do need it, you really need it. And often the reason will be an exception, which you'll want to catch and investigate.