From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21085 invoked by alias); 24 Mar 2006 05:26:09 -0000 Received: (qmail 21061 invoked by uid 22791); 24 Mar 2006 05:26:07 -0000 X-Spam-Check-By: sourceware.org Received: from ip127.bb146.pacific.net.hk (HELO mailhub.stlglobal.com) (202.64.146.127) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 24 Mar 2006 05:25:29 +0000 Received: from rccomp.stlglobal.com ([192.168.100.200]) by mailhub.stlglobal.com with esmtp (Exim 4.50) id 1FMena-0003Xl-UM for gdb-patches@sources.redhat.com; Fri, 24 Mar 2006 13:25:22 +0800 Message-ID: <442382D1.4010104@tausq.org> Date: Fri, 24 Mar 2006 09:38:00 -0000 From: Randolph Chung User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [RFA] solib-som.c fix for hpux Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00266.txt.bz2 Dan J's change to solib handling (http://sources.redhat.com/ml/gdb-patches/2006-01/msg00198.html) exposed a probably unfounded assumption in the SOM solib code that assumes that the solib_create_inferior_hook will always be called before current_sos. As a result, gdb cvs on HPUX 32-bit would always error out when trying to run any executable with the message "Debugging dynamic executables loaded via the hpux8 dld.sl is not supported.". The most straightforward fix is to remove the error and handle the case where there is not yet a link map; that is what I have in the patch below. OTOH this does remove the error message if anybody does try to run gdb on hpux8 (!!!) Comments? ok to check in? randolph 2006-03-24 Randolph Chung * solib-som.c (link_map_start): Don't error out if there is not yet a link map. Index: solib-som.c =================================================================== RCS file: /cvs/src/src/gdb/solib-som.c,v retrieving revision 1.8 diff -u -p -r1.8 solib-som.c --- solib-som.c 24 Feb 2006 23:52:04 -0000 1.8 +++ solib-som.c 24 Mar 2006 05:18:35 -0000 @@ -520,7 +523,7 @@ link_map_start (void) read_memory (addr, buf, 4); addr = extract_unsigned_integer (buf, 4); if (addr == 0) - error (_("Debugging dynamic executables loaded via the hpux8 dld.sl is not supported.")); + return 0; read_memory (addr, buf, 4); return extract_unsigned_integer (buf, 4); -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/