From: Joel Brobecker Date: Mon, 28 Sep 2009 23:56:53 +0000 (+0000) Subject: * ia64-tdep.c (ia64_memory_insert_breakpoint): Check the slotnum X-Git-Tag: gdb_7_0-2009-10-06-release~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3eb677c5d781ee77f04c6614c19518fbc002e38;p=thirdparty%2Fbinutils-gdb.git * ia64-tdep.c (ia64_memory_insert_breakpoint): Check the slotnum and the type of instruction before deciding which slot to save in the breakpoint shadown contents. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4e86c2fe173..6afeda6f23f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-09-28 Joel Brobecker + + * ia64-tdep.c (ia64_memory_insert_breakpoint): Check the slotnum + and the type of instruction before deciding which slot to save + in the breakpoint shadown contents. + 2009-09-28 Hui Zhu * i386-tdep.c (i386_process_record): Remove "0x" that diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 674204a9321..bbde5f62054 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -635,6 +635,12 @@ ia64_memory_insert_breakpoint (struct gdbarch *gdbarch, return val; } + /* Check for L type instruction in slot 1, if present then bump up the slot + number to the slot 2. */ + template = extract_bit_field (bundle, 0, 5); + if (slotnum == 1 && template_encoding_table[template][slotnum] == L) + slotnum = 2; + /* Slot number 2 may skip at most 2 bytes at the beginning. */ bp_tgt->shadow_len = BUNDLE_LEN - 2; @@ -657,12 +663,6 @@ ia64_memory_insert_breakpoint (struct gdbarch *gdbarch, return val; } - /* Check for L type instruction in slot 1, if present then bump up the slot - number to the slot 2. */ - template = extract_bit_field (bundle, 0, 5); - if (slotnum == 1 && template_encoding_table[template][slotnum] == L) - slotnum = 2; - /* Breakpoints already present in the code will get deteacted and not get reinserted by bp_loc_is_permanent. Multiple breakpoints at the same location cannot induce the internal error as they are optimized into