Changeset a3ac9a7 in mainline


Ignore:
Timestamp:
2005-12-10T12:12:09Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6e716a59
Parents:
208189f
Message:

Small debug changes.

Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/include/asm.h

    r208189f ra3ac9a7  
    218218}
    219219
     220static inline __address * get_ip()
     221{
     222        __address *ip;
     223
     224        __asm__ volatile (
     225                "mov %%rip, %0"
     226                : "=r" (ip)
     227                );
     228        return ip;
     229}
     230
     231
    220232extern size_t interrupt_handler_size;
    221233extern void interrupt_handlers(void);
  • arch/ia32/include/asm.h

    r208189f ra3ac9a7  
    224224}
    225225
     226/** Return current IP address */
     227static inline __address * get_ip()
     228{
     229        __address *ip;
     230
     231        __asm__ volatile (
     232                "mov %%eip, %0"
     233                : "=r" (ip)
     234                );
     235        return ip;
     236}
     237
    226238#endif
  • arch/mips32/include/debug.h

    r208189f ra3ac9a7  
    4343#define ___intmode()    asm volatile ( "\t.word\t0x29\n");
    4444
     45/** Return current IP address */
     46static inline __address * _get_ra()
     47{
     48        __address *ip;
     49
     50        __asm__ volatile (
     51                "mov %%31, %0"
     52                : "=r" (ip)
     53                );
     54        return ip;
     55}
     56#define CALLER(first_arg)    (_get_ra())
     57
     58
    4559#endif
  • generic/include/debug.h

    r208189f ra3ac9a7  
    3131
    3232#include <panic.h>
     33#include <arch/debug.h>
     34#include <arch.h>
    3335
     36#ifndef CALLER
     37/**  Default (returns 0) macro for getting address of calling function
     38 *   @param x First argument of the called function
     39 */
     40#  define CALLER(x)       ((__address *) 0)
     41#endif
     42
     43#ifndef HERE
     44/** Current Instruction Pointer address */
     45#  define HERE ((__address *)0)
     46#endif
    3447
    3548/** Debugging ASSERT macro
  • generic/src/interrupt/interrupt.c

    r208189f ra3ac9a7  
    112112
    113113static cmd_info_t exc_info = {
    114         .name = "exc_print",
     114        .name = "pexc",
    115115        .description = "Print exception table",
    116116        .func = exc_print_cmd,
  • generic/src/synch/spinlock.c

    r208189f ra3ac9a7  
    6464{
    6565        count_t i = 0;
    66         __address caller = ((__address *) &sl)[-1];
     66        __address caller = CALLER(sl);
    6767        char *symbol;
    6868        bool deadlock_reported = false;
Note: See TracChangeset for help on using the changeset viewer.