dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnet/ilalink link_create.c, 1.21, 1.22 link_image.


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnet/ilalink link_create.c, 1.21, 1.22 link_image.c, 1.11, 1.12 linker.h, 1.28, 1.29
Date: Mon, 29 Sep 2003 07:11:33 +0000

Update of /cvsroot/dotgnu-pnet/pnet/ilalink
In directory subversions:/tmp/cvs-serv26514/ilalink

Modified Files:
        link_create.c link_image.c linker.h 
Log Message:


Add the link directory to the debug symbol table so that
the full pathname of a source file can be recovered later.


Index: link_create.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/link_create.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** link_create.c       25 Jun 2003 05:30:57 -0000      1.21
--- link_create.c       29 Sep 2003 07:11:31 -0000      1.22
***************
*** 68,71 ****
--- 68,72 ----
        linker->error = 0;
        linker->is32Bit = ((flags & IL_WRITEFLAG_32BIT_ONLY) != 0);
+       linker->hasDebug = 0;
        linker->linkerFlags = 0;
        linker->images = 0;

Index: linker.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/linker.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** linker.h    11 Aug 2003 09:12:20 -0000      1.28
--- linker.h    29 Sep 2003 07:11:31 -0000      1.29
***************
*** 130,133 ****
--- 130,134 ----
        int                             is32Bit;                /* Non-zero if 
"-m32bit-only" supplied */
        int                             linkerFlags;    /* Extra flags for the 
linker */
+       int                             hasDebug;               /* Non-zero if 
an image has debug info */
        ILLinkImage    *images;                 /* List of images to be linked 
*/
        ILLinkImage    *lastImage;              /* Last image on the "images" 
list */

Index: link_image.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/link_image.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** link_image.c        25 Jun 2003 05:30:57 -0000      1.11
--- link_image.c        29 Sep 2003 07:11:31 -0000      1.12
***************
*** 218,221 ****
--- 218,225 ----
        linker->lastImage = linkImage;
        _ILLinkerAddSymbols(linker, image);
+       if(ILDebugPresent(image))
+       {
+               linker->hasDebug = 1;
+       }
        return 1;
  }
***************
*** 264,267 ****
--- 268,275 ----
        ILLinkImage *image = linker->images;
        ILImage *initImage;
+       char *curdir;
+       unsigned long curdirOffset;
+       unsigned char buffer[IL_META_COMPRESS_MAX_SIZE];
+       int buflen;
        int ok = 1;
  
***************
*** 285,288 ****
--- 293,310 ----
                {
                        ok = 0;
+               }
+       }
+ 
+       /* Add the link directory name if there was debug information */
+       if(ok && linker->hasDebug)
+       {
+               curdir = ILGetCwd();
+               if(curdir)
+               {
+                       curdirOffset = ILWriterDebugString(linker->writer, 
curdir);
+                       buflen = ILMetaCompressData(buffer, curdirOffset);
+                       ILWriterDebugAddPseudo(linker->writer,
+                                                                  
ILDebugGetPseudo("LDIR"), 0,
+                                                                  buffer, 
(unsigned long)(long)buflen);
                }
        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]