Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/dmd/backend/cgobj.d
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ segidx_t OmfObj_seg_debugT()
Obj OmfObj_init(Outbuffer *objbuf, const(char)* filename, const(char)* csegname)
{
//printf("OmfObj_init()\n");
Obj mobj = cast(Obj)mem_calloc((void*[2]).sizeof);
Obj mobj = cast(Obj)mem_calloc(__traits(classInstanceSize, Obj));

Outbuffer *reset_symbuf = obj.reset_symbuf;
if (reset_symbuf)
Expand Down Expand Up @@ -1532,7 +1532,7 @@ private void objheader(char *csegname)
__gshared char[78] lnames =
"\0\06DGROUP\05_TEXT\04CODE\05_DATA\04DATA\05CONST\04_BSS\03BSS" ~
"\07$$TYPES\06DEBTYP\011$$SYMBOLS\06DEBSYM";
assert(lnames[lnames.length - 1] == 'M');
assert(lnames[lnames.length - 2] == 'M');

// Include debug segment names if inserting type information
int lnamesize = config.fulltypes ? lnames.sizeof - 1 : lnames.sizeof - 1 - 32;
Expand Down Expand Up @@ -2331,7 +2331,7 @@ private int obj_newfarseg(targ_size_t size,int classidx)
{
seg_data *f = getsegment();
f.isfarseg = true;
f.seek = obj.buf.size();
f.seek = cast(int)obj.buf.size();
f.attr = obj.fdsegattr;
f.origsize = size;
f.SDoffset = size;
Expand Down
9 changes: 6 additions & 3 deletions src/dmd/backend/code.d
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ struct seg_data
int classidx; // lname idx of class name
uint attr; // segment attribute
targ_size_t origsize; // original size
long seek; // seek position in output file
int seek; // seek position in output file
void* ledata; // (Ledatarec) current one we're filling in
}

Expand All @@ -269,10 +269,13 @@ struct seg_data
uint SDlinnum_max;
linnum_data *SDlinnum_data; // array of line number / offset data

int isCode();
version (Windows)
int isCode() { return seg_data_isCode(this); }
else
int isCode();
}


extern int seg_data_isCode(const ref seg_data sd);

struct linnum_data
{
Expand Down
Loading