Hello! At the moment, gdb is not very good at debugging applications in flash: - you must remember to use 'hbreak' and not 'break' - a number of commands (like "next") want to use breakpoints internally. Since software breakpoints do no work, those commands do no work either. This patch makes insert_bp_location automatically decide what breakpoint type should be used if the target provides a memory map. Tested by running binary from flash and observing that 'break', 'step', 'next' and 'finish' all work fine, while they did not work before. OK? There are couples of other calls to target_set_breakpoint that are not affected by this patch. On a preliminary look, one call is executed only for one system (hppa) and the other call seems wrong. I'll look into that more and will send a separate patch. - Volodya gdb/ * breakpoint.c: Include "memattr.h". (automatic_hardware_breakpoints): New. (show_automatic_hardware_breakpoints): New. (insert_bp_location): Automatically use hardware breakpoints. (_initialize_breakpoint): Register the "auto-hw" variable. * Makefile.in (breakpoint.o): Update dependencies. gdb/doc * gdb.texinfo (Setting breakpoints): Document automatic software/hardware breakpoint usage and the "set breakpoint auto-hw" command.