Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Some questions about using gdb catch syscall function
@ 2014-12-09  2:17 Nan Xiao
       [not found] ` <CADPb22S2X+KDghvq9RvBOiBF-ahuUKzm6s5PJ_stmTnvV9viFA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Nan Xiao @ 2014-12-09  2:17 UTC (permalink / raw)
  To: gdb

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.

(2) I can use "catch syscall number" correctly, why can't use "catch syscall name"?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re:  Some questions about using gdb catch syscall function
       [not found] ` <CADPb22S2X+KDghvq9RvBOiBF-ahuUKzm6s5PJ_stmTnvV9viFA@mail.gmail.com>
@ 2014-12-09  3:19   ` Nan Xiao
  2014-12-09 19:45     ` Sergio Durigan Junior
  0 siblings, 1 reply; 3+ messages in thread
From: Nan Xiao @ 2014-12-09  3:19 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb

Hi Doug,

    Thanks very much for your detailed and kindly explanations!

    Per my understanding, if no "libexpat", "catch syscall" and "catch syscall number" still work normally, except some warnings. Right?

Best Regards
Nan Xiao
------------------ Original ------------------
From:  "Doug Evans";<dje@google.com>;
Date:  Tue, Dec 9, 2014 10:53 AM
To:  "Nan Xiao"<xiaonan19830818@qq.com>;
Cc:  "gdb"<gdb@sourceware.org>;
Subject:  Re: Some questions about using gdb catch syscall function

On Mon, Dec 8, 2014 at 6:16 PM, Nan Xiao <xiaonan19830818@qq.com> 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\x16º&ÖëzÛ«ŸýßÙb²Ö«r\x18\x1d

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Some questions about using gdb catch syscall function
  2014-12-09  3:19   ` Nan Xiao
@ 2014-12-09 19:45     ` Sergio Durigan Junior
  0 siblings, 0 replies; 3+ messages in thread
From: Sergio Durigan Junior @ 2014-12-09 19:45 UTC (permalink / raw)
  To: Nan Xiao; +Cc: Doug Evans, gdb

On Monday, December 08 2014, Nan Xiao wrote:

>     Per my understanding, if no "libexpat", "catch syscall" and "catch syscall number" still work normally, except some warnings. Right?

Yes, it should work normally.  The testcase for catch-syscall even tests
this scenario.  But as Doug said, you will only be able to use/see
syscall numbers, not their names.

-- 
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-09 19:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-09  2:17 Some questions about using gdb catch syscall function Nan Xiao
     [not found] ` <CADPb22S2X+KDghvq9RvBOiBF-ahuUKzm6s5PJ_stmTnvV9viFA@mail.gmail.com>
2014-12-09  3:19   ` Nan Xiao
2014-12-09 19:45     ` Sergio Durigan Junior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox