• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: GDB: Does "catch vfork" work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GDB: Does "catch vfork" work?


  • Subject: Re: GDB: Does "catch vfork" work?
  • From: Damien Bobillot <email@hidden>
  • Date: Fri, 7 Oct 2005 19:00:21 +0200


Daniel Jalkut wrote :

SystemUIServer uses vfork to spawn a new process for the screencapture invocation. In the process of examining gdb's facilities for working with multiple processes, I noticed the intriguing "catch" command.

I thought I would test it out on SystemUIServer since I know it calls vfork. But "catch vfork" doesn't seem to work. Setting a breakpoint on vfork works. I notice that "catch start" kindly informs me that it's not implemented yet. Should "catch vfork" be saying the same thing?

And out of curiosity, what are the benefits of using "catch" as opposed to "break" when the thing that's being caught corresponds to a system call? "catch start" sounds cool because it doesn't correspond to a system call. I guess that may be why it's not implemented yet :)

"catch" is very different from "break" : "break" allow you to add a breackpoint on a known function or at an arbitrary memory address, "catch" allow you to add a breakpoint at a given event in a generic way and which may be difficult to set with standard breakpoints (for "catch throw" for instance).


There may also be a problem with the process followed by gdb. When you use vfork, the system create a new process, but gdb may only debug on process at the same. It must choose to follow the parent process or the child process. The default behaviour is to follow the parent process, but you may change it with the gdb "set follow-fork- mode child" command.

--
Damien Bobillot

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: GDB: Does "catch vfork" work?
      • From: Daniel Jalkut <email@hidden>
References: 
 >GDB: Does "catch vfork" work? (From: Daniel Jalkut <email@hidden>)

  • Prev by Date: problems with latest security update???
  • Next by Date: Re: How to disable 'warning: converting to 'int' from 'float'' warning?
  • Previous by thread: GDB: Does "catch vfork" work?
  • Next by thread: Re: GDB: Does "catch vfork" work?
  • Index(es):
    • Date
    • Thread