[prev in list] [next in list] [prev in thread] [next in thread]
List: opensolaris-dtrace-discuss
Subject: Re: [dtrace-discuss] trying to find argv[0] for writing processes
From: Colin Burgess <colin.burgess () gmail ! com>
Date: 2009-05-01 1:23:23
Message-ID: f93f9650904301823l2d165098w79e3cae4d76000df () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Yes - funnily enough that's almost exactly the same as QNX 32bit Intel. :-)
I guess it would be a bit evil in Dtrace to snoop through the various arrays
to find the argv[0] there... :-)
On Thu, Apr 30, 2009 at 5:53 PM, James Litchfield
<James.Litchfield@sun.com>wrote:
> argv[0] is on the stack but not always in the same place. See
> http://blogs.sun.com/thejel/category/Sun for the
> 26 Jul 2007 entry that discusses this.
>
> Jim
> ---
> Colin Burgess wrote:
>
>> I'm not 100% sure how one finds it in Solaris, but isn't argv[0] on the
>> main thread's stack?
>>
>> On Wed, Apr 29, 2009 at 8:48 AM, Peter Stubbs <ps258@hotmail.com <mailto:
>> ps258@hotmail.com>> wrote:
>>
>> Hi Again,
>>
>> That's solved my problem, but what happens if argv[0] has a space
>> in it? That would be very uncommon on solaris, but on a Mac it's
>> more common. It seems strange that all the arguments are only
>> available bunched together with spaces between them. Is there a
>> more reliable way to get this info?
>>
>> Cheers,
>> Peter
>> --
>> This message posted from opensolaris.org <http://opensolaris.org>
>> _______________________________________________
>> dtrace-discuss mailing list
>> dtrace-discuss@opensolaris.org <mailto:dtrace-discuss@opensolaris.org>
>>
>>
>>
>>
>> --
>> colin.burgess@gmail.com <mailto:colin.burgess@gmail.com>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> dtrace-discuss mailing list
>> dtrace-discuss@opensolaris.org
>>
>>
>
>
--
colin.burgess@gmail.com
[Attachment #5 (text/html)]
<div>Yes - funnily enough that's almost exactly the same as QNX 32bit Intel. \
:-)</div> <div> </div>
<div>I guess it would be a bit evil in Dtrace to snoop through the various arrays to \
find the argv[0] there... :-)<br><br></div> <div class="gmail_quote">On Thu, Apr 30, \
2009 at 5:53 PM, James Litchfield <span dir="ltr"><<a \
href="mailto:James.Litchfield@sun.com">James.Litchfield@sun.com</a>></span> \
wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px \
0px 0.8ex; BORDER-LEFT: #ccc 1px solid">argv[0] is on the stack but not always in the \
same place. See<br><a href="http://blogs.sun.com/thejel/category/Sun" \
target="_blank">http://blogs.sun.com/thejel/category/Sun</a> for the<br> 26 Jul 2007 \
entry that discusses this.<br><br>Jim<br>---<br>Colin Burgess wrote:<br> <blockquote \
class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: \
#ccc 1px solid"> <div class="im">I'm not 100% sure how one finds it in Solaris, \
but isn't argv[0] on the main thread's stack?<br><br></div> <div \
class="im">On Wed, Apr 29, 2009 at 8:48 AM, Peter Stubbs <<a \
href="mailto:ps258@hotmail.com" target="_blank">ps258@hotmail.com</a> <mailto:<a \
href="mailto:ps258@hotmail.com" target="_blank">ps258@hotmail.com</a>>> \
wrote:<br> <br> Hi Again,<br><br> That's solved my problem, but what happens \
if argv[0] has a space<br> in it? That would be very uncommon on solaris, but on a \
Mac it's<br> more common. It seems strange that all the arguments are only<br> \
available bunched together with spaces between them. Is there a<br> more reliable \
way to get this info?<br><br> Cheers,<br> Peter<br> --<br></div> This message \
posted from <a href="http://opensolaris.org/" target="_blank">opensolaris.org</a> \
<<a href="http://opensolaris.org/" \
target="_blank">http://opensolaris.org</a>><br> \
_______________________________________________<br> dtrace-discuss mailing list<br> \
<a href="mailto:dtrace-discuss@opensolaris.org" \
target="_blank">dtrace-discuss@opensolaris.org</a> <mailto:<a \
href="mailto:dtrace-discuss@opensolaris.org" \
target="_blank">dtrace-discuss@opensolaris.org</a>><br> <br><br><br><br>-- <br><a \
href="mailto:colin.burgess@gmail.com" target="_blank">colin.burgess@gmail.com</a> \
<mailto:<a href="mailto:colin.burgess@gmail.com" \
target="_blank">colin.burgess@gmail.com</a>><br>------------------------------------------------------------------------ \
<div class="im"><br><br>_______________________________________________<br>dtrace-discuss \
mailing list<br><a href="mailto:dtrace-discuss@opensolaris.org" \
target="_blank">dtrace-discuss@opensolaris.org</a><br> <br></div></blockquote> \
<br></blockquote></div><br><br clear="all"> <div></div><br>-- <br><a \
href="mailto:colin.burgess@gmail.com">colin.burgess@gmail.com</a><br>
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic