public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/12802] New: Delete breakpoint from Breakpoint.stop
@ 2011-05-24 13:20 kevin.pouget at gmail dot com
2011-05-24 13:21 ` [Bug python/12802] " kevin.pouget at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: kevin.pouget at gmail dot com @ 2011-05-24 13:20 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
Summary: Delete breakpoint from Breakpoint.stop
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: python
AssignedTo: unassigned@sourceware.org
ReportedBy: kevin.pouget@gmail.com
an internal error occurs when you try to `delete' a breakpoint during `stop'
callback:
class MyBP(gdb.Breakpoint):
def stop(self):
self.delete()
(gdb) python MyBP(spec="main")
(gdb) run
Starting program: /home/kevin/a.out
/home/kevin/travail/srcs/git/gdb/gdb/breakpoint.c:4573: internal-error:
bpstat_what: unhandled bptype -1120308712
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug python/12802] Delete breakpoint from Breakpoint.stop
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
@ 2011-05-24 13:21 ` kevin.pouget at gmail dot com
2011-10-06 14:01 ` pmuldoon at redhat dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kevin.pouget at gmail dot com @ 2011-05-24 13:21 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
Kevin Pouget <kevin.pouget at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kevin.pouget at gmail dot
| |com
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug python/12802] Delete breakpoint from Breakpoint.stop
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
2011-05-24 13:21 ` [Bug python/12802] " kevin.pouget at gmail dot com
@ 2011-10-06 14:01 ` pmuldoon at redhat dot com
2011-10-06 14:11 ` kevin.pouget at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pmuldoon at redhat dot com @ 2011-10-06 14:01 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
Phil Muldoon <pmuldoon at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pmuldoon at redhat dot com
--- Comment #1 from Phil Muldoon <pmuldoon at redhat dot com> 2011-10-06 14:00:55 UTC ---
I cannot replicate this, can you still replicate it Kevin?
(gdb) file ~/simple
(gdb) python
>class b(gdb.Breakpoint):
> def stop(self):
> print "hello"
> self.delete()
>end
(gdb) py bp = b("main")
Breakpoint 1 at 0x400c48: file simple.c, line 4.
(gdb) r
hello
[Inferior 1 (process 715) exited normally]
(gdb) info breakpoints
No breakpoints or watchpoints.
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug python/12802] Delete breakpoint from Breakpoint.stop
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
2011-05-24 13:21 ` [Bug python/12802] " kevin.pouget at gmail dot com
2011-10-06 14:01 ` pmuldoon at redhat dot com
@ 2011-10-06 14:11 ` kevin.pouget at gmail dot com
2011-10-07 10:17 ` pmuldoon at redhat dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kevin.pouget at gmail dot com @ 2011-10-06 14:11 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
Kevin Pouget <kevin.pouget at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Kevin Pouget <kevin.pouget at gmail dot com> 2011-10-06 14:10:47 UTC ---
> I cannot replicate this, can you still replicate it Kevin?
no :)
I double checked, GNU gdb (GDB) Fedora (7.3-43.fc15) does have the bug, so it
was solved by the magic of time! Thanks for looking at it
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug python/12802] Delete breakpoint from Breakpoint.stop
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
` (2 preceding siblings ...)
2011-10-06 14:11 ` kevin.pouget at gmail dot com
@ 2011-10-07 10:17 ` pmuldoon at redhat dot com
2011-10-07 12:15 ` kevin.pouget at gmail dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pmuldoon at redhat dot com @ 2011-10-07 10:17 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
Phil Muldoon <pmuldoon at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |WONTFIX
AssignedTo|unassigned at sourceware |pmuldoon at redhat dot com
|dot org |
--- Comment #3 from Phil Muldoon <pmuldoon at redhat dot com> 2011-10-07 10:17:25 UTC ---
I'm going to change this to wontfix. Because there may be other stop()
callbacks yet to be processed on that breakpoint, you should not alter or
delete the state of breakpoints. I've submitted a manual patch to explain what
you can, or cannot do.
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug python/12802] Delete breakpoint from Breakpoint.stop
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
` (3 preceding siblings ...)
2011-10-07 10:17 ` pmuldoon at redhat dot com
@ 2011-10-07 12:15 ` kevin.pouget at gmail dot com
2011-10-07 13:24 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kevin.pouget at gmail dot com @ 2011-10-07 12:15 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
--- Comment #4 from Kevin Pouget <kevin.pouget at gmail dot com> 2011-10-07 12:14:44 UTC ---
is this a good alternative ?
class MyBP(gdb.Breakpoint):
def stop(self):
gdb.post_event(self.delete)
the documentation of gdb.post_event seems not very clear if you don't look at
what is done internally -- I didn't -- but I think it should be safe to do it
this way
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug python/12802] Delete breakpoint from Breakpoint.stop
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
` (4 preceding siblings ...)
2011-10-07 12:15 ` kevin.pouget at gmail dot com
@ 2011-10-07 13:24 ` cvs-commit at gcc dot gnu.org
2011-10-07 13:59 ` pmuldoon at redhat dot com
2011-10-10 19:07 ` tromey at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2011-10-07 13:24 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2011-10-07 13:23:24 UTC ---
CVSROOT: /cvs/src
Module name: src
Changes by: pmuldoon@sourceware.org 2011-10-07 13:23:19
Modified files:
gdb/doc : ChangeLog gdb.texinfo
Log message:
2011-10-07 Phil Muldoon <pmuldoon@redhat.com>
PR python/12930
PR python/12802
* gdb.texinfo (Breakpoints In Python): Clarify behavior in the
stop method.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1221&r2=1.1222
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.870&r2=1.871
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug python/12802] Delete breakpoint from Breakpoint.stop
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
` (5 preceding siblings ...)
2011-10-07 13:24 ` cvs-commit at gcc dot gnu.org
@ 2011-10-07 13:59 ` pmuldoon at redhat dot com
2011-10-10 19:07 ` tromey at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: pmuldoon at redhat dot com @ 2011-10-07 13:59 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
--- Comment #6 from Phil Muldoon <pmuldoon at redhat dot com> 2011-10-07 13:58:42 UTC ---
Yes, I believe so. But you are still in very dangerous waters. What happened
if you deleted the breakpoint, but returned "True" from that function. At the
very least any breakpoint event notification would be broken. GDB would call
breakpoint stopped observers, but would not have a breakpoint to reference.
There is nothing to stop you doing it in your scripts, but I would really be
very careful.
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug python/12802] Delete breakpoint from Breakpoint.stop
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
` (6 preceding siblings ...)
2011-10-07 13:59 ` pmuldoon at redhat dot com
@ 2011-10-10 19:07 ` tromey at redhat dot com
7 siblings, 0 replies; 9+ messages in thread
From: tromey at redhat dot com @ 2011-10-10 19:07 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12802
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at redhat dot com
--- Comment #7 from Tom Tromey <tromey at redhat dot com> 2011-10-10 19:06:23 UTC ---
(In reply to comment #4)
> is this a good alternative ?
>
> class MyBP(gdb.Breakpoint):
> def stop(self):
> gdb.post_event(self.delete)
I think so.
> the documentation of gdb.post_event seems not very clear if you don't look at
> what is done internally -- I didn't -- but I think it should be safe to do it
> this way
Can you suggest how to fix the docs?
--
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-10-10 19:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 13:20 [Bug python/12802] New: Delete breakpoint from Breakpoint.stop kevin.pouget at gmail dot com
2011-05-24 13:21 ` [Bug python/12802] " kevin.pouget at gmail dot com
2011-10-06 14:01 ` pmuldoon at redhat dot com
2011-10-06 14:11 ` kevin.pouget at gmail dot com
2011-10-07 10:17 ` pmuldoon at redhat dot com
2011-10-07 12:15 ` kevin.pouget at gmail dot com
2011-10-07 13:24 ` cvs-commit at gcc dot gnu.org
2011-10-07 13:59 ` pmuldoon at redhat dot com
2011-10-10 19:07 ` 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).