From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23258 invoked by alias); 11 Jan 2012 19:24:03 -0000 Received: (qmail 23248 invoked by uid 22791); 11 Jan 2012 19:24:02 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Jan 2012 19:23:46 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0BJNivC011006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 Jan 2012 14:23:45 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0BItVL9006012; Wed, 11 Jan 2012 13:55:31 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id q0BItUvw021705; Wed, 11 Jan 2012 13:55:30 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Subject: RFC: hacky fix for PR 12406 Date: Wed, 11 Jan 2012 19:25:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: 2012-01/txt/msg00364.txt.bz2 I would like to get some feedback on this. PR 12406 concerns what is printed when stop-on-solib-events is set: (gdb) set stop-on-solib-events 1 (gdb) r Starting program: /tmp/q Stopped due to shared library event What is missing here is any indication of what library was loaded. This patch changes the output to: (gdb) set stop-on-solib-events 1 (gdb) r Starting program: /tmp/q [Inferior loaded library /lib64/ld-linux-x86-64.so.2] Stopped due to shared library event I could not find a good way to get the information about what library was loaded from the library-loading code to the bpstat_print code. This approach seems like a hack to me -- so I was wondering if anyone has a better suggestion. This regtests fine on x86-64 F15. Tom 2012-01-11 Tom Tromey PR symtab/12406: * solib.c (update_solib_list): Print message if stop_on_solib_events is set. diff --git a/gdb/solib.c b/gdb/solib.c index f591785..66e2f94 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -810,6 +810,11 @@ update_solib_list (int from_tty, struct target_ops *target) _("Error while mapping shared " "library sections:\n")); + if (stop_on_solib_events) + ui_out_message (current_uiout, 0, + _("[Inferior loaded library %s]\n"), + i->so_name); + /* Notify any observer that the shared object has been loaded now that we've added it to GDB's tables. */ observer_notify_solib_loaded (i);