From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11419 invoked by alias); 28 Dec 2010 04:43:27 -0000 Received: (qmail 11400 invoked by uid 22791); 28 Dec 2010 04:43:25 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_40,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Dec 2010 04:43:19 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 915A32BABC4 for ; Mon, 27 Dec 2010 23:43:17 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zLKyfIeFhrQN for ; Mon, 27 Dec 2010 23:43:17 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 17F2C2BAB2A for ; Mon, 27 Dec 2010 23:43:17 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 6FDDB1457BB; Tue, 28 Dec 2010 05:43:08 +0100 (CET) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Porting GDB to ia64-hpux Date: Tue, 28 Dec 2010 04:43:00 -0000 Message-Id: <1293511386-7384-1-git-send-email-brobecker@adacore.com> 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: 2010-12/txt/msg00479.txt.bz2 At long last, after having promised this a long time ago (this brings memories of Australia, as I was spending time there when I first started on this port), I am finally contributing this port. It took a while, because the first port I did (against GDB 6.3) had a few hacks in it that I wasn't happy about. This port is relatively clean, I believe. There is one dark spot with shared library support, which is currently native-only - if you build GDB as a cross debugger to ia64-hpux, you won't get the shared libraries. I think that this is an acceptable limitation, since I'm not planning on supporting gdbserver-style remote debugging capabilities. I did spend a couple of hours exploring the idea of using solib-target, but there were a couple of issues[1]. I was able to build tcl/expect on this platform, and thus was able to run the testsuite. Results are not stellar, but to my surprise, already better than what I get on ia64-linux. A large portion of the failures are caused by known limitations / missing features in that port, which I will detail a little bit below. Results first: # of expected passes 10618 # of unexpected failures 727 # of expected failures 50 # of untested testcases 105 # of unresolved testcases 12 # of unsupported tests 61 The entire patch series has also been tested on ia64-linux, with no observed regression. I'd like to commit this Thu or Fri in a week from now. Known problems and missing features that are causing most of the failures: - core files are not supported (I know it's easy to add, but I just don't know how to!). If someone kindly helped, I would be happy to give it a crack - an interesting learning exercise. - The kernel on HP-UX does not allow the debugger to change the value of the BSP register, which makes it impossible to "pop" a register frame at the same time was pop the stack frame during a "return". This pretty much guaranties great chaos during a "return" (loss of synchronization between the call stack and the register stack). - Backtraces through signal handlers. - function-call parameter passing / return values: There are still some cases where we pass the parameters incorrectly. But that's general to ia64, I think. -- Joel [1] Issues related to using solib-target with ia64-hpux: (a) I need the various hooks to setup the shared-lib notifications; (b) And next, it's not obvious how to map the info I get from the system back to the way the info is encoded in the TARGET_OBJECT_SHARED_LIBRARIES object. In particular, there are two segments (data and code) to consider when performing section relocation. The second issue should be workable, but the first one is a bit more of an issue.