Subversion Repositories HelenOS

Rev

Rev 4132 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4132 Rev 4137
Line 41... Line 41...
41
#include <arch/asm.h>
41
#include <arch/asm.h>
42
#include <arch/cpu.h>
42
#include <arch/cpu.h>
43
#include <debug.h>
43
#include <debug.h>
44
#include <func.h>
44
#include <func.h>
45
#include <smp/ipi.h>
45
#include <smp/ipi.h>
46
 
-
 
47
#ifdef CONFIG_SYMTAB
-
 
48
#include <symtab.h>
46
#include <symtab.h>
49
#endif
-
 
50
 
47
 
51
typedef struct  {
48
typedef struct  {
52
    uintptr_t address;      /**< Breakpoint address */
49
    uintptr_t address;      /**< Breakpoint address */
53
    int flags;              /**< Flags regarding breakpoint */
50
    int flags;              /**< Flags regarding breakpoint */
54
    int counter;            /**< How many times the exception occured */
51
    int counter;            /**< How many times the exception occured */
Line 231... Line 228...
231
            printf("Data watchpoint - new data: %lx\n",
228
            printf("Data watchpoint - new data: %lx\n",
232
                *((unative_t *) breakpoints[slot].address));
229
                *((unative_t *) breakpoints[slot].address));
233
        }
230
        }
234
    }
231
    }
235
 
232
 
236
#ifdef CONFIG_SYMTAB
-
 
237
    printf("Reached breakpoint %d:%lx(%s)\n", slot, getip(istate),
233
    printf("Reached breakpoint %d:%lx (%s)\n", slot, getip(istate),
238
        get_symtab_entry(getip(istate)));
234
        symtab_fmt_name_lookup(getip(istate)));
239
#else
-
 
240
    printf("Reached breakpoint %d:%lx\n", slot, getip(istate));
-
 
241
#endif
-
 
242
 
235
 
243
#ifdef CONFIG_KCONSOLE
236
#ifdef CONFIG_KCONSOLE
244
    atomic_set(&haltstate, 1);
237
    atomic_set(&haltstate, 1);
245
    kconsole("debug", "Debug console ready.\n", false);
238
    kconsole("debug", "Debug console ready.\n", false);
246
    atomic_set(&haltstate, 0);
239
    atomic_set(&haltstate, 0);
Line 361... Line 354...
361
    printf("-- ----- ------------------ ---------\n");
354
    printf("-- ----- ------------------ ---------\n");
362
#endif
355
#endif
363
   
356
   
364
    for (i = 0; i < BKPOINTS_MAX; i++)
357
    for (i = 0; i < BKPOINTS_MAX; i++)
365
        if (breakpoints[i].address) {
358
        if (breakpoints[i].address) {
366
#ifdef CONFIG_SYMTAB
-
 
367
            symbol = get_symtab_entry(breakpoints[i].address);
359
            symbol = symtab_fmt_name_lookup(
368
#else
-
 
369
            symbol = "n/a";
360
                breakpoints[i].address);
370
#endif
-
 
371
 
361
 
372
#ifdef __32_BITS__
362
#ifdef __32_BITS__
373
            printf("%-2u %-5d %#10zx %s\n", i,
363
            printf("%-2u %-5d %#10zx %s\n", i,
374
                breakpoints[i].counter, breakpoints[i].address,
364
                breakpoints[i].counter, breakpoints[i].address,
375
                symbol);
365
                symbol);