From: Petr Sorfa <petrs@caldera.com>
To: "gdb-patches@sources.redhat.com" <gdb-patches@sources.redhat.com>
Subject: [PATCH] IA64 fix for breakpoints on L in MLX instruction bundles
Date: Thu, 09 May 2002 09:48:00 -0000 [thread overview]
Message-ID: <3CDAAB19.4780AA1F@caldera.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
Hi,
Patch for handling breakpoints on the L instruction type in an MLX
bundle.
2002-05-09 Petr Sorfa (petrs@caldera.com)
* ia64-tdep.c: Handle breakpoints on L instruction type
in MLX instruction bundle by moving the breakpoint to
the third slot (X instruction type) as L holds only data.
[-- Attachment #2: ia64-tdep.c.patch --]
[-- Type: text/plain, Size: 1829 bytes --]
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)
next reply other threads:[~2002-05-09 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-09 9:48 Petr Sorfa [this message]
2002-05-09 9:56 ` Kevin Buettner
2002-05-09 12:15 ` Petr Sorfa
2002-05-10 9:09 ` Petr Sorfa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CDAAB19.4780AA1F@caldera.com \
--to=petrs@caldera.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox