This is the mail archive of the
mailing list for the GDB project.
Re: breaking on open(2) on linux
- From: "Kip Macy" <kip dot macy at gmail dot com>
- To: "Marty Leisner" <leisner at rochester dot rr dot com>
- Cc: gdb at sourceware dot org
- Date: Sat, 12 Apr 2008 15:46:04 -0700
- Subject: Re: breaking on open(2) on linux
- References: <200804122237.m3CMbtfl022914@dell2.home>
On Sat, Apr 12, 2008 at 3:37 PM, Marty Leisner <email@example.com> wrote:
> I've used gdb for 20 years...I've found the ability to
> break on a system call and then backtrace very useful when
> reverse engineering code
> Now, I can't do it (not sure when I last could -- I recall its been
> a problem before, but I worked around it).
> strace shows open(2) calls...
> I have no problem breaking on exit(3) or _exit(2) -- or write(2).
> But I can't seem to break on
> I'm using ubuntu 7.10 with recent gdb/gcc...
It almost certainly just means that linux is doing a non-interruptible
sleep. There may be some part in the code that isn't equipped to
handle EINTR. I can come up with a number of cases where this might
be the case. On a socket this would surprise me, but for example the
name lookup code in the file system may have cases where it is
intended to run to completion.