various changes related to refactor of header files

This commit is contained in:
2020-02-05 12:45:06 +04:00
parent 064951f4c8
commit ef055f0324
24 changed files with 96 additions and 64 deletions
+5 -5
View File
@@ -5,15 +5,15 @@
* Author: nnosov
*/
#include "../src/dwarf/dwarf_call_site.h"
#include <dwarf.h>
#include <elfutils/libdw.h>
#include "../src/dwarf/dwarf_function.h"
#include "../src/dwarf/dwarf_utils.h"
#include "../src/dwarf/dwarf_utils.h"
#include "../utils/hash_multimap.h"
#include "dwarf_call_site.h"
#include "dwarf_function.h"
#include "dwarf_utils.h"
#include "dwarf_utils.h"
#include "utils/hash_multimap.h"
// -----------------------------------------------------------------------------------
// pst_call_site_param
+3 -3
View File
@@ -5,8 +5,8 @@
* Author: nnosov
*/
#ifndef SRC_DWARF_DWARF_CALL_SITE_H_
#define SRC_DWARF_DWARF_CALL_SITE_H_
#ifndef __PST_DWARF_CALL_SITE_H__
#define __PST_DWARF_CALL_SITE_H__
#include <inttypes.h>
#include <elfutils/libdw.h>
@@ -87,4 +87,4 @@ void pst_call_site_storage_del(pst_call_site_storage* storage, pst_call_site* st
void pst_call_site_storage_del(pst_call_site_storage* storage, pst_call_site* st);
#endif /* SRC_DWARF_DWARF_CALL_SITE_H_ */
#endif /* __PST_DWARF_CALL_SITE_H__ */
+2 -2
View File
@@ -5,13 +5,13 @@
* Author: nnosov
*/
#include "../src/dwarf/dwarf_expression.h"
#include <stdarg.h>
#include "../utils/allocator.h"
#include "utils/allocator.h"
#include "common.h"
#include "context.h"
#include "dwarf_expression.h"
//
// DWARF operation
+3 -3
View File
@@ -5,8 +5,8 @@
* Author: nnosov
*/
#ifndef SRC_DWARF_DWARF_EXPRESSION_H_
#define SRC_DWARF_DWARF_EXPRESSION_H_
#ifndef __PST_DWARF_EXPRESSION_H__
#define __PST_DWARF_EXPRESSION_H__
#include <inttypes.h>
#include <elfutils/libdwfl.h>
@@ -46,4 +46,4 @@ bool pst_dwarf_expr_equal(pst_dwarf_expr* lhs, pst_dwarf_expr* rhs);
bool pst_dwarf_expr_print_op(pst_dwarf_expr* expr, const char* fmt, ...);
void pst_dwarf_expr_set_value(pst_dwarf_expr* expr, uint64_t v);
#endif /* SRC_DWARF_DWARF_EXPRESSION_H_ */
#endif /* __PST_DWARF_EXPRESSION_H__ */
+3 -3
View File
@@ -5,14 +5,14 @@
* Author: nnosov
*/
#include "../src/dwarf/dwarf_function.h"
#include <dwarf.h>
#include <stdlib.h>
#include <cxxabi.h>
#include "../src/dwarf/dwarf_stack.h"
#include "../src/dwarf/dwarf_utils.h"
#include "dwarf_stack.h"
#include "dwarf_utils.h"
#include "dwarf_function.h"
// -----------------------------------------------------------------------------------
// pst_function
+10 -7
View File
@@ -5,14 +5,17 @@
* Author: nnosov
*/
#ifndef SRC_DWARF_DWARF_FUNCTION_H_
#define SRC_DWARF_DWARF_FUNCTION_H_
#ifndef __PST_DWARF_FUNCTION_H__
#define __PST_DWARF_FUNCTION_H__
#include "../src/dwarf/dwarf_call_site.h"
#include "../src/dwarf/dwarf_expression.h"
#include "../src/dwarf/dwarf_parameter.h"
#include "../utils/list_head.h"
#include <elfutils/libdw.h>
#include <libunwind.h>
#include "utils/list_head.h"
#include "context.h"
#include "dwarf_call_site.h"
#include "dwarf_expression.h"
#include "dwarf_parameter.h"
// -----------------------------------------------------------------------------------
// pst_function
@@ -46,4 +49,4 @@ bool pst_function_unwind(pst_function* fn, Dwarf_Addr addr);
bool pst_function_handle_dwarf(pst_function * fn, Dwarf_Die* d);
bool pst_function_print_dwarf(pst_function* fn);
#endif /* SRC_DWARF_DWARF_FUNCTION_H_ */
#endif /* __PST_DWARF_FUNCTION_H__ */
+3 -3
View File
@@ -5,8 +5,8 @@
* Author: nnosov
*/
#ifndef PST_HANDLER_H_
#define PST_HANDLER_H_
#ifndef __PST_DWARF_HANDLER_H__
#define __PST_DWARF_HANDLER_H__
//system
#include <ucontext.h>
@@ -29,4 +29,4 @@ bool pst_handler_handle_dwarf(pst_handler* h);
void pst_handler_print_dwarf(pst_handler* h);
bool pst_handler_unwind(pst_handler* h);
#endif /* PST_HANDLER_H_ */
#endif /* __PST_DWARF_HANDLER_H__ */
+1 -1
View File
@@ -5,13 +5,13 @@
* Author: nnosov
*/
#include "../src/dwarf/dwarf_operations.h"
#include <dwarf.h>
#include <inttypes.h>
#include "common.h"
#include "registers.h"
#include "dwarf_operations.h"
// not implemented operations
bool dw_op_notimpl(pst_dwarf_stack* stack, const dwarf_op_map* map, Dwarf_Word op1, Dwarf_Word op2)
+12 -1
View File
@@ -1,4 +1,13 @@
#pragma once
#ifndef __PST_DWARF_OPERATIONS_H__
#define __PST_DWARF_OPERATIONS_H__
/*
* dwarf_operations.cpp
*
* Created on: Jan 11, 2020
* Author: nnosov
*/
#include <elfutils/libdwfl.h>
@@ -20,3 +29,5 @@ typedef struct __dwarf_op_map {
} dwarf_op_map;
const dwarf_op_map* find_op_map(int op);
#endif /* __PST_DWARF_OPERATIONS_H__ */
+2 -2
View File
@@ -5,13 +5,13 @@
* Author: nnosov
*/
#include "../src/dwarf/dwarf_parameter.h"
#include <dwarf.h>
#include <elfutils/libdw.h>
#include "../src/dwarf/dwarf_utils.h"
#include "dwarf_utils.h"
#include "context.h"
#include "dwarf_parameter.h"
//
// pst_type
+5 -5
View File
@@ -5,14 +5,14 @@
* Author: nnosov
*/
#ifndef SRC_DWARF_DWARF_PARAMETER_H_
#define SRC_DWARF_DWARF_PARAMETER_H_
#ifndef __PST_DWARF_PARAMETER_H__
#define __PST_DWARF_PARAMETER_H__
#include <inttypes.h>
#include <elfutils/libdwfl.h>
#include "../src/dwarf/dwarf_expression.h"
#include "../utils/list_head.h"
#include "dwarf_expression.h"
#include "utils/list_head.h"
#include "context.h"
typedef struct __pst_type {
@@ -56,4 +56,4 @@ bool pst_parameter_print_dwarf(pst_parameter* param);
bool pst_parameter_handle_type(pst_parameter* param, Dwarf_Attribute* base);
pst_type* pst_parameter_add_type(pst_parameter* param, const char* name, int type);
#endif /* SRC_DWARF_DWARF_PARAMETER_H_ */
#endif /* __PST_DWARF_PARAMETER_H__ */
+4 -4
View File
@@ -5,16 +5,16 @@
* Author: nnosov
*/
#include "../src/dwarf/dwarf_stack.h"
#include <string.h>
#include <stdlib.h>
#include <dwarf.h>
#include "../src/dwarf/dwarf_operations.h"
#include "../utils/allocator.h"
#include "../utils/list_head.h"
#include "utils/allocator.h"
#include "utils/list_head.h"
#include "dwarf_operations.h"
#include "dwarf_handler.h"
#include "dwarf_stack.h"
// -----------------------------------------------------------------------------------
// DWARF Stack value
+3 -3
View File
@@ -5,8 +5,8 @@
* Author: nnosov
*/
#ifndef SRC_DWARF_DWARF_STACK_H_
#define SRC_DWARF_DWARF_STACK_H_
#ifndef __PST_DWARF_STACK_H__
#define __PST_DWARF_STACK_H__
#include <stdint.h>
@@ -94,4 +94,4 @@ pst_dwarf_value* pst_dwarf_stack_pop(pst_dwarf_stack* st);
void pst_dwarf_stack_push_value(pst_dwarf_stack* st, pst_dwarf_value* value);
void pst_dwarf_stack_push(pst_dwarf_stack* st, void* v, uint32_t s, int t);
#endif /* SRC_DWARF_DWARF_STACK_H_ */
#endif /* __PST_DWARF_STACK_H__ */
+3 -3
View File
@@ -5,8 +5,8 @@
* Author: nnosov
*/
#ifndef SRC_DWARF_DWARF_UTILS_H_
#define SRC_DWARF_DWARF_UTILS_H_
#ifndef __PST_DWARF_UTILS_H__
#define __PST_DWARF_UTILS_H__
#include <elfutils/libdw.h>
@@ -27,4 +27,4 @@ int regname_callback (void *arg, int regno, const char *setname, const char *pre
bool handle_location(pst_context* ctx, Dwarf_Attribute* attr, pst_dwarf_expr* loc, Dwarf_Addr pc, pst_function* fun);
bool is_location_form(int form);
#endif /* SRC_DWARF_DWARF_UTILS_H_ */
#endif /* __PST_DWARF_UTILS_H__ */