This is the mail archive of the gdb@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]

Re: breaking on open(2) on linux


On Sat, Apr 12, 2008 at 3:37 PM, Marty Leisner <leisner@rochester.rr.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
>  open(2).
>
>  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.

       -Kip


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]