Bash Script Shorcuts for Steam Games

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
User avatar
SpawnHappyJake
Level 5
Level 5
Posts: 272
Joined: Sun Feb 06, 2011 5:57 am

Dubious

Post by SpawnHappyJake »

This looks promising: http://developer.valvesoftware.com/wiki ... ne_Options

It appears (from a quick glance, seeing "allowdebug" and "-dev") that you can debug by simply passing the right arguments to hl2.exe. No external debugger. Maybe you can use hl2.exe as it's own debugger.

Right now I'm pretty dubious that hl2.exe can work in gdb. For three reasons: 1) I tried and it didn't work. 2) I'm pretty sure hl2.exe wasn't compiled in gcc or even compiled to be compatible with gdb. 3) You don't have the hl2.exe source code (or do you?).

I think you'll have to change tactic and use hl2.exe "debugging?" parameters (I hope they are) or use Wine's debugger.

Anytime I Google "debug hl2.exe" Visual Studio usually comes up. I don't think that's for debugging hl2.exe itself, though:
A message will appear indicating that symbols cannot be found for hl2.exe. This simply means that there is no debug information for hl2.exe, but we aren't particularly interested in hl2.exe itself. It is our Client.dll and Server.dll made by our project that we will be debugging. Check Don't show this dialog again and click Yes. Your mod will now load several modules, and several seconds later your mod will appear. It is recommended to edit the video options, and select windowed mode. This will make it easier to switch back and forth between your mod and VS.
-from http://developer.valvesoftware.com/wiki ... ual_Studio

Cheers,
Jake


Cheers,
Jake
Entanglement
Level 3
Level 3
Posts: 62
Joined: Tue Aug 02, 2011 1:12 am

Post by Entanglement »

bash-4.1$ ps -ef | grep hl2.exe
thomas 17020 16903 64 16:41 tty1 00:01:15 c:\program files\steam\steamapps\mysteamusername\team fortress 2\hl2.exe -game tf -steam -novid
thomas 17137 17131 0 16:43 pts/0 00:00:00 grep hl2.exe
bash-4.1$ gdb --pid 17020
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-slackware-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 17020
Reading symbols from /usr/bin/wine-preloader...(no debugging symbols found)...done.
0x10248246 in ?? ()
(gdb) handle SIGSTOP nostop noprint
Signal Stop Print Pass to program Description
SIGSTOP No No Yes Stopped (signal)
(gdb) handle SIGSEGV nostop noprint
Signal Stop Print Pass to program Description
SIGSEGV No No Yes Segmentation fault
(gdb) handle SIGUSR1 nostop
Signal Stop Print Pass to program Description
SIGUSR1 No Yes Yes User defined signal 1
(gdb) c
Continuing.
Locked