Skip to content

Instantly share code, notes, and snippets.

@kpy3
kpy3 / setupdb.md
Created March 30, 2018 22:16 — forked from danisfermi/setupdb.md
Setup gdb on Mac OS Sierra/High Sierra

Here are the steps to installing and setting up GDB on Mac OS Sierra/High Sierra. Run brew install gdb. On starting gdb, you will get the following error:

Unable to find Mach task port for process-id 2133: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))

To fix this error, follow the following steps:

@amitsaha
amitsaha / ioctl_demo.c
Created January 18, 2013 07:56
Get sector size, etc using ioctl()
/* Relevant:
http://lists.gnu.org/archive/html/bug-parted/2012-10/msg00018.html
http://stackoverflow.com/questions/8416241/block-device-information-without-mounting-in-linux
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>