News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

LNK4209: Debugging information corrupt

Started by Leaeaxedx, November 16, 2017, 11:22:25 PM

Previous topic - Next topic

johnsa

I can only find it available still a preview 5, where did you find the update ? :) It's not showing in my VS notifications either.

Leaeaxedx

Quote from: johnsa on December 06, 2017, 03:32:16 AM
I can only find it available still a preview 5, where did you find the update ? :) It's not showing in my VS notifications either.

VS showed me the available update 15.5.

I have no idea why this is not the case for you.

Have you tried the Tools\Extensions and Updates drop down menu option? A dialog opens to select updates.

Igor

BTW: I noticed your are on the UASM developer team. Great work, keep up!  :t

johnsa

Thanks :) Will do,

Yeah I checked there , still nothing.. I'm using VS 2017 Pro, maybe it hasn't been applied to Pro yet ?

Leaeaxedx

That might be the case. I'm using the Community version.

johnsa

15.5.2 is now available for Visual Studio Professional, so I can remove the preview. Yay :)

aw27

I am using the latest Microsoft (R) Incremental Linker Version 14.12.25831.0 and the latest UASM v2.46, Dec 14 2017

With this code:

; Assemble with
; uasm64 -c -win64 -Zp8 /Sg /WX /Zi main.asm
;OR with
; ml64 -c -Zp8 /Sg /WX /Zi main.asm
; link /ENTRY:start /SUBSYSTEM:windows /MACHINE:X64 /FIXED /DEBUG /DEBUGTYPE:CV /PDB:"main.pdb" main.obj

option casemap:none

includelib \masm32\Lib64\kernel32.lib
ExitProcess proto :dword;

.code

start Proc
sub rsp,8
int 3
mov ecx,0
call ExitProcess
start Endp

end


When assembled with MASM and debugged on Windbg I see the source:


When assembled with UASM and debugged on Windbg I don't see the source:


No errors, all linked perfectly.

johnsa

Just tried with VS and WinDbg x64, VS automatically opened the source file, windbg I had to manually open it to start but then it was all working fine, although I've had that same issue always with Windbg tbh..


nidud

#22
deleted

johnsa

I haven't tried to be honest, I never use windbg only Visual Studio, it's a much nicer environment to debug in, and profile etc etc..

LiaoMi

Hi,

by simple comparison I decided to find out why the 64 bit version of the Microsoft linker does not work, I make an empty project, with hope the whole difference will be visible, PDB processing stops here -Ln 2816

00 00 00 00 00 00
FF FF FF FF 1A 09 2F F1  48 00 00 00 28 02 00 00
F9 00 00 00 01 00 00 00  55 01 00 00 01 00 00 00
71 01 00 00 01 00 00 00  09 01 00 00 01 00 00 00
C5 00 00 00 01 00 00 00  39 01 00 00 01 00 00 00
8D 01 00 00 01 00 00 00  29 01 00 00 01 00 00 00
E1 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 40 00 00 00 00


the logic is

mywindow1.pdb_ml_link_x64 - ml64 & link64 - Ok
mywindow1.pdb_uasm64_bad_x64_linker - uasm64 & link64 - mywindow1.obj : fatal error LNK1318: Unexpected PDB error; OK (0) ''
mywindow1.pdb_uasm64_x32_Link - uasm64 & link32 - Ok

Where

mywindow1.pdb_uasm64_x32_Link
and
mywindow1.pdb_ml_link_x64,

different in content  :icon_rolleyes:, after that I compared jwasm64 and ml64, this bug or structure change is already present there, the size of the object files is the same, I decided to debug a bit, the place with a fatal error occurs at the first pass in the procedure

00007FF78240A2EF                                          | 48 8B CE                         | MOV     RCX, RSI                                                                            |
00007FF78240A2F2                                          | E8 85 06 01 00                   | CALL    <link.IMAGE::FPdbEarlyTypeMerge>                                                    |
00007FF78240A2F7                                          | 84 C0                            | TEST    AL, AL                                                                              |
00007FF78240A2F9                                          | 0F 85 67 04 00 00                | JNE     link.7FF78240A766                                                                   |



00007FF782435994 <link.AppendOp>                          | 40 53                            | PUSH    RBX                                                                                 |
00007FF782435996                                          | 48 83 EC 30                      | SUB     RSP, 30                                                                             |
00007FF78243599A                                          | 44 8B 02                         | MOV     R8D, DWORD PTR DS:[RDX]                                                             |
00007FF78243599D                                          | 48 8B D9                         | MOV     RBX, RCX                                                                            |
00007FF7824359A0                                          | 44 88 4C 24 20                   | MOV     BYTE PTR SS:[RSP + 20], R9B                                                         |
00007FF7824359A5                                          | E8 36 44 FE FF                   | CALL    <link.CTaskQueue::Append>                                                           |
00007FF7824359AA                                          | 83 F8 01                         | CMP     EAX, 1                                                                              |
00007FF7824359AD                                          | 0F 84 9F B4 03 00                | JE      link.7FF782470E52                                                                   |
00007FF7824359B3                                          | 48 83 C4 30                      | ADD     RSP, 30                                                                             |
00007FF7824359B7                                          | 5B                               | POP     RBX                                                                                 |
00007FF7824359B8                                          | C3                               | RET   


Append failed  :( Maybe someone has an idea, how to approach the problem from the other side  :idea:


LiaoMi

Hi friends,

problem with fatal error LNK1318 has been fixed, this means that in the next release all versions of the Microsoft linker should link even third-party modules without error in the debugging information, I hope everything is finally fixed and we will be able to test the linker for a 64 bit system with debugging information from UASM.

The bug reporting system is very convenient and simple, you just need to give exact examples, with the source code and binary file. Another problem that is covered in the topic here http://masm32.com/board/index.php?topic=6508.msg69749#msg69749 and http://masm32.com/board/index.php?topic=6447.msg69055#msg69055 added to the processing chain for the Microsoft support service.  :eusa_clap: :eusa_clap: :eusa_clap: :eusa_clap: :t

LiaoMi

Hi friends,

I am happy to inform everyone that in the latest release 14.15.26726 of Visual Studio already fixed all compatibility errors in the x64 version of the linker (Hostx64/x64/link.exe). I just checked the x64 linker in projects on UASM64, including a link with debugging information, everything works fine  :P :t

Dont forget to add to the batch file the line -  taskkill /f /im mspdbsrv.exe

Here we talked about this bug ...
http://masm32.com/board/index.php?topic=6571.msg70398#msg70398



aw27

This may be due to some bad configuration here but I can't debug UASM from within VS 2017 when using the Visual Studio 2017 toolset. It works when using older toolsets. It happens both in x86 and x64.
It works with MASM.

habran

AW, try in VS Properties, Link, Commandline, Additional Option: /debug
It will trigger debug and you can use breakpoints instead int 3
 
Cod-Father

TimoVJL

There are a problems with UAsm codeview info.
UAsm generate some useless debug info, like for __m128 __m256 ...

cvdump
May the source be with you