Index: ia64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ia64-tdep.c,v retrieving revision 1.29 diff -c -p -r1.29 ia64-tdep.c *** ia64-tdep.c 18 Apr 2002 18:09:01 -0000 1.29 --- ia64-tdep.c 9 May 2002 16:39:27 -0000 *************** ia64_memory_insert_breakpoint (CORE_ADDR *** 564,569 **** --- 564,570 ---- int slotnum = (int) (addr & 0x0f) / SLOT_MULTIPLIER; long long instr; int val; + int template; if (slotnum > 2) error("Can't insert breakpoint for slot numbers greater than 2."); *************** ia64_memory_insert_breakpoint (CORE_ADDR *** 571,576 **** --- 572,586 ---- addr &= ~0x0f; val = target_read_memory (addr, bundle, BUNDLE_LEN); + + /* Check for L type instruction in 2nd slot, if present then + bump up the slot number to the 3rd slot */ + template = extract_bit_field (bundle, 0, 5); + if (slotnum == 1 && template_encoding_table[template][1] == L) + { + slotnum = 2; + } + instr = slotN_contents (bundle, slotnum); memcpy(contents_cache, &instr, sizeof(instr)); replace_slotN_contents (bundle, BREAKPOINT, slotnum); *************** ia64_memory_remove_breakpoint (CORE_ADDR *** 587,596 **** --- 597,616 ---- int slotnum = (addr & 0x0f) / SLOT_MULTIPLIER; long long instr; int val; + int template; addr &= ~0x0f; val = target_read_memory (addr, bundle, BUNDLE_LEN); + + /* Check for L type instruction in 2nd slot, if present then + bump up the slot number to the 3rd slot */ + template = extract_bit_field (bundle, 0, 5); + if (slotnum == 1 && template_encoding_table[template][1] == L) + { + slotnum = 2; + } + memcpy (&instr, contents_cache, sizeof instr); replace_slotN_contents (bundle, instr, slotnum); if (val == 0)