Skip to content

Instantly share code, notes, and snippets.

View phil-blain's full-sized avatar

Philippe Blain phil-blain

View GitHub Profile
@willirath
willirath / orca_grid_with_cartopy.ipynb
Created March 31, 2021 04:46
Fixing the ORCA longitude for plotting with Cartopy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mike-myers-tob
mike-myers-tob / Working GDB on macOS 11.md
Last active March 3, 2025 05:38
Steps to get GDB actually working in April 2021 on macOS (Intel x86-64 only)

Debug with GDB on macOS 11

The big reason to do this is that LLDB has no ability to "follow-fork-mode child", in other words, a multi-process target that doesn't have a single-process mode (or, a bug that only manifests when in multi-process mode) is going to be difficult or impossible to debug, especially if you have to run the target over and over in order to make the bug manifest. If you have a repeatable bug, no big deal, break on the fork from the parent process and attach to the child in a second lldb instance. Otherwise, read on.

Install GDB

Don't make the mistake of thinking you can just brew install gdb. Currently this is version 10.2 and it's mostly broken, with at least two annoying bugs as of April 29th 2021, but the big one is https://sourceware.org/bugzilla/show_bug.cgi?id=24069

$ xcode-select install  # install the XCode command-line tools