<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
<div class="moz-cite-prefix">On 03/08/2016 06:36 AM, Dmitry V. Levin
wrote:<br>
</div>
<blockquote cite="mid:20160307223627.GB4391@altlinux.org"
type="cite">
<pre wrap="">On Mon, Mar 07, 2016 at 11:29:49AM +0800, Fei, Jie/费 杰 wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On 03/04/2016 10:46 PM, Dmitry V. Levin wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Fri, Mar 04, 2016 at 05:10:46PM +0800, Fei Jie wrote:
[...]
</pre>
<blockquote type="cite">
<pre wrap="">* linux/dummy.h: (sys_getpriority, sys_setpriority): Change to
printargs_d.
</pre>
</blockquote>
<pre wrap="">Why?
</pre>
</blockquote>
<pre wrap="">I added this to make strace print xetpriority in the following format:
getpriority(0, 17207) = 20
instead of
getpriority(PRIO_PROCESS, 18446744069414605786) = 20.
</pre>
</blockquote>
<pre wrap="">
Why do you think that
getpriority(0, 17207) = 20
is better than
getpriority(PRIO_PROCESS, 17207) = 20
?
I'd agree if you suggested to print 2nd argument of getpriority and
setpriority using %d format, but what's wrong with current symbolic
representation of their 1st argument?
</pre>
</blockquote>
My original idea was to print the 2nd argument in %d format by
adding<br>
printargs_d, but it changed the 1st argument's format.<br>
Would it be helpful by modifying SYS_FUNC(xetpriority) in resource.c
as follows?<br>
<br>
SYS_FUNC(getpriority)<br>
{<br>
printxval(priorities, tcp->u_arg[0], "PRIO_???");<br>
tprintf(", %d", (int) tcp->u_arg[1]);<br>
<br>
return RVAL_DECODED;<br>
}<br>
<br>
SYS_FUNC(setpriority)<br>
{<br>
printxval(priorities, tcp->u_arg[0], "PRIO_???");<br>
tprintf(", %d, %d", (int) tcp->u_arg[1], (int)
tcp->u_arg[2]);<br>
<br>
return RVAL_DECODED;<br>
}<br>
<br>
<blockquote cite="mid:20160307223627.GB4391@altlinux.org"
type="cite">
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
<a class="moz-txt-link-freetext" href="http://makebettercode.com/inteldaal-eval">http://makebettercode.com/inteldaal-eval</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Strace-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Strace-devel@lists.sourceforge.net">Strace-devel@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/strace-devel">https://lists.sourceforge.net/lists/listinfo/strace-devel</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Thanks!
Fei Jie</pre>
</body>
</html>