[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/ilasm ilasm_build.c,1.21,1.22 ilasm_bui
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/ilasm ilasm_build.c,1.21,1.22 ilasm_build.h,1.9,1.10 ilasm_grammar.y,1.34,1.35 ilasm_output.c,1.16,1.17ilasm_output.h,1.6,1.7 |
Date: |
Mon, 10 Mar 2003 15:52:35 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/ilasm
In directory subversions:/tmp/cvs-serv8491/ilasm
Modified Files:
ilasm_build.c ilasm_build.h ilasm_grammar.y ilasm_output.c
ilasm_output.h
Log Message:
Recognise column numbers in ".line" directives.
Index: ilasm_build.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_build.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** ilasm_build.c 1 Mar 2003 00:47:26 -0000 1.21
--- ilasm_build.c 10 Mar 2003 20:52:32 -0000 1.22
***************
*** 1052,1056 ****
}
! void ILAsmDebugLine(ILUInt32 line, char *filename)
{
if(ILAsmDebugMode)
--- 1052,1056 ----
}
! void ILAsmDebugLine(ILUInt32 line, ILUInt32 column, char *filename)
{
if(ILAsmDebugMode)
***************
*** 1060,1064 ****
{
/* Debug line information within the body of a method */
! ILAsmOutDebugLine(filename, line);
}
else
--- 1060,1064 ----
{
/* Debug line information within the body of a method */
! ILAsmOutDebugLine(filename, line, column);
}
else
***************
*** 1071,1075 ****
(buf, ILWriterDebugString(ILAsmWriter,
filename));
len += ILMetaCompressData(buf + len, line);
! len += ILMetaCompressData(buf + len, 0);
/* column number */
if(item)
{
--- 1071,1075 ----
(buf, ILWriterDebugString(ILAsmWriter,
filename));
len += ILMetaCompressData(buf + len, line);
! len += ILMetaCompressData(buf + len, column);
if(item)
{
Index: ilasm_build.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_build.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** ilasm_build.h 1 Mar 2003 00:47:26 -0000 1.9
--- ilasm_build.h 10 Mar 2003 20:52:32 -0000 1.10
***************
*** 223,227 ****
* Process a debug line within the input stream.
*/
! void ILAsmDebugLine(ILUInt32 line, char *filename);
/*
--- 223,227 ----
* Process a debug line within the input stream.
*/
! void ILAsmDebugLine(ILUInt32 line, ILUInt32 column, char *filename);
/*
Index: ilasm_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_grammar.y,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** ilasm_grammar.y 10 Mar 2003 12:04:54 -0000 1.34
--- ilasm_grammar.y 10 Mar 2003 20:52:32 -0000 1.35
***************
*** 962,966 ****
%type <type> ActualGenericParams
! %expect 8
%start File
--- 962,966 ----
%type <type> ActualGenericParams
! %expect 9
%start File
***************
*** 3274,3284 ****
ExternalSourceSpecification
: D_LINE INTEGER_CONSTANT SQUOTE_STRING {
! ILAsmDebugLine((ILUInt32)($2), $3.string);
}
| D_LINE INTEGER_CONSTANT DQUOTE_STRING {
! ILAsmDebugLine((ILUInt32)($2), $3.string);
}
| D_LINE INTEGER_CONSTANT {
! ILAsmDebugLine((ILUInt32)($2),
ILAsmDebugLastFile);
}
;
--- 3274,3294 ----
ExternalSourceSpecification
: D_LINE INTEGER_CONSTANT SQUOTE_STRING {
! ILAsmDebugLine((ILUInt32)($2), 0, $3.string);
! }
! | D_LINE INTEGER_CONSTANT ':' INTEGER_CONSTANT SQUOTE_STRING {
! ILAsmDebugLine((ILUInt32)($2), (ILUInt32)($4),
$5.string);
}
| D_LINE INTEGER_CONSTANT DQUOTE_STRING {
! ILAsmDebugLine((ILUInt32)($2), 0, $3.string);
! }
! | D_LINE INTEGER_CONSTANT ':' INTEGER_CONSTANT DQUOTE_STRING {
! ILAsmDebugLine((ILUInt32)($2), (ILUInt32)($4),
$5.string);
}
| D_LINE INTEGER_CONSTANT {
! ILAsmDebugLine((ILUInt32)($2), 0,
ILAsmDebugLastFile);
! }
! | D_LINE INTEGER_CONSTANT ':' INTEGER_CONSTANT {
! ILAsmDebugLine((ILUInt32)($2), (ILUInt32)($4),
! ILAsmDebugLastFile);
}
;
Index: ilasm_output.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_output.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** ilasm_output.c 13 Jan 2003 10:08:39 -0000 1.16
--- ilasm_output.c 10 Mar 2003 20:52:32 -0000 1.17
***************
*** 130,133 ****
--- 130,134 ----
char *debugFilename;
ILUInt32 debugLine;
+ ILUInt32 debugColumn;
} LabelInfo;
***************
*** 136,139 ****
--- 137,141 ----
static int initLabelPool = 0;
static LabelInfo *labels = 0;
+ static int haveColumnInfo = 0;
/*
***************
*** 305,308 ****
--- 307,311 ----
initLabelPool = 0;
labels = 0;
+ haveColumnInfo = 0;
}
***************
*** 595,598 ****
--- 598,602 ----
label->debugFilename = 0;
label->debugLine = 0;
+ label->debugColumn = 0;
labels = label;
return label;
***************
*** 1284,1288 ****
}
! void ILAsmOutDebugLine(char *filename, ILUInt32 line)
{
/* Output a unique label at this position */
--- 1288,1292 ----
}
! void ILAsmOutDebugLine(char *filename, ILUInt32 line, ILUInt32 column)
{
/* Output a unique label at this position */
***************
*** 1293,1297 ****
--- 1297,1303 ----
info->debugFilename = filename;
info->debugLine = line;
+ info->debugColumn = column;
haveDebug = 1;
+ haveColumnInfo |= (column != 0);
}
***************
*** 1669,1672 ****
--- 1675,1683 ----
LabelInfo *label = labels;
unsigned long len = 0;
+ int type = IL_DEBUGTYPE_LINE_OFFSETS;
+ if(haveColumnInfo)
+ {
+ type = IL_DEBUGTYPE_LINE_COL_OFFSETS;
+ }
while(label != 0)
{
***************
*** 1679,1683 ****
{
ILWriterDebugAdd(ILAsmWriter,
(ILProgramItem *)method,
!
IL_DEBUGTYPE_LINE_OFFSETS, buf, len);
len = 0;
}
--- 1690,1694 ----
{
ILWriterDebugAdd(ILAsmWriter,
(ILProgramItem *)method,
! type,
buf, len);
len = 0;
}
***************
*** 1690,1700 ****
/* Add the line and offset information */
len += ILMetaCompressData(buf + len, label->debugLine);
len += ILMetaCompressData(buf + len, label->address);
/* Flush the buffer if it is nearly full */
! if(len >= (sizeof(buf) - IL_META_COMPRESS_MAX_SIZE * 3))
{
ILWriterDebugAdd(ILAsmWriter, (ILProgramItem
*)method,
!
IL_DEBUGTYPE_LINE_OFFSETS, buf, len);
len = 0;
}
--- 1701,1715 ----
/* Add the line and offset information */
len += ILMetaCompressData(buf + len, label->debugLine);
+ if(haveColumnInfo)
+ {
+ len += ILMetaCompressData(buf + len,
label->debugColumn);
+ }
len += ILMetaCompressData(buf + len, label->address);
/* Flush the buffer if it is nearly full */
! if(len >= (sizeof(buf) - IL_META_COMPRESS_MAX_SIZE * 4))
{
ILWriterDebugAdd(ILAsmWriter, (ILProgramItem
*)method,
! type, buf,
len);
len = 0;
}
***************
*** 1706,1710 ****
/* Flush the remainder of the debug information */
ILWriterDebugAdd(ILAsmWriter, (ILProgramItem *)method,
! IL_DEBUGTYPE_LINE_OFFSETS,
buf, len);
}
}
--- 1721,1725 ----
/* Flush the remainder of the debug information */
ILWriterDebugAdd(ILAsmWriter, (ILProgramItem *)method,
! type, buf, len);
}
}
***************
*** 2064,2067 ****
--- 2079,2083 ----
labels = 0;
haveDebug = 0;
+ haveColumnInfo = 0;
}
Index: ilasm_output.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_output.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** ilasm_output.h 13 Dec 2002 00:33:30 -0000 1.6
--- ilasm_output.h 10 Mar 2003 20:52:32 -0000 1.7
***************
*** 140,144 ****
* Add debug line information at this point within the method.
*/
! void ILAsmOutDebugLine(char *filename, ILUInt32 line);
/*
--- 140,144 ----
* Add debug line information at this point within the method.
*/
! void ILAsmOutDebugLine(char *filename, ILUInt32 line, ILUInt32 column);
/*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/ilasm ilasm_build.c,1.21,1.22 ilasm_build.h,1.9,1.10 ilasm_grammar.y,1.34,1.35 ilasm_output.c,1.16,1.17ilasm_output.h,1.6,1.7,
Rhys Weatherley <address@hidden> <=