aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Galloway <kgallowa@redhat.com>2007-04-09 20:32:19 +0000
committerKyle Galloway <kgallowa@gcc.gnu.org>2007-04-09 20:32:19 +0000
commitb1bdab7eb5e02ff0457c023da6a79b77c3d0ccb8 (patch)
tree19a655ae9bb391740c25b7709782bcdaa552c577
parentaa2473e4fcc82761d92c32ea7a459b8df8196864 (diff)
downloadgcc-b1bdab7eb5e02ff0457c023da6a79b77c3d0ccb8.zip
gcc-b1bdab7eb5e02ff0457c023da6a79b77c3d0ccb8.tar.gz
gcc-b1bdab7eb5e02ff0457c023da6a79b77c3d0ccb8.tar.bz2
interpret-run.cc: If debugging, check if args is NULL before getting the "this" pointer.
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
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/interpret-run.cc10
2 files changed, 12 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index dc120ca..5bcf24e 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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.
diff --git a/libjava/interpret-run.cc b/libjava/interpret-run.cc
index 30e55da..b8c88af 100644
--- a/libjava/interpret-run.cc
+++ b/libjava/interpret-run.cc
@@ -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++;
}