2007-07-13 Andrew Haley <aph@redhat.com>
* libgcj.ver: Add __gcj_personality_sj0.
* testsuite/libjava.jvmti/jvmti-interp.exp: Likewise.
* testsuite/libjava.jni/jni.exp: Use -fdollars-in-identifiers.
* testsuite/libjava.jni/cni.exp: Use -fdollars-in-identifiers.
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise.
* gnu/classpath/natVMStackWalker.cc (getCallingClassLoader): Check
klass is non-null.
* java/lang/reflect/natField.cc (getAddr): Call
_Jv_StackTrace::GetCallingClass only if CALLER is non-null.
* java/lang/reflect/natVMProxy.cc (run_proxy): Use
_Jv_getFieldInternal to get field proxyClass.m.
(_Jv_getFieldInternal): New function.
From-SVN: r126623
2007-07-13 Andrew Haley <aph@redhat.com>
* libgcj.ver: Add __gcj_personality_sj0.
* testsuite/libjava.jvmti/jvmti-interp.exp: Likewise.
* testsuite/libjava.jni/jni.exp: Use -fdollars-in-identifiers.
* testsuite/libjava.jni/cni.exp: Use -fdollars-in-identifiers.
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise.
* gnu/classpath/natVMStackWalker.cc (getCallingClassLoader): Check
klass is non-null.
* java/lang/reflect/natField.cc (getAddr): Call
_Jv_StackTrace::GetCallingClass only if CALLER is non-null.
* java/lang/reflect/natVMProxy.cc (run_proxy): Use
_Jv_getFieldInternal to get field proxyClass.m.
(_Jv_getFieldInternal): New function.
2007-07-11 Andrew Haley <aph@redhat.com>
* configure.host (arm*-linux-gnu): New.
* sysdep/arm/locks.h: New.
From-SVN: r126622
* interpret.cc (get_local_var_table) [DIRECT_THREADED]: Make sure the
method is compiled.
* testsuite/libjava.jvmti/interp/getlocalvartable.out: Revise
for compiled methods.
From-SVN: r126556
2007-07-05 Andreas Tobler <a.tobler@schweiz.org>
* java/lang/natPosixProcess.cc: Reorder includes to fix compilation
on hppa2.0w-hp-hpux11.11.
Remove include of <gcj/cni.h>.
From-SVN: r126388
2007-06-28 Jan Nijtmans <nijtmans@users.sourceforge.net>
PR libgcj/30999:
* jni_md.h: Add the possibility to compile jni code with.
-fvisibility=hidden. This causes all symbols to be hidden
except the JNI functions which need to be exported.
From-SVN: r126090
2007-06-28 Andreas Tobler <a.tobler@schweiz.org>
* testsuite/libjava.jvmti/jvmti-interp.exp (gij_jvmti_test_one): Pass
the cxxldlibflags to exec_gij to have the right libstdc++ invoked.
From-SVN: r126083
* classpath/lib/gnu/classpath/jdwp/value/StringValue.class:
Regenerate.
* gnu/classpath/jdwp/value/StringValue.java
(StringValue): Tag of StringValue is STRING not OBJECT.
(write): String values are written to the wire as tag byte
and object ID, not JdwpString.
From-SVN: r125897
* gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
(executeInvokeMethod): No need to use ValueFactory any more;
MethodResult.getReturnedValue now returns a Value.
(executeNewInstance): Double-check that return result is
an ObjectValue; throw JdwpInternalErrorException if it is not.
(invokeMethod): Method IDs come from VMMethod, not VMIdManager.
Arguments are Values not Objects.
Use ValueFactory to create arguments.
Pass invocation options to VMVirtualMachine.executeMethod.
Don't do any thread suspend/resume work: VMVM.executeMethod
will take care of it.
* gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
(executeInvokeMethod): Method IDs come from VMMethod, not
VMIdManager.
Arguments should be Values instead of Objects.
Use ValueFactory to create Values.
Remove specific option handling and pass options to
VMVirtualMachine.executeMethod.
Remove thread suspension.
Use MethodResult.getReturnedValue to get method's result.
* gnu/classpath/jdwp/util/MethodResult.java
(returnedValue): Change type to Value.
(thrownException): Change type to Throwable.
(resType): Remove.
(MethodResult): New constructor.
(setReturnedValue): Remove.
(SetThrownException): Remove.
(getResultType): Remove.
(setResultType): Remove.
* gnu/classpath/jdwp/value/ObjectValue.java (getValue):
New method.
* vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java
(executeMethod): Replace "nonVirtual" parameter with more
generic "options" parameter.
Replace java.lang.reflect.Method parameter with VMMethod.
Replace Object[] parameter with Value[] parameter.
From-SVN: r125895
* gnu/gcj/jvmti/Breakpoint.java: Make abstract.
(method): Change from private to protected.
(location): Likewise.
(Breakpoint): Change argument list to take only integer type.
Add default constructor.
(initialize_native): Renamed to ...
(_save_insn): ... this to make function more explicit.
(execute): New method.
* gnu/gcj/jvmti/Breakpoint.h: Regenerate.
* gnu/gcj/jvmti/natBreakpoint.cc (initialize_native): Rename to...
(_save_insn): ... this.
(install): Save the original instruction.
* gnu/gcj/jvmti/NormalBreakpoint.java: New file.
* gnu/gcj/jvmti/NormalBreakpoint.h: New file.
* gnu/gcj/jvmti/natNormalBreakpoint.cc: New file.
* gnu/gcj/jvmti/BreakpointManager.java (newBreakpoint):
Instantiate a NormalBreakpoint instead of Breakpoint.
* interpret-run.cc (insn_breakpoint): Remove breakpoint actions
and call Breakpoint.execute to do them.
* classpath/lib/gnu/gcj/jvmti/Breakpoint.class: Regenerate.
* classpath/lib/gnu/gcj/jvmti/BreakpointManager.class: Likewise.
* classpath/lib/gnu/gcj/jvmti/NormalBreakpoint.class: New file.
* sources.am: Regenerate.
* Makefile.am (nat_source_files): Add natNormalBreakpoint.cc.
* Makefile.in: Regenerated.
From-SVN: r125834
* include/java-interp.h (_Jv_LocalVarTableEntry): Add union
for bytecode_pc and direct-threaded pc.
Add field descriptions inline.
* defineclass.cc (read_one_code_attribute): Change from
bytecode_start_pc to bytecode_pc.
Remove unused variable "len".
* interpret.cc (compile): Remap the variable table, too.
(get_local_var_table) [DIRECT_THREADED]: Use insn_index on the
start location to map from pc_t to code index.
From-SVN: r125734
* include/java-interp.h (_Jv_InterpFrame::get_pc): Only deduct
one when pc_ptr is non-NULL.
* prims.cc (parse_init_args): Enable JVMTI with agentlib
and agentpath options.
* testsuite/lib/libjava.exp (exec_gij): Add new addl_flags
parameter.
* testsuite/libjava.jvmti/jvmti-interp.exp (gij_jvmti_test_one):
Pass '-agentlib:dummyagent' when executing gij.
(gij_jvmti_run): Build dummy JVMTI agent before running tests,
and remove it when finished.
* testsuite/libjava.jvmti/dummyagent.c: New file.
From-SVN: r125040
* ltmain.sh: Update from ToT Libtool.
* libtool.m4: Update from ToT Libtool.
* ltsugar.m4: New. Update from ToT Libtool.
* ltversion.m4: New. Update from ToT Libtool.
* ltoptions.m4: New. Update from ToT Libtool.
* ltconfig: Remove.
* ltcf-c.sh: Remove.
* ltcf-cxx.sh: Remove.
* ltcf-gcj.sh: Remove.
* Regenerate all subdirs
From-SVN: r125032
2007-05-17 Kyle Galloway <kgallowa@redhat.com>
* gnu/classpath/jdwp/natVMMethod.cc (getModifiers): Check for native
classes and mark methods as native appropriately.
From-SVN: r124807
* include/java-interp.h (breakpoint_at): Declare.
* interpret.cc (breakpoint_at): New function.
* gnu/classpath/jdwp/VMVirtualMachine.java (_event_list):
New member.
* gnu/classpath/jdwp/natVMVirtualMachine.cc (initialize):
Initialize _event_list.
(handle_single_step): If there is a breakpoint at the
location at which we are stopping, do not send the notification.
Instead add the event to a list of events that occur at this
location.
(jdwpBreakpointCB): If the event list is not empty, send
whatever events are in it and the breakpoint event in a single
notification.
Mark parameter jni_env as MAYBE_UNUSED.
* classpath/lib/gnu/classpath/jdwp/VMVirtualMachine.class:
Regenerated.
* gnu/classpath/jdwp/VMVirtualMachine.h: Regenerated.
From-SVN: r124778
* include/java-interp.h (breakpoint_at): Declare.
* interpret.cc (breakpoint_at): New function.
* gnu/classpath/jdwp/VMVirtualMachine.java (_event_list):
New member.
* gnu/classpath/jdwp/natVMVirtualMachine.cc (initialize):
Initialize _event_list.
(handle_single_step): If there is a breakpoint at the
location at which we are stopping, do not send the notification.
Instead add the event to a list of events that occur at this
location.
(jdwpBreakpointCB): If the event list is not empty, send
whatever events are in it and the breakpoint event in a single
notification.
Mark parameter jni_env as MAYBE_UNUSED.
* classpath/lib/gnu/classpath/jdwp/VMVirtualMachine.class:
Regenerated.
* gnu/classpath/jdwp/VMVirtualMachine.h: Regenerated.
From-SVN: r124777
* gnu/classpath/jdwp/Jdwp.java (notify): Rewrite to call
new array-based method.
(notify): New function.
(sendEvent): Rewrite to use sendEvents.
(sendEvents): New method.
* gnu/classpath/jdwp/event/Event.java (toPacket): Make static.
Change parameters to use arrays for events and requests.
Add suspendPolicy parameter.
Move per-event data transformation to...
(_toData): ... here.
* gnu/classpath/jdwp/transport/JdwpConnection.java
(sendEvent): Renamed to ...
(sendEvents): ... this.
Change parameters to use arrays for events and requests.
Add suspendPolicy parameter.
From-SVN: r124514
2007-05-03 Andrew Haley <aph@redhat.com>
* gnu/javax/management/Server.java (Server): Record the delegate.
(registerMBean): Notify the delegate.
(unregisterMBean): Likewise.
(notify): New method.
From-SVN: r124386
2007-05-03 Andrew Haley <aph@redhat.com>
* gnu/javax/management/Server.java (Server): Record the delegate.
(registerMBean): Notify the delegate.
(unregisterMBean): Likewise.
(notify): New method.
From-SVN: r124385
2007-05-03 Andrew Haley <aph@redhat.com>
* gnu/javax/management/Server.java (Server): Record the delegate.
(registerMBean): Notify the delegate.
(unregisterMBean): Likewise.
(notify): New method.
From-SVN: r124383
* interpret-run.cc (NEXT_INSN)[DEBUG]: Advance PC before
executing the instruction.
* include/java-interp.h (_Jv_InterpFrame::get_pc): Subtract
one insn from the frame's PC. _Jv_InterpMethod::run et al
will advance the PC before executing the instruction.
From-SVN: r124313
* classpath/lib/gnu/classpath/jdwp/Jdwp.class: Regenerated.
* classpath/lib/gnu/classpath/jdwp/event/EventManager.class:
Regenerated.
* gnu/classpath/jdwp/event/EventManager.h: Regenerated.
* gnu/classpath/jdwp/event/EventManager.java
(getEventRequest): Rename to...
(getEventRequests): ...this.
Change return type to array of requests.
Construct a list of all matching events and return
them all.
* gnu/classpath/jdwp/Jdwp.java (notify): Use getEventRequests
and send event notifications for all matching requests.
From-SVN: r124250
2007-04-25 Andrew Haley <aph@redhat.com>
* java/io/ObjectStreamClass.java (ensureFieldsSet): New method.
(setFields): call ensureFieldsSet.
(fieldsSet): New field.
* java/io/ObjectOutputStream.java (writeFields): Call
osc.ensureFieldsSet().
* java/io/ObjectInputStream.java (parseContent): Assign the handle
for a PROXYCLASSDESC immediately after reading the marker.
From-SVN: r124188
2007-04-25 Andrew Haley <aph@redhat.com>
* java/io/ObjectStreamClass.java (ensureFieldsSet): New method.
(setFields): call ensureFieldsSet.
(fieldsSet): New field.
* java/io/ObjectOutputStream.java (writeFields): Call
osc.ensureFieldsSet().
* java/io/ObjectInputStream.java (parseContent): Assign the handle
for a PROXYCLASSDESC immediately after reading the marker.
From-SVN: r124187
2007-04-23 Kyle Galloway <kgallowa@redhat.com>
* include/java-interp.h (_Jv_InterpFrame): Add pointer to the
interpreter PC.
(<init>): Add a pointer to the interpreter PC as a parameter with
default value NULL.
(get_pc): New method.
* interpret-run.cc: If debugging, pass a pointer to the PC when
creating the stack frame.
* jvmti.cc (_Jv_JVMTI_GetStackTrace): Call _Jv_InterpFrame::get_pc
to get the PC.
From-SVN: r124076
* gnu/gcj/jvmti/BreakpointManager.java (newBreakpoint):
Install the new breakpoint into the bytecode.
(deleteBreakpoint): Remove the breakpoint from the bytecode.
* classpath/lib/gnu/gcj/jvmti/BreakpointManager.class:
Regenerate.
* gnu/gcj/jvmti/natBreakpoint.cc (initialize_native):
Don't install the breakpoint here.
From-SVN: r123997
2007-04-18 Andrew Haley <aph@redhat.com>
* java/lang/reflect/natVMProxy.cc (ncode_closure): Add
method_index.
(generateProxyClass): Add field $Proxy0.m. Store methods array in
it.
(run_proxy): Retrieve the method to invoke from in $Proxy0.m.
* java/lang/Class.h: Remove _Jv_LookupProxyMethod.
* java/lang/natClass.cc: Likewise.
* headers.txt: Likewise.
* java/lang/reflect/Method.h: Likewise.
From-SVN: r123954
2007-04-18 Andrew Haley <aph@redhat.com>
* java/lang/reflect/natVMProxy.cc (ncode_closure): Add
method_index.
(generateProxyClass): Add field $Proxy0.m. Store methods array in
it.
(run_proxy): Retrieve the method to invoke from in $Proxy0.m.
* java/lang/Class.h: Remove _Jv_LookupProxyMethod.
* java/lang/natClass.cc: Likewise.
* headers.txt: Likewise.
From-SVN: r123953
2007-04-17 Francis Kung <fkung@redhat.com>
PR classpath/31311
* gnu/java/awt/peer/gtk/ComponentGraphics.java
(dispose): Removed method.
(disposeSurface): Removed method.
* gnu_java_awt_peer_gtk_ComponentGraphics.h: Regenerated.
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
(Java_gnu_java_awt_peer_gtk_ComponentGraphics_disposeSurface): Removed.
(Java_gnu_java_awt_peer_gtk_ComponentGraphics_initState): Destroy surface
after it is used to create a cairo context.
From-SVN: r123928
2007-04-16 Andrew Haley <aph@redhat.com>
* java/io/ObjectInputStream.java: (parseContent): Call (String,
Object) version of dumpElementln.
(dumpElementln(String, Object)): New method.
* java/io/ObjectOutputStream.java (writeObject): Call (String,
Object) version of dumpElementln.
(dumpElementln(String, Object)): New method.
From-SVN: r123875
* javax/management/ObjectName.java:
(parse(String)): Catch multiple wildcards,
initialise with an empty string (so null isn't
appended), and emit comma even when wildcard
ends the list.
(checkComponents()): Catch newlines.
(quote(String)): Handle newlines and quotes
correctly.
From-SVN: r123873
2007-04-16 Andrew Haley <aph@redhat.com>
* gnu/gcj/runtime/BootClassLoader.java (getBootURLLoader): New
method.
(bootGetResource): Use getBootURLLoader() to load resources.
(bootGetResources): Likewise.
* java/lang/reflect/natMethod.cc (Method::invoke): In invoke also
check that the method's declaring class is accessible.
From-SVN: r123867
2007-04-16 Andrew Haley <aph@redhat.com>
* org/omg/IOP/TaggedComponentHelper.java (read): Use
read_octet_array(), not read().
(write): Use write_octet_array(), not write().
* org/omg/PortableServer/Servant.java (_get_delegate): Throw if no
delegate has been set.
* javax/management/ObjectName.java serialVersionUID: Declare.
Make all fields transient.
(parse): Break out from constructor.
(writeObject, readObject): New methods.
From-SVN: r123865
2007-04-16 Andrew Haley <aph@redhat.com>
* org/omg/IOP/TaggedComponentHelper.java (read): Use
read_octet_array(), not read().
(write): Use write_octet_array(), not write().
* org/omg/PortableServer/Servant.java (_get_delegate): Throw if no
delegate has been set.
* javax/management/ObjectName.java serialVersionUID: Declare.
Make all fields transient.
(parse): Break out from constructor.
(writeObject, readObject): New methods.
From-SVN: r123864
2007-04-16 Andrew Haley <aph@redhat.com>
* gnu/gcj/runtime/BootClassLoader.java (getBootURLLoader): New
method.
(bootGetResource): Use getBootURLLoader() to load resources.
(bootGetResources): Likewise.
* java/lang/reflect/natMethod.cc (Method::invoke): In invoke also
check that the method's declaring class is accessible.
From-SVN: r123862
2007-04-09 Kyle Galloway <kgallowa@redhat.com>
* interpret-run.cc: If debugging, check if args is NULL before
getting the "this" pointer.
From-SVN: r123681
PR libgcj/23758
* java/lang/natPosixProcess.cc (nativeSpawn): Move building of
environment before the fork.
* testsuite/libjava.lang/Process_7.java: New test.
* testsuite/libjava.lang/Process_7.out: Its expected results.
* testsuite/libjava.lang/Process_7.jar: Generated file.
From-SVN: r123676
2007-04-04 Tania Bento <tbento@redhat.com>
* java/text/DecimalFormatSymbols.java: Added the year 2007 to
Copyright information and introduced new variable, currency.
(DecimalFormatSymbols(Locale)): Define currency and intlCurrencySymbol
to "XXX", currencySymbol to "?" and localCurrency appropriately.
(getCurrency): Fixed documentation and return the value of currency.
(setCurrency): Fixed documentation and update the value of currency.
(setInternationalCurrencySymbol): Fixed documentation and update the
value of currency.
* java/util/Currency.java: Introduced two new variables, properties
and fractionDigits. In the static block, a properties object is
created and the currency resource is loaded.
(Currency(Locale)): fractionDigits is defined.
(Currency(String)): New method.
(getDefaultFractionDigits): Return the value of fractionDigits.
(getInstance(String)): Check if String is equal to "XXX".
From-SVN: r123512
2007-04-04 Kyle Galloway <kgallowa@redhat.com>
* classpath/gnu/classpath/jdwp/util/VariableTable.java: Change longs
to ints for argCnt and slots.
(write): Replace writeLong with writeInt for the above.
From-SVN: r123511
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=233406
* gnu/java/net/natPlainSocketImplPosix.cc (create): Return if
already created.
* gnu/java/net/PlainSocketImpl.java (getLocalAddress): Handle case
where localport is -1.
(create): Now public.
* gnu/java/nio/SocketChannelImpl.java (SocketChannelImpl): Call
'create' on the socket.
From-SVN: r123440
* gnu/classpath/jdwp/event/ThreadStartEvent.java (Event):
Event type is "THREAD_START" not "THREAD_END".
* gnu/classpath/jdwp/transport/SocketTransport.java (ITransport):
Handle configure strings ":port" and "port".
From-SVN: r123436
2007-04-02 Andrew Haley <aph@redhat.com>
* java/lang/reflect/natVMProxy.cc (run_proxy): Use
_Jv_LookupProxyMethod to find the Method.
If parameter_types->length == 0, pass a null paramameter list,
not a zero-length parameter list.
* java/lang/natClass.cc (_Jv_LookupProxyMethod): New function.
* java/lang/Class.h (_Jv_LookupProxyMethod): Declare.
From-SVN: r123431
2007-03-30 Andrew Haley <aph@redhat.com>
* javax/management/ObjectName.java: Handle 0-length names.
2007-03-27 Andrew Haley <aph@redhat.com>
* javax/management/MBeanServerFactory.java: Use the domain that
we've been passed, not the fixed string "DefaultDomain".
From-SVN: r123430
2007-04-02 Kyle Galloway <kgallowa@redhat.com>
* interpret-run.cc: Add code to properly set up variable slots
when debugging.
* gnu/classpath/jdwp/natVMFrame.cc (checkJVMTIError): New function.
(getObjectJVMTI): New function.
(setObjectJVMTI): New function.
(getIntJVMTI): New function.
(setIntJVMTI): New function.
(getLongJVMTI): New function.
(setLongJVMTI): New function.
(getFloatJVMTI): New function.
(setFloatJVMTI): New function.
(getDoubleJVMTI): New function.
(setDoubleJVMTI): New function.
(getFrameDepth): New function.
(getValue): Implement.
(setValue): Implement.
From-SVN: r123427
2007-03-28 Casey Marshall <csm@gnu.org>
* gnu/javax/net/ssl/provider/ClientHandshake.java (RSAGen.implRun):
check keyEncipherment bit of the certificate, and just pass the public
key to the cipher.
From-SVN: r123307
2007-03-26 Stepan Kasal <skasal@redhat.com>
* tools/gnu/classpath/tools/javah/Main.java (cniOrJniSeen): New
field.
(getParser): Use new field.
From-SVN: r123240
2007-03-23 Gary Benson <gbenson@redhat.com>
* link.cc (_Jv_Linker::resolve_method_entry):
Ensure that the argument types and the return type of the
found method match those expected by the calling method.
From-SVN: r123156
* sources.am, Makefile.in: Rebuilt.
* scripts/makemake.tcl (scan_directory): Allow service files to be
omitted.
Omit all XML-related service files.
From-SVN: r122764
2007-03-09 Gary Benson <gbenson@redhat.com>
Chris Burdess <dog@gnu.org>
PR classpath/30831
* gnu/xml/dom/ls/SAXEventSink.java: Only set extended document
properties when reader is available.
Co-Authored-By: Chris Burdess <dog@gnu.org>
From-SVN: r122743
2007-03-08 Gary Benson <gbenson@redhat.com>
PR classpath/30983:
* gnu/xml/dom/ls/DomLSParser.java (getInputSource):
Do not use the entity resolver to resolve the top-level document.
From-SVN: r122700
libjava
* Makefile.in: Rebuilt.
* Makefile.am (bin_PROGRAMS): Added gcjh.
(gcjh_SOURCES, gcjh_LDFLAGS, gcjh_LINK, gcjh_LDADD,
gcjh_DEPENDENCIES): New variables.
libjava/classpath
* tools/gnu/classpath/tools/javah/Main.java (getName): New
method.
(getParser): Now protected. Use getName. Add '-v' alias for
--verbose.
(postParse): New method.
(run): Now protected. Use postParse.
* tools/gnu/classpath/tools/javah/GcjhMain.java: New file.
* tools/Makefile.in: Rebuilt.
* tools/Makefile.am: Remove vm-tools.lst before creating it.
From-SVN: r122631
2007-03-05 Andrew Haley <aph@redhat.com>
* java/lang/reflect/natVMProxy.cc (ncode_closure.meth): Delete.
(generateProxyClass): Don't pass method to ncode.
(run_proxy): Call _Jv_GetReflectedMethod to find the proxy method.
* java/lang/reflect/Method.h: Rebuild.
* java/lang/reflect/Method.java (internalGetParameterTypes,
internalGetExceptionTypes): New methods.
* headers.txt (class java/lang/reflect/Method): Declare
_Jv_GetReflectedMethod. Be its friend.
* java/lang/natClass.cc (_Jv_GetReflectedMethod): New method.
* java/lang/Class.h: Declare it. Be its friend.
From-SVN: r122554
2007-03-03 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (parseAnnotationElement): Correct long
annotations to read JV_CONSTANT_Long, not JV_CONSTANT_Double.
From-SVN: r122545