Changeset 8fcb0c6 in rtems


Ignore:
Timestamp:
Jun 27, 2002, 9:13:44 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
007d59d6
Parents:
085dd80
Message:

2002-06-25 Joel Sherrill <joel@…>

  • Thomas Doerfler <Thomas.Doerfler@…> added m68k support to the shared gdb stub glue necessitating a move up.
  • ChangeLog?, Makefile.am, .cvsignore: New file.
  • rtems-stub-glue.c: Moved from mips/shared/gdbstub and m68k/shared/gdbstub.
Location:
c/src/lib/libbsp/shared/gdbstub
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/gdbstub/rtems-stub-glue.c

    r085dd80 r8fcb0c6  
    372372
    373373      strcat(info->display, tmp_buf);
    374  
     374#if 0
    375375      name = *(unsigned32 *)(obj_info->local_table[thread]->name);
    376      
     376#else
     377      name = *(unsigned32 *)(obj_info->local_table[thread -
     378                                                   first_rtems_id + 1]->name);
     379#endif
    377380      info->name[0] = (name >> 24) & 0xff;
    378381      info->name[1] = (name >> 16) & 0xff;
     
    14071410}
    14081411
     1412#elif defined(__mc68000__)
     1413
     1414
     1415void rtems_gdb_stub_get_registers_from_context(
     1416  int            *registers,
     1417  Thread_Control *th
     1418)
     1419{
     1420  /*
     1421   * how about register D0/D1/A0/A1
     1422   * they are located on thread stack ...
     1423   * -> they are not needed for context switch
     1424   */
     1425  registers[D0] = 0;
     1426  registers[D1] = 0;
     1427  registers[D2] = (unsigned32)th->Registers.d2;
     1428  registers[D3] = (unsigned32)th->Registers.d3;
     1429  registers[D4] = (unsigned32)th->Registers.d4;
     1430  registers[D5] = (unsigned32)th->Registers.d5;
     1431  registers[D6] = (unsigned32)th->Registers.d6;
     1432  registers[D7] = (unsigned32)th->Registers.d7;
     1433
     1434  registers[A0] = 0;
     1435  registers[A1] = 0;
     1436  registers[A2] = (unsigned32)th->Registers.a2;
     1437  registers[A3] = (unsigned32)th->Registers.a3;
     1438  registers[A4] = (unsigned32)th->Registers.a4;
     1439  registers[A5] = (unsigned32)th->Registers.a5;
     1440  registers[A6] = (unsigned32)th->Registers.a6;
     1441  registers[A7] = (unsigned32)th->Registers.a7_msp;
     1442 
     1443  registers[PS] = (unsigned32)th->Registers.sr;
     1444#if 0
     1445  registers[PC] = *(unsigned32 *)th->Registers.a7_msp; /* *SP = ret adr */
     1446#else
     1447  registers[PC] = (unsigned32)_CPU_Context_switch;
     1448#endif
     1449}
     1450
     1451
     1452int rtems_gdb_stub_get_offsets(
     1453  unsigned char **text_addr,
     1454  unsigned char **data_addr,
     1455  unsigned char **bss_addr
     1456)
     1457{
     1458/*
     1459  extern unsigned32 _ftext;
     1460  extern unsigned32 _fdata;
     1461  extern unsigned32 _bss_start;
     1462
     1463  *text_addr = &_ftext;
     1464  *data_addr = &_fdata;
     1465  *bss_addr  = &_bss_start;
     1466*/
     1467  *text_addr = 0;
     1468  *data_addr = 0;
     1469  *bss_addr  = 0;
     1470  return 1;
     1471}
     1472
    14091473#else
    14101474#error "rtems-gdb-stub.c: Unsupported CPU!"
Note: See TracChangeset for help on using the changeset viewer.