# HG changeset patch # User Tormod Volden # Date 1535525098 -7200 # Node ID 11d87afc644a8330df1770984fc2033bc353435e # Parent d0e8324af298215a538760939e5bb4a594c3a093 scripts/os9.gdb: Use module directory start/end vectors diff -r d0e8324af298 -r 11d87afc644a scripts/os9.gdb --- a/scripts/os9.gdb Wed Aug 29 08:44:37 2018 +0200 +++ b/scripts/os9.gdb Wed Aug 29 08:44:58 2018 +0200 @@ -15,6 +15,9 @@ define os9_mname set $mname = (char*)$arg0 + *((int*)$arg0 + 2) while 1 + if (*$mname < 0x20) + loop_break + end if (*$mname < 0x80) printf "%c", *$mname else @@ -48,8 +51,9 @@ define os9_mdir printf "addr size ty name\n" - set $mt = 0x300 - while ($mt < 0x400) + set $mt = *0x44 + set $mte = *0x46 + while ($mt < $mte) if ((int*)*$mt) os9_mident (int*)*$mt end @@ -63,8 +67,9 @@ define os9_mwhich set $pc_reg = $arg0 - set $mt = 0x300 - while ($mt < 0x400) + set $mt = *0x44 + set $mte = *0x46 + while ($mt < $mte) if ((int*)*$mt) set $mstart = (int*)*$mt set $mend = (char*)$mstart + *($mstart + 1) @@ -74,7 +79,7 @@ end set $mt += 4 end - if ($mt == 0x400) + if ($mt == $mte) set $mstart = 0 end end