From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1122 invoked by alias); 18 Mar 2003 01:51:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1011 invoked from network); 18 Mar 2003 01:51:10 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 18 Mar 2003 01:51:10 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id D6DD9D34B8; Mon, 17 Mar 2003 17:51:12 -0800 (PST) Date: Tue, 18 Mar 2003 01:51:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFA] Add observer notification in normal_stop Message-ID: <20030318015112.GK16507@gnat.com> References: <20030318014944.GJ16507@gnat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="c3bfwLpm8qysLVxt" Content-Disposition: inline In-Reply-To: <20030318014944.GJ16507@gnat.com> User-Agent: Mutt/1.4i X-SW-Source: 2003-03/txt/msg00384.txt.bz2 --c3bfwLpm8qysLVxt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 940 [sigh, once more, with the patch this time...] Hello, I am currently writing a regression test for observer.c, which will live in testsuite/gdb.gdb. It's using a mechanism similar to xfullpath.exp. But in order for the test to function, observer.o needs to be linked in. This wasn't the case up to now, because there is currently no code using it. This patch is adding a call to observer_notify_normal_stop() inside normal_stop. This notification will be useful later, when the latest version of ada-task.c (from ACT's repository, accessible from libre.act-europe.fr BTW) is contributed. In the meantime, the overhead is really minimal and it allows us to test observer.c by debugging gdb. 2003-03-17 J. Brobecker * infrun.c (observer.h): Add #include. (normal_stop): Add call to observer_notify_normal_stop. * Makefile.in (infrun.o): Add dependency on observer.h. Ok to apply? -- Joel --c3bfwLpm8qysLVxt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="infrun.diff" Content-length: 2154 Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.97 diff -c -3 -p -r1.97 infrun.c *** infrun.c 24 Feb 2003 21:56:49 -0000 1.97 --- infrun.c 18 Mar 2003 01:40:13 -0000 *************** *** 42,47 **** --- 42,48 ---- #include "inf-loop.h" #include "regcache.h" #include "value.h" + #include "observer.h" /* Prototypes for local functions */ *************** print_stop_reason (enum inferior_stop_re *** 2953,2958 **** --- 2954,2961 ---- void normal_stop (void) { + observer_notify_normal_stop (); + /* As with the notification of thread events, we want to delay notifying the user that we've switched thread context until the inferior actually stops. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.342 diff -c -3 -p -r1.342 Makefile.in *** Makefile.in 17 Mar 2003 23:25:08 -0000 1.342 --- Makefile.in 18 Mar 2003 01:40:15 -0000 *************** infptrace.o: infptrace.c $(defs_h) $(fra *** 1817,1823 **** infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \ $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \ $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \ ! $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h) infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ --- 1817,1824 ---- infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \ $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \ $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \ ! $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \ ! $(observer_h) inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h) infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ --c3bfwLpm8qysLVxt--