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 python/14674] New: No KeyboardInterrupt exception duringgdb.execute


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

             Bug #: 14674
           Summary: No KeyboardInterrupt exception during gdb.execute
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: minor
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: m@bruenink.de
    Classification: Unclassified


This is either
1. a bug in gdb, or
2. a bug in the documentation, or
3. a feature request.

Reading the documentation at
http://sourceware.org/gdb/onlinedocs/gdb/Exception-Handling.html I expect to
get a KeyboardInterrupt exception whenever I hit C-c. I only get it while
python code is directly executed. However, I also expect to get one if I use
gdb.execute.


def stop_handler(event):
    print "Stopped: %s" % event

gdb.events.stop.connect (stop_handler)

try:
  while True:
    pass
except KeyboardInterrupt:
  print "Got keyboard interrupt #1"

try:
  gdb.execute ("c")
except KeyboardInterrupt:
  print "Got keyboard interrupt #2"


Output:
^CGot keyboard interrupt #1
^C
Program received signal SIGINT, Interrupt.

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