8000 remove BT_MAX_DEPTH and struct bt_frame from the public API by dajohi · Pull Request #1 · conformal/backtrace · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

remove BT_MAX_DEPTH and struct bt_frame from the public API #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/backtrace_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "backtrace.h"

#define BT_MAX_DEPTH (128)

void
f2(void)
{
Expand Down
6 changes: 6 additions & 0 deletions libbacktrace/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ __attribute__((unused)) static const char *cvstag = "$backtrace$";

#define BT_GET_DEPTH (1)
#define BT_ADD_CR (1)
#define BT_MAX_DEPTH (128)

struct bt_frame {
Dl_info bt_dlinfo;
unsigned int line;
};

#define HANDLE_FRAME(depth, idx, btaddr) \
case depth: \
Expand Down
19 changes: 13 additions & 6 deletions libbacktrace/backtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,25 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef _EXECINFO_H_
#define _EXECINFO_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifndef __GNUC__
#error "this library must be compiled with gcc"
#endif

#define BT_MAX_DEPTH (128)

struct bt_frame {
Dl_info bt_dlinfo;
unsigned int line;
};
#include <dlfcn.h>

/* compatability functions with libexecinfo and glibc */
int backtrace(void **, int);
char **backtrace_symbols(void *const *, int);
void backtrace_symbols_fd(void *const *, int, int);

#ifdef __cplusplus
}
#endif
#endif
4 changes: 2 additions & 2 deletions libbacktrace/shlib_version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
major=0
minor=1
major=1
minor=0
0