Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: yuming5@attbi.com, gdb@sources.redhat.com
Subject: Re: Help: cannot break into shared libraries on LinuxPPC
Date: Wed, 29 Jan 2003 01:58:00 -0000	[thread overview]
Message-ID: <1030129015821.ZM8299@localhost.localdomain> (raw)
In-Reply-To: yuming5@attbi.com "Help: cannot break into shared libraries on LinuxPPC" (Jan 29, 12:15am)

On Jan 29, 12:15am, yuming5@attbi.com wrote:

> I have a problem that the gdb cannot break into the shared library -- actually, 
> it successfully breaks into the very first function defined in the shared 
> library source file(i.e. libPrint() in printlib.c, see the following example), 
> but failed to break into the other functions in that same source file (i.e. 
> libErrPrint() in printlib.c).
> 
> This was run with Linux2.2.17 on PowerPC. Other information:
> gcc version 2.95.3, GNU ld and ar version 2.10.91.
> 
> Please see below the gdb output and the shell script used to create the 
> executable and shared library.
> 
> Any idea what went wrong?
[...]
> The gdb output:
> it didn't break into libErrPrint().
> ------------------------------------------------------------------
> ... ...
> Breakpoint 1, libPrint (a=3) at printlib.c:9
> 9           b = a;
> (gdb) n 
> 10          printf(">>>libPrint, %d\n",b);
> (gdb) 
> >>>libPrint, 3
> 11      }
> (gdb) 
> main () at main.c:13
> 13              libErrPrint(3);
> (gdb) step
> 0x30025fc4 in .LC0 () from /lib/ld.so.1
> (gdb) n
> Single stepping until exit from function .LC0, 
> which has no line number information.
> 
> Breakpoint 2, 0x0ffdf4ac in libErrPrint (a=268367100) 
> from /home/mark/test/sharedlib/libmp_shr.so

I'm not sure what's going on.

You've hit the breakpoint in libErrPrint(), but there's no line number
information associated with it.  I'm don't how this can be since (you
say) libPrint() and libErrPrint() are in the same source file and
libPrint() clearly does have line number information associated with
it.

Try using objdump to look at the contents of the object files and
libraries to make sure that they contain everything they should.

Kevin


       reply	other threads:[~2003-01-29  1:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200301290009.h0T09w123901@mx2.redhat.com>
2003-01-29  1:58 ` Kevin Buettner [this message]
2003-01-29  0:15 yuming5
  -- strict thread matches above, loose matches on Subject: below --
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5
2003-01-29  0:15 yuming5

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=1030129015821.ZM8299@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=yuming5@attbi.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