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

[REDO] Fix sun.awt.nativedebug on X11 platforms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 11, 12
    • client-libs
    • None
    • b21

      AWT supports some kind of native logging which can be enabled with "-Dsun.awt.nativedebug=true -Dawtdebug.ctrace=true".

      Unfortunately this doesn't work on X platforms any more because both, libawt and libawt_xawt end up with a copy of debug_trace.o. Among others, debug_trace.o contains the static variable GlobalTracingEnabled which denotes the tracing state. This obviously can't work if the final executable contains several instances of this variable.

      The fix is trivial. Remove "common/awt/debug" from the set of sources for libawt_xawt. libawt_xawt is linked against libawt (which contains debug_trace.o) anyway, so this is no problem.

      Also JNIEXPORT the following methods from libawt.so otherwise they won't be visible in libawt_xawt.so on some platforms which make symbols local by default (e.g. Solaris):

      DAssert_Impl
      DTrace_PrintFunction
      DTrace_VPrint
      DTrace_VPrintln

            simonis Volker Simonis
            simonis Volker Simonis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: