drgn/libdrgn/stack_trace.h
Omar Sandoval 46343ae08d libdrgn: get rid of struct drgn_stack_frame
In preparation for adding a "real", internal-only struct
drgn_stack_frame, replace the existing struct drgn_stack_frame with
explicit trace/frame arguments.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-01-27 11:22:34 -08:00

41 lines
646 B
C

// Copyright (c) Facebook, Inc. and its affiliates.
// SPDX-License-Identifier: GPL-3.0+
/**
* @file
*
* Stack trace internals
*
* See @ref StackTraceInternals.
*/
#ifndef DRGN_STACK_TRACE_H
#define DRGN_STACK_TRACE_H
/**
* @ingroup Internals
*
* @defgroup StackTraceInternals Stack traces
*
* Stack trace internals.
*
* This provides the internal data structures used for stack traces.
*
* @{
*/
struct drgn_stack_trace {
struct drgn_program *prog;
union {
Dwfl_Thread *thread;
/* Used during creation. */
size_t capacity;
};
size_t num_frames;
Dwfl_Frame *frames[];
};
/** @} */
#endif /* DRGN_STACK_TRACE_H */