This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for Preview: _Jv_ThisExecutable (The Saga Continues)


Andrew (and/or anyone else),

I'm stuck on something and need your help. If my analysis
is incorrect, let me know.

Prior to my patch, _Jv_RunMain() was the only place that
_Jv_ThisExecutable() was ever initialized. I don't see how
stacktraces could have ever worked if _Jv_RunMain() were
never invoked, as appears to be the case of Andrew Shuttlewood.

After my patch, _Jv_ThisExecutable() will work only for Posix if
HAVE_PROC_SELF_EXE is defined. Otherwise, _Jv_ThisExecutable()
will bomb because it will attempt to pass back _Jv_argv[0].

So my updated patch will need to fix this too.

How do I do this? I can think of several possible ways:

- Readd a  _Jv_ThisExecutable() setter (which I took away in my patch)
  which allows a back-door way of specifying this and hope that they
  call it?
- Provide a _Jv_SetArgs() method which they should invoke manually to
  set _Jv_argc and _Jv_argv and hope that call this?
- Pray that they set _Jv_argc and _Jv_argv manually?
- Require some gcj-specific Java VM init args which specify the executable name?

...or is there some better way?

Depending on the solution, the gnu.gcj.progname problem might be
indirectly fixed too.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]