public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/11368] New: breakpoint deleted twice when using call command that loads shared object
@ 2010-03-10 17:33 danny dot geist at gmail dot com
  2010-03-10 19:15 ` [Bug breakpoints/11368] " tromey at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: danny dot geist at gmail dot com @ 2010-03-10 17:33 UTC (permalink / raw)
  To: gdb-prs

I hacked this out. 
1. The call (print) command. Sets up a cleanup marker to clean everything
(including breakpoints) during the call command execution. Some breakpoints are
generated (gdb internal). 
2. Then the called function  loads a shared object. At this point gdb gets a
load shared object event. gdb then decides to reset all breakpoints.
3. The reset breakpoint function deletes all breakpoints and their dynamic
memory. HOWEVER it does so bypassing the intended cleanup mecahnism in gdb which
utilizes cleanup lists.
4. Thus a situation happens where the cleanup list entries point to already
deleted locations.
5. When the called function exits the control is returned to the gdb call
command. The command finalizes with a cleanup using the cleanup lists and tries
to free already free'ed memory - and hits an exception.

-- 
           Summary: breakpoint deleted twice when using call command that
                    loads shared object
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: breakpoints
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: danny dot geist at gmail dot com
                CC: gdb-prs at sourceware dot org
GCC target triplet: i686-pc-linux-gnu


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-25 20:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-10 17:33 [Bug breakpoints/11368] New: breakpoint deleted twice when using call command that loads shared object danny dot geist at gmail dot com
2010-03-10 19:15 ` [Bug breakpoints/11368] " tromey at redhat dot com
2010-03-10 19:57 ` danny dot geist at gmail dot com
2010-03-10 20:00 ` tromey at redhat dot com
2010-03-25 20:54 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).