Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows pdb #9229

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ jobs:
distribution: Ubuntu-18.04

- name: Install WSL dependencies
run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip
run: apt update && apt install -y make autoconf unzip

- name: Install openssl
shell: cmd
Expand Down
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: 3 additions & 1 deletion erts/emulator/beam/erl_bif_coverage.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ get_cover_id_line(Process* c_p, const BeamCodeHeader* hdr)
for (i = hdr->line_coverage_len - 1; i >= 0; i--) {
Eterm coverage = am_error;
Uint* coverage_array = hdr->coverage;
Sint coverage_data;
unsigned cover_id;

if (!hdr->line_coverage_valid[i]) {
Expand All @@ -388,7 +389,8 @@ get_cover_id_line(Process* c_p, const BeamCodeHeader* hdr)
if (location == LINE_INVALID_LOCATION) {
continue;
}
coverage = make_small(MIN(coverage_array[i], MAX_SMALL));
coverage_data = coverage_array[i];
coverage = make_small(MIN(coverage_data, MAX_SMALL));
cover_id = loc2id[i];
tmp = TUPLE2(hp, make_small(cover_id), coverage);
hp += 3;
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
15 changes: 4 additions & 11 deletions otp_build
Original file line number Diff line number Diff line change
Expand Up @@ -1257,20 +1257,13 @@ do_update_ex_doc ()
do_debuginfo_win32 ()
{
setup_make
(cd erts/emulator && $MAKE MAKE="$MAKE" TARGET=$TARGET debug) || exit 1
($MAKE MAKE="$MAKE" TARGET=$TARGET TYPE=debug) || exit 1
if [ -z "$1" ]; then
RELDIR="$ERL_TOP/release/$TARGET"
RELDIR="$ERL_TOP/release/$TARGET"
else
RELDIR="$1"
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
if [ -f $BINDIR/$f ]; then
rm -f $RELDIR/erts-$EVSN/bin/$f
cp $BINDIR/$f $RELDIR/erts-$EVSN/bin/$f
fi
done
($MAKE release RELEASE_ROOT="$RELDIR" MAKE="$MAKE" TARGET=$TARGET TYPE=debug) || exit 1
}

do_installer_win32 ()
Expand Down
Loading