Changeset ce8e6a8 in rtems for c/src/librdbg/src/_servtgt.c


Ignore:
Timestamp:
Jul 1, 2002, 10:14:25 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
8d3b3be
Parents:
35290c9
Message:

2002-07-01 Joel Sherrill <joel@…>

  • 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/librdbg/src/_servtgt.c

    r35290c9 rce8e6a8  
    242242  unsigned name;
    243243
    244   if (Id < _Objects_Information_table[OBJECTS_RTEMS_TASKS]->maximum_id &&
    245       Id > _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id) {
    246 
    247     index = Id - _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id;
     244  if (Id < _Objects_Information_table[OBJECTS_CLASSIC_API][1]->maximum_id &&
     245      Id > _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id) {
     246
     247    index = Id - _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id;
    248248    name =
    249       *(unsigned *) (_Objects_Information_table[OBJECTS_RTEMS_TASKS]->
     249      *(unsigned *) (_Objects_Information_table[OBJECTS_CLASSIC_API][1]->
    250250                     local_table[1 + index]->name);
    251251    ThrName[0] = (char) ((name >> 24) & 0xFF);
     
    257257  }
    258258
    259   if (Id < _Objects_Information_table[OBJECTS_POSIX_THREADS]->maximum_id &&
    260       Id > _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id) {
     259  if (Id < _Objects_Information_table[OBJECTS_POSIX_API][1]->maximum_id &&
     260      Id > _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id) {
    261261
    262262    index =
    263       Id - _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id;
     263      Id - _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id;
    264264    name =
    265       *(unsigned *) (_Objects_Information_table[OBJECTS_POSIX_THREADS]->
     265      *(unsigned *) (_Objects_Information_table[OBJECTS_POSIX_API][1]->
    266266                     local_table[1 + index]->name);
    267267    ThrName[0] = (char) ((name >> 24) & 0xFF);
     
    289289  unsigned index;
    290290
    291   id = _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id;
    292 
    293   while (id < _Objects_Information_table[OBJECTS_RTEMS_TASKS]->maximum_id) {
    294     index = id - _Objects_Information_table[OBJECTS_RTEMS_TASKS]->minimum_id;
    295     if (_Objects_Information_table[OBJECTS_RTEMS_TASKS]->
     291  id = _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id;
     292
     293  while (id < _Objects_Information_table[OBJECTS_CLASSIC_API][1]->maximum_id) {
     294    index = id - _Objects_Information_table[OBJECTS_CLASSIC_API][1]->minimum_id;
     295    if (_Objects_Information_table[OBJECTS_CLASSIC_API][1]->
    296296        local_table[1 + index] != NULL) {
    297297      threads[curr] = (unsigned) id;
     
    301301  }
    302302
    303   id = _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id;
    304 
    305   while (id < _Objects_Information_table[OBJECTS_POSIX_THREADS]->maximum_id) {
     303  id = _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id;
     304
     305  while (id < _Objects_Information_table[OBJECTS_POSIX_API][1]->maximum_id) {
    306306    index =
    307       id - _Objects_Information_table[OBJECTS_POSIX_THREADS]->minimum_id;
    308     if (_Objects_Information_table[OBJECTS_POSIX_THREADS]->
     307      id - _Objects_Information_table[OBJECTS_POSIX_API][1]->minimum_id;
     308    if (_Objects_Information_table[OBJECTS_POSIX_API][1]->
    309309        local_table[1 + index] != NULL) {
    310310      threads[curr] = (unsigned) id;
     
    314314  }
    315315
     316#warning "ignores ITRON tasks and could be a single loop"
     317
    316318  return curr;
    317319}
Note: See TracChangeset for help on using the changeset viewer.