18<!-- Copyright (C) 2009-%s Free Software Foundation, Inc.
20 Copying and distribution of this file,
with or without modification,
21 are permitted
in any medium without royalty provided the copyright
22 notice
and this notice are preserved. This file
is offered
as-
is,
23 without any warranty. -->
25<!DOCTYPE feature SYSTEM
"gdb-syscalls.dtd">
27<!-- This file was generated using the following file:
31 The file mentioned above belongs to the Linux Kernel.
32 Some small hand-edits were made. -->
35 % (time.strftime("%Y"), infname)
39def record(name, number, comment=None):
42 s =
' <syscall name="%s" number="%d"/>' % (name, number)
44 s +=
" <!-- %s -->" % comment
49 m = re.match(
r"^#define __NR_(\w+)\s+\(__NR_SYSCALL_BASE\+\s*(\d+)\)", line)
51 record(m.group(1), int(m.group(2)))
54 m = re.match(
r"^\s+/\* (\d+) was sys_(\w+) \*/$", line)
56 record(m.group(2), int(m.group(1)),
"removed")
58 m = re.match(
r"^#define __ARM_NR_(\w+)\s+\(__ARM_NR_BASE\+\s*(\d+)\)", line)
60 record(
"ARM_" + m.group(1), 0x0F0000 + int(m.group(2)))
63print(
"</syscalls_info>")
record(name, number, comment=None)