|
I've been studying all the interactive debug commands -- amazing what you can find when you hit the "F1 help" key -- I gotta start doing that more! Anyway, I can't seem to wrap my mind around what is meant by a "thread." The AS/400 documentation text for both "thread" and "tbreak" don't seem to define it, and the Interactive Source Debugger manual doesn't even have an index entry for it. (Under 'T' there are only two entries!) T text string, finding 16 TOP command 15 Here's the AS/400 documentation: Thread Command Abbreviation: th The thread command allows you to display the 'Work with Debugged Threads' display or change the current thread. If the command is entered with no parameters, the 'Work with Debugged Threads' display is shown. If the command is entered with a thread identification parameter, the current thread is changed to the specified thread. The thread identification parameter may be entered without leading zeros. Tbreak Command Abbreviation: tb Use the tbreak command to enter either an unconditional or a conditional breakpoint in the current thread at a position in the program being tested. Breakpoints set with the tbreak command are called thread breakpoints. The position can be either of the following: Line_number A line number of the source file for the module (as shown on the Display Module Source display). Procedure_name/statement_number The name of a procedure contained in the module that is followed by a slash and a statement number in the procedure (as shown on a listing of the program). This is not valid for OPM programs under source level debug. Each thread in a threaded application may have its own thread breakpoint at the same position at the same time. However, a job breakpoint set with a break command at a specified position cannot exist at the same time as thread breakpoints at that same position. You can either have a job breakpoint or thread breakpoint(s) on a specified position at the same time, but not both. An unconditional breakpoint can be entered by using the tbreak command with the position parameter only. This causes the program to stop just before the position is entered in the thread that the breakpoint was entered for. Type tbreak position when expression to enter a conditional breakpoint for the current thread. The expression must have a boolean or logical value. The expression is evaluated just before the statement, at the position entered, runs in the specified thread. The scope of the variables used in the expression is defined by the position of the breakpoint. If the value of the expression is true, or if there is an error evaluating the expression, the program stops. The Display Module Source display is shown. If the value is false, the program does not stop. Breakpoints can be changed by entering a new tbreak command using the same position. This will cause the existing thread breakpoint or job breakpoint to be replaced by the new one. Since I'm trying to learn CODE/400, I'm curious how this concept is applied to it's debugger. But, I'll post this to that list separately! Any help would be greatly appreciated! Jeff Markel
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.