OSDN Git Service

2007-04-09 Kyle Galloway <kgallowa@redhat.com>
authorkgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Apr 2007 20:32:19 +0000 (20:32 +0000)
committerkgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Apr 2007 20:32:19 +0000 (20:32 +0000)
* interpret-run.cc: If debugging, check if args is NULL before
getting the "this" pointer.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123681 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/interpret-run.cc

index dc120ca..5bcf24e 100644 (file)
@@ -1,5 +1,10 @@
 2007-04-09  Kyle Galloway  <kgallowa@redhat.com>
 
+       * interpret-run.cc: If debugging, check if args is NULL before
+       getting the "this" pointer.
+
+2007-04-09  Kyle Galloway  <kgallowa@redhat.com>
+
        * classpath/gnu/classpath/jdwp/value/ArrayValue.java: New file.
        * classpath/lib/gnu/classpath/jdwp/value/ArrayValue.class: New file.
        * gnu/classpath/jdwp/ArrayValue.h: New file.
index 30e55da..b8c88af 100644 (file)
@@ -46,9 +46,13 @@ details.  */
   // If the method is non-static, we need to set the type for the "this" pointer.
   if ((method->accflags & java::lang::reflect::Modifier::STATIC) == 0)
     {
-      // Set the "this" pointer for this frame
-      _Jv_word *this_ptr = reinterpret_cast<_Jv_word *> (args);
-      frame_desc.obj_ptr = this_ptr[0].o;
+      if (args)
+        {
+          // Set the "this" pointer for this frame.
+          _Jv_word *this_ptr = reinterpret_cast<_Jv_word *> (args);
+          frame_desc.obj_ptr = this_ptr[0].o;
+        }
+
       frame_desc.locals_type[0] = 'o';
       type_ctr++;
     }