Commit 3ab7e167 authored by Steve Revill's avatar Steve Revill
Browse files

Modified SWI number output.

  SWI number stuff also implemented in Thumb mode.
  Unknown SWIs were dissasembled as an 8 nibble hexadecimal number.
  This has been reduced to a six nibble number (as the top byte is
  always zero).

  The unknown SWI disassembled as a number stuff has also been added
  to Thumb mode disassembly. Only two nibbles are displayed in this
  Tested on a RiscPC.

Version 1.68. Tagged as 'Debugger-1_68'
parent 37ce7484
......@@ -11,14 +11,14 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.67"
Module_Version SETA 167
Module_MajorVersion SETS "1.68"
Module_Version SETA 168
Module_MinorVersion SETS ""
Module_Date SETS "15 Feb 2001"
Module_ApplicationDate2 SETS "15-Feb-01"
Module_ApplicationDate4 SETS "15-Feb-2001"
Module_Date SETS "21 Mar 2001"
Module_ApplicationDate2 SETS "21-Mar-01"
Module_ApplicationDate4 SETS "21-Mar-2001"
Module_ComponentName SETS "Debugger"
Module_ComponentPath SETS "RiscOS/Sources/Programmer/Debugger"
Module_FullVersion SETS "1.67"
Module_HelpVersion SETS "1.67 (15 Feb 2001)"
Module_FullVersion SETS "1.68"
Module_HelpVersion SETS "1.68 (21 Mar 2001)"
/* (1.67)
/* (1.68)
* This file is automatically maintained by srccommit, do not edit manually.
#define Module_MajorVersion_CMHG 1.67
#define Module_MajorVersion_CMHG 1.68
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 15 Feb 2001
#define Module_Date_CMHG 21 Mar 2001
#define Module_MajorVersion "1.67"
#define Module_Version 167
#define Module_MajorVersion "1.68"
#define Module_Version 168
#define Module_MinorVersion ""
#define Module_Date "15 Feb 2001"
#define Module_Date "21 Mar 2001"
#define Module_ApplicationDate2 "15-Feb-01"
#define Module_ApplicationDate4 "15-Feb-2001"
#define Module_ApplicationDate2 "21-Mar-01"
#define Module_ApplicationDate4 "21-Mar-2001"
#define Module_ComponentName "Debugger"
#define Module_ComponentPath "RiscOS/Sources/Programmer/Debugger"
#define Module_FullVersion "1.67"
#define Module_HelpVersion "1.67 (15 Feb 2001)"
#define Module_FullVersion "1.68"
#define Module_HelpVersion "1.68 (21 Mar 2001)"
......@@ -850,6 +850,7 @@ Swi LDR R10, Mistake
SWI XOS_SWINumberToString ; This may give error (eg. Buffer over)
BVS InstructionEnd
BL unknown_swis
ADD r0, r1, r2
B InstructionEnd
......@@ -866,8 +867,9 @@ Swi LDR R10, Mistake
; R2 - pointer to last char of string (may be different)
Push "R3, LR"
Push "R3, R12, LR"
; Ensure all bytes after the SWI name string up to the next word boundary are zero
BIC R12, R14, #&FC000003 ; This is 32-bit safe
MOV R14, #0
ADD R3, R1, R2
......@@ -888,17 +890,21 @@ unk_swi_align
BL strcmp
BEQ unk_swi_replace
SUB R2,R2,#1 ; Adjust to avoid taking the zero byte
Pull "R3, PC"
Pull "R3, R12, PC"
; Replace the SWI name string with the SWI number decoded as hexadecimal
MOV R2, #ampersand
STRB R2, [R1], #1
MOV R2, #12
SWI XOS_ConvertHex8
ADR R14, not_thumb_swi
BIC R14, R14, #&FC000003 ; This is 32-bit safe
TEQ R12, R14
SWIEQ XOS_ConvertHex6 ; If called from non-Thumb mode, do a 6 char hex number
SWINE XOS_ConvertHex2 ; If called from Thumb mode, do a 2 char hex number
SUB R2, R1, R0
SUB R1, R0, #1
ADD R2, R2, #1
Pull "R3, PC"
Pull "R3, R12, PC"
; Compare two word-aligned strings. They *must* be padded with zero or more null bytes after
; the terminator (which must also be null) up to the word boundary.
......@@ -266,8 +266,9 @@ ThumbSWI
SUB R2,R2,R1
AND R0,R4,#&FF
SWI XOS_SWINumberToString
SUBVC R2,R2,#1
BVS ThumbInstEnd
BL unknown_swis
ADD R0,R1,R2
B ThumbInstEnd
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment