From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16437 invoked by alias); 13 Aug 2002 16:12:55 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 16274 invoked from network); 13 Aug 2002 16:12:53 -0000 Received: from unknown (HELO mail1.uk.neceur.com) (193.116.254.3) by sources.redhat.com with SMTP; 13 Aug 2002 16:12:53 -0000 Received: from cerberus.neceur.com (cerberus.uk.neceur.com [172.29.14.12]) by mail1.uk.neceur.com (Switch-2.1.4/Switch-2.1.0) with ESMTP id g7DGCl212872; Tue, 13 Aug 2002 17:12:47 +0100 (BST) Received: from ldn-hermes.uk.neceur.com (localhost [127.0.0.1]) by cerberus.neceur.com (Switch-2.1.4/Switch-2.1.0) with ESMTP id g7DGBYr27969; Tue, 13 Aug 2002 17:11:34 +0100 (BST) Received: from thoth.uk.neceur.com ([172.29.7.4]) by ldn-hermes.uk.neceur.com (Lotus Domino Release 5.0.10) with ESMTP id 2002081317124336:22584 ; Tue, 13 Aug 2002 17:12:43 +0100 Subject: Re: PA64 shared library problems with gdb-5.2 (hpux) To: law@redhat.com Cc: binutils@sources.redhat.com, gdb@sources.redhat.com Message-ID: From: ross.alexander@uk.neceur.com Date: Tue, 13 Aug 2002 09:12:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-SW-Source: 2002-08/txt/msg00118.txt.bz2 I have a rinky-dinky test program which works fine. #include #include #include int main(int argc, char *argv[]) { void *v; int i, count; void **handle; if (argc < 2) { printf("%s: \n", argv[0]); } handle = calloc(sizeof(void*), argc); for (i = 1; i < argc; i++) { if ((handle[count] = dlopen(argv[i], RTLD_GLOBAL|RTLD_NOW)) == NULL) printf("dlopen: %s\n", dlerror()); else count++; } struct load_module_desc mod; for (i = -1; ; i++) { if (dlget(i, &mod, sizeof(mod))) { char *name = dlgetname(&mod, sizeof(mod), NULL, 0, 0); printf("Have index %d %s\n", i, name ? name : ""); } else break; } printf("\n"); for (i = 1; ; i++) { if (dlgetmodinfo(i, &mod, sizeof(mod), NULL, 0, 0)) { char *name = dlgetname(&mod, sizeof(mod), NULL, 0, 0); printf("Have index %d %s\n", i, name ? name : ""); } else break; } for (i = 0; i < count; i++) dlclose(handle[i]); return 0; } for example ralexand@styx 16:40:33 $./dltest /opt/gtk+-2.0/lib/libgtk-x11-2.0.sl Have index -1 /usr/lib/pa20_64/dld.sl Have index 0 ./dltest Have index 1 /lib/pa20_64/libdl.1 Have index 2 /lib/pa20_64/libc.2 Have index 3 /opt/gtk+-2.0/lib/libgtk-x11-2.0.sl Have index 4 /opt/gtk+-2.0/lib/libgdk_pixbuf-2.0.sl.0 Have index 5 /opt/gtk+-2.0/lib/libgdk-x11-2.0.sl.0 Have index 6 /opt/gtk+-2.0/lib/libpangox-1.0.sl.0 Have index 7 /opt/gtk+-2.0/lib/libpango-1.0.sl.0 Have index 8 /opt/gtk+-2.0/lib/libatk-1.0.sl.0 Have index 9 /opt/gtk+-2.0/lib/libgobject-2.0.sl.0 Have index 10 /opt/gtk+-2.0/lib/libgmodule-2.0.sl.0 Have index 11 /opt/gtk+-2.0/lib/libglib-2.0.sl.0 Have index 12 /lib/pa20_64/libm.2 Have index 13 /opt/dev64/lib/libintl.sl.2 Have index 14 /opt/dev64/lib/libiconv.sl.3 Have index 15 /opt/dev64/lib/libXext.sl.6.4 Have index 16 /opt/dev64/lib/libX11.sl.6.1 Have index 1 /lib/pa20_64/libdl.1 Have index 2 /lib/pa20_64/libc.2 Have index 3 /opt/gtk+-2.0/lib/libgtk-x11-2.0.sl Have index 4 /opt/gtk+-2.0/lib/libgdk_pixbuf-2.0.sl.0 Have index 5 /opt/gtk+-2.0/lib/libgdk-x11-2.0.sl.0 Have index 6 /opt/gtk+-2.0/lib/libpangox-1.0.sl.0 Have index 7 /opt/gtk+-2.0/lib/libpango-1.0.sl.0 Have index 8 /opt/gtk+-2.0/lib/libatk-1.0.sl.0 Have index 9 /opt/gtk+-2.0/lib/libgobject-2.0.sl.0 Have index 10 /opt/gtk+-2.0/lib/libgmodule-2.0.sl.0 Have index 11 /opt/gtk+-2.0/lib/libglib-2.0.sl.0 Have index 12 /lib/pa20_64/libm.2 Have index 13 /opt/dev64/lib/libintl.sl.2 Have index 14 /opt/dev64/lib/libiconv.sl.3 Have index 15 /opt/dev64/lib/libXext.sl.6.4 Have index 16 /opt/dev64/lib/libX11.sl.6.1 So it is something to do with the interaction with gdb's copy function. The problem is I simply don't know enough about gdb internals to start. I might try to cross build a 64bit version of gdb as a 32bit SOM exe, so I could then run that under a 32bit gdb, but I'm not sure if that will actually work. Many thanks Ross --------------------------------------------------------------------------------- Ross Alexander "He knows no more about his MIS - NEC Europe Limited destiny than a tea leaf knows Work ph: +44 20 8752 3394 the history of East India Company" Jeff Law cc: gdb@sources.redhat.com, binutils@sources.redhat.com Subject: Re: PA64 shared library problems with gdb-5.2 (hpux) 12/08/2002 19:20 Please respond to law In message , ross.alexan der@uk.neceur.com writes: >I'm trying to debug PA64 program with relies on shared libraries. >I keep getting problems with pa64_solib_add. I have created a simple >program with uses dlopen to show the problem. [ ... ] This happens when dlgetname returns an error. Unfortunately, dlgetname is a routine provided by HP, so it may be very difficult to figure out why it's returning an error. It might be interesting to know which index it's choking on so that we can try to guess which library dlgetname is unhappy about. jeff