Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lauterbach scripting: checking if program stops at breakpoint

I have to check by way of a script if a program stops at a breakpoint: example:

break.set func1 /Program

Go

IF (program stops at breakpoint) ( do smth )

I am new to this language and I cannot seem to find relevant information on google. Thank you

like image 711
sandra Avatar asked Jun 30 '26 10:06

sandra


1 Answers

If you don't know whether the program stops at the program you need to wait a certain (defined by you) amount of time and then check the run-state of the processor, and if stopped then check whether the PC is at your symbol.

; set breakpoint
Break.Set func1 /Program

; start processor
Go

; wait until processor stopped or 5 seconds elasped
WAIT !STATE.RUN() 5.0s

IF STATE.RUN()
(
    PRINT %ERROR "Processor still running!"
    ENDDO
)

; check PC
IF R(PC)!=sYmbol.BEGIN(func1)
(
    PRINT %ERROR "Processor stopped but wrong PC!"
    ENDDO
)

PRINT "Test passed!"

ENDDO
like image 180
dev15 Avatar answered Jul 04 '26 02:07

dev15



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!