Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Debugging scripts.dll
Debugging scripts.dll [message #478449] Sun, 06 January 2013 16:12 Go to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Hi, I apologize if this belongs in the Mod forum, but this IS the TT scripts.dll I'm trying to compile so... Wink

Anyway, I can't seem to compile scripts.dll in debug mode any longer. Evidently it's due to a macro redefining the new operator which seems to cause some syntax errors (I recall "SetThreadTracking" being involved). However, iran said you can no longer compile scripts in debug mode period, so maybe I just missed the memo.

The main and more important part of my question is that I used to know how to get Visual Studio to attach to the FDS and allow me to debug scripts, but I can no longer do it. As far as I'm aware, the only way to get symbols in Visual Studio code is to compile in debug mode, unlike GCC which compiles in all symbols by default. Part of the dilemma I am facing here is that I can't compile in debug mode, and the other part is that I can't remember how to attach the debugger to server.dat.

Some help would be greatly appreciated here. Figuring this out would help me out tremendously. Thanks in advance!


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

[Updated on: Mon, 07 January 2013 03:28]

Report message to a moderator

Re: Debugging scripts.dll [message #478450 is a reply to message #478449] Sun, 06 January 2013 17:02 Go to previous messageGo to next message
ViPeaX is currently offline  ViPeaX
Messages: 40
Registered: January 2007
Karma: 0
Recruit
What's wrong with Linker -> Debugging -> Generate Debug Info [Yes] aka /DEBUG syntax.
Re: Debugging scripts.dll [message #478451 is a reply to message #478449] Sun, 06 January 2013 17:52 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Debug compiles fine for me, so I guess the publicly released source is missing something to allow it to compile... can you post the output from Visual Studio? Maybe we can figure it out...

(Unless jonwil has done it deliberately anyway... or it's due to something we *can't* release...)


http://steamsignature.com/card/1/76561197975867233.png
Re: Debugging scripts.dll [message #478460 is a reply to message #478449] Mon, 07 January 2013 00:11 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

What danpaul said. As for attaching, you can set the scripts.dll project as startup project and configure its debugging options (right click the project in the solution explorer, click properties and go to the "debugging" page or something similar, I am in the train right now and cannot check it.) Alternatively, you can go to "attach to process" from the "debugging" menu. As a side note, I recommend setting the RENSERVERPATH or REN_SERVER_PATH or similar environment var so that compiled .dlls are copied there automatically after compiling.

As for debugging info, the MSVC++ compiler normally does not store symbols in the executable, instead they are in the .pdb. The .pdb, in our settings, is generated for both debug and release mode builds, but release mode symbols are less reliable due to optimization shuffling things around.


BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: Debugging scripts.dll [message #478463 is a reply to message #478449] Mon, 07 January 2013 03:29 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Quote:

2> engine_da.cpp
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(598): error C2544: expected ')' for operator '()'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(598): error C2065: '()' : undeclared identifier
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(598): error C2146: syntax error : missing ';' before identifier 'SetThreadTrackingInformation'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(598): error C2059: syntax error : ')'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(598): error C2059: syntax error : ';'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(603): error C2544: expected ')' for operator '()'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(603): error C2065: '()' : undeclared identifier
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(603): error C2146: syntax error : missing ';' before identifier 'SetThreadTrackingInformation'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(603): error C2059: syntax error : ')'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(603): error C2059: syntax error : ';'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(1147): error C2544: expected ')' for operator '()'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(1147): error C2065: '()' : undeclared identifier
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(1147): error C2146: syntax error : missing ';' before identifier 'SetThreadTrackingInformation'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(1147): error C2059: syntax error : ')'
2>c:\users\will\documents\dragonade\source\scripts\engine_da.cpp(1147): error C2059: syntax error : ';'


This is my Dragonade source, but these error messages are quite similar to the ones from stock 4.0 scripts. I will compile my regular scripts and edit this post in just a moment.

EDIT: Well fuck guys, I thought for sure I had this issue in regular scripts but it just compiled fine in both Debug SSGM and Debug. Evidently this is one for Whitedragon. I'll either hope that WD sees this or make a post in the Mod forum. Thanks for the help! Rocked Over


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

[Updated on: Mon, 07 January 2013 03:38]

Report message to a moderator

Re: Debugging scripts.dll [message #478539 is a reply to message #478449] Wed, 09 January 2013 11:50 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
eh dude, as far as i can see is everything just on big syntax error meaning you just messed up something with the ; and ( or )

read your code

on lines 598,603,1147 or next time double click the error that should prob solve your problem unless you get even more errors that arent syntax


Owner of kambot TT server

kambot.freeforums.org

[Updated on: Wed, 09 January 2013 11:51]

Report message to a moderator

Re: Debugging scripts.dll [message #478555 is a reply to message #478449] Wed, 09 January 2013 22:40 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Error from freshly unzipped DA1.0.1 zip:
Quote:

2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(598): error C2544: expected ')' for operator '()'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(598): error C2065: '()' : undeclared identifier
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(598): error C2146: syntax error : missing ';' before identifier 'SetThreadTrackingInformation'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(598): error C2059: syntax error : ')'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(598): error C2059: syntax error : ';'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(603): error C2544: expected ')' for operator '()'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(603): error C2065: '()' : undeclared identifier
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(603): error C2146: syntax error : missing ';' before identifier 'SetThreadTrackingInformation'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(603): error C2059: syntax error : ')'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(603): error C2059: syntax error : ';'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(1147): error C2544: expected ')' for operator '()'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(1147): error C2065: '()' : undeclared identifier
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(1147): error C2146: syntax error : missing ';' before identifier 'SetThreadTrackingInformation'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(1147): error C2059: syntax error : ')'
2>c:\westwood\renegade stuff\da\source\scripts\engine_da.cpp(1147): error C2059: syntax error : ';'


That's a negative ghostrider


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Debugging scripts.dll [message #478559 is a reply to message #478449] Thu, 10 January 2013 01:38 Go to previous messageGo to next message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma: 1
Colonel
For the moment you can just comment out the contents of the two functions that give those errors. I'll see about a proper fix for it.

Black-Cell.net
Network Administrator (2003 - )

DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )

Dragonade, Renegade's first server side modification
Lead coder (2005 - )

[Updated on: Thu, 10 January 2013 01:38]

Report message to a moderator

Re: Debugging scripts.dll [message #478560 is a reply to message #478449] Thu, 10 January 2013 01:40 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Thanks WD, you rock! (and so does Dragonade) In Love

-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

[Updated on: Thu, 10 January 2013 01:40]

Report message to a moderator

Re: Debugging scripts.dll [message #478602 is a reply to message #478449] Fri, 11 January 2013 22:47 Go to previous message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma: 1
Colonel
Updated the download with a fix.

Black-Cell.net
Network Administrator (2003 - )

DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )

Dragonade, Renegade's first server side modification
Lead coder (2005 - )
Previous Topic: remote c4 bug
Next Topic: Crash
Goto Forum:
  


Current Time: Sun Dec 22 16:00:54 MST 2024

Total time taken to generate the page: 0.00803 seconds