********************************************************************** * * * PEACEBUG, Config * * ---------------- * * * * written by: Emanuel M”cklin * * Zschokkestrasse 7 * * CH-8037 Zrich * * FREDDY@ezrz1.vmsmail.ethz.ch * * * * written with: Turboassembler 1.xx * * * ********************************************************************** 0. Introduction --------------- General: With PEACEBUG-Config you can comfortably configurate PEACEBUG over its cookie interface. You can either configurate a resident instal- led debugger or PEACEBUG.PRG (on disc/hd). For more explanations to the parameters mentioned in the following chapters, please consulate the readme of PEACEBUG, chapter "Inter- face". PBUGCONF works as accessory or as program, on all known and unknown TOS versions, ST(E)/TT/F030 and all possible and impossible config- urations. The resource file is included in the program. Dialogs: All dialogs lie in a window and are non modal. "Cancel" dismisses all changes. "OK" accepts all changes. Some dialogs have additionally a button "Set", which has the same effect as "OK" but does not close the dialog. You cannot undo chan- ges with "Cancel" overtaken by "Set". UNDO has the same effect as "Cancel". RETURN has the same effect as "OK". Control q closes all windows and terminates the program. The changes of the top window are dismissed. Control u or the close button of the window close the top window and dismiss the changes. When the program is started or the accessory is called, the main menu appears, which allows you to call the other dialogs. Modes: Basically there are two different working modes, the patch mode and the config mode: - config mode: every time a dialog is opened the parameters, which can be manipulated in this dialog, will be copied from a resident debugger and if the dialog is left by "OK", copied back. The con- fig mode is the default mode if a debugger is installed in the time of the startup of PBUGCONF. Since version 1.16 of PBUGCONF it has been possible to configure several resident installed debuggers with the same PBUGCONF. - patch mode: the parameters are neither taken from a resident debugger nor copied back. This allows you to manipulate and save the parameters afterwards in PEACEBUG.PRG or PBUGCONF.PRG/ACC. As not all of the parameters have the state p(=patch) (---> readme PEACEBUG, chapter "Interface"), some of them can't be manipulated in the patch mode. If you are interessted in the source code, please send me a formatted disc or an e-mail. You will then receive the newest version on the same way, you sent me the disc. Also bug reports and suggestions are welcome. The following chapters describe in turn the every single dialog which can be called from the main menu. 1. Information -------------- This dialog does not need many explanations, doesn't it? 2. Flags -------- This dialog allows you to configure two things: 1. How PEACEBUG reacts, if a certain exception occurs. 2. How the routine VEKTOR (---> readme PEACEBUG, chapter "Vectors") reacts (VEKTOR is called if PEACEBUG is called and if a F1-F20 or RETURN/ENTER is pressed within the debugger). And thats the way you have to proceed: 1. First you choose the vector you want to configure on the left side "Exceptions". 2. Then you choose on the right side ("Action"), how the debugger should react if the choosen exception occurs. There are three possibilities: - Debugger: the debugger is called and the occurance of the exception is reported. - Original: the debugger ignores the exception and just calls the routine following the debugger's one (normally the OS). - Ignore: the exception is corrected, that means it jumps to the opcode following the one, that caused the exception. If a move sr, occurs on all MC680x0 with x>0 a privileg vio- lation is the consequence as this addressing mode is only allowed in supervisor mode. For that reason tow additional buttons appear if you configure the exception "Privileg"(=Privileg Violation): - SR,: the command is executed in supervisor mode and the program doesn't realize it. In contrast to the TOS routine, the one of the debugger works with any opcodes like e.g.: move sr,([-1,A7,D0.l*8],-1). - CCR,: the SR in the opcode is modified directly to a CCR, that means e.g. a move sr,d0 to a move ccr,d0 (in the program code). If vector "Reset" is selected, two more buttons will appear: - Always: means, that a reset within the debugger is always catched. - Once a Sec: means, that a reset within the debugger is catched only once a second. That means, that if you reset twice a second, the reset is really executed. If both buttons are disabled, a reset within the debugger is never fetched. If the reset happens not within the debugger: - Debugger: The debugger fetches the reset, but as the PC gets lost, the program can't be continued. - Original: Just a normal reset. - Ignore: All programs hanging in the reset vector are ignored, that means actually a normal reset but without calling the pro- grams in the reset vector. 3. Finally you fix, how the routine VEKTOR shall work (the values in brackets are equal to the ones described in the readme PEACEBUG, chapter "The Highbyte": - Untrap (0): the routine is untrapped if possible (if it can be found by the xbra links). h„ngt, falls sie gefunden wird. - no choose, that means all three buttons are disabled (2): the status quo remains untouched. - 1st Position (-2): the routine is untrapped if possible and setup the vector again. - Setup (1): the routine is searched and if not found setupped in the vector. If it's found, nothing happens. - 1st Position+Setup (-1): the routine is searched and if not found setupped in the vector. If it's found, it will be untrapped and setupped again (so it's position is always the first). ATTENTION: if you leave the dialog with "OK", the routine VEKTOR is called afterwards. 3. Cache -------- This dialog allows you to fix the length of the cache and the history- buffer. - Cache: - Length each Entry: informs, how many bytes one cache entry needs. This can vary from PEACEBUG version to PEACEBUG version. - Length Cache 1: number of entries of cache 1. - Length Cache 2: number of entries of cache 2. - Expand Cache 1 to: here you fix how many entries cache 1 should contain. - Expand Cache 2 to: here you fix how many entries cache 2 should contain. You can also choose values lower than the actual ones. In this case entries are deletes, that means untrapped from the chain. If you add entries, only the new ones will be allocated, as it is organized as a ring. - History: - Length: that's the amount of bytes the historybuffer contains. - Actual Number: informs you, how many entries are possible with the actual length of the buffer (Length/Length of one line). - New Length: here you choose the new length of the history buffer. 4. Keyboard ----------- Here you fix the key combination to call the debugger. Any combination of shift keys (shift left/right, control, alternate, left/right mousebutton left) and one of the other keys. CapsLock is always ignored. The two mousebuttons are the ones under the cursor block, names with "l" and "r". - Call 1: key combination, which does not work if flock ($43E) is set. Default: alternate F10. - Call 2: key combination, which works always (hopefully). Default: alternate+control F10. 5. Miscellanous --------------- - Cursor: insert- or overwritemode, that's the question. - Symbols: 1. All: PEACEBUG uses for disassemlies all symbols, that means the own ones and the ones, the Resident Symbol Driver offers (---> Readme PEACEBUG, Chapter "Symbols, "Resident Symbol Driver"). 2. Debugger: PEACEBUG uses for disassemblies only the own symbols. 3. None: PEACEBUG uses for disassemblies no symbols. In list mode if the RSD is installed also the program name is printed. Only if you choose None, this will suppressed. - Keyboard+Mouse: here you fix the keyrepeat/-delay and the same for the mouse. - Timeout: gives you the possibility to fix the timeouts for the different interfaces, that means the time the debugger waits till it can send datas to a port (or cannot send). 6. Screen --------- The many parameters of the screen interface can be configured in this dialog. Detailed explanations to each parameter are to be found in the readme PEACEBUG, chapter "Interface, Screen Interface". - Configure: this box will not appear in the patch mode, as the para- meters in it don't have state p. It contains the actual parameters. - Prefer: in contrary to the parameters of "Configure", these are the parameters, the debugger evaluates when it's started or if NEW_FORMAT is called. - Active Font: tells the debugger which font to use. - Load Font: you can load another font in tempus format (8*16 = 4096 Bytes, 8*8 = 2048 Bytes). Some fonts are in \PEACEBUG\PBUGCONF\FONTS. 7. Priorities ------------- In this dialog you fix the priorities of the arithmetic operations. Higher values are stronger than lower ones, e.g. a+b*c is equal a+(b*c) but unequal (a+b)*c, as the multiplication is stronger. This function does not seem to me very useful but to change the priority of the pointer operation (p). 8. User Routines ---------------- This box gives you the possibility to install the six routines USERTRACE, USERENTER, USERQUIT, USERSWITCH_ENTER, USERSWITCH_QUIT and USERRESET (---> readme PEACEBUG, chapter "Interface, User Routines"). Instead of writting a whole program which has to search PEACEBUG and has to install itself, use this function. A program has to have a certain format. It must have the following structure at the beginning: typedef struct { int null; /* Dummy */ long *us_message; /* Pointer to the message */ char xb_magic[4]; /* "XBRA" */ char xb_id[4]; /* XBRA-ID */ long *xb_oldvec; /* old value of the vector */ } USER; or in assembler: > dc.w 0 > dc.l MESSAGE > dc.b 'XBRA' > dc.b 'PBUG' ; z.B. > dc.l $XXXXXXXX After this structure the program follows. When loaded it will be relocated, memory will be freed, the structure above will be initialized and last but not least it will be trapped into the vector. Examples are in the folder PEACEBUG\PBUGCONF\USER. These do not have a really senseful task but to illustrate this possibility. By the way the dummy at the beginning is necessary because otherwise *us_message would not be relocated as it would have the offset 0 to the text segment. 9. Accelerator -------------- This dialog allows you to configurate the mouse accelerator of the debugger. Simple click on the arrow buttons increment or decrement the coeffi- cients of the polynom by 1/128, double click by 10/128. 10. Load Parameters ------------------- This function loads parameters from the files PBUGCONF.ACC/PRG or PEACEBUG.PRG. The program recognizes if it's the debugger or the config program. If it loads from the config program then there are some additional parameters, which are not part of the debugger. 11. Save Parameters ------------------- This function saves parameters into the files PBUGCONF.ACC/PRG or PEACEBUG.PRG. The program recognizes if it's the debugger or the config program. If it saves into the config program then there are some additional parameters, which are not part of the debugger. 12. Configurate --------------- This dialog offers you the utilities of \PEACEBUG\PEACEBUG\UTILLITY\. The functions are executed in two cases: 1. If you select "OK" or "Set". 2. If the program/accessory is startet and the debugger is installed at that moment. Before you have to save the configuration in PBUG- CONF naturally. The functions which set certain values ("Cache" and "History") take these from the config program itself, that means Cache sets the number of entries to the value, you fixed in the dialog "Cache". - Cache: adds a certain number of entries to the two caches. - History: adds certain number of entries to the history buffer. It is bytes=entries*length of one line. - Invert: inverts the color palette of the debugger - Getrez: sets the resolution of the debugger according to Getrez (XBIOS 4). This is senseful if you are working with virtual resolutions (e.g. with protos or bigscreen). As the debugger has its own screen, the screenexpander cannot come into action and the screen will be messed up. This can be fixed with this function, as it urges the debugger to use the real (physically) resolution. - Newfont: installs a new screen font. - NewFormat: adapts the debugger to the actual resolution, a parctical function with gfx board, which are installed after the auto folder programs. - NewScreen: if a gfx boards installs after the debugger it won't recognize that. With this function PEACEBUG allocates a new screen. 13. Config-/Patchmode --------------------- Till version 1.15 you could only switch between config- and patchmode. Now it's possible to configure several debuggers with only one config program. This function switches now from patchmode to PEACEBUG 0 till 9 and back to patchmode.