diff --git a/make/Bundles.gmk b/make/Bundles.gmk index cf3b77e4e520d..7771f4acc6197 100644 --- a/make/Bundles.gmk +++ b/make/Bundles.gmk @@ -125,11 +125,11 @@ define SetupBundleFileBody && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \ $(TAR_IGNORE_EXIT_VALUE) ) \ | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) ) - # Rename stripped pdb files + # Rename full pdb files for symbols bundle ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public) - for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \ - $(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \ - $(MV) $$$${f} $$$${f%stripped.pdb}pdb; \ + for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.full.pdb"`; do \ + $(ECHO) Renaming $$$${f} to $$$${f%full.pdb}pdb $(LOG_INFO); \ + $(MV) $$$${f} $$$${f%full.pdb}pdb; \ done endif # Unzip any zipped debuginfo files @@ -225,10 +225,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), ) else ifeq ($(SHIP_DEBUG_SYMBOLS), public) JDK_SYMBOLS_EXCLUDE_PATTERN := \ - $(filter-out \ - %.stripped.pdb, \ - $(filter %.pdb, $(ALL_JDK_FILES)) \ - ) + $(filter %.full.pdb, $(ALL_JDK_FILES)) endif endif endif @@ -270,10 +267,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), ) else ifeq ($(SHIP_DEBUG_SYMBOLS), public) JRE_SYMBOLS_EXCLUDE_PATTERN := \ - $(filter-out \ - %.stripped.pdb, \ - $(filter %.pdb, $(ALL_JRE_FILES)) \ - ) + $(filter %.full.pdb, $(ALL_JRE_FILES)) endif endif endif diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk index 3280b24924a34..3baaf40c9c128 100644 --- a/make/CreateJmods.gmk +++ b/make/CreateJmods.gmk @@ -60,16 +60,13 @@ $(call FillFindCache, \ ifneq ($(LIBS_DIR), ) DEPS += $(call FindFiles, $(LIBS_DIR)) ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public) - # For public debug symbols on Windows, we have to use stripped pdbs and rename them - rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1) + # For public debug symbols on Windows, we have to filter out full pdbs LIBS_DIR_FILTERED := $(subst modules_libs,modules_libs_filtered, $(LIBS_DIR)) - FILES_LIBS := $(filter-out %.pdb, $(call FindFiles, $(LIBS_DIR))) \ - $(filter %.stripped.pdb, $(call FindFiles, $(LIBS_DIR))) + FILES_LIBS := $(filter-out %.full.pdb, $(call FindFiles, $(LIBS_DIR))) $(eval $(call SetupCopyFiles, COPY_FILTERED_LIBS, \ SRC := $(LIBS_DIR), \ DEST := $(LIBS_DIR_FILTERED), \ FILES := $(FILES_LIBS), \ - NAME_MACRO := rename_stripped, \ )) DEPS += $(COPY_FILTERED_LIBS) JMOD_FLAGS += --libs $(LIBS_DIR_FILTERED) @@ -80,16 +77,13 @@ endif ifneq ($(CMDS_DIR), ) DEPS += $(call FindFiles, $(CMDS_DIR)) ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public) - # For public debug symbols on Windows, we have to use stripped pdbs and rename them - rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1) + # For public debug symbols on Windows, we have to filter out full pdbs CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR)) - FILES_CMDS := $(filter-out %.pdb, $(call FindFiles, $(CMDS_DIR))) \ - $(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR))) + FILES_CMDS := $(filter-out %.full.pdb, $(call FindFiles, $(CMDS_DIR))) $(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \ SRC := $(CMDS_DIR), \ DEST := $(CMDS_DIR_FILTERED), \ FILES := $(FILES_CMDS), \ - NAME_MACRO := rename_stripped, \ )) DEPS += $(COPY_FILTERED_CMDS) JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED) diff --git a/make/common/native/DebugSymbols.gmk b/make/common/native/DebugSymbols.gmk index 7f21fd8cbf337..c5395d9c5b2d9 100644 --- a/make/common/native/DebugSymbols.gmk +++ b/make/common/native/DebugSymbols.gmk @@ -64,10 +64,11 @@ define CreateDebugSymbols endif ifeq ($(call isTargetOs, windows), true) - $1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).pdb" \ - "-map:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).map" + $1_EXTRA_LDFLAGS += -debug "-map:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).map" ifeq ($(SHIP_DEBUG_SYMBOLS), public) - $1_EXTRA_LDFLAGS += "-pdbstripped:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).stripped.pdb" + $1_EXTRA_LDFLAGS += "-pdbstripped:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).pdb" "-pdb:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).full.pdb" + else + $1_EXTRA_LDFLAGS += "-pdb:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).pdb" endif endif diff --git a/test/jdk/jdk/modules/etc/JmodExcludedFiles.java b/test/jdk/jdk/modules/etc/JmodExcludedFiles.java index 90ca6840d52a6..d24f83f84e600 100644 --- a/test/jdk/jdk/modules/etc/JmodExcludedFiles.java +++ b/test/jdk/jdk/modules/etc/JmodExcludedFiles.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -82,10 +82,10 @@ boolean isNativeDebugSymbol(String name) { } if (OperatingSystem.isWindows() && name.endsWith(".pdb")) { // on Windows we check if we should have public symbols through --with-external-symbols-in-bundles=public (JDK-8237192) - String strippedpdb = javaHome + "/bin/" + name.substring(index + 1, name.length() - 4) + ".stripped.pdb"; - if (!Files.exists(Paths.get(strippedpdb))) { + String fullpdb = javaHome + "/bin/" + name.substring(index + 1, name.length() - 4) + ".full.pdb"; + if (!Files.exists(Paths.get(fullpdb))) { System.err.println("Found symbols in " + jmod + ": " + name + - ". No stripped pdb file " + strippedpdb + " exists."); + ". No full pdb file " + fullpdb + " exists."); return true; } }