Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4168853

STD: Stepover System.loadLibrary(String) acts as step into

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.1.6
    • core-svc
    • x86
    • windows_nt



      Name: mf23781 Date: 08/25/98


      *Test case:


      JD_0005f8_0005f1_0005Native.h
      =================================

      /* DO NOT EDIT THIS FILE - it is machine generated */
      #include <jni.h>
      /* Header for class JD_0005f8_0005f1_0005fNative */

      #ifndef _Included_JD_0005f8_0005f1_0005fNative
      #define _Included_JD_0005f8_0005f1_0005fNative
      #ifdef __cplusplus
      extern "C" {
      #endif
      /*
       * Class: JD_0005f8_0005f1_0005fNative
       * Method: greeting
       * Signature: ()V
       */
      JNIEXPORT void JNICALL Java_JD_18_11_1Native_greeting
        (JNIEnv *, jclass);

      #ifdef __cplusplus
      }
      #endif
      #endif


      JD_8_1_Native.c
      ===============

      #include "JD_0005f8_0005f1_0005fNative.h"
      #include <stdio.h>

      JNIEXPORT void JNICALL Java_JD_18_11_1Native_greeting
        (JNIEnv * e, jclass cl)
      {
         printf("Hello world!\n");
      }

      JD_8_1_Natine.def
      ==================

      LIBRARY JD_8_1_Native
      EXPORTS
      ;From object file: .\JD_8_1_Native.obj
        ;PUBDEFs (Symbols available from object file):
          _Java_JD_18_11_1Native_greeting@8


      JD_8_1_Native.java
      ===================

      class JD_8_1_Native
      { public static native void greeting();
         static
         {
           System.loadLibrary("JD_8_1_Native"); //(1)
         }
      }


      JD_8_1_TEST_Native.java
      =========================

      class JD_8_1_TEST_Native
      { public static void main(String[] args)
         {
           JD_8_1_Native.greeting(); //(2)
         } //(3)
      }




      *Steps to reproduce the problem:

      jdb JD_8_1_TEST_Native
      stop in JD_8_1_TEST_Native.main
      run
      step
      next



      *Ouputs:

      1.1.6
      =========

      P:\defects\6443>jdb JD_8_1_TEST_Native
      Initializing jdb...
      Warning: JIT compiler "symcjit" not found. Will use interpreter.
      0xf8faa0:class(JD_8_1_TEST_Native)
      > stop in JD_8_1_TEST_Native.main
      Breakpoint set in JD_8_1_TEST_Native.main
      > run
      run JD_8_1_TEST_Native
      running ...
      main[1]
      Breakpoint hit: JD_8_1_TEST_Native.main (JD_8_1_TEST_Native:4)
      main[1] step
      main[1]
      Breakpoint hit: JD_8_1_Native.<clinit> (JD_8_1_Native:5)
      main[1] next
      main[1]
      Breakpoint hit: java.lang.String.<init> (String:368)
      main[1]

      1.1.7
      =======

      P:\defects\6443>jdb JD_8_1_TEST_Native
      Initializing jdb...
      0xf8ff78:class(JD_8_1_TEST_Native)
      > stop in JD_8_1_TEST_Native.main
      Breakpoint set in JD_8_1_TEST_Native.main
      > run
      run JD_8_1_TEST_Native
      running ...
      main[1]
      Breakpoint hit: JD_8_1_TEST_Native.main (JD_8_1_TEST_Native:4)
      main[1] step
      main[1]
      Breakpoint hit: JD_8_1_Native.<clinit> (JD_8_1_Native:5)
      main[1] next
      main[1]
      Breakpoint hit: java.lang.String.<init> (String:360)
      main[1]


      1.2fcs-E
      ==========

      P:\defects\6443>jdb JD_8_1_TEST_Native
      Initializing jdb...
      0xa9:class(JD_8_1_TEST_Native)
      > stop in JD_8_1_TEST_Native.main
      Breakpoint set in JD_8_1_TEST_Native.main
      > run
      run JD_8_1_TEST_Native
      running ...
      main[1]
      Breakpoint hit: JD_8_1_TEST_Native.main (JD_8_1_TEST_Native:4)
      main[1] step

      Breakpoint hit: java.lang.ClassLoader.loadClass (ClassLoader:202)
      main[1] main[1] next
      main[1]
      Breakpoint hit: JD_8_1_Native.<clinit> (JD_8_1_Native:5)
      main[1]



      ======================================================================

            Unassigned Unassigned
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: