This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug breakpoints/14844] New: Tracepoints are not reinserted inreloaded libraries.


http://sourceware.org/bugzilla/show_bug.cgi?id=14844

             Bug #: 14844
           Summary: Tracepoints are not reinserted in reloaded libraries.
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: m.lesniewski@samsung.com
    Classification: Unclassified


Created attachment 6738
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6738
Example program, library and test script

Tracepoints in shared libraries are not reinserted if the library is unloaded
and loaded back again.

Here's the scenario that illustrates this in detail:
1. A process loads a shared library explicitly using dlload
2. GDB Server attaches to the process
3. The user starts GDB; attaches to the remote target; defines a tracepoint in
the loaded library; starts the trace experiment (using tstart) and lets the
program continue;
4. The process unloads the library using dlclose;
5. The process loads the library again using dlload;

After this, the tracepoint is not inserted. No traceframes are created when
execution reaches the tracepoint location. 

I attached a simple example, which allows to reproduce the error. In the
archive there are two source files -- one for the program and one for the
library. 

The program loads the library, calls a function named "foo" from the library
ten times and unloads the library. This is repeated 10 times, so "foo" is
called 100 times in total. 

In the archive there is also a script run-test.sh, which builds the binaries,
starts gdbserver and gdb. GDB executes another script, which sets a tracepoint
in the library, launches the trace experiment and displays the number of
tracepoint hits just before the process exits.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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