[M3devel] m3gap.... what is it and what does this mean?

Tony Hosking hosking at cs.purdue.edu
Tue Oct 5 22:04:06 CEST 2010


M3 ids cannot begin with "_".

Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484




On 5 Oct 2010, at 15:26, Rodney M. Bates wrote:

> 
> 
> Jay K wrote:
>> Hey, look, until August, stock gdb never showed any fields!
>> The front does layout, it might tell the backend:
>> struct {
>>  integer a at offset 4, size 4
>>  integer b at offset 12, size 4
>> }
>> in which case the backend will generate a "gap" field at offset 8, size 4
>> I suspect we might not have to generate the fields.
>> I'm nervous that the backend might do its own layout and move up b to offset 8 otherwise.
>> And there was other code in the backing doing similar.
>> We are in complete control of the name.
>> If you want we can call it "_m3_padding_for_alignment"
>> or "-m3_nothing_to_see_here"
>> or "http://m3.org/faq1.html" (not sure they have to be valid C identifiers)
> 
> I doubt it, but they might need to be valid linker identifiers.  If there is a
> character that is not legal in Modula-3 identifiers but legal here, it would be nice
> to use it in generated things like this.  Then a debugger could normally suppress
> displaying it, yet not be fooled by a Modula-3 programmer's actually declaring, e.g.,
> _m3gap_8_56 in source code.  There are other places this comes up.
> 
>> - Jay
>> ----------------------------------------
>>> From: dragisha at m3w.org
>>> To: m3devel at elegosoft.com
>>> Date: Tue, 5 Oct 2010 15:32:30 +0200
>>> Subject: [M3devel] m3gap.... what is it and what does this mean?
>>> 
>>> (gdb) p event
>>> $1 = {type = 8 '\b', _m3gap_8_56 = {}, window = 0x6924c0, send_event = 0 '\000', _m3gap_136_56 =
>>> {}, time = 210453397504, state = 1, keyval = 0, length = 22953024, _m3gap_352_32 = {},
>>> string = 0xa , hardware_keycode = 0, group = 0 '\000', _m3gap_472_40 = {}}
>>> 
>>> 
>>> VAR
>>> event: Gdk.EventKey;
>>> 
>>> EventKey = RECORD
>>> type: EventType;
>>> window: WindowStar;
>>> send_event: char;
>>> time: unsigned_long_int;
>>> state: unsigned_int;
>>> keyval: unsigned_int;
>>> length: int;
>>> string: char_star;
>>> hardware_keycode: unsigned_short_int;
>>> group: unsigned_char;
>>> END;
>>> 
>>> also with m3gdb....
>>> 
>>> (m3gdb) p event
>>> $1 = {4type = 8 '\b', _m3gap_8_56 = {}, window = 0x0,
>>> send_event = 0 '\000',
>>> _m3gap_136_56 = {}, time = 49, state = -937844736,
>>> keyval = 32616, length = 23801648,
>>> _m3gap_352_32 = {}, string = 0x7f68c839be10 "\001
>>> \000", hardware_keycode = 0, group = 0 '\000',
>>> _m3gap_472_40 = {}}
>>> 
>>> --
>>> Dragiša Durić 
>> 		 	   		  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20101005/18a08712/attachment-0002.html>


More information about the M3devel mailing list