How about this? The memory_error is only relevant for memory breakpoints, and only insert_breakpoint returns an errno (the hardware and catcpoint functions return -1 on error)-- so the call to strerror prints the error when it is relevant, and so replaces print_sys_errmsg. grace