[mdb-discuss] display current environment using ::getenv on a core file

2005-07-07 Thread Jonathan Haslam
I hadn't actually noticed as I'd never tried to use the ::getenv dcmd before but, by default, it doesn't operate on the target process. This kind of surprised me. I understand the need to be able to prepare an environment for a process that I'm going to ::run but I'd have expected that the default

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-07 Thread Eric Schrock
On Thu, Jul 07, 2005 at 02:27:18PM +0100, Jonathan Haslam wrote: > I hadn't actually noticed as I'd never tried to use the > ::getenv dcmd before but, by default, it doesn't operate > on the target process. This kind of surprised me. > > I understand the need to be able to prepare an environment >

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-05 Thread Stefan Parvu
> My recommendation would be to either take the code > for mdb's ::getenv > or pargs (usr/src/cmd/ptools/pargs/pargs.c), now > conveniently OpenSourced > for your viewing pleasure, and recompile it on your > Solaris 8 system. yes. thanks I will do that. stefan

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-04 Thread Stefan Parvu
--- Jonathan Haslam wrote: > Hi Stefan, > > The ::getenv dcmd was only introduced in Solaris 10. right, thanks. That explains. I will try tomorrow to see if I'm able to extract the information using " the pr_envp pointer in the psinfo_t struct" I'm trying to figure out how. thanks, Stefan

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-04 Thread Fintan Ryan
On Mon, Jul 04, 2005 at 02:47:54PM +0100, Jonathan Haslam wrote: < Hi Stefan, < < The ::getenv dcmd was only introduced in Solaris 10. < Ah, so that would explain my not noticing, must remember to look at earlier os'es. Can you get at this data via the pr_envp pointer in the psinfo_t structure?

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-04 Thread Jonathan Haslam
Hi Stefan, The ::getenv dcmd was only introduced in Solaris 10. Cheers. Jon. Stefan Parvu wrote: > --- Fintan Ryan wrote: > > >>Hi, >> >>its possible that your core file doesn't have the >>environment details >>stored in it, getenv normally works >> >>Take a look at the pargs(1) command >>

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-04 Thread Stefan Parvu
--- Fintan Ryan wrote: > Hi, > > its possible that your core file doesn't have the > environment details > stored in it, getenv normally works > > Take a look at the pargs(1) command > > - pargs -e core > > and see if it prints out anything. Thanks, I will have a look why this does n

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-04 Thread Michael Shapiro
> --- Jonathan Haslam wrote: > > > Hi Stefan, > > > > The ::getenv dcmd was only introduced in Solaris 10. > > right, thanks. That explains. > > I will try tomorrow to see if I'm able to extract the > information using " the pr_envp pointer > in the psinfo_t struct" > > I'm trying to figure

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-04 Thread Fintan Ryan
Hi, its possible that your core file doesn't have the environment details stored in it, getenv normally works Take a look at the pargs(1) command - pargs -e core and see if it prints out anything. - Fintan On Mon, Jul 04, 2005 at 12:13:45PM +0100, Stefan Parvu wrote: < Hi, < < I am t

[mdb-discuss] display current environment using ::getenv on a core file

2005-07-04 Thread Stefan Parvu
Hi, I am trying to determine what was it the current environment from a core file which belongs to a java virtual machine process. I have tried: $ mdb core.26707 Loading modules: [ ] > > ::status debugging core file of java (32-bit) from saeb2bp42 executable file: /u01/bea/jdk142_07/bin/ja