Skip to content
abstraktor edited this page May 20, 2015 · 7 revisions

VM

  1. Get constant selector name in VM as Smalltalk symbol: add to Constants.SIMULATION_SELECTORS and a field with that name will be available in object space
  2. Build with a different GC and no JIT: python .build/build.py -O2 --gc=generation
  3. Run in interpreted mode with pypy: PYTHONPATH=pypy:rsdl pypy targetrsqueak.py -t images/Squeak4.6-vmmaker.1.image
  4. Set break point for interpreted mode: import pdb; pdb.set_trace()

Build GDB-debuggable binary

  1. Look for this line at the end of the build process: [translation:info] written: /var/folders/c_/77lk4k657w5gzk7mfckmll6c0000gn/T/usession-default-129/testing_1/testing_1.c
  2. Change Makefile and add flag -arch i386 to DEBUG_FLAGS
  3. Run make clean and make debug -j8 (8 cores)
  4. Run VM: sudo gdb --args ./rsqueak images/Squeak4.6-vmmaker.1.image

Image

  1. Check if running on RSqueak.
isRSqueak
	< primitive: 'isRSqueak' module: 'VMDebugging' >
	^ false
  1. To test the mini.image in a different VM, use Squeak 4.2.5 (Mac), 4.4.7 or 3.3.7 (Unix)

Fix Debugger

The debugger is broken at the moment, because of issues with weak dictionary. Use this workaround for the moment.

DebuggerMethodMap class>>voidMapCache

	self protected: [ 
		MapCache := IdentityDictionary new.
		MapCacheEntries := 16 ]

Then initialize classes again.

DebuggerMethodMap cleanUp.
DebuggerMethodMapForBlueBookMethods cleanUp.
DebuggerMethodMapForClosureCompiledMethods cleanUp.
Clone this wiki locally