yann@96: Status: submitted for comments yann@96: yann@96: 2004-11-13 Daniel Jacobowitz yann@96: yann@96: * sparc-tdep.c (sparc_software_single_step): Handle stepping to NULL. yann@96: yann@96: Index: gdb-6.3/gdb/sparc-tdep.c yann@96: =================================================================== yann@96: --- gdb-6.3.orig/gdb/sparc-tdep.c 2004-06-06 22:02:55.000000000 -0400 yann@96: +++ gdb-6.3/gdb/sparc-tdep.c 2004-11-13 17:06:05.000000000 -0500 yann@96: @@ -1026,10 +1026,10 @@ yann@96: yann@96: if (insert_breakpoints_p) yann@96: { yann@96: - CORE_ADDR pc; yann@96: + CORE_ADDR pc, orig_npc; yann@96: yann@96: pc = sparc_address_from_register (tdep->pc_regnum); yann@96: - npc = sparc_address_from_register (tdep->npc_regnum); yann@96: + orig_npc = npc = sparc_address_from_register (tdep->npc_regnum); yann@96: yann@96: /* Analyze the instruction at PC. */ yann@96: nnpc = sparc_analyze_control_transfer (pc, &npc); yann@96: @@ -1039,9 +1039,10 @@ yann@96: target_insert_breakpoint (nnpc, nnpc_save); yann@96: yann@96: /* Assert that we have set at least one breakpoint, and that yann@96: - they're not set at the same spot. */ yann@96: - gdb_assert (npc != 0 || nnpc != 0); yann@96: - gdb_assert (nnpc != npc); yann@96: + they're not set at the same spot - unless we're going yann@96: + from here straight to NULL, i.e. a call or jump to 0. */ yann@96: + gdb_assert (npc != 0 || nnpc != 0 || orig_npc == 0); yann@96: + gdb_assert (nnpc != npc || orig_npc == 0); yann@96: } yann@96: else yann@96: {