This is the mail archive of the gdb-patches@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: [PATCH 3/4] catch syscall -- try 4 -- XML support


Pretty much OK.

On Wed, Jan 28, 2009 at 10:38:35AM -0200, Sérgio Durigan Júnior wrote:
> +<!-- The root element of a syscall info is <syscalls_info>.  -->
> +
> +<!ELEMENT syscalls_info		(syscall*)>

Sorry for the trouble, but please use "-" instead of "_".

> +<!-- Maybe the 'number' attribute will have to be changed from
> +     ID to CDATA.  -->
> +<!ELEMENT syscall		EMPTY>
> +<!ATTLIST syscall
> +	name			CDATA	#REQUIRED
> +	number			ID	#REQUIRED>

Yeah, just use CDATA.  Let's not mess with ID attributes; an ID of "1"
is not helpful if you want to embed this sort of document in another
one later.

> +<!ELEMENT xi:include	(EMPTY)>
> +<!ATTLIST xi:include
> +	xmlns:xi	CDATA	#FIXED "http://www.w3.org/2001/XInclude";
> +	href		CDATA	#REQUIRED>

Delete this; we don't need xi:include support for system call lists,
and you don't call xml_process_xincludes anyway.

> +/* Open FILENAME, read all its text into memory, close it, and return
> +   the text.  If something goes wrong, return NULL and warn.  */
> +
> +static char *
> +fetch_xml_from_file (const char *filename, void *baton)

Assuming this is identical to the one in xml-tdesc.c, give it a name
starting with xml and put it in xml-support.c instead please.

> +int
> +xml_number_of_syscalls (const struct syscalls_info *sysinfo)
> +{
> +  return (sysinfo == NULL ? 0 : VEC_length(syscall_desc_p,
> +                                           sysinfo->syscalls));
> +}

Space before paren.

-- 
Daniel Jacobowitz
CodeSourcery


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