Handle file position information for fragments differently: Instead of

handling them separately (which has historic reasons), generate real line info
information. This means that line info for the assembler source will be part
of the debug info file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4774 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2010-07-30 22:44:09 +00:00
parent f308a3c4d1
commit 23b867b7a4
6 changed files with 124 additions and 57 deletions

View File

@@ -6,10 +6,10 @@
/* */
/* */
/* */
/* (C) 1998-2003 Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* (C) 1998-2010, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
@@ -39,6 +39,7 @@
/* common */
#include "coll.h"
#include "filepos.h"
@@ -68,8 +69,7 @@ struct Fragment {
struct ObjData* Obj; /* Source of fragment */
unsigned Size; /* Size of data/expression */
struct ExprNode* Expr; /* Expression if FRAG_EXPR */
FilePos Pos; /* File position in source */
struct LineInfo* LI; /* Additional line info */
Collection LineInfos; /* Line info for this fragment */
unsigned char Type; /* Type of fragment */
unsigned char LitBuf [1]; /* Dynamically alloc'ed literal buffer */
};
@@ -85,6 +85,15 @@ struct Fragment {
Fragment* NewFragment (unsigned char Type, unsigned Size, struct Section* S);
/* Create a new fragment and insert it into the section S */
void AddLineInfo (Fragment* F, struct LineInfo* LI);
/* Add the line info to the given fragment */
const char* GetFragmentSourceName (const Fragment* F);
/* Return the name of the source file for this fragment */
unsigned long GetFragmentSourceLine (const Fragment* F);
/* Return the source file line for this fragment */
/* End of fragment.h */