aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-09-28 23:47:02 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-09-28 23:47:02 +0000
commit35ec2a3e66b5f5e28170d267d36939db8ee27490 (patch)
treedc84a53401657a643205f09ec63dfa6b03900bd6 /gdb
parent66d990c74963fb25d8448e4d081fa757b427a5bc (diff)
downloadgdb-35ec2a3e66b5f5e28170d267d36939db8ee27490.zip
gdb-35ec2a3e66b5f5e28170d267d36939db8ee27490.tar.gz
gdb-35ec2a3e66b5f5e28170d267d36939db8ee27490.tar.bz2
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/ia64-tdep.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0627150..61cb155 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-28 Joel Brobecker <brobecker@adacore.com>
+
+ * 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 Doug Evans <dje@google.com>
* linux-nat.c (status_to_str): Handle TRAP_IS_SYSCALL.
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 674204a..bbde5f6 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