mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-28 13:12:10 +01:00
[girparser] Remove backtrace()
It's not useful; we never got good info from it, and modern operating systems ship with crash catching systems.
This commit is contained in:
parent
9a9825b0f9
commit
e169006ed6
29
girparser.c
29
girparser.c
@ -35,10 +35,6 @@
|
|||||||
*/
|
*/
|
||||||
#define SUPPORTED_GIR_VERSION "1.1"
|
#define SUPPORTED_GIR_VERSION "1.1"
|
||||||
|
|
||||||
#if defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS)
|
|
||||||
# include <execinfo.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct _GIrParser
|
struct _GIrParser
|
||||||
{
|
{
|
||||||
gchar **includes;
|
gchar **includes;
|
||||||
@ -282,29 +278,6 @@ locate_gir (GIrParser *parser,
|
|||||||
line_number, char_number, attribute, element); \
|
line_number, char_number, attribute, element); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static void
|
|
||||||
backtrace_stderr (void)
|
|
||||||
{
|
|
||||||
#if defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS)
|
|
||||||
void *array[50];
|
|
||||||
int size, i;
|
|
||||||
char **strings;
|
|
||||||
|
|
||||||
size = backtrace (array, 50);
|
|
||||||
strings = (char**) backtrace_symbols (array, size);
|
|
||||||
|
|
||||||
fprintf (stderr, "--- BACKTRACE (%d frames) ---\n", size);
|
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
|
||||||
fprintf (stderr, "%s\n", strings[i]);
|
|
||||||
|
|
||||||
fprintf (stderr, "--- END BACKTRACE ---\n");
|
|
||||||
|
|
||||||
free (strings);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static const gchar *
|
static const gchar *
|
||||||
find_attribute (const gchar *name,
|
find_attribute (const gchar *name,
|
||||||
const gchar **attribute_names,
|
const gchar **attribute_names,
|
||||||
@ -2857,7 +2830,6 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
g_markup_parse_context_get_position (context, &line_number, &char_number);
|
g_markup_parse_context_get_position (context, &line_number, &char_number);
|
||||||
|
|
||||||
g_printerr ("%s:%d:%d: error: %s\n", ctx->file_path, line_number, char_number, (*error)->message);
|
g_printerr ("%s:%d:%d: error: %s\n", ctx->file_path, line_number, char_number, (*error)->message);
|
||||||
backtrace_stderr ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2896,7 +2868,6 @@ require_one_of_end_elements (GMarkupParseContext *context,
|
|||||||
"Unexpected end tag '%s' on line %d char %d; current state=%d",
|
"Unexpected end tag '%s' on line %d char %d; current state=%d",
|
||||||
actual_name,
|
actual_name,
|
||||||
line_number, char_number, ctx->state);
|
line_number, char_number, ctx->state);
|
||||||
backtrace_stderr();
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user