summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-07-01 22:14:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-07-01 22:14:25 +0000
commitce8e6a8bb7b9149c6c86150a48ee51e488a7490a (patch)
tree1ca4e8be3b4f2a6a0f03b33ec4ba0bb9f4bef47b /c/src
parent2002-07-01 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-ce8e6a8bb7b9149c6c86150a48ee51e488a7490a.tar.bz2
2002-07-01 Joel Sherrill <joel@OARcorp.com>
* src/_servtgt.c, src/ptrace.c: Corrected use of _Objects_Information_table now that it is a two dimensional array based upon API and class.
Diffstat (limited to 'c/src')
-rw-r--r--c/src/librdbg/ChangeLog6
-rw-r--r--c/src/librdbg/src/_servtgt.c34
-rw-r--r--c/src/librdbg/src/ptrace.c20
3 files changed, 34 insertions, 26 deletions
diff --git a/c/src/librdbg/ChangeLog b/c/src/librdbg/ChangeLog
index c353e0afa2..bab8b2346c 100644
--- a/c/src/librdbg/ChangeLog
+++ b/c/src/librdbg/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-01 Joel Sherrill <joel@OARcorp.com>
+
+ * src/_servtgt.c, src/ptrace.c: Corrected use of
+ _Objects_Information_table now that it is a two dimensional
+ array based upon API and class.
+
2001-05-15 Joel Sherrill <joel@OARcorp.com>
* src/i386/any/remdeb_svc.c, src/m68k/any/remdeb_svc.c,
diff --git a/c/src/librdbg/src/_servtgt.c b/c/src/librdbg/src/_servtgt.c
index 1ae011542b..0ec9f3c1bf 100644
--- a/c/src/librdbg/src/_servtgt.c
+++ b/c/src/librdbg/src/_servtgt.c
@@ -241,12 +241,12 @@ TgtGetThreadName (PID_LIST * plst, /* Process entry */
int index;
unsigned name;
- if (Id < _Objects_Information_table[OBJECTS_RTEMS_TASKS]->maximum_id &&
- Id > _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id) {
+ if (Id < _Objects_Information_table[OBJECTS_CLASSIC_API][1]->maximum_id &&
+ Id > _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id) {
- index = Id - _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id;
+ index = Id - _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id;
name =
- *(unsigned *) (_Objects_Information_table[OBJECTS_RTEMS_TASKS]->
+ *(unsigned *) (_Objects_Information_table[OBJECTS_CLASSIC_API][1]->
local_table[1 + index]->name);
ThrName[0] = (char) ((name >> 24) & 0xFF);
ThrName[1] = (char) ((name >> 16) & 0xFF);
@@ -256,13 +256,13 @@ TgtGetThreadName (PID_LIST * plst, /* Process entry */
return 0;
}
- if (Id < _Objects_Information_table[OBJECTS_POSIX_THREADS]->maximum_id &&
- Id > _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id) {
+ if (Id < _Objects_Information_table[OBJECTS_POSIX_API][1]->maximum_id &&
+ Id > _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id) {
index =
- Id - _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id;
+ Id - _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id;
name =
- *(unsigned *) (_Objects_Information_table[OBJECTS_POSIX_THREADS]->
+ *(unsigned *) (_Objects_Information_table[OBJECTS_POSIX_API][1]->
local_table[1 + index]->name);
ThrName[0] = (char) ((name >> 24) & 0xFF);
ThrName[1] = (char) ((name >> 16) & 0xFF);
@@ -288,11 +288,11 @@ TgtThreadList (PID_LIST * plst, /* Process entry */
Objects_Id id;
unsigned index;
- id = _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id;
+ id = _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id;
- while (id < _Objects_Information_table[OBJECTS_RTEMS_TASKS]->maximum_id) {
- index = id - _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id;
- if (_Objects_Information_table[OBJECTS_RTEMS_TASKS]->
+ while (id < _Objects_Information_table[OBJECTS_CLASSIC_API][1]->maximum_id) {
+ index = id - _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id;
+ if (_Objects_Information_table[OBJECTS_CLASSIC_API][1]->
local_table[1 + index] != NULL) {
threads[curr] = (unsigned) id;
curr++;
@@ -300,12 +300,12 @@ TgtThreadList (PID_LIST * plst, /* Process entry */
id++;
}
- id = _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id;
+ id = _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id;
- while (id < _Objects_Information_table[OBJECTS_POSIX_THREADS]->maximum_id) {
+ while (id < _Objects_Information_table[OBJECTS_POSIX_API][1]->maximum_id) {
index =
- id - _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id;
- if (_Objects_Information_table[OBJECTS_POSIX_THREADS]->
+ id - _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id;
+ if (_Objects_Information_table[OBJECTS_POSIX_API][1]->
local_table[1 + index] != NULL) {
threads[curr] = (unsigned) id;
curr++;
@@ -313,5 +313,7 @@ TgtThreadList (PID_LIST * plst, /* Process entry */
id++;
}
+#warning "ignores ITRON tasks and could be a single loop"
+
return curr;
}
diff --git a/c/src/librdbg/src/ptrace.c b/c/src/librdbg/src/ptrace.c
index 62a74d2135..d3603e4489 100644
--- a/c/src/librdbg/src/ptrace.c
+++ b/c/src/librdbg/src/ptrace.c
@@ -35,22 +35,22 @@ Thread_Get_RDBG (Objects_Id Id)
{
unsigned index;
- if (Id < _Objects_Information_table[OBJECTS_RTEMS_TASKS]->maximum_id &&
- Id > _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id) {
+ if (Id < _Objects_Information_table[OBJECTS_CLASSIC_API][1]->maximum_id &&
+ Id > _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id) {
- index = Id - _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id;
- if (_Objects_Information_table[OBJECTS_RTEMS_TASKS]->local_table[1 + index] != NULL) {
- return (Thread_Control*) (_Objects_Information_table[OBJECTS_RTEMS_TASKS]->local_table[1 + index]);
+ index = Id - _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id;
+ if (_Objects_Information_table[OBJECTS_CLASSIC_API][1]->local_table[1 + index] != NULL) {
+ return (Thread_Control*) (_Objects_Information_table[OBJECTS_CLASSIC_API][1]->local_table[1 + index]);
}
}
- if (Id < _Objects_Information_table[OBJECTS_POSIX_THREADS]->maximum_id &&
- Id > _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id) {
+ if (Id < _Objects_Information_table[OBJECTS_POSIX_API][1]->maximum_id &&
+ Id > _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id) {
- index = Id - _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id;
- if (_Objects_Information_table[OBJECTS_POSIX_THREADS]->
+ index = Id - _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id;
+ if (_Objects_Information_table[OBJECTS_POSIX_API][1]->
local_table[1 + index] != NULL)
- return (Thread_Control*) (_Objects_Information_table[OBJECTS_POSIX_THREADS]->local_table[1 + index]);
+ return (Thread_Control*) (_Objects_Information_table[OBJECTS_POSIX_API][1]->local_table[1 + index]);
}
return 0;