From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1593 invoked by alias); 12 Nov 2007 02:08:58 -0000 Received: (qmail 1583 invoked by uid 22791); 12 Nov 2007 02:08:57 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.173) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Nov 2007 02:08:54 +0000 Received: by ug-out-1314.google.com with SMTP id o2so756215uge for ; Sun, 11 Nov 2007 18:08:54 -0800 (PST) Received: by 10.67.30.6 with SMTP id h6mr1687591ugj.1194833333896; Sun, 11 Nov 2007 18:08:53 -0800 (PST) Received: from ?192.168.0.4? ( [62.169.107.97]) by mx.google.com with ESMTPS id s1sm3918876uge.2007.11.11.18.08.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 11 Nov 2007 18:08:53 -0800 (PST) Message-ID: <4737B5B7.4080902@portugalmail.pt> Date: Mon, 12 Nov 2007 02:08:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org, Lerele Subject: [gdbserver] (10/11) Don't report dll events on first attach when --attach'ing Content-Type: multipart/mixed; boundary="------------060205050607050508060608" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00223.txt.bz2 This is a multi-part message in MIME format. --------------060205050607050508060608 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 283 Hi, When attaching to a process, we're reporting the loaded dlls on the first target remote attach, thus gdb will print: "Stopped due to shared library event" This was already handled for the normal run case. The patch simple makes the fix unconditional. Cheers, Pedro Alves --------------060205050607050508060608 Content-Type: text/x-diff; name="gdbserver_attach_no_dllevent.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdbserver_attach_no_dllevent.diff" Content-length: 1214 2007-11-12 Pedro Alves * server.c (main): Don't report dll events on the initial connection on attaches. --- gdb/gdbserver/server.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) Index: src/gdb/gdbserver/server.c =================================================================== --- src.orig/gdb/gdbserver/server.c 2007-11-11 23:16:20.000000000 +0000 +++ src/gdb/gdbserver/server.c 2007-11-11 23:16:30.000000000 +0000 @@ -903,10 +903,6 @@ main (int argc, char *argv[]) /* We are now (hopefully) stopped at the first instruction of the target process. This assumes that the target process was successfully created. */ - - /* Don't report shared library events on the initial connection, - even if some libraries are preloaded. */ - dlls_changed = 0; } else { @@ -921,6 +917,11 @@ main (int argc, char *argv[]) } } + /* Don't report shared library events on the initial connection, + even if some libraries are preloaded. Avoids the "stopped by + shared library event" notice on gdb side. */ + dlls_changed = 0; + if (setjmp (toplevel)) { fprintf (stderr, "Killing inferior\n"); --------------060205050607050508060608--