summaryrefslogtreecommitdiffhomepage
path: root/ir/common/debugger.h
blob: 52317e18e426dcc5856b6c5fdcd9350771c30ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 * This file is part of libFirm.
 * Copyright (C) 2012 University of Karlsruhe.
 */

/**
 * @file
 * @brief     Helper function for integrated debug support
 * @author    Michael Beck
 * @date      2005
 */
#ifndef FIRM_DEBUG_DEBUGGER_H
#define FIRM_DEBUG_DEBUGGER_H

#include "firm_types.h"

/** Break into the debugger. */
void firm_debug_break(void);

/**
 * High level function to use from debugger interface
 *
 * Supported commands:
 *  .create nr    break if node nr was created
 *  .help         list all commands
 */
void firm_break(const char *cmd);

/** Creates the debugger tables. */
void firm_init_debugger(void);

void firm_finish_debugger(void);

/**
 * @defgroup external_debug    helper functions for debuggers
 *
 * @{
 */

/**
 * Return the content of the debug text buffer.
 *
 * To be called from the debugger.
 */
const char *firm_debug_text(void);

/**
 * A gdb helper function to print tarvals.
 */
const char *gdb_tarval_helper(void *tv_object);

/**
 * A gdb helper to print all (new-style-) out edges of a node
 */
const char *gdb_out_edge_helper(const ir_node *node);

/**
 * High level function to use from debugger interface
 *
 * See show_commands() for supported commands.
 */
void firm_debug(const char *cmd);

/**
 * @}
 */

#endif