Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a breakpoint has odd effect on debugger cursor placement #254

Open
ericwinger opened this issue Mar 3, 2025 · 1 comment
Open
Assignees
Labels
P3-Problem Bug that should be fixed, but not critical

Comments

@ericwinger
Copy link
Member

Create two methods:

Foo>>foo
	self halt
Foo>>goo
	self halt
  • Do not have any breakpoints set.
  • Execute Foo>>foo
  • Notice the cursor correctly on the the halt

Then,

  • Set breakpoint in Foo>goo
  • Execute Foo>>foo
  • Notice the cursor just past the halt, but not correct.

See JadeiteDebuggerPresenter>>updateSourcePaneWith:

In the correct case, frameListPresenter selectedItem stepPoint = 2.
But in the error case, frameListPresenter selectedItem stepPoint = 3.

On the server, see RowanFrameService>>initializeProcess:level:organizer: where stepPoint is computed by this code

  stepPoint :=  gsNMethod homeMethod _stepPointForMeth: gsNMethod ip: (frameData at: 2).

Noticed by @dalehenrich who speculated that it's a native code problem. Break points are ignored in native code.

@ericwinger ericwinger added the P3-Problem Bug that should be fixed, but not critical label Mar 3, 2025
@ericwinger ericwinger self-assigned this Mar 3, 2025
@ericwinger
Copy link
Member Author

ericwinger commented Mar 3, 2025

When I expanded the goo method to the following I started seeing nil step points.

goo
	| array |
	self halt. 
	array := Array new. 
	array add: 1. 
	^array

The nil step point is coming from the server. RowanFrameService>>initializeProcess:level:organizer:


'ProcessorScheduler >> _switchFrom:to: @2 line 8''   '2
'ProcessorScheduler >> _reschedule @7 line 7''   'nil
'ProcessorScheduler >> _suspendProcess: @8 line 8''   'nil
'GsProcess >> suspend @7 line 8''   '8
'[] in RowanService >> setDebugActionBlock @42 line 42''   'nil
'ExecBlock1 (ExecBlock) >> cull: @7 line 7''   '8
'Halt (AbstractException) >> _signalToDebugger @8 line 5''   '9
'Halt (AbstractException) >> defaultAction @2 line 18''   '3
'Halt (AbstractException) >> _defaultAction @4 line 4''   '5
'Halt (AbstractException) >> _signal @2 line 20''   '3
'Halt class (AbstractException class) >> signal @3 line 5''   '4
'Foo (Object) >> halt @2 line 5''   '3
'Foo >> goo @2 line 4''   'nil     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< with breakpoints
'Executed Code  @3 line 1''   '4
<snip>




'ProcessorScheduler >> _switchFrom:to: @2 line 8''   '2
'ProcessorScheduler >> _reschedule @7 line 7''   '7
'ProcessorScheduler >> _suspendProcess: @8 line 8''   '8
'GsProcess >> suspend @7 line 8''   '7
'[] in RowanService >> setDebugActionBlock @42 line 42''   '42
'ExecBlock1 (ExecBlock) >> cull: @7 line 7''   '7
'Halt (AbstractException) >> _signalToDebugger @8 line 5''   '8
'Halt (AbstractException) >> defaultAction @2 line 18''   '2
'Halt (AbstractException) >> _defaultAction @4 line 4''   '4
'Halt (AbstractException) >> _signal @2 line 20''   '2
'Halt class (AbstractException class) >> signal @3 line 5''   '3
'Foo (Object) >> halt @2 line 5''   '2
'Foo >> goo @2 line 4''   '2     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< without breakpoints
'Executed Code  @3 line 1''   '3
<snip> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3-Problem Bug that should be fixed, but not critical
Projects
None yet
Development

No branches or pull requests

1 participant