/* unknown.c -- used when backtrace configury does not know file format.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
met:
(1) Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ notice, this list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
- distribution.
-
+ distribution.
+
(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
/* A trivial routine that always fails to find fileline data. */
static int
-unknown_fileline (void *fileline_data ATTRIBUTE_UNUSED,
+unknown_fileline (struct backtrace_state *state ATTRIBUTE_UNUSED,
uintptr_t pc, backtrace_full_callback callback,
- backtrace_error_callback ATTRIBUTE_UNUSED,
+ backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
void *data)
{
debug info. */
int
-backtrace_initialize (int descriptor ATTRIBUTE_UNUSED,
+backtrace_initialize (struct backtrace_state *state ATTRIBUTE_UNUSED,
+ const char *filename ATTRIBUTE_UNUSED,
+ int descriptor ATTRIBUTE_UNUSED,
backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
- void *data ATTRIBUTE_UNUSED, fileline *fileline_fn,
- void **fileline_data)
+ void *data ATTRIBUTE_UNUSED, fileline *fileline_fn)
{
+ state->fileline_data = NULL;
*fileline_fn = unknown_fileline;
- *fileline_data = NULL;
return 1;
}