This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] call observer_notify_new_objfile after the attach command


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]