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 gdb/12363] New: Breakpoints are messed after call to popen/fork


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

           Summary: Breakpoints are messed after call to popen/fork
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: steven.demierre@gmx.ch


I ran into a really strange Problem concerning Breakpoints in gdb. 

Steps to reproduce:

I call popen, which calls some Linux tools (iconv and sort). After the call to
popen (or more probably the fork which is called by popen) all the breakpoints
i've set before are really messed.


Actual results:
This means, if i type "continue" some of the breakpoints which shoud be hit
aren't. And if they are hit, the program is really in some other place. For
instance i hit a breakpoint which is at the beginning of a function. Then i
press "next" and get "Program exited with code 01.".

It also happened, that a breakpoint wasn't hit until i made a new breakpoint in
main (and then "continue"d from there).

What seemed to help was to completely delete all breakpoints and enter them
again after the popen call ("delete" with no parameters! deleting each
breakpoint didn't work for some reason).


Build Date & Platform: 
7.2-1ubuntu3 on Ubuntu Linux Kernel 2.6.35-23.
I've also checked with the newest weekly version "7.2.0.20110104" but it has
the same problems.


Additional information:
As i think it could be somehow linked to the fork, i use the following gdb
settings:
follow-fork-mode: parent
follow-exec-mode: same

-- 
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]