Skip to content

Commit

Permalink
erts: Include jit.pdb and release all pdb files
Browse files Browse the repository at this point in the history
When debugging on windows, the name of the pdb file is
not the name of the file being debugger, but the name
of the file as it was compiled. We rename beam.jit.dll
to beam.smp.dll during the build so the pdb needed is called
jit.pdb and not smp.pdb.

We also make sure to release all pdb files so that they
are part of the installer.
  • Loading branch information
garazdawi committed Dec 20, 2024
1 parent f44f15a commit 1f28792
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions erts/emulator/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,10 @@ release_spec: all
$(INSTALL_DATA) $(RELEASE_INCLUDES) "$(RELEASE_PATH)/usr/include"
$(INSTALL_DATA) $(RELEASE_INCLUDES) "$(RELSYSDIR)/include"
$(INSTALL_PROGRAM) $(BINDIR)/$(EMULATOR_EXECUTABLE) "$(RELSYSDIR)/bin"
ifeq ($(TARGET),win32)
$(INSTALL_DATA) $(BINDIR)/$(EMULATOR_EXECUTABLE:.dll=.pdb) "$(RELSYSDIR)/bin"
$(INSTALL_DATA) $(BINDIR)/$(FLAVOR_EXECUTABLE:.dll=.pdb) "$(RELSYSDIR)/bin"
endif
ifeq ($(RELEASE_LIBBEAM),yes)
$(INSTALL_DIR) "$(RELSYSDIR)/lib"
$(INSTALL_PROGRAM) $(BINDIR)/$(EMULATOR_LIB) "$(RELSYSDIR)/lib"
Expand Down
4 changes: 4 additions & 0 deletions erts/etc/common/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ $(OBJDIR)/safe_string.o: $(ETC)/safe_string.c $(RC_GENERATED)
# erl_call
$(BINDIR)/erl_call@EXEEXT@: $(ERL_TOP)/lib/erl_interface/bin/$(TARGET)/erl_call@EXEEXT@
$(ld_verbose)cp $< $@
$(ld_verbose)cp $(<:.exe=.pdb) $(@:.exe=.pdb)

ifneq ($(TARGET),win32)
$(BINDIR)/$(ERLEXEC): $(OBJDIR)/$(ERLEXEC).o $(ERTS_LIB)
Expand Down Expand Up @@ -545,6 +546,9 @@ ifneq ($(TARGET), win32)
endif
ifneq ($(INSTALL_PROGS),)
$(INSTALL_PROGRAM) $(INSTALL_PROGS) "$(RELEASE_PATH)/erts-$(VSN)/bin"
ifeq ($(TARGET),win32)
$(INSTALL_DATA) $(INSTALL_PROGS: %.exe, %.pdb) "$(RELEASE_PATH)/erts-$(VSN)/bin"
endif
endif
ifneq ($(INSTALL_TOP),)
$(INSTALL_SCRIPT) $(INSTALL_TOP) "$(RELEASE_PATH)"
Expand Down
4 changes: 2 additions & 2 deletions otp_build
Original file line number Diff line number Diff line change
Expand Up @@ -1264,8 +1264,8 @@ do_debuginfo_win32 ()
RELDIR="$1"
fi
BINDIR="$ERL_TOP/bin/$TARGET"
EVSN=`grep '^VSN' erts/vsn.mk | sed 's,^VSN.*=[^0-9]*\([0-9].*\)$,@\1,g;s,^[^@].*,,g;s,^@,,g'`
for f in beam.debug.smp.dll beam.smp.pdb beam.debug.smp.dll.pdb erl.pdb erlexec.pdb; do
EVSN=$(grep '^VSN' erts/vsn.mk | sed 's,^VSN.*=[^0-9]*\([0-9].*\)$,@\1,g;s,^[^@].*,,g;s,^@,,g')
for f in beam.debug.smp.dll beam.debug.smp.dll.pdb beam.debug.jit.dll.pdb; do
if [ -f $BINDIR/$f ]; then
rm -f $RELDIR/erts-$EVSN/bin/$f
cp $BINDIR/$f $RELDIR/erts-$EVSN/bin/$f
Expand Down

0 comments on commit 1f28792

Please sign in to comment.