[M3devel] debugging with stock gdb
Jay K
jay.krell at cornell.edu
Wed Sep 1 18:30:35 CEST 2010
Here's a quick sample of what you can do now in gdb, so much better than before.
Records used to have no types.
This is on Darwin.
jbook2:m3cc jay$ gdb /cm3/bin/Juno
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
(gdb) break RTType__Expand
(gdb) run
Breakpoint 1, RTType__Expand (M3_DaARCY_m=0x1010cccd0) at ../src/runtime/common/RTType.m3:715
715 new : InfoMap;
(gdb) n
716 pi, pt: SlotPtr;
(gdb) n
719 IF m.map = NIL THEN
(gdb)
721 m.cnt := 0;
(gdb) info locals
M3_AcxOUs_key2 = 4312105936
M3_AcxOUs_key1 = 4321920593
M3_EM4UH1_pt = (struct {...} ***) 0x0
M3_EM4UH1_pi = (struct {...} ***) 0x0
M3_BQo8Jp_new = {
name = 0x0,
is_equal = 0x0,
rehash = 0x0,
initial_size = 0,
full = 0,
cnt = 0,
max = 0,
mask = 0,
map = 0x0
}
(gdb) p **M3_DaARCY_m
$1 = {
name = 0x1010e2ca0,
is_equal = 0x8,
rehash = 0x7364697565707974,
initial_size = 0,
full = 2,
cnt = 4312673440,
max = 6,
mask = 126875185803874,
map = 0x2
}
- Jay
More information about the M3devel
mailing list