forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user