This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] call observer_notify_new_objfile after the attach command
- From: Adrian Sendroiu <adrian dot sendroiu at freescale dot com>
- To: <gdb-patches at sourceware dot org>, <palves at redhat dot com>
- Date: Thu, 10 Jul 2014 13:56:26 +0300
- Subject: Re: [PATCH] call observer_notify_new_objfile after the attach command
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=fail (sender IP is 192.88.168.50) smtp dot mailfrom=adrian dot sendroiu at freescale dot com;
- References: <53BD4F45 dot 4090000 at redhat dot com>
Thanks, I added a call to remote_check_symbols in the post_attach hook.
Adrian
>From 0820f5ab475bd9e261e7be26dabbd30e5df60544 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20=C8=98endroiu?= <adrian.sendroiu@freescale.com>
Date: Thu, 10 Jul 2014 11:16:41 +0300
Subject: [PATCH] call remote_check_symbols after attaching
---
gdb/remote.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gdb/remote.c b/gdb/remote.c
index 3aa030c..8b438c7 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -4484,6 +4484,13 @@ extended_remote_attach (struct target_ops *ops, const char *args, int from_tty)
extended_remote_attach_1 (ops, args, from_tty);
}
+static void
+extended_remote_post_attach (struct target_ops *ops, int pid)
+{
+ if (symfile_objfile)
+ remote_check_symbols();
+}
+
/* Check for the availability of vCont. This function should also check
the response. */
@@ -11530,6 +11537,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
extended_remote_ops.to_mourn_inferior = extended_remote_mourn;
extended_remote_ops.to_detach = extended_remote_detach;
extended_remote_ops.to_attach = extended_remote_attach;
+ extended_remote_ops.to_post_attach = extended_remote_post_attach;
extended_remote_ops.to_kill = extended_remote_kill;
extended_remote_ops.to_supports_disable_randomization
= extended_remote_supports_disable_randomization;
--
1.7.9.5