From: ross.alexander@uk.neceur.com
To: gdb@sources.redhat.com, binutils@sources.redhat.com
Subject: PA64 shared library problems with gdb-5.2 (hpux)
Date: Fri, 12 Jul 2002 03:20:00 -0000 [thread overview]
Message-ID: <OF35E93CD6.ADFC4642-ON80256BF4.0033D184@uk.neceur.com> (raw)
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.
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
int main(int argc, char *argv[])
{
void *v;
int i, count;
void **handle;
if (argc < 2)
{
printf("%s: <filename>\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 : "<No 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 : "<No name>");
}
else
break;
}
for (i = 0; i < count; i++)
dlclose(handle[i]);
return 0;
}
./dltest /usr/lib/pa20_64/libm.2
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 /usr/lib/pa20_64/libm.2
Have index 1 /lib/pa20_64/libdl.1
Have index 2 /lib/pa20_64/libc.2
Have index 3 /usr/lib/pa20_64/libm.2
GNU gdb 5.2
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "hppa64-hp-hpux11.00"...
(gdb) run /usr/pa20_64/libm.2
Starting program: /home/ralexand/dltest/dltest /usr/pa20_64/libm.2
dlopen: Unable to find library '/usr/pa20_64/libm.2'.
Have index -1 /usr/lib/pa20_64/dld.sl
Have index 0 /home/ralexand/dltest/dltest
Have index 1 /lib/pa20_64/libdl.1
Have index 2 /lib/pa20_64/libc.2
Have index 1 /lib/pa20_64/libdl.1
Have index 2 /lib/pa20_64/libc.2
Program exited normally.
(gdb) run /usr/lib/pa20_64/libm.2
Starting program: /home/ralexand/dltest/dltest /usr/lib/pa20_64/libm.2
pa64_solib_add, unable to read shared library path.
(gdb) cont
Continuing.
pa64_solib_add, unable to read shared library path.
(gdb)
Continuing.
Have index -1 /usr/lib/pa20_64/dld.sl
Have index 0 /home/ralexand/dltest/dltest
Have index 1 /lib/pa20_64/libdl.1
Have index 2 /lib/pa20_64/libc.2
Have index 3 /usr/lib/pa20_64/libm.2
Have index 1 /lib/pa20_64/libdl.1
Have index 2 /lib/pa20_64/libc.2
Have index 3 /usr/lib/pa20_64/libm.2
Program exited normally.
(gdb) quit
I'm also getting some "found in psymtab but not in symtab" errors, but
they are very difficult to duplicate. I noticed a while back H.J Lu was
reporting something very similar. One thing at a time though.
Cheers,
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"
next reply other threads:[~2002-07-12 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-12 3:20 ross.alexander [this message]
2002-08-12 11:17 ` Jeff Law
2002-08-13 9:12 ross.alexander
2002-08-13 10:46 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF35E93CD6.ADFC4642-ON80256BF4.0033D184@uk.neceur.com \
--to=ross.alexander@uk.neceur.com \
--cc=binutils@sources.redhat.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox