This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/288: Setting breakpoint on function that exists in two dlopened libraries



>Number:         288
>Category:       gdb
>Synopsis:       Setting breakpoint on function that exists in two dlopened libraries
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 22 16:08:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     sarrazip@iname.com
>Release:        gdb-5.1-1 RedHat 7.2 RPM
>Organization:
>Environment:
RedHat 7.2 - Linux 2.4.7-10 - glibc 2.2.4
AMD Athlon 1200 Mhz
>Description:
A program uses dlopen() to load two shared libraries that
both define a function named some_lib_func().  Then the
program calls some_lib_func() in each library.

GDB is asked to break after the program has loaded
those two libraries.  Then it is asked to break on
some_lib_func() and to continue the execution.

GDB breaks when entering some_lib_func() in the first
library.  Then it is asked to continue.  GDB does not
break on the call to some_lib_func() in the second library,
and the execution terminates.

This may be a bug: should the breakpoint apply to all
functions named some_lib_func() in all shared libraries?
Is there already a way to specify that?  Is there a way
to specify to which some_lib_func() the breakpoint applies?

Moreover, if GDB is asked to run the program again, it
fails in this manner:

Program received signal SIGSEGV, Segmentation fault.
Cannot remove breakpoints because program is no longer
writable.
It might be running in another process.
Further execution is probably impossible.

The attached archive contains the sources for a main
program and two small shared libraries, as well as a copy
of a GDB session that illustrates the problem.
>How-To-Repeat:
See session.txt in the attached archive.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/gzip; name="gdb-2libs.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gdb-2libs.tar.gz"

H4sIAB39TTwCA+1ZfW/buBnPv+aneObrALtnK5LsOJ3TXneXa7MAaVc0vR2w3aGgJcomKpMeSTdx
i373/U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uvi/3PfEGHgEPjOia4UL2BvHo3SIs0J1ZN95JeHPnNXBPo/uHJ3bPIDR1zyAxdf1
9Zcn9Pgx4rDy97/D2WxDoIohasyT61D2FjgUA2FBMKlq02J/Wtqv/dqv/dqv/239ByPEPyMAKAAA


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]