aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-02-01 00:14:40 +0000
committerNick Clifton <nickc@redhat.com>2001-02-01 00:14:40 +0000
commit88694af3f9e50c9196913fc0246cad42a0ae4d80 (patch)
tree008b77fe52a56ac41cc9d966445a8d4764aeea64 /sim
parent27b82ed26e4c5d8012bc78a194a50417e324e87a (diff)
downloadgdb-88694af3f9e50c9196913fc0246cad42a0ae4d80.zip
gdb-88694af3f9e50c9196913fc0246cad42a0ae4d80.tar.gz
gdb-88694af3f9e50c9196913fc0246cad42a0ae4d80.tar.bz2
Detect installation of SWI vector by running program as well as loading program.
Diffstat (limited to 'sim')
-rw-r--r--sim/arm/ChangeLog9
-rw-r--r--sim/arm/armos.c4
-rw-r--r--sim/arm/armos.h2
-rw-r--r--sim/arm/armvirt.c5
-rw-r--r--sim/arm/wrapper.c5
5 files changed, 18 insertions, 7 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 9180bd5..b4ffb90 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,12 @@
+2001-01-31 Nick Clifton <nickc@redhat.com>
+
+ * armvirt.c (PutWord): Detect installation of SWI vector.
+ (SWI_vector_installed): Define.
+ * armos.c (ARMul_OsInit): Reset SWI_vector_installed.
+ * armos.h (SWI_vector_installed): Declare.
+ * wrapper.c (SWI_vector_installed): Remove definition.
+ (sim_write): Remove check of SWI vector installation
+
2000-12-18 Nick Clifton <nickc@redhat.com>
* armemu.c (ARMul_Emulate26): Fix test for StoreDouble
diff --git a/sim/arm/armos.c b/sim/arm/armos.c
index dd0ce23..789a35d 100644
--- a/sim/arm/armos.c
+++ b/sim/arm/armos.c
@@ -171,6 +171,8 @@ ARMul_OSInit (ARMul_State * state)
for (i = ARMul_ResetV; i <= ARMFIQV; i += 4)
ARMul_WriteWord (state, i, instr); /* write hardware vectors */
+ SWI_vector_installed = 0;
+
for (i = ARMul_ResetV; i <= ARMFIQV + 4; i += 4)
{
ARMul_WriteWord (state, ADDRSOFTVECTORS + i, SOFTVECTORCODE + i * 4);
@@ -628,8 +630,6 @@ ARMul_OSHandleSWI (ARMul_State * state, ARMword number)
default:
{
/* If there is a SWI vector installed use it. */
- extern int SWI_vector_installed;
-
if (state->is_XScale && saved_number != -1)
number = saved_number;
diff --git a/sim/arm/armos.h b/sim/arm/armos.h
index 1010b4f..d943735 100644
--- a/sim/arm/armos.h
+++ b/sim/arm/armos.h
@@ -93,3 +93,5 @@
extern unsigned long fpecode[];
extern unsigned long fpesize;
+
+extern int SWI_vector_installed;
diff --git a/sim/arm/armvirt.c b/sim/arm/armvirt.c
index f9ac453..b9a018b 100644
--- a/sim/arm/armvirt.c
+++ b/sim/arm/armvirt.c
@@ -49,6 +49,8 @@ defined to generate aborts. */
#define PAGEBITS 16
#define OFFSETBITS 0xffff
+int SWI_vector_installed = FALSE;
+
/***************************************************************************\
* Get a Word from Virtual Memory, maybe allocating the page *
\***************************************************************************/
@@ -111,6 +113,9 @@ PutWord (ARMul_State * state, ARMword address, ARMword data)
*(pagetable + page) = pageptr;
}
+ if (address == 0x8)
+ SWI_vector_installed = TRUE;
+
*(pageptr + offset) = data;
}
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index f6c4b05..f2e5823 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -114,8 +114,6 @@ ARMul_Debug (ARMul_State * state ATTRIBUTE_UNUSED, ARMword pc ATTRIBUTE_UNUSED,
return 0;
}
-int SWI_vector_installed = FALSE;
-
int
sim_write (sd, addr, buffer, size)
SIM_DESC sd ATTRIBUTE_UNUSED;
@@ -127,9 +125,6 @@ sim_write (sd, addr, buffer, size)
init ();
- if ((addr <= 0x8) && ((addr + size) >= 0x8))
- SWI_vector_installed = TRUE;
-
for (i = 0; i < size; i++)
ARMul_WriteByte (state, addr + i, buffer[i]);