public inbox for frysk-bugzilla@sourceware.org
help / color / mirror / Atom feed
* [Bug general/4117] New: state detaching doesn't handle unblock after deleting a breakpoint.
@ 2007-03-01 14:26 timoore at redhat dot com
  0 siblings, 0 replies; only message in thread
From: timoore at redhat dot com @ 2007-03-01 14:26 UTC (permalink / raw)
  To: frysk-bugzilla

When running the test program below with fhpd:

[moore@localhost frysk-build]$ ./frysk-core/frysk/bindir/fhpd 
(fhpd) attach ~/test/test1.c 8862
runState state = 0
Attached to process 8862
(fhpd) where
#0 0x00000000004006ca in main () from: /home/moore/test/test1.c#42
#1 0x0000003f8501da44 in __libc_start_main ()
#2 0x0000000000400559 in _start ()
(fhpd) break test1.c 44
breakpoint 0
(fhpd) go
runState state = 1
(fhpd) runState state = 0
breakpoint hit file frysk.rt.RunState$PersistentBreakpoint@2e37ae25
delete 0
(fhpd) go
runState state = 1
(fhpd) Exception in thread "Thread-3" java.lang.RuntimeException:
{frysk.proc.LinuxPtraceTask@2e372435,pid=8862,tid=8862,state=detaching} in state
"detaching" did not handle handleUnblock
   at frysk.proc.State.unhandled(fhpd)
   at frysk.proc.TaskState.handleUnblock(fhpd)
   at frysk.proc.Task$2.execute(fhpd)
   at frysk.event.EventLoop.runEventLoop(fhpd)
   at frysk.event.EventLoop.run(fhpd)
   at frysk.cli.hpd.CLI$CLIEventLoop.run(fhpd)

#include <sys/types.h>
#include <errno.h>
#include <stdlib.h>
#include <signal.h>

volatile int running = 1;

static void
signal_handler(int sig)
{
  running = 0;
}

int main (int argc, char **argv)
{
  int i = 0;

  if (argc > 2)
    {
      pid_t target_pid;
      int signal;
      
      errno = 0;
      target_pid = (pid_t)strtoul(argv[1], (char **)0, 10);
      if (errno)
	{
	  perror("Invalid pid");
	  exit(1);
	}
      signal = (int)strtoul(argv[2], (char **)0, 10);
      if (errno)
	{
	  perror("Invalid signal");
	  exit(1);
	}
      kill(target_pid, signal);
    }
  signal(SIGALRM, &signal_handler);
  while (running)
    {
      if (i >= 0)
	i--;
      else
	i++;
    }
  return 0;
}

-- 
           Summary: state detaching doesn't handle unblock after deleting a
                    breakpoint.
           Product: frysk
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: frysk-bugzilla at sourceware dot org
        ReportedBy: timoore at redhat dot com


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-01 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 14:26 [Bug general/4117] New: state detaching doesn't handle unblock after deleting a breakpoint timoore 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).