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 v2 3/3] Update the FreeBSD system call table to match FreeBSD 12.0.


On 11/9/18 8:34 AM, Pedro Alves wrote:
> On 11/06/2018 05:54 PM, John Baldwin wrote:
>> Add a script to generate the FreeBSD XML system call table from the
>> sys/sys/syscall.h file in the kernel source tree.  For ABI
>> compatiblity system calls used by older binaries (such as
>> freebsd11_kevent()), the original system call name is used as an
>> alias.
>>
>> Run this script against the current syscall.h file in FreeBSD's head
>> branch which is expected to be the file used in 12.0 (head is
>> currently in code freeze as part of the 12.0 release process).
>>
>> gdb/ChangeLog:
>>
>> 	* syscalls/update-freebsd.sh: New file.
>> 	* syscalls/freebsd.xml: Regenerate.
> 
> Can you make the script emit the usual make-read-only trick at the
> top of the generated file?

I ended up having to do it in a kind of ugly way to get a file that
libexpat would parse and Emacs would still recognize as read-only.

This version libexpat failed to parse:

<!-- THIS FILE IS GENERATED -*- buffer-read-only: t -*-  -->
<!-- vi:set ro: -->
<?xml version="1.0"?>

This version Emacs didn't mark read-only:

<?xml version="1.0"?>
<!-- THIS FILE IS GENERATED -*- buffer-read-only: t -*-  -->
<!-- vi:set ro: -->

So I'm using this:

<?xml version="1.0"?> <!-- THIS FILE IS GENERATED -*- buffer-read-only: t -*-  -->
<!-- vi:set ro: -->

I haven't tested in vim though.

>> +++ b/gdb/syscalls/update-freebsd.sh
>> @@ -0,0 +1,77 @@
>> +#! /bin/sh
>> +
>> +# Copyright (C) 2011-2018 Free Software Foundation, Inc.
> 
> Curious, you had this script since 2011?

Oops, I just copied the license block from update-gnulib.sh I think.  Fixed.

-- 
John Baldwin

                                                                            


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