All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* How to debug glibc library functions in glibc...
@ 2001-11-07  0:39 Peter Barada
  0 siblings, 0 replies; only message in thread
From: Peter Barada @ 2001-11-07  0:39 UTC (permalink / raw
  To: linuxppc-embedded, @popmail.space.net (No recipients specified)


We have an application that's dynamically linked, running and it has the
problem where:

void foo(double x, double y)
{
  fprintf(stdout, "Values are %f, %f\n", x, y);
}

doesn't produce anywhere near the expected output.  We've fired up gdb
and used the remote target on it(since the application is running on
the embledded ppc board), and since libc is dynamically linked in, I
told gdb that glibc symbols are at:

(gdb) add-symbol-file ....../libc.so.6 0x30000000
(gdb) dir ...../glibc-2.2.2/stdio-common/

then we can get to fprintf.  (I picked 0x30000000 since from somewhere
I remember that's where the library starts linking itself in).
Unfortunately that address(and the ones folloing it) look like an
array of stub instructions to branch off to the funcstions in glibc.
If I 'stepi', I'm off in code the looks like fprintf, but I don't have
any symbols to match to that address.

Unfortunately I don't have a clue how to go further from here.

Does anybody have an idea what magic incantation(s) I need to throw at
gdb to get it to be able to use the library source and allow me to set
breakpoints in libc.so.6 and other sub-libraries that glibc is fond of
linking in on the fly so I can figure out why fprintf() is producing
the incorrect output???

Thanks in advance,

--
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-07  0:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-07  0:39 How to debug glibc library functions in glibc Peter Barada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.