From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2463 invoked by alias); 12 Apr 2008 22:46:24 -0000 Received: (qmail 2454 invoked by uid 22791); 12 Apr 2008 22:46:23 -0000 X-Spam-Check-By: sourceware.org Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.177) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 12 Apr 2008 22:46:06 +0000 Received: by wa-out-1112.google.com with SMTP id l35so1156063waf.12 for ; Sat, 12 Apr 2008 15:46:04 -0700 (PDT) Received: by 10.114.75.1 with SMTP id x1mr1904966waa.150.1208040364886; Sat, 12 Apr 2008 15:46:04 -0700 (PDT) Received: by 10.114.255.16 with HTTP; Sat, 12 Apr 2008 15:46:04 -0700 (PDT) Message-ID: Date: Sun, 13 Apr 2008 04:18:00 -0000 From: "Kip Macy" To: "Marty Leisner" Subject: Re: breaking on open(2) on linux Cc: gdb@sourceware.org In-Reply-To: <200804122237.m3CMbtfl022914@dell2.home> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200804122237.m3CMbtfl022914@dell2.home> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00103.txt.bz2 On Sat, Apr 12, 2008 at 3:37 PM, Marty Leisner 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