From: Yufeng Zhang <Yufeng.Zhang@arm.com>
To: Pedro Alves <palves@redhat.com>
Cc: Marcus Shawcroft <marcus.shawcroft@gmail.com>,
GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [native AAarch64 GNU/Linux] Access debug register mirror from the corresponding process.
Date: Wed, 13 Feb 2013 18:57:00 -0000 [thread overview]
Message-ID: <511BE1EF.3020408@arm.com> (raw)
In-Reply-To: <511BB8DE.3060704@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 588 bytes --]
On 02/13/13 16:01, Pedro Alves wrote:
> On 02/13/2013 03:21 PM, Marcus Shawcroft wrote:
>>> I'll send you an aarch64 version of this patch, unless you've
>>> already started porting the necessary bits over.
>>
>> We were just about to get started... but if you have a patch in hand
>> that would be great!
>
> Here it is. Completely untested, of course. But hopefully not
> too far off.
Not far off at all; thanks! I have tested your patch and made some
further changes; please find the attached patch. The two patches
together seem to be working.
Thanks,
Yufeng
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: aarch64-fix.diff --]
[-- Type: text/x-patch; name=aarch64-fix.diff, Size: 2038 bytes --]
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index 89055f4..846f156 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -336,7 +336,7 @@ struct aarch64_dr_update_callback_param
unsigned int idx;
};
-/* Callback for linux_nat_iterate_watchpoint_lwps. Records the
+/* Callback for iterate_over_lwps. Records the
information about the change of one hardware breakpoint/watchpoint
setting for the thread LWP.
The information is passed in via PTR.
@@ -410,12 +410,12 @@ aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state,
int is_watchpoint, unsigned int idx)
{
struct aarch64_dr_update_callback_param param;
+ ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (inferior_ptid));
param.is_watchpoint = is_watchpoint;
param.idx = idx;
- linux_nat_iterate_watchpoint_lwps (debug_reg_change_callback,
- (void *) ¶m);
+ iterate_over_lwps (pid_ptid, debug_reg_change_callback, (void *) ¶m);
}
/* Print the values of the cached breakpoint/watchpoint registers. */
@@ -739,8 +739,8 @@ aarch64_linux_new_fork (struct lwp_info *parent, pid_t child_pid)
removed together. */
parent_pid = ptid_get_pid (parent->ptid);
- parent_state = i386_debug_reg_state (parent_pid);
- child_state = i386_debug_reg_state (child_pid);
+ parent_state = aarch64_get_debug_reg_state (parent_pid);
+ child_state = aarch64_get_debug_reg_state (child_pid);
*child_state = *parent_state;
}
\f
@@ -1540,10 +1540,6 @@ _initialize_aarch64_linux_nat (void)
t->to_stopped_data_address = aarch64_linux_stopped_data_address;
t->to_watchpoint_addr_within_range =
aarch64_linux_watchpoint_addr_within_range;
- if (aarch64_inferior_data == NULL)
- aarch64_inferior_data
- = register_inferior_data_with_cleanup (NULL,
- aarch64_inferior_data_cleanup);
/* Override the GNU/Linux inferior startup hook. */
super_post_startup_inferior = t->to_post_startup_inferior;
next prev parent reply other threads:[~2013-02-13 18:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-07 16:33 [PATCH] [native x86 GNU/Linux] Access debug register mirror from the corresponding inferior Pedro Alves
2013-02-07 16:59 ` Jan Kratochvil
2013-02-11 21:10 ` Pedro Alves
2013-02-12 12:36 ` Pedro Alves
2013-02-12 16:50 ` Jan Kratochvil
2013-02-13 15:04 ` Pedro Alves
2013-02-13 14:20 ` Yufeng Zhang
2013-02-13 14:51 ` Pedro Alves
2013-02-13 15:14 ` Pedro Alves
2013-02-13 15:21 ` Marcus Shawcroft
2013-02-13 16:02 ` [native AAarch64 GNU/Linux] Access debug register mirror from the corresponding process Pedro Alves
2013-02-13 18:57 ` Yufeng Zhang [this message]
2013-02-13 19:04 ` Pedro Alves
2013-02-14 10:13 ` Yufeng Zhang
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=511BE1EF.3020408@arm.com \
--to=yufeng.zhang@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=marcus.shawcroft@gmail.com \
--cc=palves@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