#162 ✓resolved
Peter Johnson

CodeView Bug?

Reported by Peter Johnson | June 25th, 2011 @ 07:51 PM

Originally posted on Trac by pellelindblad@gmail.com
Original Trac Ticket

  Description

Hello,

It would seem that when using a building with a relative path to the source file, the CodeView source information in the object file will point to $(outputdir)\relativepath\file.asm, rather than $(currentdir)\relativepath\file.asm.

However, when using a full path it seems to get everything right.

This of course causes the resulting .pdb to be broken :(

Regards,
Pellsson

Trac Attachments

h3. Trac Comments
comment:1

                      follow-up:
  ↓ 2

              Changed 2 years ago by peter@tortall.net


Have you tried this with 0.8.0?  Can you compile a short testcase (e.g. 2-3 lines of .asm) and attach the resultant .obj to this bug report?  Thanks!

comment:2

                    in reply to:
  ↑ 1

              Changed 2 years ago by anonymous


Replying to peter@…:

Have you tried this with 0.8.0?  Can you compile a short testcase (e.g. 2-3 lines of .asm) and attach the resultant .obj to this bug report?  Thanks!

Yea, I have.
My original ticket is wrong. It doesn't put it in the output directory, but rather it strips of the last portion of the full path url.

I did write a local fix that seems to work.
The problem is in libyasm!file.c, function yasmcombpath_win().

/* Get path component; note this strips trailing slash */

pathlen = yasmsplitpath_win(from, &tail);

Passing "C:\some\fullpath" returns the length of "C:\some".
It then copies that amount of bytes, append a tail slash and appends the relative path. As a result, "fullpath" is missing.

I couldn't be bothered to figure out exactly what went wrong (tbh, the code was rather hackish), so i just replaced it for strlen() ;) and it seems to do the trick until you provide with a proper patch.

Regards,
Pellsson

comment:3

              Changed 2 years ago by peter


(In [2202]) Fix #173: Debug full paths were being generated incorrectly.
This was because the path returned by yasmgetcwd() did not have a trailing
slash and thus yasmcombpath() stripped off the last path component.

      comment:3

                  Changed 2 years ago by peter

      Status
        changed from new to closed
    
      Resolution
        set to fixed

(In [2202]) Fix #173: Debug full paths were being generated incorrectly.
This was because the path returned by yasmgetcwd() did not have a trailing
slash and thus yasmcombpath() stripped off the last path component.

      Status
        changed from new to closed
    
      Resolution
        set to fixed

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket

Pages