Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2011-08-16T18:53:00Z (10 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master
Children:
49160c4
Parents:
e0e922d (diff), 45058baa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/arm32/include/elf_linux.h

    re0e922d rdb6e419  
    3030 * @{
    3131 */
    32 /** @file
     32/** @file Definitions needed to write core files in Linux-ELF format.
    3333 */
    3434
     
    3939#include <sys/types.h>
    4040
     41/** Linux kernel struct pt_regs structure.
     42 *
     43 * We need this to save register state to a core file in Linux format
     44 * (readable by GDB configured for Linux target).
     45 */
    4146typedef struct {
    42         /* TODO */
    43         uint32_t pad[16];
     47        uint32_t r0;
     48        uint32_t r1;
     49        uint32_t r2;
     50        uint32_t r3;
     51        uint32_t r4;
     52        uint32_t r5;
     53        uint32_t r6;
     54        uint32_t r7;
     55        uint32_t r8;
     56        uint32_t r9;
     57        uint32_t r10;
     58        uint32_t fp;
     59        uint32_t r12;
     60        uint32_t sp;
     61        uint32_t lr;
     62        uint32_t pc;
     63        uint32_t cpsr;
     64        uint32_t old_r0;
    4465} elf_regs_t;
    4566
     67/** Convert istate_t to elf_regs_t. */
    4668static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
    4769{
    48         /* TODO */
    49         (void) istate; (void) elf_regs;
     70        elf_regs->r0 = istate->r0;
     71        elf_regs->r1 = istate->r1;
     72        elf_regs->r2 = istate->r2;
     73        elf_regs->r3 = istate->r3;
     74        elf_regs->r4 = istate->r4;
     75        elf_regs->r5 = istate->r5;
     76        elf_regs->r6 = istate->r6;
     77        elf_regs->r7 = istate->r7;
     78        elf_regs->r8 = istate->r8;
     79        elf_regs->r9 = istate->r9;
     80        elf_regs->r10 = istate->r10;
     81
     82        elf_regs->fp = istate->fp;
     83        elf_regs->r12 = istate->r12;
     84        elf_regs->sp = istate->sp;
     85        elf_regs->lr = istate->lr;
     86        elf_regs->pc = istate->pc;
     87        elf_regs->cpsr = istate->spsr;
     88        elf_regs->old_r0 = 0;
    5089}
    5190
Note: See TracChangeset for help on using the changeset viewer.