ug4
lua_debug.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2015: G-CSC, Goethe University Frankfurt
3  * Author: Martin Rupp
4  *
5  * This file is part of UG4.
6  *
7  * UG4 is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License version 3 (as published by the
9  * Free Software Foundation) with the following additional attribution
10  * requirements (according to LGPL/GPL v3 §7):
11  *
12  * (1) The following notice must be displayed in the Appropriate Legal Notices
13  * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14  *
15  * (2) The following notice must be displayed at a prominent place in the
16  * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17  *
18  * (3) The following bibliography is recommended for citation and must be
19  * preserved in all covered files:
20  * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21  * parallel geometric multigrid solver on hierarchically distributed grids.
22  * Computing and visualization in science 16, 4 (2013), 151-164"
23  * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24  * flexible software system for simulating pde based models on high performance
25  * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU Lesser General Public License for more details.
31  */
32 
33 #ifndef LUA_DEBUG_H_
34 #define LUA_DEBUG_H_
35 
36 #include "registry/registry.h"
37 
38 namespace ug
39 {
40 namespace script
41 {
42 
47 {
53 };
54 
62 
70 
71 UG_API void ProfileLUA(bool bProfile);
72 
74 UG_API void DebugList();
75 
77 UG_API void DebugBacktrace(int fromLevel);
78 
80 UG_API void DebugDown();
81 
83 UG_API void DebugUp();
84 
87 
89 
90 UG_API void DebugHold();
91 }
92 }
93 
94 #endif /* LUA_DEBUG_H_ */
Registry for functions and classes that are exported to scripts and visualizations.
Definition: registry.h:138
#define UG_API
Definition: ug_config.h:65
struct lua_State lua_State
Definition: lua_table_handle.h:40
void DebugUp()
move down function stack
Definition: lua_debug.cpp:640
void DebugList()
lists the current line in the script
Definition: lua_debug.cpp:589
void ProfileLUA(bool b)
Definition: lua_debug.cpp:569
void DebugDown()
move down function stack
Definition: lua_debug.cpp:650
void DebugHold()
Definition: lua_debug.cpp:194
void SetLuaDebugIDs(lua_State *L)
Definition: lua_debug.cpp:704
void DebugBacktrace(int fromLevel)
lists the function stack in lua
Definition: lua_debug.cpp:613
int SetDebugShell(debug_return(*s)())
Definition: lua_debug.cpp:117
debug_return
Definition: lua_debug.h:47
@ DEBUG_FINISH
continue until we finish current function
Definition: lua_debug.h:52
@ DEBUG_CONTINUE
continue execution
Definition: lua_debug.h:49
@ DEBUG_STEP
go to next line, step into functions (deeper in stack)
Definition: lua_debug.h:51
@ DEBUG_NEXT
go to next line, but do not go deeper in stack
Definition: lua_debug.h:50
@ DEBUG_EXIT
exit ug
Definition: lua_debug.h:48
bool RegisterLuaDebug(ug::bridge::Registry &reg)
Definition: lua_debug.cpp:662
void FinalizeLUADebug()
Free all memory associated with lua_debug.
Definition: lua_debug.cpp:108
the ug namespace