Skip to content

Commit

Permalink
build: import upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GloriousEggroll committed Jul 21, 2023
1 parent 610dead commit d2a4a91
Show file tree
Hide file tree
Showing 5 changed files with 498 additions and 1 deletion.
3 changes: 2 additions & 1 deletion make/rules-cargo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $$(OBJ)/.$(1)-build$(3):
$$(filter -j%,$$(MAKEFLAGS)) \
--target "$$(CARGO_TARGET_$(3))" \
--target-dir $$($(2)_OBJ$(3)) \
$$(CARGO_BUILD_ARG) \
$$(CARGO_BUILD_ARGS) \
$$($(2)_CARGO_ARGS) \
$$($(2)_CARGO_ARGS$(3))
touch $$@
Expand All @@ -27,3 +27,4 @@ rules-cargo = $(call create-rules-cargo,$(1),$(call toupper,$(1)),$(2))

CARGO_TARGET_32 := i686-unknown-linux-gnu
CARGO_TARGET_64 := x86_64-unknown-linux-gnu

4 changes: 4 additions & 0 deletions symstore/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
all: symstore

symstore: symstore.c
$(CC) -o $@ symstore.c $(SYMSTORE_CFLAGS) -D__WINESRC__ -DWINE_UNIX_LIB -Wall -g -Wall -Wno-packed-not-aligned
32 changes: 32 additions & 0 deletions symstore/guidelines-deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Building the symbol server

From a Proton build environment, run
```
make symstore-tarball
```
This will create in <BUILD>/symstore a .zip file, named after the
release being built (<BUILD_NAME>-symstore.zip).

# Requirements for symbol server

This requires mapping a directory <TOP> (and all its sub-hierarchy) at
a given URI.

There are two strong requirements:
- all files in <TOP> must be served as binary,
- the mapping of <TOP> must be case insensitive.

# Deploying a new Proton version

Get the <BUILD_NAME>-symstore.zip [[URI or process to get it]] and
extract in inside <TOP>.
```
cd <TOP> && unzip <BUILD_NAME>-symstore.zip
```
[[ Note: no check when overwritting files... this shouldn't happen as
the timestamp should diversify ]]

# Removing a Proton version

Erase <TOP> and reinstall all Proton version -symstore.tip files
except the one(s) to be removed.
77 changes: 77 additions & 0 deletions symstore/guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
This small note to describe how a windows developer can inject
minidump files generated from a crash of a game running under Proton
Steam (desktop or Deck).

Note: this doesn't apply if the application is running managed code as
it's required more compabilities between .NET and Mono. So, from now
on, we only consider native (non managed) code.

These minidumps are fully reloadable under Microsoft tools (WinDbg or
Visual Studio) when the binaries of the Proton system files are made
available to the debugging tool.
It's mandatory for reloading a minidump created with a given Proton
version that the very same Proton system files are made avaiable to
the machine running the debugging tool.

If the right version is not installed, the debugging tool will likely
emit warnings (like "couldn't match module", or "invalid time
stamp"). This means the debugging tool will report likely bogus
information, and your setup must be fixed before going any further.

# Installing on dev machine

Each new released proton version (starting at XXXX FIXME XXXX) will
also be available as a zip package to be installed inside symbol store.

The .zip file is available at URL XXX FIXME XXX [decide] and is named
<BUILD_NAME>-symstore.zip.

You must create a top directory (referred as <SYMSTORE> below) and
extract the zip file with <SYMSTORE> as the parent directory.

Each time a new Proton's version is released, this extraction scheme
has to be done in order to have proper access to minidumps generated
from this Proton version.

# Setting up the debugging tools

## WinDbg

In the WinDbg "File > Settings" menu, in the "Symbols path" pane, add
```
srv*<SYMSTORE>
```
Of course, one can add also the paths to the application being
debugged.

## Visual Studio

In Visual Studio:
- Open the minidump from the "File > Open > File" menu
- Open the "Set Symbol paths" item, and add a (.pdb) store pointing to
<SYMSTORE>
- Depending on your project settings, you could also have another
store pointing to your own application
- Then start debugging by using the "Debug with..." appropriate to
your project.

## Other debugging tool

If the tool supports symbol stores, then there's should be a similar
configuration as described above for MS tools.

[[ Note: the settings above should work also if we're able to generate
.pdb files along side the images ]]

# Public store

[[ NOTE depends on Valve's agreeing to set it up ]]

A Proton symbol store is available at <SYMSTORE_URI>.

Then no local installation is required, only setting the
```
srv*<SYMSTORE_URI>
```
in the debugging tools would be required.

Loading

0 comments on commit d2a4a91

Please sign in to comment.