mirror of
https://github.com/cc65/cc65.git
synced 2024-10-02 21:54:47 +00:00
Added more debug output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5041 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
8cb4788e13
commit
c17816fafd
@ -172,6 +172,7 @@ Section* NewSection (Segment* Seg, unsigned char Align, unsigned char AddrSize)
|
||||
/* Initialize the data */
|
||||
S->Next = 0;
|
||||
S->Seg = Seg;
|
||||
S->Obj = 0;
|
||||
S->FragRoot = 0;
|
||||
S->FragLast = 0;
|
||||
S->Size = 0;
|
||||
@ -231,6 +232,9 @@ Section* ReadSection (FILE* F, ObjData* O)
|
||||
/* Allocate the section we will return later */
|
||||
Sec = NewSection (S, Align, Type);
|
||||
|
||||
/* Remember the object file this section was from */
|
||||
Sec->Obj = O;
|
||||
|
||||
/* Set up the minimum segment alignment */
|
||||
if (Sec->Align > S->Align) {
|
||||
/* Section needs larger alignment, use this one */
|
||||
@ -467,7 +471,12 @@ void SegWrite (const char* TgtName, FILE* Tgt, Segment* S, SegWriteFunc F, void*
|
||||
while (Sec) {
|
||||
Fragment* Frag;
|
||||
|
||||
/* Output were this section is from */
|
||||
Print (stdout, 2, " Section from \"%s\"\n", GetObjFileName (Sec->Obj));
|
||||
|
||||
/* If we have fill bytes, write them now */
|
||||
Print (stdout, 2, " Filling 0x%x bytes with 0x%02x\n",
|
||||
Sec->Fill, S->FillVal);
|
||||
WriteMult (Tgt, S->FillVal, Sec->Fill);
|
||||
Offs += Sec->Fill;
|
||||
|
||||
@ -527,6 +536,8 @@ void SegWrite (const char* TgtName, FILE* Tgt, Segment* S, SegWriteFunc F, void*
|
||||
}
|
||||
|
||||
/* Update the offset */
|
||||
Print (stdout, 2, " Fragment with 0x%x bytes\n",
|
||||
Frag->Size);
|
||||
Offs += Frag->Size;
|
||||
|
||||
/* Next fragment */
|
||||
|
@ -81,6 +81,7 @@ typedef struct Section Section;
|
||||
struct Section {
|
||||
Section* Next; /* List of sections in a segment */
|
||||
Segment* Seg; /* Segment that contains the section */
|
||||
struct ObjData* Obj; /* Object file this section comes from */
|
||||
struct Fragment* FragRoot; /* Fragment list */
|
||||
struct Fragment* FragLast; /* Pointer to last fragment */
|
||||
unsigned long Offs; /* Offset into the segment */
|
||||
|
Loading…
Reference in New Issue
Block a user