From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9235 invoked by alias); 9 Dec 2014 02:17:06 -0000 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 Received: (qmail 9213 invoked by uid 89); 9 Dec 2014 02:17:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_EXCESS_BASE64,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: smtpbgsg2.qq.com Received: from smtpbgsg2.qq.com (HELO smtpbgsg2.qq.com) (54.254.200.128) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 09 Dec 2014 02:16:57 +0000 X-QQ-FEAT: ZuWDiQM4aeY9n75mKrW/PN1OR4KsgsUIIr4aFnU8AA3LaZiXiQKv+cRm4oS7a 5OwfTTLKA8W8wW37fHgxRajitHAxoHCsOpbDZgbBfx/pqYtqwD7vbArkwcojiKqSWPj5WjK IfPAcX+dG9COWmHzbXZMeWoVSlYRzZW2E56E0FGPnuXfDpqx7VbhFoOZ71cBJ20IP1S1N0M 42us/53jA2Q== X-QQ-SSF: 00000000000000F0000000000000000 X-HAS-ATTACH: no X-QQ-BUSINESS-ORIGIN: 2 X-QQ-STYLE: X-QQ-mid: webmail54t1418091406t2463439 From: "=?utf-8?B?TmFuIFhpYW8=?=" To: "=?utf-8?B?Z2Ri?=" Subject: Some questions about using gdb catch syscall function Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Date: Tue, 09 Dec 2014 02:17:00 -0000 Message-ID: X-QQ-MIME: TCMime 1.0 by Tencent X-QQ-Mailer: QQM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gImNhdGNoIHN5c2NhbGwgbmFtZSI/CgpQLlMuLCBteSBnZGIgaXMg Ny44LjEgYW5kIHJ1bnMgb24gTGludXggWDg2LgoKQ291bGQgYW55b25lIGdp dmUgYW55IGNvbW1lbnRzIGFib3V0IHRoaXMgaXNzdWU/IFRoYW5rcyB2ZXJ5 IG11Y2ggaW4gYWR2YW5jZSEKCkJlc3QgUmVnYXJkcwpOYW4gWGlhbw== >From gdb-return-43937-listarch-gdb=sources.redhat.com@sourceware.org Tue Dec 09 02:54:04 2014 Return-Path: Delivered-To: listarch-gdb@sources.redhat.com Received: (qmail 29870 invoked by alias); 9 Dec 2014 02:54:03 -0000 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 Delivered-To: mailing list gdb@sourceware.org Received: (qmail 29855 invoked by uid 89); 9 Dec 2014 02:54:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-vc0-f176.google.com Received: from mail-vc0-f176.google.com (HELO mail-vc0-f176.google.com) (209.85.220.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 09 Dec 2014 02:53:59 +0000 Received: by mail-vc0-f176.google.com with SMTP id hq12so2717132vcb.21 for ; Mon, 08 Dec 2014 18:53:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Ih2F/mvP4RBq8zgZ6lG6Rxvs2z0t9CZIQOFaYdDOoW4=; b=Y9ixEYpVdQdPtU0I8WndDSmX4+0xZF/kO2jzrMzDVB1xWXqmvZeOgdkaiv7kxAZgDA X08V3VRp8aKX6f85p3mTlZ7RTFd/v6snCAR6xXmqJ/ZlY8FIyMAsGO8mT3bVnWncLPEr ZiJV3pbK6hfbGLBzhB2VncuXWFeFXwvbpkgzBCZ/DM/fFWBlSyIz9unLpJeSIHgcKKvL SippH4cAweQg5b5rq2v3i4Y7ucKbSlRMsLFa4ZrplMt6cj4bcsWniznlmB5CC0XJzeCL Zi8tSXoJPxaMWMv6B0d3mJCObVFJUa5SEKASaM/sHZyRWJHEBX57D3BC7f5l75blF+0N 8o7g== X-Gm-Message-State: ALoCoQk+kmwMKtH6cRounLP9FMoTQ3CoaRc+AN+4vqaXIFpBKuuf19IXJ08HhjhHzKIJR2A9s3xF MIME-Version: 1.0 X-Received: by 10.220.237.134 with SMTP id ko6mr292119vcb.57.1418093637204; Mon, 08 Dec 2014 18:53:57 -0800 (PST) Received: by 10.52.114.101 with HTTP; Mon, 8 Dec 2014 18:53:57 -0800 (PST) In-Reply-To: References: Date: Tue, 09 Dec 2014 02:54:00 -0000 Message-ID: Subject: Re: Some questions about using gdb catch syscall function From: Doug Evans To: Nan Xiao Cc: gdb Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00014.txt.bz2 Content-length: 1466 On Mon, Dec 8, 2014 at 6:16 PM, Nan Xiao wrote: > Hi all, > > I am using gdb's catch syscall function(https://sourceware.org/gdb/onlinedocs/gdb/Set-Catchpoints.html#index-catch-syscall), and meets some issues. The procedure of running gdb is like this: > > (gdb) catch syscall > warning: Can not parse XML syscalls information; XML support was disabled at compile time. > Catchpoint 1 (any syscall) > (gdb) catch syscall 1 > Catchpoint 2 (syscall 1) > (gdb) catch syscall read > Unknown syscall name 'read'. > > My questions are: > (1) gdb prints "warning: Can not parse XML syscalls information; XML support was disabled at compile time.". Does it affect the normal use of catch function? It seems the gdb can set catchpoint normally. You need to build gdb with "libexpat". Check that you have it installed (I'm assuming not) and rebuild gdb. If you have libexpat installed in a non-standard place, there are options to gdb/configure to tell the build system where to find libexpat. bash$ gdb/configure --help # and grep for expat > > (2) I can use "catch syscall number" correctly, why can't use "catch syscall name"? gdb uses libexpat to parse the xml descriptions of the syscalls, which is how it knows their names. No libexpat -> no ability to recognize syscall names. > > P.S., my gdb is 7.8.1 and runs on Linux X86. > > Could anyone give any comments about this issue? Thanks very much in advance! > > Best Regards > Nan Xiao