Author Topic: VS 2010: debug info  (Read 3043 times)

jj2007

  • Member
  • *****
  • Posts: 7541
  • Assembler is fun ;-)
    • MasmBasic
VS 2010: debug info
« on: October 23, 2014, 12:17:16 PM »
Hi,
I have a C library that I use with assembler. It builds fine, and works fine when included in assembler code, but when I use linker option /debug, it chokes:

LINK 6.14: fatal error LNK1000: unknown error; consult documentation for technical support options

POLINK: fatal error: Unknown kind (0x0) of CodeView symbol in object 'tinf.lib(tmp.obj)'

No such error with /debugtype:coff, but Olly can't handle that option.

Any ideas? Using a more recent link.exe version is not a good option, because I'd like to maintain compatibility with Masm32.

P.S.: It works better with Pelles C, but the resulting code is much slower :(

habran

  • Member
  • *****
  • Posts: 1107
    • uasm
Re: VS 2010: debug info
« Reply #1 on: October 23, 2014, 01:27:23 PM »
Hi jj2007,
WinDbg is an excellent FREE debugger :t
Give it a try :biggrin:
Cod-Father

jj2007

  • Member
  • *****
  • Posts: 7541
  • Assembler is fun ;-)
    • MasmBasic
Re: VS 2010: debug info
« Reply #2 on: October 23, 2014, 01:53:01 PM »
WinDbg is an excellent FREE debugger :t

Debugging Tools for Windows
Quote
get the Windows 7 Debugging Tools for Windows package, which is included in the Microsoft Windows Software Development Kit (SDK) ... You might have to uninstall Microsoft Visual C++ 2010 Redistributable components before you install the SDK

Ah... Microsoft :eusa_boohoo:

P.S.: Just tried C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\Mdbg.exe - true hitech :t

habran

  • Member
  • *****
  • Posts: 1107
    • uasm
Re: VS 2010: debug info
« Reply #3 on: October 23, 2014, 02:16:56 PM »
 8)
If you have Windows 7 you should use Microsoft Visual Studio Express 13 for Desktop
it is FREE for commercial use, it is actually new VC10 :t
I use it as a studio and work with JWasm and C together in the same project
In that case you can run and debug using built in debugger
Cod-Father

jj2007

  • Member
  • *****
  • Posts: 7541
  • Assembler is fun ;-)
    • MasmBasic
Re: VS 2010: debug info
« Reply #4 on: October 23, 2014, 06:10:47 PM »
If you have Windows 7 you should use Microsoft Visual Studio Express

I do have XP, too, and I like Olly. So, any ideas how to convince ML 10.0 to output symbols that can be handled by the old Masm32 linker?

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: VS 2010: debug info
« Reply #5 on: October 24, 2014, 02:05:26 AM »
Quote
C library that I use with assembler. It builds fine, and works fine when included in assembler code, but when I use linker option /debug, it chokes:
Old binaries of the masm32 package aren't compatible with VS2010 in debug mode.
use only the VS2010 linker and rebuild all your sources code
Fa is a musical note to play with CL

jj2007

  • Member
  • *****
  • Posts: 7541
  • Assembler is fun ;-)
    • MasmBasic
Re: VS 2010: debug info
« Reply #6 on: October 24, 2014, 04:34:10 AM »
Old binaries of the masm32 package aren't compatible with VS2010 in debug mode.
use only the VS2010 linker and rebuild all your sources code

So, will the rebuilt libraries be compatible with the old Masm32 linker that almost everybody uses here?

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: VS 2010: debug info
« Reply #7 on: October 24, 2014, 04:53:31 AM »
The linker of the masm32 package must be replace by the Vc 2010.
                         You must add it his dll ms*.* and more
The masm32 library must be rebuild.
The crt_library must be rebuild.
After that,no more problem.
Fa is a musical note to play with CL

Gunther

  • Member
  • *****
  • Posts: 3515
  • Forgive your enemies, but never forget their names
Re: VS 2010: debug info
« Reply #8 on: October 24, 2014, 09:06:53 AM »
The linker of the masm32 package must be replace by the Vc 2010.
                         You must add it his dll ms*.* and more
The masm32 library must be rebuild.
The crt_library must be rebuild.
After that,no more problem.

That's a lot of expenditure. Is it worth the effort? Would the gcc be an alternative?

Gunther
Get your facts first, and then you can distort them.

jj2007

  • Member
  • *****
  • Posts: 7541
  • Assembler is fun ;-)
    • MasmBasic
Re: VS 2010: debug info
« Reply #9 on: October 24, 2014, 04:00:48 PM »
The linker of the masm32 package must be replace by the Vc 2010.
                         You must add it his dll ms*.* and more
The masm32 library must be rebuild.
The crt_library must be rebuild.
After that,no more problem.

Yves, "no more problem"??? You are ignoring my question:
So, will the rebuilt libraries be compatible with the old Masm32 linker that almost everybody uses here?

So I'll answer it myself: NO, the rebuilt libraries will NOT be usable by anybody who has NOT replaced his whole installation with the latest M$ crap. But then, you'll probably suggest that everybody must install the "ready-to-use SDK", right? ;)

In the meantime, I've solved the problem. PM me if you are interested.

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: VS 2010: debug info
« Reply #10 on: October 24, 2014, 04:27:43 PM »

You are right,using the  "ready-to-use SDK",you get the perfect soluce to mix masm and c code(object files).
You have no need of the masm crt_library with the translated headers .
There is about three functions in the crt whose names aren't compatible with masm.The soluce for them is to made a dynamic link,if you need them.
Fa is a musical note to play with CL