From: Tom Tromey Date: Sun, 20 May 2018 22:15:14 +0000 (-0600) Subject: Use gdb_assert in two places in buildsym.c X-Git-Tag: users/ARM/embedded-binutils-master-2018q4~1410 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccdac490bb3b568e88626afc84017c79e2d086e7;p=thirdparty%2Fbinutils-gdb.git Use gdb_assert in two places in buildsym.c This changes buildsym.c to use gdb_assert rather than internal_error in a couple of spots. gdb/ChangeLog 2018-07-16 Tom Tromey * buildsym.c (push_subfile): Use gdb_assert. (pop_subfile): Use gdb_assert. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 04b80ebac05..d382384415a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-07-16 Tom Tromey + + * buildsym.c (push_subfile): Use gdb_assert. + (pop_subfile): Use gdb_assert. + 2018-07-16 Tom Tromey * buildsym.h (merge_symbol_lists): Remove. diff --git a/gdb/buildsym.c b/gdb/buildsym.c index d1e47c3eeef..6db07ceb4d4 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -891,11 +891,7 @@ push_subfile (void) tem->next = subfile_stack; subfile_stack = tem; - if (current_subfile == NULL || current_subfile->name == NULL) - { - internal_error (__FILE__, __LINE__, - _("failed internal consistency check")); - } + gdb_assert (current_subfile != NULL && current_subfile->name != NULL); tem->name = current_subfile->name; } @@ -905,11 +901,7 @@ pop_subfile (void) char *name; struct subfile_stack *link = subfile_stack; - if (link == NULL) - { - internal_error (__FILE__, __LINE__, - _("failed internal consistency check")); - } + gdb_assert (link != NULL); name = link->name; subfile_stack = link->next; xfree ((void *) link);