bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hurd/utils/rpctrace.c - print RPC names as well as the ID


From: Michael Oberg
Subject: Re: hurd/utils/rpctrace.c - print RPC names as well as the ID
Date: Tue, 29 Jan 2002 22:08:55 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6+) Gecko/20011207

Roland McGrath wrote:

Thanks for working on this.

I rewrote your changes to make some better use of convenient library
functions, and to parse the RPC number list format produced by the -list
option to mig.  (I added that option to mig in version 1.2 last year after
previous discussions about this.)  I've checked in my changes to CVS after
verifying that rpctrace compiles ok, but I hope you can test it for me.


Your rewrite appears to work perfectly, although I haven't done extensive
testing. I just checked that without an input file that the output shows the
ID, and that the correct name is listed when an input file is given.



You can use "mig -n -list foo.list foo.defs" to generate a list of RPC
names and message ID numbers in foo.list from the RPCs in foo.defs.


Oh, ic.  The ticket is to only provide one .defs at a time.  I used the
following shell script to generate this file for myself:

#!/bin/bash
for f in `ls -1 /include/hurd/*.defs /include/mach/*.defs`
do
  mig -n -list $f.list $f
done
cat /include/hurd/*.list /include/mach/*.list > ~/msgids
rm /include/hurd/*.list /include/mach/*.list



We should add something to the Hurd build procedure to create one or more
such files to be installed, and then rpctrace can look for those files by
default (similar to your code).  For now, I've just added the command line
option `-I FILE' or `--rpc-list=FILE' with no default files used.

Please test my changes, and by all means continue to work on other rpctrace
improvements.  (I can take care of the build stuff for producing standard
RPC lists sometime soon.)



The next improvements that I am gearing towards are:
(1) A --verbose option that would show all datatype definitions from the
RPC and its data, so instead of just showing the following for vm_region:

task124->vm_region (134217728) = 0 134512640 36864 5 7 1 0 99 0

it would show something along the lines of:

task124->vm_region (134217728        target_task     vm_task_t) = 0
                134512640       address vm_address_t    
                36864   size    vm_size_t       
                5       protection      vm_prot_t
                7       max_protection  vm_prot_t
                1       inheritance     vm_inherit_t
                0       is_shared       boolean_t
                99      object_name     memory_object_name_t
                0       offset  vm_offset_t

This would entail adding this info to the file created by mig, I assume.

(2) Filtering Options:
        - Show/Dont show specific msg ID/Name.
        - Show/Dont show specific subsystem(s).
        - Show/Dont show range of IDs/subsystems/rights.
        - Show/Dont show reply's

What are everyone's thoughts on this?


Michael Oberg
oberg@adhocinc.com






reply via email to

[Prev in Thread] Current Thread [Next in Thread]