<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: &amp;quot; ttrace related stuff &amp;quot;: Printing syscall arguments using tts_scarg. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450929#M682986</link>
    <description>&lt;!--!*#--&gt;Hi Dennis, &lt;BR /&gt;&amp;gt;&amp;gt;I would hope it is obvious, the addresses &amp;gt;&amp;gt;you get for syscall arguments are in the &amp;gt;&amp;gt;traced process' address space. You'll need &amp;gt;&amp;gt;to fetch MAXPATHLEN bytes for each to &lt;BR /&gt;&amp;gt;&amp;gt;print them out.&lt;BR /&gt;&lt;BR /&gt;You are right, thanks for your reply!!! At the very first time I didn't realize this, and I thought I can access the content with the given address directly (we can't do this, because we cannot access kernel space directly). So we need to use ttrace again to get the content of the given address.&lt;BR /&gt;Finally its working fine!!! &lt;BR /&gt;Thanks a lot to everyone replied for this thread!!! :-)&lt;BR /&gt;&lt;BR /&gt;~Shaan.</description>
    <pubDate>Mon, 06 Jul 2009 03:12:35 GMT</pubDate>
    <dc:creator>Shaan_2</dc:creator>
    <dc:date>2009-07-06T03:12:35Z</dc:date>
    <item>
      <title>" ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450922#M682979</link>
      <description>Hi, &lt;BR /&gt;ttstate_t structure will give the arguments list of the syscall which is being called by the process.&lt;BR /&gt;I am trying to print the arguments of open syscall, following statement is used to print : &lt;BR /&gt;[code]printf("\nOpen args : %s\n", (char *) stp-&amp;gt;tts_scarg[0]/* first arg of open syscall */);&lt;BR /&gt;[/code]&lt;BR /&gt;following is the command to run my tracer :&lt;BR /&gt;[command]&lt;BR /&gt;./tracer make&lt;BR /&gt;[/command]&lt;BR /&gt; &lt;BR /&gt;[output]&lt;BR /&gt;&lt;BR /&gt;Open args :&lt;BR /&gt;&lt;BR /&gt;Open args : /opt/graphics/OpenGL/lib/libogltls.sl&lt;BR /&gt;&lt;BR /&gt;Open args : ding&lt;BR /&gt;&lt;BR /&gt;Open args : /usr/lib/libdld.2&lt;BR /&gt;&lt;BR /&gt;Open args : /usr/lib/libc.2&lt;BR /&gt;&lt;BR /&gt;Open args :&lt;BR /&gt;&lt;BR /&gt;Open args :&lt;BR /&gt;&lt;BR /&gt;Open args : .&lt;BR /&gt;&lt;BR /&gt;Open args : ..&lt;BR /&gt;&lt;BR /&gt;Open args : ..&lt;BR /&gt;&lt;BR /&gt;Open args : ..&lt;BR /&gt;&lt;BR /&gt;Open args : ..&lt;BR /&gt;&lt;BR /&gt;Open args : ERROR: mmap failed for dld&lt;BR /&gt;Memory fault(coredump)&lt;BR /&gt;[/output]&lt;BR /&gt;&lt;BR /&gt;anybody has idea what is the problem here?&lt;BR /&gt;even when I go to debug mode and try to print the argument with the given address, its saying "error accessing memory address : bad address"&lt;BR /&gt;&lt;BR /&gt;any help would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;~Shaan&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Jul 2009 10:32:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450922#M682979</guid>
      <dc:creator>Shaan_2</dc:creator>
      <dc:date>2009-07-01T10:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450923#M682980</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;is SHLIB_PATH set properly before this run?&lt;BR /&gt;&lt;BR /&gt;Does it include /usr/lib ?&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 01 Jul 2009 10:39:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450923#M682980</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-07-01T10:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450924#M682981</link>
      <description>&amp;gt;I am trying to print the arguments of open syscall&lt;BR /&gt;&amp;gt;try to print the argument with the given address&lt;BR /&gt;&lt;BR /&gt;You should also print out the hex address of the string (%p) so you check if you have a bogus address.</description>
      <pubDate>Wed, 01 Jul 2009 10:45:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450924#M682981</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-01T10:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450925#M682982</link>
      <description>Thanks a lot steven for quick reply .&lt;BR /&gt;&lt;BR /&gt;here is the content of SHLIB_PATH &lt;BR /&gt;$ echo $SHLIB_PATH&lt;BR /&gt;/usr/lib&lt;BR /&gt;&lt;BR /&gt;and run the tracer program but no luck :( &lt;BR /&gt;Hit with same problem ...&lt;BR /&gt;Any inputs on the same will help me a lot ..&lt;BR /&gt;&lt;BR /&gt;Waiting for your reply &lt;BR /&gt;Shaan&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Jul 2009 10:47:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450925#M682982</guid>
      <dc:creator>Shaan_2</dc:creator>
      <dc:date>2009-07-01T10:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450926#M682983</link>
      <description>I would hope it is obvious, the addresses you get for syscall arguments are in the traced process' address space.  You'll need to fetch MAXPATHLEN bytes for each to print them out.</description>
      <pubDate>Wed, 01 Jul 2009 11:04:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450926#M682983</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-01T11:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450927#M682984</link>
      <description>Hi Dennis, &lt;BR /&gt;Few of those are printing, and I am not able to access the memory for the one which I got core dump.  &lt;BR /&gt;"Open args : ERROR: mmap failed for dld"&lt;BR /&gt;1) In the above statement, I expect the error message should come through "write" syscall not from "open".&lt;BR /&gt;2) After the above statement, we are getting core dump(Observe the error message: mmap failed for dld). I am suspecting something happening wrong with mmap, because of this we are trying to access bad address.&lt;BR /&gt;I am not sure, just a guess :)&lt;BR /&gt;&lt;BR /&gt;~Shaan</description>
      <pubDate>Wed, 01 Jul 2009 11:22:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450927#M682984</guid>
      <dc:creator>Shaan_2</dc:creator>
      <dc:date>2009-07-01T11:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450928#M682985</link>
      <description>&amp;gt;Few of those are printing&lt;BR /&gt;&lt;BR /&gt;These are illusions, I would assume none are printing correctly.  Use a real tool, tusc, to compare.</description>
      <pubDate>Thu, 02 Jul 2009 22:44:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450928#M682985</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-02T22:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450929#M682986</link>
      <description>&lt;!--!*#--&gt;Hi Dennis, &lt;BR /&gt;&amp;gt;&amp;gt;I would hope it is obvious, the addresses &amp;gt;&amp;gt;you get for syscall arguments are in the &amp;gt;&amp;gt;traced process' address space. You'll need &amp;gt;&amp;gt;to fetch MAXPATHLEN bytes for each to &lt;BR /&gt;&amp;gt;&amp;gt;print them out.&lt;BR /&gt;&lt;BR /&gt;You are right, thanks for your reply!!! At the very first time I didn't realize this, and I thought I can access the content with the given address directly (we can't do this, because we cannot access kernel space directly). So we need to use ttrace again to get the content of the given address.&lt;BR /&gt;Finally its working fine!!! &lt;BR /&gt;Thanks a lot to everyone replied for this thread!!! :-)&lt;BR /&gt;&lt;BR /&gt;~Shaan.</description>
      <pubDate>Mon, 06 Jul 2009 03:12:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450929#M682986</guid>
      <dc:creator>Shaan_2</dc:creator>
      <dc:date>2009-07-06T03:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450930#M682987</link>
      <description>&amp;gt;we can't do this, because we cannot access kernel space directly&lt;BR /&gt;&lt;BR /&gt;This isn't in kernel space, it is in the other process' space.  You would need to to be in ring 0 to set the space/region register and the PID.</description>
      <pubDate>Mon, 06 Jul 2009 04:07:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450930#M682987</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-06T04:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: " ttrace related stuff ": Printing syscall arguments using tts_scarg.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450931#M682988</link>
      <description>&amp;gt;&amp;gt; This isn't in kernel space, it is in the other process' space. &lt;BR /&gt;&lt;BR /&gt;Yup, its in other process space.&lt;BR /&gt;&lt;BR /&gt;~Shaan.</description>
      <pubDate>Tue, 07 Jul 2009 04:31:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-ttrace-related-stuff-quot-printing-syscall-arguments-using/m-p/4450931#M682988</guid>
      <dc:creator>Shaan_2</dc:creator>
      <dc:date>2009-07-07T04:31:36Z</dc:date>
    </item>
  </channel>
</rss>

