Hi,
On Mon, Feb 28, 2000 at 07:15:08PM +0000, Chris Lingard wrote:
> Breakpoint 1, main (argc=134529024, argv=0x1, envp=0x11affa8)
> at ../../proc/main.c:64
> 64 struct argp argp = { 0, 0, 0, "Hurd process server" };
> (gdb) info threads
> * 1 thread 125.1 main (argc=134529024, argv=0x1, envp=0x11affa8)
> at ../../proc/main.c:64
> (gdb) info regs
> Undefined info command: "regs". Try "help info".
> (gdb) bt
> #0 main (argc=134529024, argv=0x1, envp=0x11affa8) at ../../proc/main.c:64
> (gdb) info shared
> >From To Syms Read Shared Object Library
> 0x0101e000 0x0101f5cc No /lib/libhurdbugaddr.so.0.2
> 0x01020000 0x0102582c No /lib/libthreads.so.0.2
> 0x01026000 0x010280d8 No /lib/libihash.so.0.2
> 0x0102a000 0x01030540 No /lib/libports.so.0.2
> 0x01031000 0x0103aa20 No /lib/libshouldbeinlibc.so.0.2
> 0x0103b000 0x0116a5a4 No /lib/libc.so.0.2
We will use this later to calculate the symbol names.
> 0x00001000 0x000181d8 No /lib/ld.so
> 0x0116b000 0x0117bae0 No /lib/libmachuser.so.1
Likewise.
> 0x0117c000 0x01199bd4 No /lib/libhurduser.so.0.0
> (gdb) cont
> Continuing.
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> 0x11738f8 in ?? () from /lib/libmachuser.so.1
> (gdb) bt
> #0 0x11738f8 in ?? () from /lib/libmachuser.so.1
> #1 0x105767d in ?? () from /lib/libc.so.0.2
> #2 0x1173980 in ?? () from /lib/libmachuser.so.1
(#1-#2 repeated a lot of times. It seems to be trapped in a loop and run
over memory bounds)
Unfortunately, you are lacking debugging symbols in your library.
However, with objdum and the hex addresses, we should be able to calculate
them (I never did this, so hopefully I don't make a mistake).
Okay, let's do some math.
> #0 0x11738f8 in ?? () from /lib/libmachuser.so.1
0x11738f8 - 0x0116b000 = 0x000088f8
Now the difficult part:
$ objdump --dynamic-syms /lib/libmachuser.so.1 | grep ^000088f8
(no output)
$ objdump --dynamic-syms /lib/libmachuser.so.1 | grep ^000088f
000088f0 w DF .text 000000fd Base mach_port_mod_refs
000088f0 g DF .text 000000fd Base __mach_port_mod_refs
The result can be different on your machine. Slowly decrease the address
until you find the exact function it belongs to. This output is needed for
all addresses, so for the next one:
> #1 0x105767d in ?? () from /lib/libc.so.0.2
0x1051c67d - 0x103b000 = 0x0001c67d
Now grep in /lib/libc.so.0.2
> #2 0x1173980 in ?? () from /lib/libmachuser.so.1
and so on.
> #899 0x105767d in ?? () from /lib/libc.so.0.2
> #900 0x1173980 in ?? () from /lib/libmachuser.so.1
> #901 0x105767d in ?? () from /lib/libc.so.0.2
> #902 0x1173572 in ?? () from /lib/libmachuser.so.1
> #903 0x10571e5 in ?? () from /lib/libc.so.0.2
> #904 0x102e621 in ?? () from /lib/libports.so.0.2
> #905 0x102e121 in ?? () from /lib/libports.so.0.2
> #906 0x804cbec in allocate_proc (task=3) at ../../proc/mgt.c:504
> #907 0x804c10f in main (argc=1, argv=0x11affa8, envp=0x11affb0)
> at ../../proc/main.c:87
> (gdb)
I don't know if this will help, of course it is easier to let the debugger
do the work if you have symbols in your libs:
> (gdb) shared
> Reading symbols from /lib/libhurdbugaddr.so.0.2...done.
> Reading symbols from /lib/libthreads.so.0.2...done.
> Reading symbols from /lib/libihash.so.0.2...done.
> Reading symbols from /lib/libports.so.0.2...done.
> Reading symbols from /lib/libshouldbeinlibc.so.0.2...done.
> Reading symbols from /lib/libc.so.0.2...done.
> Reading symbols from /lib/ld.so...done.
> Reading symbols from /lib/libmachuser.so.1...done.
> Reading symbols from /lib/libhurduser.so.0.0...done.
How does a bt look here? gdb can give more information about the status of
arguments etc which might be useful.
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server
Marcus Brinkmann GNU http://www.gnu.org for public PGP Key
[EMAIL PROTECTED], [EMAIL PROTECTED] PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ [EMAIL PROTECTED]